diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index fc735594542..df433e7f471 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -281,3 +281,9 @@ var/global/list/##LIST_NAME = list();\ #define MATRIX_Achromatomaly list(0.62, 0.32, 0.06, 0.16, 0.78, 0.06, 0.16, 0.32, 0.52) #define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80) #define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60) + +// Tool substitution defines +#define IS_SCREWDRIVER "screwdriver" +#define IS_CROWBAR "crowbar" +#define IS_WIRECUTTER "wirecutter" +#define IS_WRENCH "wrench" \ No newline at end of file diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 0bda144e8aa..e2d3dbdfd43 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -1,105 +1,152 @@ #define FORWARD -1 #define BACKWARD 1 + +// As of August 4th, 2018, these datums are only used in Mech construction. /datum/construction var/list/steps var/atom/holder var/result var/list/steps_desc - New(atom) - ..() - holder = atom - if(!holder) //don't want this without a holder - spawn - qdel(src) +/datum/construction/New(atom) + ..() + holder = atom + if(!holder) //don't want this without a holder + spawn + qdel(src) + set_desc(steps.len) + return + +/datum/construction/proc/next_step() + steps.len-- + if(!steps.len) + spawn_result() + else set_desc(steps.len) - return + return - proc/next_step() - steps.len-- - if(!steps.len) - spawn_result() - else - set_desc(steps.len) - return +/datum/construction/proc/action(var/obj/item/I,mob/user as mob) + return - proc/action(atom/used_atom,mob/user as mob) - return +/datum/construction/proc/check_step(var/obj/item/I,mob/user as mob) //check last step only + var/valid_step = is_right_key(I) + if(valid_step) + if(custom_action(valid_step, I, user)) + next_step() + return 1 + return 0 - proc/check_step(atom/used_atom,mob/user as mob) //check last step only - var/valid_step = is_right_key(used_atom) - if(valid_step) - if(custom_action(valid_step, used_atom, user)) - next_step() +/datum/construction/proc/is_right_key(var/obj/item/I) // returns current step num if I is of the right type. + var/list/L = steps[steps.len] + switch(L["key"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return steps.len + if(IS_CROWBAR) + if(I.is_crowbar()) + return steps.len + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return steps.len + if(IS_WRENCH) + if(I.is_wrench()) + return steps.len + + if(istype(I, L["key"])) + return steps.len + return 0 + +/datum/construction/proc/custom_action(step, I, user) + return 1 + +/datum/construction/proc/check_all_steps(var/obj/item/I,mob/user as mob) //check all steps, remove matching one. + for(var/i=1;i<=steps.len;i++) + var/list/L = steps[i]; + if(istype(I, L["key"])) + if(custom_action(i, I, user)) + steps[i]=null;//stupid byond list from list removal... + listclearnulls(steps); + if(!steps.len) + spawn_result() return 1 - return 0 - - proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type. - var/list/L = steps[steps.len] - if(istype(used_atom, L["key"])) - return steps.len - return 0 - - proc/custom_action(step, used_atom, user) - return 1 - - proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one. - for(var/i=1;i<=steps.len;i++) - var/list/L = steps[i]; - if(istype(used_atom, L["key"])) - if(custom_action(i, used_atom, user)) - steps[i]=null;//stupid byond list from list removal... - listclearnulls(steps); - if(!steps.len) - spawn_result() - return 1 - return 0 + return 0 - proc/spawn_result() - if(result) - new result(get_turf(holder)) - spawn() - qdel(holder) - return +/datum/construction/proc/spawn_result() + if(result) + new result(get_turf(holder)) + spawn() + qdel(holder) + return - proc/set_desc(index as num) - var/list/step = steps[index] - holder.desc = step["desc"] - return +/datum/construction/proc/set_desc(index as num) + var/list/step = steps[index] + holder.desc = step["desc"] + return + +// Reversible /datum/construction/reversible var/index - New(atom) - ..() - index = steps.len - return +/datum/construction/reversible/New(atom) + ..() + index = steps.len + return - proc/update_index(diff as num) - index+=diff - if(index==0) - spawn_result() - else - set_desc(index) - return +/datum/construction/reversible/proc/update_index(diff as num) + index+=diff + if(index==0) + spawn_result() + else + set_desc(index) + return - is_right_key(atom/used_atom) // returns index step - var/list/L = steps[index] - if(istype(used_atom, L["key"])) - return FORWARD //to the first step -> forward - else if(L["backkey"] && istype(used_atom, L["backkey"])) - return BACKWARD //to the last step -> backwards - return 0 +/datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step + var/list/L = steps[index] - check_step(atom/used_atom,mob/user as mob) - var/diff = is_right_key(used_atom) - if(diff) - if(custom_action(index, diff, used_atom, user)) - update_index(diff) - return 1 - return 0 + switch(L["key"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return FORWARD + if(IS_CROWBAR) + if(I.is_crowbar()) + return FORWARD + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return FORWARD + if(IS_WRENCH) + if(I.is_wrench()) + return FORWARD - custom_action(index, diff, used_atom, user) - return 1 \ No newline at end of file + switch(L["backkey"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return BACKWARD + if(IS_CROWBAR) + if(I.is_crowbar()) + return BACKWARD + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return BACKWARD + if(IS_WRENCH) + if(I.is_wrench()) + return BACKWARD + + if(istype(I, L["key"])) + return FORWARD //to the first step -> forward + else if(L["backkey"] && istype(I, L["backkey"])) + return BACKWARD //to the last step -> backwards + return 0 + +/datum/construction/reversible/check_step(var/obj/item/I,mob/user as mob) + var/diff = is_right_key(I) + if(diff) + if(custom_action(index, diff, I, user)) + update_index(diff) + return 1 + return 0 + +/datum/construction/reversible/custom_action(index, diff, I, user) + return 1 \ No newline at end of file diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 8bc873aa9bb..ce5b751e556 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -66,7 +66,9 @@ S.use(5) return 1 - +////////////////////// +// Ripley +////////////////////// /datum/construction/mecha/ripley_chassis steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso),//1 list("key"=/obj/item/mecha_parts/part/ripley_left_arm),//2 @@ -75,25 +77,25 @@ list("key"=/obj/item/mecha_parts/part/ripley_right_leg)//5 ) - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - qdel(I) - return 1 +/datum/construction/mecha/ripley_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) +/datum/construction/mecha/ripley_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/ripley(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "ripley0" - const_holder.density = 1 - const_holder.overlays.len = 0 - spawn() - qdel(src) - return +/datum/construction/mecha/ripley_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/ripley(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "ripley0" + const_holder.density = 1 + const_holder.overlays.len = 0 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/ripley @@ -101,11 +103,11 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/stack/material/plasteel, @@ -113,170 +115,171 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //7 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //8 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //9 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //10 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //11 - list("key"=/obj/item/weapon/tool/wirecutters, - "backkey"=/obj/item/weapon/tool/screwdriver, + list("key"=IS_WIRECUTTER, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //12 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //13 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //14 - list("key"=/obj/item/weapon/tool/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(obj/item/I,mob/user as mob) - return check_step(I,user) +/datum/construction/reversible/mecha/ripley/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, obj/item/I, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/ripley/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(14) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(14) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "ripley1" + if(13) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "ripley2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "ripley0" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "ripley3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "ripley1" - if(13) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "ripley2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "ripley0" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "ripley3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "ripley1" - if(11) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "ripley4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "ripley2" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(I) - holder.icon_state = "ripley5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "ripley3" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "ripley6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) - holder.icon_state = "ripley4" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(I) - holder.icon_state = "ripley7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "ripley5" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "ripley8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) - holder.icon_state = "ripley6" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "ripley9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "ripley7" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "ripley10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "ripley8" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "ripley11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "ripley9" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") - holder.icon_state = "ripley12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "ripley10" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "ripley13" - else - user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "ripley11" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "ripley12" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_ripley_created",1) - return - + if(11) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "ripley4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "ripley2" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "ripley5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "ripley3" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "ripley6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) + holder.icon_state = "ripley4" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "ripley7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "ripley5" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "ripley8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) + holder.icon_state = "ripley6" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "ripley9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "ripley7" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "ripley10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "ripley8" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "ripley11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "ripley9" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "ripley12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "ripley10" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "ripley13" + else + user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "ripley11" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "ripley12" + return 1 +/datum/construction/reversible/mecha/ripley/spawn_result() + ..() + feedback_inc("mecha_ripley_created",1) + return +////////////////////// +// Gygax +////////////////////// /datum/construction/mecha/gygax_chassis steps = list(list("key"=/obj/item/mecha_parts/part/gygax_torso),//1 list("key"=/obj/item/mecha_parts/part/gygax_left_arm),//2 @@ -286,24 +289,24 @@ list("key"=/obj/item/mecha_parts/part/gygax_head) ) - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - qdel(I) - return 1 +/datum/construction/mecha/gygax_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) +/datum/construction/mecha/gygax_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/gygax(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "gygax0" - const_holder.density = 1 - spawn() - qdel(src) - return +/datum/construction/mecha/gygax_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/gygax(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "gygax0" + const_holder.density = 1 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/gygax @@ -311,11 +314,11 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/mecha_parts/part/gygax_armour, @@ -323,240 +326,243 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced capacitor is secured"), //7 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced capacitor is installed"), //8 list("key"=/obj/item/weapon/stock_parts/capacitor/adv, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced scanner module is secured"), //9 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced scanner module is installed"), //10 list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Targeting module is secured"), //11 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Targeting module is installed"), //12 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/targeting, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //13 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //14 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //15 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //16 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //17 list("key"=/obj/item/weapon/tool/wirecutters, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //18 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //19 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //20 - list("key"=/obj/item/weapon/tool/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(obj/item/I,mob/user as mob) - return check_step(I,user) +/datum/construction/reversible/mecha/gygax/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, obj/item/I, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/gygax/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(20) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(20) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "gygax1" + if(19) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "gygax2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "gygax0" + if(18) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "gygax3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "gygax1" - if(19) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "gygax2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "gygax0" - if(18) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "gygax3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "gygax1" - if(17) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "gygax4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "gygax2" - if(16) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(I) - holder.icon_state = "gygax5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "gygax3" - if(15) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "gygax6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/main(get_turf(holder)) - holder.icon_state = "gygax4" - if(14) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(I) - holder.icon_state = "gygax7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "gygax5" - if(13) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "gygax8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/peripherals(get_turf(holder)) - holder.icon_state = "gygax6" - if(12) - if(diff==FORWARD) - user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") - qdel(I) - holder.icon_state = "gygax9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "gygax7" - if(11) - if(diff==FORWARD) - user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") - holder.icon_state = "gygax10" - else - user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/targeting(get_turf(holder)) - holder.icon_state = "gygax8" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") - qdel(I) - holder.icon_state = "gygax11" - else - user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") - holder.icon_state = "gygax9" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") - holder.icon_state = "gygax12" - else - user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") - new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) - holder.icon_state = "gygax10" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") - qdel(I) - holder.icon_state = "gygax13" - else - user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") - holder.icon_state = "gygax11" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") - holder.icon_state = "gygax14" - else - user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") - new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) - holder.icon_state = "gygax12" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "gygax15" - else - user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") - holder.icon_state = "gygax13" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "gygax16" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "gygax14" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "gygax17" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "gygax15" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs Gygax Armour Plates to [holder].", "You install Gygax Armour Plates to [holder].") - qdel(I) - holder.icon_state = "gygax18" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "gygax16" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures Gygax Armour Plates.", "You secure Gygax Armour Plates.") - holder.icon_state = "gygax19" - else - user.visible_message("[user] pries Gygax Armour Plates from [holder].", "You prie Gygax Armour Plates from [holder].") - new /obj/item/mecha_parts/part/gygax_armour(get_turf(holder)) - holder.icon_state = "gygax17" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds Gygax Armour Plates to [holder].", "You weld Gygax Armour Plates to [holder].") - else - user.visible_message("[user] unfastens Gygax Armour Plates.", "You unfasten Gygax Armour Plates.") - holder.icon_state = "gygax18" - return 1 + if(17) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "gygax4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "gygax2" + if(16) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "gygax5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "gygax3" + if(15) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "gygax6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/main(get_turf(holder)) + holder.icon_state = "gygax4" + if(14) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "gygax7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "gygax5" + if(13) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "gygax8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/peripherals(get_turf(holder)) + holder.icon_state = "gygax6" + if(12) + if(diff==FORWARD) + user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") + qdel(I) + holder.icon_state = "gygax9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "gygax7" + if(11) + if(diff==FORWARD) + user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") + holder.icon_state = "gygax10" + else + user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/targeting(get_turf(holder)) + holder.icon_state = "gygax8" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") + qdel(I) + holder.icon_state = "gygax11" + else + user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") + holder.icon_state = "gygax9" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") + holder.icon_state = "gygax12" + else + user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") + new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) + holder.icon_state = "gygax10" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") + qdel(I) + holder.icon_state = "gygax13" + else + user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") + holder.icon_state = "gygax11" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") + holder.icon_state = "gygax14" + else + user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") + new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) + holder.icon_state = "gygax12" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "gygax15" + else + user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") + holder.icon_state = "gygax13" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "gygax16" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "gygax14" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "gygax17" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "gygax15" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs Gygax Armour Plates to [holder].", "You install Gygax Armour Plates to [holder].") + qdel(I) + holder.icon_state = "gygax18" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "gygax16" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures Gygax Armour Plates.", "You secure Gygax Armour Plates.") + holder.icon_state = "gygax19" + else + user.visible_message("[user] pries Gygax Armour Plates from [holder].", "You prie Gygax Armour Plates from [holder].") + new /obj/item/mecha_parts/part/gygax_armour(get_turf(holder)) + holder.icon_state = "gygax17" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds Gygax Armour Plates to [holder].", "You weld Gygax Armour Plates to [holder].") + else + user.visible_message("[user] unfastens Gygax Armour Plates.", "You unfasten Gygax Armour Plates.") + holder.icon_state = "gygax18" + return 1 - spawn_result() - ..() - feedback_inc("mecha_gygax_created",1) - return +/datum/construction/reversible/mecha/gygax/spawn_result() + ..() + feedback_inc("mecha_gygax_created",1) + return +//////////////////////// +// Firfighter +//////////////////////// /datum/construction/mecha/firefighter_chassis steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso),//1 list("key"=/obj/item/mecha_parts/part/ripley_left_arm),//2 @@ -566,25 +572,25 @@ list("key"=/obj/item/clothing/suit/fire)//6 ) - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - user.drop_item() - qdel(I) - return 1 +/datum/construction/mecha/firefighter_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + user.drop_item() + qdel(I) + return 1 - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) +/datum/construction/mecha/firefighter_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/firefighter(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "fireripley0" - const_holder.density = 1 - spawn() - qdel(src) - return +/datum/construction/mecha/firefighter_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/firefighter(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "fireripley0" + const_holder.density = 1 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/firefighter @@ -592,15 +598,15 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/tool/crowbar, + "backkey"=IS_CROWBAR, "desc"="External armor is being installed."), //4 list("key"=/obj/item/stack/material/plasteel, @@ -608,179 +614,180 @@ "desc"="Internal armor is welded."), //5 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //6 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), - //7 list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //8 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //9 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //10 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //11 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //12 list("key"=/obj/item/weapon/tool/wirecutters, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //13 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //14 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //15 - list("key"=/obj/item/weapon/tool/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(obj/item/I,mob/user as mob) - return check_step(I,user) +/datum/construction/reversible/mecha/firefighter/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, obj/item/I, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/firefighter/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(15) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(15) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "fireripley1" + if(14) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "fireripley2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "fireripley0" + if(13) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "fireripley3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "fireripley1" - if(14) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "fireripley2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "fireripley0" - if(13) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "fireripley3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "fireripley1" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "fireripley4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "fireripley2" - if(11) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(I) - holder.icon_state = "fireripley5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "fireripley3" - if(10) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "fireripley6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) - holder.icon_state = "fireripley4" - if(9) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(I) - holder.icon_state = "fireripley7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "fireripley5" - if(8) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "fireripley8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) - holder.icon_state = "fireripley6" - if(7) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "fireripley9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "fireripley7" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "fireripley4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "fireripley2" + if(11) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "fireripley5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "fireripley3" + if(10) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "fireripley6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) + holder.icon_state = "fireripley4" + if(9) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "fireripley7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "fireripley5" + if(8) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "fireripley8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) + holder.icon_state = "fireripley6" + if(7) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "fireripley9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "fireripley7" + if(6) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "fireripley10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley8" + if(5) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "fireripley11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "fireripley9" + if(4) + if(diff==FORWARD) + user.visible_message("[user] starts to install the external armor layer to [holder].", "You start to install the external armor layer to [holder].") + holder.icon_state = "fireripley12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "fireripley10" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "fireripley13" + else + user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley11" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "fireripley14" + else + user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley12" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "fireripley13" + return 1 - if(6) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "fireripley10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley8" - if(5) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "fireripley11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "fireripley9" - if(4) - if(diff==FORWARD) - user.visible_message("[user] starts to install the external armor layer to [holder].", "You start to install the external armor layer to [holder].") - holder.icon_state = "fireripley12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "fireripley10" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") - holder.icon_state = "fireripley13" - else - user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley11" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "fireripley14" - else - user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley12" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "fireripley13" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_firefighter_created",1) - return +/datum/construction/reversible/mecha/firefighter/spawn_result() + ..() + feedback_inc("mecha_firefighter_created",1) + return +////////////////////// +// Durand +////////////////////// /datum/construction/mecha/durand_chassis steps = list(list("key"=/obj/item/mecha_parts/part/durand_torso),//1 list("key"=/obj/item/mecha_parts/part/durand_left_arm),//2 @@ -790,35 +797,36 @@ list("key"=/obj/item/mecha_parts/part/durand_head) ) - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - qdel(I) - return 1 +/datum/construction/mecha/durand_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) +/datum/construction/mecha/durand_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) + +/datum/construction/mecha/durand_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/durand(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "durand0" + const_holder.density = 1 + spawn() + qdel(src) + return - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/durand(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "durand0" - const_holder.density = 1 - spawn() - qdel(src) - return /datum/construction/reversible/mecha/durand result = "/obj/mecha/combat/durand" steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/mecha_parts/part/durand_armour, @@ -826,242 +834,456 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced capacitor is secured"), //7 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced capacitor is installed"), //8 list("key"=/obj/item/weapon/stock_parts/capacitor/adv, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced scanner module is secured"), //9 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced scanner module is installed"), //10 list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Targeting module is secured"), //11 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Targeting module is installed"), //12 list("key"=/obj/item/weapon/circuitboard/mecha/durand/targeting, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //13 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //14 list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //15 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //16 list("key"=/obj/item/weapon/circuitboard/mecha/durand/main, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //17 list("key"=/obj/item/weapon/tool/wirecutters, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //18 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/tool/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //19 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //20 - list("key"=/obj/item/weapon/tool/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(obj/item/I,mob/user as mob) - return check_step(I,user) +/datum/construction/reversible/mecha/durand/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, obj/item/I, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/durand/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(20) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(20) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "durand1" + if(19) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "durand2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "durand0" + if(18) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "durand3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "durand1" - if(19) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "durand2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "durand0" - if(18) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "durand3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "durand1" - if(17) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "durand4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "durand2" - if(16) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(I) - holder.icon_state = "durand5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "durand3" - if(15) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "durand6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/main(get_turf(holder)) - holder.icon_state = "durand4" - if(14) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(I) - holder.icon_state = "durand7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "durand5" - if(13) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "durand8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/peripherals(get_turf(holder)) - holder.icon_state = "durand6" - if(12) - if(diff==FORWARD) - user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") - qdel(I) - holder.icon_state = "durand9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "durand7" - if(11) - if(diff==FORWARD) - user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") - holder.icon_state = "durand10" - else - user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/targeting(get_turf(holder)) - holder.icon_state = "durand8" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") - qdel(I) - holder.icon_state = "durand11" - else - user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") - holder.icon_state = "durand9" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") - holder.icon_state = "durand12" - else - user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") - new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) - holder.icon_state = "durand10" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") - qdel(I) - holder.icon_state = "durand13" - else - user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") - holder.icon_state = "durand11" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") - holder.icon_state = "durand14" - else - user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") - new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) - holder.icon_state = "durand12" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "durand15" - else - user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") - holder.icon_state = "durand13" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "durand16" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "durand14" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "durand17" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "durand15" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].") - qdel(I) - holder.icon_state = "durand18" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "durand16" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures Durand Armour Plates.", "You secure Durand Armour Plates.") - holder.icon_state = "durand19" - else - user.visible_message("[user] pries Durand Armour Plates from [holder].", "You prie Durand Armour Plates from [holder].") - new /obj/item/mecha_parts/part/durand_armour(get_turf(holder)) - holder.icon_state = "durand17" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds Durand Armour Plates to [holder].", "You weld Durand Armour Plates to [holder].") - else - user.visible_message("[user] unfastens Durand Armour Plates.", "You unfasten Durand Armour Plates.") - holder.icon_state = "durand18" - return 1 + if(17) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "durand4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "durand2" + if(16) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "durand5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "durand3" + if(15) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "durand6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/main(get_turf(holder)) + holder.icon_state = "durand4" + if(14) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "durand7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "durand5" + if(13) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "durand8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/peripherals(get_turf(holder)) + holder.icon_state = "durand6" + if(12) + if(diff==FORWARD) + user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") + qdel(I) + holder.icon_state = "durand9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "durand7" + if(11) + if(diff==FORWARD) + user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") + holder.icon_state = "durand10" + else + user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/targeting(get_turf(holder)) + holder.icon_state = "durand8" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") + qdel(I) + holder.icon_state = "durand11" + else + user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") + holder.icon_state = "durand9" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") + holder.icon_state = "durand12" + else + user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") + new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) + holder.icon_state = "durand10" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") + qdel(I) + holder.icon_state = "durand13" + else + user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") + holder.icon_state = "durand11" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") + holder.icon_state = "durand14" + else + user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") + new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) + holder.icon_state = "durand12" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "durand15" + else + user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") + holder.icon_state = "durand13" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "durand16" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "durand14" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "durand17" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "durand15" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].") + qdel(I) + holder.icon_state = "durand18" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "durand16" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures Durand Armour Plates.", "You secure Durand Armour Plates.") + holder.icon_state = "durand19" + else + user.visible_message("[user] pries Durand Armour Plates from [holder].", "You prie Durand Armour Plates from [holder].") + new /obj/item/mecha_parts/part/durand_armour(get_turf(holder)) + holder.icon_state = "durand17" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds Durand Armour Plates to [holder].", "You weld Durand Armour Plates to [holder].") + else + user.visible_message("[user] unfastens Durand Armour Plates.", "You unfasten Durand Armour Plates.") + holder.icon_state = "durand18" + return 1 - spawn_result() - ..() - feedback_inc("mecha_durand_created",1) - return +/datum/construction/reversible/mecha/durand/spawn_result() + ..() + feedback_inc("mecha_durand_created",1) + return + +//////////////////////// +// Odysseus +//////////////////////// +/datum/construction/mecha/odysseus_chassis + steps = list(list("key"=/obj/item/mecha_parts/part/odysseus_torso),//1 + list("key"=/obj/item/mecha_parts/part/odysseus_head),//2 + list("key"=/obj/item/mecha_parts/part/odysseus_left_arm),//3 + list("key"=/obj/item/mecha_parts/part/odysseus_right_arm),//4 + list("key"=/obj/item/mecha_parts/part/odysseus_left_leg),//5 + list("key"=/obj/item/mecha_parts/part/odysseus_right_leg)//6 + ) + +/datum/construction/mecha/odysseus_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 + +/datum/construction/mecha/odysseus_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) + +/datum/construction/mecha/odysseus_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/odysseus(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "odysseus0" + const_holder.density = 1 + spawn() + qdel(src) + return +/datum/construction/reversible/mecha/odysseus + result = "/obj/mecha/medical/odysseus" + steps = list( + //1 + list("key"=/obj/item/weapon/weldingtool, + "backkey"=IS_WRENCH, + "desc"="External armor is wrenched."), + //2 + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, + "desc"="External armor is installed."), + //3 + list("key"=/obj/item/stack/material/plasteel, + "backkey"=/obj/item/weapon/weldingtool, + "desc"="Internal armor is welded."), + //4 + list("key"=/obj/item/weapon/weldingtool, + "backkey"=IS_WRENCH, + "desc"="Internal armor is wrenched"), + //5 + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, + "desc"="Internal armor is installed"), + //6 + list("key"=/obj/item/stack/material/steel, + "backkey"=IS_SCREWDRIVER, + "desc"="Peripherals control module is secured"), + //7 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, + "desc"="Peripherals control module is installed"), + //8 + list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, + "backkey"=IS_SCREWDRIVER, + "desc"="Central control module is secured"), + //9 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, + "desc"="Central control module is installed"), + //10 + list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main, + "backkey"=IS_SCREWDRIVER, + "desc"="The wiring is adjusted"), + //11 + list("key"=/obj/item/weapon/tool/wirecutters, + "backkey"=IS_SCREWDRIVER, + "desc"="The wiring is added"), + //12 + list("key"=/obj/item/stack/cable_coil, + "backkey"=IS_SCREWDRIVER, + "desc"="The hydraulic systems are active."), + //13 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, + "desc"="The hydraulic systems are connected."), + //14 + list("key"=IS_WRENCH, + "desc"="The hydraulic systems are disconnected.") + ) + +/datum/construction/reversible/mecha/odysseus/action(obj/item/I,mob/user as mob) + return check_step(I,user) + +/datum/construction/reversible/mecha/odysseus/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 + + //TODO: better messages. + switch(index) + if(14) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "odysseus1" + if(13) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "odysseus2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "odysseus0" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "odysseus3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") + holder.icon_state = "odysseus1" + if(11) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "odysseus4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "odysseus2" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "odysseus5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "odysseus3" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "odysseus6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/odysseus/main(get_turf(holder)) + holder.icon_state = "odysseus4" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "odysseus7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "odysseus5" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "odysseus8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/odysseus/peripherals(get_turf(holder)) + holder.icon_state = "odysseus6" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "odysseus9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "odysseus7" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "odysseus10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "odysseus8" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "odysseus11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "odysseus9" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs [I] layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "odysseus12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "odysseus10" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "odysseus13" + else + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + user.visible_message("[user] pries [MS] from [holder].", "You prie [MS] from [holder].") + holder.icon_state = "odysseus11" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + holder.icon_state = "odysseus14" + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "odysseus12" + return 1 + +/datum/construction/reversible/mecha/odysseus/spawn_result() + ..() + feedback_inc("mecha_odysseus_created",1) + return + +////////////////////// +// Phazon +////////////////////// /datum/construction/mecha/phazon_chassis result = "/obj/mecha/combat/phazon" steps = list(list("key"=/obj/item/mecha_parts/part/phazon_torso),//1 @@ -1072,224 +1294,11 @@ list("key"=/obj/item/mecha_parts/part/phazon_head) ) - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - qdel(I) - return 1 +/datum/construction/mecha/phazon_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) - - - - -/datum/construction/mecha/odysseus_chassis - steps = list(list("key"=/obj/item/mecha_parts/part/odysseus_torso),//1 - list("key"=/obj/item/mecha_parts/part/odysseus_head),//2 - list("key"=/obj/item/mecha_parts/part/odysseus_left_arm),//3 - list("key"=/obj/item/mecha_parts/part/odysseus_right_arm),//4 - list("key"=/obj/item/mecha_parts/part/odysseus_left_leg),//5 - list("key"=/obj/item/mecha_parts/part/odysseus_right_leg)//6 - ) - - custom_action(step, obj/item/I, mob/user) - user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") - holder.overlays += I.icon_state+"+o" - qdel(I) - return 1 - - action(obj/item/I,mob/user as mob) - return check_all_steps(I,user) - - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/odysseus(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "odysseus0" - const_holder.density = 1 - spawn() - qdel(src) - return - - -/datum/construction/reversible/mecha/odysseus - result = "/obj/mecha/medical/odysseus" - steps = list( - //1 - list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, - "desc"="External armor is wrenched."), - //2 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, - "desc"="External armor is installed."), - //3 - list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/weldingtool, - "desc"="Internal armor is welded."), - //4 - list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/tool/wrench, - "desc"="Internal armor is wrenched"), - //5 - list("key"=/obj/item/weapon/tool/wrench, - "backkey"=/obj/item/weapon/tool/crowbar, - "desc"="Internal armor is installed"), - //6 - list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/tool/screwdriver, - "desc"="Peripherals control module is secured"), - //7 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, - "desc"="Peripherals control module is installed"), - //8 - list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, - "backkey"=/obj/item/weapon/tool/screwdriver, - "desc"="Central control module is secured"), - //9 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/crowbar, - "desc"="Central control module is installed"), - //10 - list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main, - "backkey"=/obj/item/weapon/tool/screwdriver, - "desc"="The wiring is adjusted"), - //11 - list("key"=/obj/item/weapon/tool/wirecutters, - "backkey"=/obj/item/weapon/tool/screwdriver, - "desc"="The wiring is added"), - //12 - list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/tool/screwdriver, - "desc"="The hydraulic systems are active."), - //13 - list("key"=/obj/item/weapon/tool/screwdriver, - "backkey"=/obj/item/weapon/tool/wrench, - "desc"="The hydraulic systems are connected."), - //14 - list("key"=/obj/item/weapon/tool/wrench, - "desc"="The hydraulic systems are disconnected.") - ) - - action(obj/item/I,mob/user as mob) - return check_step(I,user) - - custom_action(index, diff, obj/item/I, mob/user) - if(!..()) - return 0 - - //TODO: better messages. - switch(index) - if(14) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") - holder.icon_state = "odysseus1" - if(13) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "odysseus2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "odysseus0" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "odysseus3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "odysseus1" - if(11) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "odysseus4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "odysseus2" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(I) - holder.icon_state = "odysseus5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "odysseus3" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "odysseus6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/odysseus/main(get_turf(holder)) - holder.icon_state = "odysseus4" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(I) - holder.icon_state = "odysseus7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "odysseus5" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "odysseus8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/odysseus/peripherals(get_turf(holder)) - holder.icon_state = "odysseus6" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "odysseus9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "odysseus7" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "odysseus10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "odysseus8" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "odysseus11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "odysseus9" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs [I] layer to [holder].", "You install external reinforced armor layer to [holder].") - - holder.icon_state = "odysseus12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "odysseus10" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "odysseus13" - else - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - user.visible_message("[user] pries [MS] from [holder].", "You prie [MS] from [holder].") - holder.icon_state = "odysseus11" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - holder.icon_state = "odysseus14" - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "odysseus12" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_odysseus_created",1) - return +/datum/construction/mecha/phazon_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) \ No newline at end of file diff --git a/code/modules/surgery/_defines.dm b/code/modules/surgery/_defines.dm index b7a8918f5cc..a76fb4e9709 100644 --- a/code/modules/surgery/_defines.dm +++ b/code/modules/surgery/_defines.dm @@ -1,6 +1 @@ -#define SURGERY_FAILURE -1 - -#define IS_SCREWDRIVER "screwdriver" -#define IS_CROWBAR "crowbar" -#define IS_WIRECUTTER "wirecutter" -#define IS_WRENCH "wrench" \ No newline at end of file +#define SURGERY_FAILURE -1 \ No newline at end of file diff --git a/code/modules/surgery/~defines.dm b/code/modules/surgery/~defines.dm index 144539530eb..61f9b143f28 100644 --- a/code/modules/surgery/~defines.dm +++ b/code/modules/surgery/~defines.dm @@ -1,6 +1 @@ -#undef SURGERY_FAILURE - -#undef IS_SCREWDRIVER -#undef IS_CROWBAR -#undef IS_WIRECUTTER -#undef IS_WRENCH \ No newline at end of file +#undef SURGERY_FAILURE \ No newline at end of file