Fixes Examine Crashes (#17430)

* Fixes Examine Crashes

* fukken indentations
This commit is contained in:
Wowzewow (Wezzy)
2023-09-27 10:22:04 +00:00
committed by GitHub
parent 725d999680
commit fd26ff32e2
32 changed files with 147 additions and 136 deletions
+15 -16
View File
@@ -29,24 +29,23 @@
return ..()
/obj/machinery/light_construct/examine(mob/user, distance, is_adjacent)
if(distance > 2)
return
. = ..()
if(is_adjacent)
switch(stage)
if(1)
to_chat(user, SPAN_NOTICE("It's an empty frame."))
if(2)
to_chat(user, SPAN_NOTICE("It's wired."))
if(3)
to_chat(user, SPAN_NOTICE("The casing is closed."))
switch(stage)
if(1)
to_chat(user, SPAN_NOTICE("It's an empty frame."))
if(2)
to_chat(user, SPAN_NOTICE("It's wired."))
if(3)
to_chat(user, SPAN_NOTICE("The casing is closed."))
if (cell_connectors)
if (cell)
to_chat(user, SPAN_NOTICE("You see [cell] inside the casing."))
if (cell_connectors)
if (cell)
to_chat(user, SPAN_NOTICE("You see [cell] inside the casing."))
else
to_chat(user, SPAN_NOTICE("The casing has no power cell installed."))
else
to_chat(user, SPAN_NOTICE("The casing has no power cell installed."))
else
to_chat(user, SPAN_WARNING("This casing doesn't support a backup power cell."))
to_chat(user, SPAN_WARNING("This casing doesn't support a backup power cell."))
/obj/machinery/light_construct/attackby(obj/item/W, mob/living/user)
add_fingerprint(user)
+6 -6
View File
@@ -67,12 +67,12 @@
return ..()
/obj/machinery/power/portgen/examine(mob/user, distance, is_adjacent)
if(distance > 1)
return
if(active)
to_chat(user, SPAN_NOTICE("The generator is on."))
else
to_chat(user, SPAN_NOTICE("The generator is off."))
. = ..()
if(is_adjacent)
if(active)
to_chat(user, SPAN_NOTICE("The generator is on."))
else
to_chat(user, SPAN_NOTICE("The generator is off."))
/obj/machinery/power/portgen/emp_act(severity)
var/duration = 6000 //ten minutes