Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOLY JESUS, WHAT IS THAT? WHAT. THE. FUCK. IS. THAT. #14655

Merged
merged 1 commit into from Jan 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 12 additions & 12 deletions code/modules/mob/living/silicon/ai/life.dm
Expand Up @@ -70,14 +70,14 @@
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)

if (src:aiRestorePowerRoutine==2)
if (aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else if (src:aiRestorePowerRoutine==3)
else if (aiRestorePowerRoutine==3)
src << "Alert cancelled. Power has been restored."
src:aiRestorePowerRoutine = 0
aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else
Expand All @@ -93,8 +93,8 @@
src.see_invisible = SEE_INVISIBLE_LIVING

if (lacks_power())
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
if (aiRestorePowerRoutine==0)
aiRestorePowerRoutine = 1

src << "You've lost power!"
// world << "DEBUG CODE TIME! [loc] is the area the AI is sucking power from"
Expand All @@ -109,7 +109,7 @@
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src.aiRestorePowerRoutine = 0
aiRestorePowerRoutine = 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got this one right.

src.blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
Expand All @@ -118,7 +118,7 @@
sleep(50)
if (istype(T, /turf/space))
src << "Unable to verify! No power connection detected!"
src:aiRestorePowerRoutine = 2
aiRestorePowerRoutine = 2
return
src << "Connection verified. Searching for APC in power network."
sleep(50)
Expand All @@ -142,12 +142,12 @@
switch(PRP)
if (1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
src:aiRestorePowerRoutine = 2
aiRestorePowerRoutine = 2
return
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
aiRestorePowerRoutine = 0
src.blind.layer = 0 //This, too, is a fix to issue 603
return
switch(PRP)
Expand All @@ -163,7 +163,7 @@
apc_override = 1
theAPC.ui_interact(src, state = conscious_state)
apc_override = 0
src:aiRestorePowerRoutine = 3
aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws()
sleep(50)
Expand All @@ -183,4 +183,4 @@
if(!fire_res_on_core)
health -= getFireLoss()
diag_hud_set_status()
diag_hud_set_health()
diag_hud_set_health()