Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Data/local.ini
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,6 @@ to_zone=Use the elevator to go to the Light or Heavy Containment Zone.
contain_173=Find SCP-173 to start the containment procedure.
contain_106=Find SCP-106's containment chamber.
173_tochamber=Bring SCP-173 to it's containment chamber.
106_recall=Execute Recall Protocol RP-106-N.
106_recall=Execute Recall Protocol RP-106-N.
elec_locate=Find the Electrical Room.
elec_found=Disable the Remote Door Control System.
31 changes: 18 additions & 13 deletions SourceCode/Rooms/Electrical_Center.bb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Function FillRoom_Electrical_Center(r.Rooms)
Local d.Doors,it.Items,sc.SecurityCams
Local i,n
Expand All @@ -21,7 +20,7 @@ Function FillRoom_Electrical_Center(r.Rooms)
End Function

Function UpdateEvent_Electrical_Center(e.Events)

If PlayerRoom = e\room Then

EntityPick(Camera, 1.5)
Expand All @@ -31,6 +30,8 @@ Function UpdateEvent_Electrical_Center(e.Events)
e\EventState = Max(e\EventState,1)
PlaySound_Strict HorrorSFX[7]
PlaySound_Strict LeverSFX
EndTask(TASK_ELECLOCATE)
BeginTask(TASK_ELECFOUND)
EndIf
EndIf

Expand All @@ -47,18 +48,22 @@ Function UpdateEvent_Electrical_Center(e.Events)
SecondaryLightOn = CurveValue(0.0, SecondaryLightOn, 10.0)
EndIf

;Remote Door Control
RemoteDoorOn = UpdateLever(e\room\Levers[2]\obj)

If e\EventState > 0 And e\EventState < 200 Then
e\EventState = e\EventState + FPSfactor
RotateEntity(e\room\Levers[1]\obj, CurveValue(-80, EntityPitch(e\room\Levers[1]\obj), 5), EntityYaw(e\room\Levers[1]\obj), 0)
EndIf

EndIf

; Remote Door Control
RemoteDoorOn = UpdateLever(e\room\Levers[2]\obj)
If RemoteDoorOn Then
If e\EventState > 0 And e\EventState < 200 Then
EndTask(TASK_ELEFOUND)
e\EventState = e\EventState + FPSfactor
RotateEntity(e\room\Levers[1]\obj, CurveValue(-80, EntityPitch(e\room\Levers[1]\obj), 5), EntityYaw(e\room\Levers[1]\obj), 0)
EndIf
Else
EndTask(TASK_ELECFOUND) ; Ensure TASK_ELECFOUND is ended when RemoteDoorOn is False - drmaynard
BeginTask(TASK_CHECKPOINT) ; Now we simply go to the next task - drmynard
EndIf

EndIf
End Function

;~IDEal Editor Parameters:
;~F#1#16
;~C#Blitz3D
;~C#Blitz3D
4 changes: 2 additions & 2 deletions SourceCode/Rooms/Gate_A_Entrance.bb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Function UpdateEvent_Gate_A_Entrance(e.Events)
EndIf

If e\EventState = 3 And (Not IsStreamPlaying_Strict(IntercomStreamCHN)) Then
BeginTask(TASK_CHECKPOINT)
BeginTask(TASK_ELECLOCATE)
e\EventState = 4
ElseIf e\EventState = 4 And e\room\dist >= 25.0 Then
If SelectedDifficulty\saveType = SAVEONSCREENS Then
Expand All @@ -218,4 +218,4 @@ Function UpdateEvent_Gate_A_Entrance(e.Events)
End Function

;~IDEal Editor Parameters:
;~C#Blitz3D
;~C#Blitz3D
31 changes: 19 additions & 12 deletions SourceCode/TaskSystem.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ Const TASK_RENDER_TIME = 70*5
Const TASK_OPENINV = 0
Const TASK_CLICKKEYCARD = 1
Const TASK_OPENDOOR = 2
Const TASK_CHECKPOINT = 3
Const TASK_ELECLOCATE = 3
Const TASK_ELECFOUND = 4
Const TASK_CHECKPOINT = 5
;Checkpoint tasks (story mode)
Const TASK_FIXELEVATOR = 4
Const TASK_FIXELEVATOR = 6
;Sewers tasks (story mode)
Const TASK_FINDWEAPON = 5
Const TASK_FINDFUSE = 6
Const TASK_FINDFUSEBOX = 7
Const TASK_FINDWEAPON = 7
Const TASK_FINDFUSE = 8
Const TASK_FINDFUSEBOX = 9
;Checkpoint tasks (classic mode)
Const TASK_GOTOZONE = 8
Const TASK_CONTAIN173 = 9
Const TASK_CONTAIN106 = 10
Const TASK_173TOCHAMBER = 11
Const TASK_106RECALL = 12
Const TASK_GOTOZONE = 10
Const TASK_CONTAIN173 = 11
Const TASK_CONTAIN106 = 12
Const TASK_173TOCHAMBER = 13
Const TASK_106RECALL = 14


Type NewTask
Field ID%
Expand All @@ -32,7 +35,7 @@ Type NewTask
Field Timer#
End Type

Function BeginTask.NewTask(ID%)
Function BeginTask.NewTask(ID%)
Local t.NewTask

For t = Each NewTask
Expand Down Expand Up @@ -70,6 +73,10 @@ Function BeginTask.NewTask(ID%)
t\txt = GetLocalString("Tasks", "173_tochamber")
Case TASK_106RECALL
t\txt = GetLocalString("Tasks", "106_recall")
Case TASK_ELECLOCATE
t\txt = GetLocalString("Tasks", "elec_locate")
Case TASK_ELECFOUND
t\txt = GetLocalString("Tasks", "elec_found")
End Select
t\Timer = TASK_RENDER_TIME
t\Status = TASK_STATUS_NEW
Expand Down Expand Up @@ -243,4 +250,4 @@ Function DrawTasks()
End Function

;~IDEal Editor Parameters:
;~C#Blitz3D
;~C#Blitz3D