diff --git a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm index 53e5b229578..778809373dc 100644 --- a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm +++ b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm @@ -89,7 +89,7 @@ /turf/open/floor/mineral/titanium/yellow/airless, /area/ruin/space/has_grav/powered/mechtransport) "x" = ( -/obj/structure/mecha_wreckage/ripley/firefighter, +/obj/structure/mecha_wreckage/clarke, /turf/open/floor/mineral/titanium/yellow/airless, /area/ruin/space/has_grav/powered/mechtransport) "y" = ( diff --git a/_maps/RandomZLevels/spacebattle.dmm b/_maps/RandomZLevels/spacebattle.dmm index d2d511fc287..17826ee8e9f 100644 --- a/_maps/RandomZLevels/spacebattle.dmm +++ b/_maps/RandomZLevels/spacebattle.dmm @@ -819,7 +819,7 @@ /turf/open/floor/plating, /area/awaymission/spacebattle/cruiser) "dL" = ( -/obj/mecha/working/ripley/firefighter{ +/obj/mecha/working/clarke{ ruin_mecha = 1 }, /turf/open/floor/plating, diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 6790607b466..5dde9f02171 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -21,6 +21,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( /obj/item/toy/prize/odysseus = 1, /obj/item/toy/prize/phazon = 1, /obj/item/toy/prize/reticence = 1, + /obj/item/toy/prize/clarke = 1, /obj/item/toy/cards/deck = 2, /obj/item/toy/nuke = 2, /obj/item/toy/minimeteor = 2, diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 7ac11a09af7..9feb2e8a3e6 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -24,8 +24,8 @@ var/list/part_sets = list( "Cyborg", "Ripley", - "Firefighter", "Odysseus", + "Clarke", "Gygax", "Durand", "H.O.N.K", diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 3d845303bfb..dc964eb6d14 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -3,7 +3,7 @@ desc = "Exosuit" icon = 'icons/mecha/mecha.dmi' density = TRUE //Dense. To raise the heat. - opacity = 1 ///opaque. Menacing. + opacity = TRUE //opaque. Menacing. move_force = MOVE_FORCE_VERY_STRONG move_resist = MOVE_FORCE_EXTREMELY_STRONG resistance_flags = FIRE_PROOF | ACID_PROOF @@ -25,9 +25,12 @@ armor = list("melee" = 20, "bullet" = 10, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5) var/equipment_disabled = 0 //disabled due to EMP - var/obj/item/stock_parts/cell/cell ///Keeps track of the mech's cell - var/obj/item/stock_parts/scanning_module/scanmod ///Keeps track of the mech's scanning module - var/obj/item/stock_parts/capacitor/capacitor ///Keeps track of the mech's capacitor + /// Keeps track of the mech's cell + var/obj/item/stock_parts/cell/cell + /// Keeps track of the mech's scanning module + var/obj/item/stock_parts/scanning_module/scanmod + /// Keeps track of the mech's capacitor + var/obj/item/stock_parts/capacitor/capacitor var/construction_state = MECHA_LOCKED var/last_message = 0 var/add_req_access = 1 @@ -108,6 +111,8 @@ var/phasing_energy_drain = 200 var/phase_state = "" //icon_state when phasing var/strafe = FALSE //If we are strafing + var/canstrafe = TRUE //if we can turn on strafing + var/haslights = TRUE //if we can turn on lights var/nextsmash = 0 var/smashcooldown = 3 //deciseconds diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index 67247b766eb..11c063ae015 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -6,9 +6,11 @@ if(enclosed) internals_action.Grant(user, src) cycle_action.Grant(user, src) - lights_action.Grant(user, src) + if(haslights) + lights_action.Grant(user, src) stats_action.Grant(user, src) - strafing_action.Grant(user, src) + if(canstrafe) + strafing_action.Grant(user, src) /obj/mecha/proc/RemoveActions(mob/living/user, human_occupant = 0) @@ -16,9 +18,11 @@ eject_action.Remove(user) internals_action.Remove(user) cycle_action.Remove(user) - lights_action.Remove(user) + if(haslights) + lights_action.Remove(user) stats_action.Remove(user) - strafing_action.Remove(user) + if(canstrafe) + strafing_action.Remove(user) /datum/action/innate/mecha diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 4f351de43c5..d6265da7615 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -537,156 +537,164 @@ user.visible_message("[user] unfastens Gygax Armor Plates.", "You unfasten Gygax Armor Plates.") return TRUE -/datum/component/construction/unordered/mecha_chassis/firefighter - result = /datum/component/construction/mecha/firefighter +/datum/component/construction/unordered/mecha_chassis/clarke + result = /datum/component/construction/mecha/clarke steps = list( - /obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg, - /obj/item/clothing/suit/fire + /obj/item/mecha_parts/part/clarke_torso, + /obj/item/mecha_parts/part/clarke_left_arm, + /obj/item/mecha_parts/part/clarke_right_arm, + /obj/item/mecha_parts/part/clarke_head ) -/datum/component/construction/mecha/firefighter - result = /obj/mecha/working/ripley/firefighter - base_icon = "fireripley" +/datum/component/construction/mecha/clarke + result = /obj/mecha/working/clarke + base_icon = "clarke" - circuit_control = /obj/item/circuitboard/mecha/ripley/main - circuit_periph = /obj/item/circuitboard/mecha/ripley/peripherals + circuit_control = /obj/item/circuitboard/mecha/clarke/main + circuit_periph = /obj/item/circuitboard/mecha/clarke/peripherals inner_plating = /obj/item/stack/sheet/plasteel inner_plating_amount = 5 -/datum/component/construction/mecha/firefighter/get_outer_plating_steps() + outer_plating = /obj/item/stack/sheet/mineral/gold + outer_plating_amount = 5 + +/datum/component/construction/mecha/clarke/get_frame_steps() return list( list( - "key" = /obj/item/stack/sheet/plasteel, - "amount" = 5, - "back_key" = TOOL_WELDER, - "desc" = "Internal armor is welded." - ), - list( - "key" = /obj/item/stack/sheet/plasteel, - "amount" = 5, - "back_key" = TOOL_CROWBAR, - "desc" = "External armor is being installed." + "key" = /obj/item/stack/conveyor, + "amount" = 4, + "desc" = "The treads are added." ), list( "key" = TOOL_WRENCH, "back_key" = TOOL_CROWBAR, - "desc" = "External armor is installed." + "desc" = "The hydraulic systems are disconnected." ), list( - "key" = TOOL_WELDER, + "key" = TOOL_SCREWDRIVER, "back_key" = TOOL_WRENCH, - "desc" = "External armor is wrenched." + "desc" = "The hydraulic systems are connected." ), + list( + "key" = /obj/item/stack/cable_coil, + "amount" = 5, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The hydraulic systems are active." + ), + list( + "key" = TOOL_WIRECUTTER, + "back_key" = TOOL_SCREWDRIVER, + "desc" = "The wiring is added." + ) ) -/datum/component/construction/mecha/firefighter/custom_action(obj/item/I, mob/living/user, diff) + + +/datum/component/construction/mecha/clarke/custom_action(obj/item/I, mob/living/user, diff) if(!..()) return FALSE //TODO: better messages. switch(index) if(1) - user.visible_message("[user] connects [parent] hydraulic systems.", "You connect [parent] hydraulic systems.") + user.visible_message("[user] adds the tread systems.", "You add the tread systems.") if(2) + if(diff==FORWARD) + user.visible_message("[user] connects [parent] hydraulic systems.", "You connect [parent] hydraulic systems.") + else + user.visible_message("[user] removes the tread systems.", "You remove the tread systems.") + + if(3) if(diff==FORWARD) user.visible_message("[user] activates [parent] hydraulic systems.", "You activate [parent] hydraulic systems.") else user.visible_message("[user] disconnects [parent] hydraulic systems.", "You disconnect [parent] hydraulic systems.") - if(3) + if(4) if(diff==FORWARD) user.visible_message("[user] adds the wiring to [parent].", "You add the wiring to [parent].") else user.visible_message("[user] deactivates [parent] hydraulic systems.", "You deactivate [parent] hydraulic systems.") - if(4) + if(5) if(diff==FORWARD) user.visible_message("[user] adjusts the wiring of [parent].", "You adjust the wiring of [parent].") else user.visible_message("[user] removes the wiring from [parent].", "You remove the wiring from [parent].") - if(5) + if(6) if(diff==FORWARD) user.visible_message("[user] installs [I] into [parent].", "You install [I] into [parent].") else user.visible_message("[user] disconnects the wiring of [parent].", "You disconnect the wiring of [parent].") - if(6) + if(7) if(diff==FORWARD) user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") else user.visible_message("[user] removes the central control module from [parent].", "You remove the central computer mainboard from [parent].") - if(7) + if(8) if(diff==FORWARD) - user.visible_message("[user] installs [I]into [parent].", "You install [I]into [parent].") + user.visible_message("[user] installs [I] into [parent].", "You install [I] into [parent].") else user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - if(8) + if(9) if(diff==FORWARD) user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") else user.visible_message("[user] removes the peripherals control module from [parent].", "You remove the peripherals control module from [parent].") - if(9) + if(10) if(diff==FORWARD) user.visible_message("[user] installs [I] into [parent].", "You install [I] into [parent].") else user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - if(10) + if(11) if(diff==FORWARD) user.visible_message("[user] secures the scanner module.", "You secure the scanner module.") else user.visible_message("[user] removes the scanner module from [parent].", "You remove the scanner module from [parent].") - if(11) + if(12) if(diff==FORWARD) user.visible_message("[user] installs [I] to [parent].", "You install [I] to [parent].") else user.visible_message("[user] unfastens the scanner module.", "You unfasten the scanner module.") - if(12) + if(13) if(diff==FORWARD) user.visible_message("[user] secures the capacitor.", "You secure the capacitor.") else user.visible_message("[user] removes the capacitor from [parent].", "You remove the capacitor from [parent].") - if(13) + if(14) if(diff==FORWARD) user.visible_message("[user] installs [I] into [parent].", "You install [I] into [parent].") else user.visible_message("[user] unfastens the capacitor.", "You unfasten the capacitor.") - if(14) + if(15) if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") - if(15) + if(16) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") else user.visible_message("[user] unfastens the power cell.", "You unfasten the power cell.") - if(16) + if(17) if(diff==FORWARD) user.visible_message("[user] secures the internal armor layer.", "You secure the internal armor layer.") else user.visible_message("[user] pries internal armor layer from [parent].", "You pry internal armor layer from [parent].") - if(17) + if(18) if(diff==FORWARD) user.visible_message("[user] welds the internal armor layer to [parent].", "You weld the internal armor layer to [parent].") else user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - if(18) - if(diff==FORWARD) - user.visible_message("[user] starts to install the external armor layer to [parent].", "You install the external armor layer to [parent].") - else - user.visible_message("[user] cuts the internal armor layer from [parent].", "You cut the internal armor layer from [parent].") if(19) if(diff==FORWARD) - user.visible_message("[user] installs the external reinforced armor layer to [parent].", "You install the external reinforced armor layer to [parent].") + user.visible_message("[user] installs the external armor layer to [parent].", "You install the external reinforced armor layer to [parent].") else - user.visible_message("[user] removes the external armor from [parent].", "You remove the external armor from [parent].") + user.visible_message("[user] cuts the internal armor layer from [parent].", "You cut the internal armor layer from [parent].") if(20) if(diff==FORWARD) user.visible_message("[user] secures the external armor layer.", "You secure the external reinforced armor layer.") else - user.visible_message("[user] pries external armor layer from [parent].", "You pry external armor layer from [parent].") + user.visible_message("[user] pries the external armor layer from [parent].", "You pry the external armor layer from [parent].") if(21) if(diff==FORWARD) user.visible_message("[user] welds the external armor layer to [parent].", "You weld the external armor layer to [parent].") @@ -694,6 +702,7 @@ user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") return TRUE + /datum/component/construction/unordered/mecha_chassis/honker result = /datum/component/construction/mecha/honker steps = list( diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 74b3cf9b67f..4061030e02a 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -182,12 +182,31 @@ desc = "A set of armor plates for the Durand. Built heavy to resist an incredible amount of brute force." icon_state = "durand_armor" -////////// Firefighter +////////// Clarke -/obj/item/mecha_parts/chassis/firefighter - name = "\improper Firefighter chassis" - construct_type = /datum/component/construction/unordered/mecha_chassis/firefighter +/obj/item/mecha_parts/chassis/clarke + name = "\improper Clarke chassis" + construct_type = /datum/component/construction/unordered/mecha_chassis/clarke +/obj/item/mecha_parts/part/clarke_torso + name = "\improper Clarke torso" + desc = "A torso part of Clarke. Contains power unit, processing core and life support systems." + icon_state = "clarke_harness" + +/obj/item/mecha_parts/part/clarke_head + name = "\improper Clarke head" + desc = "A Clarke head. Contains an integrated diagnostic HUD scanner." + icon_state = "clarke_head" + +/obj/item/mecha_parts/part/clarke_left_arm + name = "\improper Clarke left arm" + desc = "A Clarke left arm. Data and power sockets are compatible with most exosuit tools." + icon_state = "clarke_l_arm" + +/obj/item/mecha_parts/part/clarke_right_arm + name = "\improper Clarke right arm" + desc = "A Clarke right arm. Data and power sockets are compatible with most exosuit tools." + icon_state = "clarke_r_arm" ////////// HONK @@ -352,3 +371,11 @@ /obj/item/circuitboard/mecha/phazon/main name = "Phazon Central Control module (Exosuit Board)" + +/obj/item/circuitboard/mecha/clarke/peripherals + name = "Clarke Peripherals Control module (Exosuit Board)" + icon_state = "mcontroller" + +/obj/item/circuitboard/mecha/clarke/main + name = "Clarke Central Control module (Exosuit Board)" + icon_state = "mainboard" diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 91b2a2bbf2a..88d72f037f9 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -147,7 +147,8 @@ /obj/structure/mecha_wreckage/ripley name = "\improper Ripley wreckage" icon_state = "ripley-broken" - parts = list(/obj/item/mecha_parts/part/ripley_torso, + parts = list( + /obj/item/mecha_parts/part/ripley_torso, /obj/item/mecha_parts/part/ripley_left_arm, /obj/item/mecha_parts/part/ripley_right_arm, /obj/item/mecha_parts/part/ripley_left_leg, @@ -157,15 +158,15 @@ name = "\improper Ripley MK-II wreckage" icon_state = "ripleymkii-broken" -/obj/structure/mecha_wreckage/ripley/firefighter - name = "\improper Firefighter wreckage" - icon_state = "firefighter-broken" - parts = list(/obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg, - /obj/item/clothing/suit/fire) +/obj/structure/mecha_wreckage/clarke + name = "\improper Clarke wreckage" + icon_state = "clarke-broken" + parts = list( + /obj/item/mecha_parts/part/clarke_torso, + /obj/item/mecha_parts/part/clarke_head, + /obj/item/mecha_parts/part/clarke_left_arm, + /obj/item/mecha_parts/part/clarke_right_arm, + /obj/item/stack/conveyor) /obj/structure/mecha_wreckage/ripley/deathripley name = "\improper Death-Ripley wreckage" @@ -177,7 +178,6 @@ icon_state = "honker-broken" desc = "All is right in the universe." parts = list( - /obj/item/mecha_parts/chassis/honker, /obj/item/mecha_parts/part/honker_torso, /obj/item/mecha_parts/part/honker_head, /obj/item/mecha_parts/part/honker_left_arm, @@ -199,6 +199,14 @@ /obj/structure/mecha_wreckage/phazon name = "\improper Phazon wreckage" icon_state = "phazon-broken" + parts = list( + /obj/item/mecha_parts/part/phazon_torso, + /obj/item/mecha_parts/part/phazon_head, + /obj/item/mecha_parts/part/phazon_left_arm, + /obj/item/mecha_parts/part/phazon_right_arm, + /obj/item/mecha_parts/part/phazon_left_leg, + /obj/item/mecha_parts/part/phazon_right_leg) + /obj/structure/mecha_wreckage/odysseus diff --git a/code/game/mecha/working/clarke.dm b/code/game/mecha/working/clarke.dm new file mode 100644 index 00000000000..c76668342f5 --- /dev/null +++ b/code/game/mecha/working/clarke.dm @@ -0,0 +1,80 @@ +///Lavaproof, fireproof, fast mech with low armor and higher energy consumption, cannot strafe and has an internal ore box. +/obj/mecha/working/clarke + desc = "Combining man and machine for a better, stronger engineer. Can even resist lava!" + name = "\improper Clarke" + icon_state = "clarke" + max_temperature = 65000 + max_integrity = 200 + step_in = 1.25 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + lights_power = 7 + deflect_chance = 10 + step_energy_drain = 15 //slightly higher energy drain since you movin those wheels FAST + armor = list("melee" = 20, "bullet" = 10, "laser" = 20, "energy" = 10, "bomb" = 60, "bio" = 0, "rad" = 70, "fire" = 100, "acid" = 100) //low armor to compensate for fire protection and speed + max_equip = 7 + wreckage = /obj/structure/mecha_wreckage/clarke + enter_delay = 40 + canstrafe = FALSE + /// Handles an internal ore box for Clarke + var/obj/structure/ore_box/box + +/obj/mecha/working/clarke/Initialize() + . = ..() + box = new /obj/structure/ore_box(src) + var/obj/item/mecha_parts/mecha_equipment/orebox_manager/ME = new(src) + ME.attach(src) + +/obj/mecha/working/clarke/Destroy() + box.dump_box_contents() + return ..() + +/obj/mecha/working/clarke/moved_inside(mob/living/carbon/human/H) + . = ..() + if(.) + var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED] + hud.add_hud_to(H) + +/obj/mecha/working/clarke/go_out() + if(isliving(occupant)) + var/mob/living/L = occupant + var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED] + hud.remove_hud_from(L) + return ..() + +/obj/mecha/working/clarke/mmi_moved_inside(obj/item/mmi/M, mob/user) + . = ..() + if(.) + var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_DIAGNOSTIC_ADVANCED] + var/mob/living/brain/B = M.brainmob + hud.add_hud_to(B) + +//Ore Box Controls + +///Special equipment for the Clarke mech, handles moving ore without giving the mech a hydraulic clamp and cargo compartment. +/obj/item/mecha_parts/mecha_equipment/orebox_manager + name = "ore storage module" + desc = "An automated ore box management device." + icon_state = "mecha_clamp" //None of this should matter, this shouldn't ever exist outside a mech anyway. + selectable = FALSE + detachable = FALSE + salvageable = FALSE + /// Var to avoid istype checking every time the topic button is pressed. This will only work inside Clarke mechs. + var/obj/mecha/working/clarke/hostmech + +/obj/item/mecha_parts/mecha_equipment/orebox_manager/attach(obj/mecha/M) + . = ..() + if(istype(M, /obj/mecha/working/clarke)) + hostmech = M + +/obj/item/mecha_parts/mecha_equipment/orebox_manager/detach() + hostmech = null //just in case + return ..() + +/obj/item/mecha_parts/mecha_equipment/orebox_manager/Topic(href,href_list) + . = ..() + if(!hostmech || !hostmech.box) + return + hostmech.box.dump_box_contents() + +/obj/item/mecha_parts/mecha_equipment/orebox_manager/get_equip_info() + return "[..()] [hostmech?.box ? "Unload Cargo" : "Error"]" diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index b9512af99c8..f23fb7d0a94 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -4,8 +4,10 @@ icon_state = "ripley" silicon_icon_state = "ripley-empty" step_in = 1.5 //Move speed, lower is faster. - var/fast_pressure_step_in = 1.5 //step_in while in low pressure conditions - var/slow_pressure_step_in = 2.0 //step_in while in normal pressure conditions + /// How fast the mech is in low pressure + var/fast_pressure_step_in = 1.5 + /// How fast the mech is in normal pressure + var/slow_pressure_step_in = 2 max_temperature = 20000 max_integrity = 200 lights_power = 7 @@ -14,35 +16,21 @@ max_equip = 6 wreckage = /obj/structure/mecha_wreckage/ripley internals_req_access = list(ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE, ACCESS_MECH_MINING) - var/list/cargo = new - var/cargo_capacity = 15 - var/hides = 0 enclosed = FALSE //Normal ripley has an open cockpit design enter_delay = 10 //can enter in a quarter of the time of other mechs exit_delay = 10 opacity = FALSE //Ripley has a window + /// Amount of Goliath hides attached to the mech + var/hides = 0 + /// List of all things in Ripley's Cargo Compartment + var/list/cargo = new + /// How much things Ripley can carry in their Cargo Compartment + var/cargo_capacity = 15 /obj/mecha/working/ripley/Move() . = ..() - if(.) - collect_ore() update_pressure() -/obj/mecha/working/ripley/proc/collect_ore() - if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment) - var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo - if(ore_box) - for(var/obj/item/stack/ore/ore in range(1, src)) - if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it! - ore.forceMove(ore_box) - -/obj/mecha/working/ripley/Destroy() - for(var/atom/movable/A in cargo) - A.forceMove(drop_location()) - step_rand(A) - cargo.Cut() - return ..() - /obj/mecha/working/ripley/go_out() ..() update_icon() @@ -56,40 +44,29 @@ possible_int_damage -= (MECHA_INT_TEMP_CONTROL + MECHA_INT_TANK_BREACH) //if we don't even have an air tank, these two doesn't make a ton of sense. . = ..() - /obj/mecha/working/ripley/Initialize() . = ..() AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5)) +/obj/mecha/working/ripley/Destroy() + for(var/atom/movable/A in cargo) + A.forceMove(drop_location()) + step_rand(A) + cargo.Cut() + return ..() + /obj/mecha/working/ripley/mkii - desc = "Autonomous Power Loader Unit MK-II. This prototype Ripley is refitted with a pressurized cabin, trading its prior speed for atmospheric protection" + desc = "Autonomous Power Loader Unit MK-II. This prototype Ripley is refitted with a pressurized cabin, trading its prior speed for atmospheric protection and armor." name = "\improper APLU MK-II \"Ripley\"" icon_state = "ripleymkii" fast_pressure_step_in = 2 //step_in while in low pressure conditions slow_pressure_step_in = 4 //step_in while in normal pressure conditions step_in = 4 - armor = list("melee" = 40, "bullet" = 20, "laser" = 10, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - wreckage = /obj/structure/mecha_wreckage/ripley/mkii - enclosed = TRUE - enter_delay = 40 - silicon_icon_state = null - opacity = TRUE - -/obj/mecha/working/ripley/firefighter - desc = "Autonomous Power Loader Unit MK-III. This model is refitted with a pressurized cabin and additional thermal protection." - name = "\improper APLU MK-III \"Firefighter\"" - icon_state = "firefighter" - max_temperature = 65000 + max_temperature = 30000 max_integrity = 250 - fast_pressure_step_in = 2 //step_in while in low pressure conditions - slow_pressure_step_in = 4 //step_in while in normal pressure conditions - step_in = 4 - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - lights_power = 7 armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 60, "bio" = 0, "rad" = 70, "fire" = 100, "acid" = 100) - max_equip = 5 // More armor, less tools - wreckage = /obj/structure/mecha_wreckage/ripley/firefighter + wreckage = /obj/structure/mecha_wreckage/ripley/mkii enclosed = TRUE enter_delay = 40 silicon_icon_state = null @@ -197,18 +174,6 @@ output += "" return output -/obj/mecha/working/ripley/proc/update_pressure() - var/turf/T = get_turf(loc) - - if(lavaland_equipment_pressure_check(T)) - step_in = fast_pressure_step_in - for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment) - drill.equip_cooldown = initial(drill.equip_cooldown)/2 - else - step_in = slow_pressure_step_in - for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment) - drill.equip_cooldown = initial(drill.equip_cooldown) - /obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O) to_chat(user, "You lean on the back of [O] and start pushing so it falls out of [src].") if(do_after(user, 300, target = O)) @@ -220,3 +185,20 @@ else if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded. to_chat(user, "You fail to push [O] out of [src]!") +/** + * Makes the mecha go faster and halves the mecha drill cooldown if in Lavaland pressure. + * + * Checks for Lavaland pressure, if that works out the mech's speed is equal to fast_pressure_step_in and the cooldown for the mecha drill is halved. If not it uses slow_pressure_step_in and drill cooldown is normal. + */ +/obj/mecha/working/ripley/proc/update_pressure() + var/turf/T = get_turf(loc) + + if(lavaland_equipment_pressure_check(T)) + step_in = fast_pressure_step_in + for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment) + drill.equip_cooldown = initial(drill.equip_cooldown) * 0.5 + + else + step_in = slow_pressure_step_in + for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment) + drill.equip_cooldown = initial(drill.equip_cooldown) diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm index b3e9c4ba55e..874313b0666 100644 --- a/code/game/mecha/working/working.dm +++ b/code/game/mecha/working/working.dm @@ -1,2 +1,20 @@ /obj/mecha/working internal_damage_threshold = 60 + +/obj/mecha/working/Move() + . = ..() + if(.) + collect_ore() + +/** + * Handles collecting ore. + * + * Checks for a hydraulic clamp or ore box manager and if it finds an ore box inside them puts ore in the ore box. + */ +/obj/mecha/working/proc/collect_ore() + if((locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment) || (locate(/obj/item/mecha_parts/mecha_equipment/orebox_manager) in equipment)) + var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in contents + if(ore_box) + for(var/obj/item/stack/ore/ore in range(1, src)) + if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it! + ore.forceMove(ore_box) diff --git a/code/game/objects/items/manuals.dm b/code/game/objects/items/manuals.dm index be7915f67f0..f9d2aa9d34d 100644 --- a/code/game/objects/items/manuals.dm +++ b/code/game/objects/items/manuals.dm @@ -101,14 +101,6 @@