From 7bd73f6e1d604e50f2d09d91cf211454779773e2 Mon Sep 17 00:00:00 2001 From: kevinz000 Date: Mon, 9 Oct 2017 17:04:15 -0700 Subject: [PATCH] Update mecha_construction_paths.dm (#31446) --- code/game/mecha/mecha_construction_paths.dm | 78 +++++++++------------ 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 27aeea4c09..d8f435190f 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -8,7 +8,7 @@ if (W.remove_fuel(0, user)) playsound(holder, 'sound/items/welder2.ogg', 50, 1) else - return 0 + return FALSE else if(istype(used_atom, /obj/item/wrench)) var/obj/item/W = used_atom playsound(holder, W.usesound, 50, 1) @@ -27,15 +27,15 @@ playsound(holder, 'sound/items/deconstruct.ogg', 50, 1) else to_chat(user, ("There's not enough cable to finish the task!")) - return 0 + return FALSE else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom if(S.get_amount() < 5) to_chat(user, ("There's not enough material in this stack!")) - return 0 + return FALSE else S.use(5) - return 1 + return TRUE /datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user) if(istype(used_atom, /obj/item/weldingtool)) @@ -43,7 +43,7 @@ if (W.remove_fuel(0, user)) playsound(holder, 'sound/items/welder2.ogg', 50, 1) else - return 0 + return FALSE else if(istype(used_atom, /obj/item/wrench)) var/obj/item/W = used_atom playsound(holder, W.usesound, 50, 1) @@ -62,15 +62,15 @@ playsound(holder, 'sound/items/deconstruct.ogg', 50, 1) else to_chat(user, ("There's not enough cable to finish the task!")) - return 0 + return FALSE else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom if(S.get_amount() < 5) to_chat(user, ("There's not enough material in this stack!")) - return 0 + return FALSE else S.use(5) - return 1 + return TRUE /datum/construction/mecha/ripley_chassis @@ -85,7 +85,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/ripley_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -98,8 +98,6 @@ const_holder.density = TRUE const_holder.cut_overlays(TRUE) qdel(src) - return - /datum/construction/reversible/mecha/ripley result = /obj/mecha/working/ripley @@ -178,7 +176,7 @@ /datum/construction/reversible/mecha/ripley/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -304,7 +302,7 @@ else user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") holder.icon_state = "ripley14" - return 1 + return TRUE /datum/construction/reversible/mecha/ripley/spawn_mecha_result() ..() @@ -326,7 +324,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/gygax_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -338,8 +336,6 @@ const_holder.icon_state = "gygax0" const_holder.density = TRUE qdel(src) - return - /datum/construction/reversible/mecha/gygax result = /obj/mecha/combat/gygax @@ -441,7 +437,7 @@ /datum/construction/reversible/mecha/gygax/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -619,7 +615,7 @@ else user.visible_message("[user] unfastens Gygax Armor Plates.", "You unfasten Gygax Armor Plates.") holder.icon_state = "gygax20" - return 1 + return TRUE /datum/construction/reversible/mecha/gygax/spawn_mecha_result() ..() @@ -639,7 +635,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/firefighter_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -651,7 +647,6 @@ const_holder.icon_state = "fireripley0" const_holder.density = TRUE qdel(src) - return /datum/construction/reversible/mecha/firefighter @@ -734,7 +729,7 @@ /datum/construction/reversible/mecha/firefighter/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -869,7 +864,7 @@ else user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") holder.icon_state = "fireripley15" - return 1 + return TRUE /datum/construction/reversible/mecha/firefighter/spawn_mecha_result() ..() @@ -894,15 +889,13 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/honker_chassis/spawn_result() var/obj/item/mecha_parts/chassis/const_holder = holder const_holder.construct = new /datum/construction/mecha/honker(const_holder) const_holder.density = TRUE qdel(src) - return - /datum/construction/mecha/honker result = /obj/mecha/combat/honker @@ -928,7 +921,7 @@ /datum/construction/mecha/honker/custom_action(step, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE if(istype(used_atom, /obj/item/bikehorn)) playsound(holder, 'sound/items/bikehorn.ogg', 50, 1) @@ -958,12 +951,11 @@ if(3) user.visible_message("[user] puts clown boots on the [holder].", "You put clown boots on the [holder].") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/honker/spawn_mecha_result() ..() SSblackbox.inc("mecha_honker_created",1) - return /datum/construction/mecha/durand_chassis steps = list(list("key"=/obj/item/mecha_parts/part/durand_torso), //1 @@ -978,7 +970,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder]") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/durand_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -989,8 +981,7 @@ const_holder.icon = 'icons/mecha/mech_construction.dmi' const_holder.icon_state = "durand0" const_holder.density = TRUE - del src - return + qdel(src) /datum/construction/reversible/mecha/durand result = /obj/mecha/combat/durand @@ -1093,7 +1084,7 @@ /datum/construction/reversible/mecha/durand/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -1271,12 +1262,11 @@ else user.visible_message("[user] unfastens Durand Armor Plates.", "You unfasten Durand Armor Plates.") holder.icon_state = "durand20" - return 1 + return TRUE /datum/construction/reversible/mecha/durand/spawn_mecha_result() ..() SSblackbox.inc("mecha_durand_created",1) - return //PHAZON @@ -1293,7 +1283,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/phazon_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -1304,8 +1294,7 @@ const_holder.icon = 'icons/mecha/mech_construction.dmi' const_holder.icon_state = "phazon0" const_holder.density = TRUE - del src - return + qdel(src) /datum/construction/reversible/mecha/phazon result = /obj/mecha/combat/phazon @@ -1424,7 +1413,7 @@ /datum/construction/reversible/mecha/phazon/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -1629,12 +1618,11 @@ user.visible_message("[user] carefully inserts the anomaly core into \the [holder] and secures it.", "You slowly place the anomaly core into its socket and close its chamber.") qdel(used_atom) spawn_mecha_result() - return 1 + return TRUE /datum/construction/reversible/mecha/phazon/spawn_mecha_result() ..() SSblackbox.inc("mecha_phazon_created",1) - return //ODYSSEUS @@ -1651,7 +1639,7 @@ user.visible_message("[user] has connected [used_atom] to the [holder].", "You connect [used_atom] to the [holder].") holder.add_overlay(used_atom.icon_state+"+o") qdel(used_atom) - return 1 + return TRUE /datum/construction/mecha/odysseus_chassis/action(atom/used_atom,mob/user) return check_all_steps(used_atom,user) @@ -1662,8 +1650,7 @@ const_holder.icon = 'icons/mecha/mech_construction.dmi' const_holder.icon_state = "odysseus0" const_holder.density = TRUE - del src - return + qdel(src) /datum/construction/reversible/mecha/odysseus @@ -1742,7 +1729,7 @@ /datum/construction/reversible/mecha/odysseus/custom_action(index, diff, atom/used_atom, mob/user) if(!..()) - return 0 + return FALSE //TODO: better messages. switch(index) @@ -1869,9 +1856,8 @@ else user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") holder.icon_state = "odysseus14" - return 1 + return TRUE /datum/construction/reversible/mecha/odysseus/spawn_mecha_result() ..() SSblackbox.inc("mecha_odysseus_created",1) - return