diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index 3e1a864d542..f7e8aa5c053 100644 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -313,6 +313,23 @@ containername = "Robotics Assembly" access = access_robotics +/datum/supply_packs/mecha_ripley + name = "APLU \"Ripley\" Exosuit Assembly Crate" + contains = list("/obj/mecha_chassis/ripley", + "/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/weapon/disk/circuit_disk/mecha/ripley/main", + "/obj/item/weapon/disk/circuit_disk/mecha/ripley/peripherals", + "/obj/item/weapon/book/manual/ripley_build_and_repair") + cost = 40 + containertype = "/obj/crate/secure" + containername = "ARLU \"Ripley\" Exosuit Assembly" + access = access_heads + + /datum/supply_packs/hydroponics // -- Skie name = "Hydroponics Supply Crate" contains = list("/obj/item/weapon/plantbgone", diff --git a/code/game/machinery/circuitprinter.dm b/code/game/machinery/circuitprinter.dm index 2fd196adabf..2ed5f766137 100644 --- a/code/game/machinery/circuitprinter.dm +++ b/code/game/machinery/circuitprinter.dm @@ -472,4 +472,23 @@ Operations Highlights: blueprint = "/obj/item/weapon/aiModule/tyrant" circuit = "'T.Y.R.A.N.T.' AI Core Module" department = "Command and Control" - security = "ULTRA'" \ No newline at end of file + security = "ULTRA'" + + +/////////////////////////////////// +//////////Mecha Module Disks/////// +/////////////////////////////////// + +/obj/item/weapon/disk/circuit_disk/mecha/ripley/main + name = "Circuit Design (APLU \"Ripley\" Central Control module)" + blueprint = "/obj/item/mecha_parts/circuitboard/ripley/main" + circuit = "Circuit Board (APLU \"Ripley\" Central Control module)" + department = "Engineering" + security = "MEDIUM" + +/obj/item/weapon/disk/circuit_disk/mecha/ripley/peripherals + name = "Circuit Design (APLU \"Ripley\" Peripherals Control module)" + blueprint = "/obj/item/mecha_parts/circuitboard/ripley/peripherals" + circuit = "Circuit Board (APLU \"Ripley\" Peripherals Control module)" + department = "Engineering" + security = "MEDIUM" \ No newline at end of file diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 8ab894cb2a9..54e3046ef5a 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -74,14 +74,13 @@ return result -/*obj/mecha/combat/honker/Topic(href, href_list) +obj/mecha/combat/honker/Topic(href, href_list) ..() if (href_list["play_sound"]) switch(href_list["play_sound"]) if("sadtrombone") -// playsound(src, 'sadtrombone.ogg', 50) + playsound(src, 'sadtrombone.ogg', 50) return -*/ proc/rand_hex_color() var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f") diff --git a/code/game/mecha/construction_datum.dm b/code/game/mecha/construction_datum.dm index 1fb0209e80e..a115e306dec 100644 --- a/code/game/mecha/construction_datum.dm +++ b/code/game/mecha/construction_datum.dm @@ -13,13 +13,11 @@ proc/next_step() steps.len-- - if(!steps.len && result) - new result(get_turf(holder)) - spawn() - del holder + if(!steps.len) + spawn_result() return - proc/check_step(used_atom,user as mob) + 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)) @@ -27,51 +25,42 @@ return 1 return 0 - proc/is_right_key(used_atom) // returns current step num if used_atom is of the right type. + 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, text2path(L["key"]))) return steps.len return 0 - proc/custom_action(used_atom, user) + proc/custom_action(step, used_atom, user) return 1 - -/datum/construction/mecha/gygax - - result = "/obj/mecha/combat/gygax" - steps = list(list("key"="/obj/item/weapon/wrench"),//1 - list("key"="/obj/item/weapon/weldingtool"),//2 - list("key"="/obj/item/weapon/screwdriver"),//3 - list("key"="/obj/item/stack/sheet/metal")//4 - ) - - custom_action(step, used_atom, mob/user) - switch(step) - if(4) - var/obj/item/stack/sheet/metal/metal = used_atom - if(metal.amount < 1) - del metal - return 0 - metal.use(1) - playsound(holder, 'bang.ogg', 50, 1) - user.visible_message("[user] has added [used_atom] to [holder].", "You add [used_atom] to [holder]") - if(3) - holder.icon_state = "gygax" - user.visible_message("[user] screwed the metal sheet in place.", "You screw the metal sheet in place") - if(2) - var/obj/item/weapon/weldingtool/W = used_atom - if(!W.welding) - return 0 - if(W.get_fuel() < 2) - user << ("You need more fuel to complete current task") - return 0 - W.use_fuel(1) - playsound(holder, 'Welder.ogg', 50, 1) - user.visible_message("[user] welded the metal sheet to [holder].", "You weld the metal sheet to [holder].") + 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, text2path(L["key"]))) + if(custom_action(i, used_atom, user)) + steps[i]=null;//stupid byond list from list removal... + clear_nulls(steps); + if(!steps.len) + spawn_result() + return 1 + return 0 + + + proc/spawn_result() + if(result) + new result(get_turf(holder)) + spawn() + del holder + return + + proc/clear_nulls(list/L) + while(null in L) + L -= null + return + - return 1 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 5d3747c4867..b57d2c5fd8e 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -370,6 +370,12 @@ src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST),1) return +/obj/mecha/blob_act() + return + +/obj/mecha/meteorhit() + return ex_act(rand(1,3))//should do for now + ///////////////////////////////////// //////// Atmospheric stuff //////// ///////////////////////////////////// @@ -644,7 +650,6 @@ /obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob) - src.log_message("Attacked by [W].") if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if(src.internals_access_allowed(usr)) if(state==0) @@ -716,6 +721,7 @@ return else + src.log_message("Attacked by [W]. Attacker - [user]") if(prob(src.deflect_chance)) user << "\red The [W] bounces off [src.name] armor." src.log_append_to_last("Armor saved.") @@ -725,6 +731,8 @@ V.show_message("The [W] bounces off [src.name] armor.", 1) */ else + src.occupant_message("[user] hits [src] with [W].") + user.visible_message("[user] hits [src] with [W].", "You hit [src] with [W]") src.take_damage(W.force,W.damtype) src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) return diff --git a/code/game/mecha/mecha_construction.dm b/code/game/mecha/mecha_construction.dm new file mode 100644 index 00000000000..b200be1bc69 --- /dev/null +++ b/code/game/mecha/mecha_construction.dm @@ -0,0 +1,277 @@ +/////////////////////////// +////// Mecha Chassis ////// +/////////////////////////// + +/obj/mecha_chassis + name="Mecha Chassis" + icon = 'mech_construct.dmi' + icon_state = "mecha_chassis" + var/datum/construction/construct + flags = FPRINT | CONDUCT + +/obj/mecha_chassis/ripley + name = "Ripley Chassis Frame" + + New() + ..() + construct = new /datum/construction/mecha/ripley_chassis(src) + + attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/mecha_parts)) + if(construct) + construct.check_all_steps(W, user) + else + ..() + return + +/obj/mecha_chassis/ripley_full + name = "Ripley Chassis" + icon_state = "ripley_chassis" + + New() + ..() + construct = new /datum/construction/mecha/ripley(src) + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(!construct || !construct.check_step(W, user)) + ..() + return + +///////////////////////// +////// Mecha Parts ////// +///////////////////////// + + +/obj/item/mecha_parts + name = "mecha part" + icon = 'mech_construct.dmi' + icon_state = "mecha_chassis" + w_class = 20 + flags = FPRINT | TABLEPASS | CONDUCT + + +/obj/item/mecha_parts/part/ripley_torso + name="Ripley Torso" + icon_state = "ripley_torso" + +/obj/item/mecha_parts/part/ripley_left_arm + name="Ripley Left Arm" + icon_state = "ripley_left_arm" + +/obj/item/mecha_parts/part/ripley_right_arm + name="Ripley Right Arm" + icon_state = "ripley_right_arm" + +/obj/item/mecha_parts/part/ripley_left_leg + name="Ripley Left Leg" + icon_state = "ripley_left_leg" + +/obj/item/mecha_parts/part/ripley_right_leg + name="Ripley Right Leg" + icon_state = "ripley_right_leg" + +/obj/item/mecha_parts/circuitboard + name = "Exosuit Circuit board" + icon = 'module.dmi' + icon_state = "std_mod" + item_state = "electronic" + flags = FPRINT | TABLEPASS| CONDUCT + force = 5.0 + w_class = 2.0 + throwforce = 5.0 + throw_speed = 3 + throw_range = 15 + + ripley/peripherals + name = "Circuit board (Ripley Peripherals Control module)" + + ripley/main + name = "Circuit board (Ripley Central Control module)" + icon_state = "mainboard" + + +//////////////////////////////// +///// Construction datums ////// +//////////////////////////////// + +/datum/construction/mecha/ripley_chassis + result = "/obj/mecha_chassis/ripley_full" + steps = list(list("key"="/obj/item/mecha_parts/part/ripley_torso"),//1 + list("key"="/obj/item/mecha_parts/part/ripley_left_arm"),//2 + list("key"="/obj/item/mecha_parts/part/ripley_right_arm"),//3 + list("key"="/obj/item/mecha_parts/part/ripley_left_leg"),//4 + list("key"="/obj/item/mecha_parts/part/ripley_right_leg")//5 + ) + + custom_action(step, atom/used_atom, mob/user) +/* + switch(step) + if(5) + if(4) + if(3) + if(2) + if(1) +*/ + user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") + holder.overlays += used_atom.icon_state + del used_atom + return 1 + + +/datum/construction/mecha/ripley + result = "/obj/mecha/working/ripley" + steps = list(list("key"="/obj/item/weapon/weldingtool"),//1 + list("key"="/obj/item/weapon/wrench"),//2 + list("key"="/obj/item/stack/sheet/r_metal"),//3 + list("key"="/obj/item/weapon/weldingtool"),//4 + list("key"="/obj/item/weapon/wrench"),//5 + list("key"="/obj/item/stack/sheet/metal"),//6 + list("key"="/obj/item/weapon/screwdriver"),//7 + list("key"="/obj/item/mecha_parts/circuitboard/ripley/peripherals"),//8 + list("key"="/obj/item/weapon/screwdriver"),//9 + list("key"="/obj/item/mecha_parts/circuitboard/ripley/main"),//10 + list("key"="/obj/item/weapon/wirecutters"),//11 + list("key"="/obj/item/weapon/cable_coil"),//12 + list("key"="/obj/item/weapon/screwdriver"),//13 + list("key"="/obj/item/weapon/wrench")//14 + ) + + custom_action(step, atom/used_atom, mob/user) + if(istype(used_atom, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/W = used_atom + if(W.get_fuel() < 2) + user << ("You need more fuel to complete current task") + return 0 + else + W.use_fuel(1) + playsound(holder, 'Welder.ogg', 50, 1) + else if(istype(used_atom, /obj/item/weapon/wrench)) + playsound(holder, 'Ratchet.ogg', 50, 1) + + else if(istype(used_atom, /obj/item/weapon/wirecutters)) + playsound(holder, 'Wirecutter.ogg', 50, 1) + + else if(istype(used_atom, /obj/item/weapon/cable_coil)) + var/obj/item/weapon/cable_coil/C = used_atom + if(C.amount<3) + user << ("There's not enough cable to finish the task.") + return 0 + else + C.use(4) + else if(istype(used_atom, /obj/item/stack)) + var/obj/item/stack/S = used_atom + if(S.amount < 5) + user << ("There's not enough material in this stack.") + return 0 + else + S.use(5) + + //TODO: better messages. + switch(step) + if(14) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + if(13) + user.visible_message("[user] adjusts [holder] hydraulic systems.", "You adjust [holder] hydraulic systems.") + if(12) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + if(11) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + if(10) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + del used_atom + if(9) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + if(8) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + del used_atom + if(7) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + if(6) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + if(5) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + if(4) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + if(3) + user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") + if(2) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + if(1) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + return 1 + + + +////////////////// misc //////////////// + + + +/obj/item/weapon/book/manual/ripley_build_and_repair + name = "APLU \"Ripley\" Construction and Operation Manual" + icon = 'library.dmi' + icon_state ="book" + due_date = 0 // Game time in 1/10th seconds + author = "Weyland-Yutani Corp" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned + unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + +//big pile of shit below. + + dat = {" + + + + +
+ Weyland-Yutani - Building Better Worlds +

Autonomous Power Loader Unit \"Ripley\"

+
+

Specifications:

+ + +

Construction:

+
    +
  1. Connect all exosuit parts to the chassis frame
  2. +
  3. Connect all hydraulic fittings and tighten them up with a wrench
  4. +
  5. Adjust the servohydraulics with a screwdriver
  6. +
  7. Wire the chassis. (Cable is not included.)
  8. +
  9. Use the wirecutters to remove the excess cable if needed.
  10. +
  11. Install the central control module (Not included. Use supplied datadisk to create one).
  12. +
  13. Secure the mainboard with a screwdriver.
  14. +
  15. Install the peripherals control module (Not included. Use supplied datadisk to create one).
  16. +
  17. Secure the mainboard with a screwdriver
  18. +
  19. Install the internal armor plating (Not included due to Nanotrasen regulations.)
  20. +
  21. Secure the internal armor plating with a wrench
  22. +
  23. Weld the internal armor plating to the chassis
  24. +
  25. Install the external reinforced armor plating (Not included due to Nanotrasen regulations.)
  26. +
  27. Secure the external reinforced armor plating with a wrench
  28. +
  29. Weld the external reinforced armor plating to the chassis
  30. +
+ + + +

Operation

+ Coming soon... + "} diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 89363d0e4f9..7df71f0ffaa 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -74,18 +74,6 @@ name = "Gygax wreckage" icon_state = "gygax-broken" - var/datum/construction/construct - - New() - ..() - construct = new /datum/construction/mecha/gygax(src) - return - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(!construct.check_step(W, user)) - ..() - return - /obj/decal/mecha_wreckage/marauder name = "Marauder wreckage" @@ -97,8 +85,6 @@ icon_state = "ripley-broken" - - /obj/decal/mecha_wreckage/durand name = "Durand wreckage" icon_state = "durand-broken" diff --git a/code/game/mecha/working/tools/tools.dm b/code/game/mecha/working/tools/tools.dm index 4ad6b139855..d22003567fc 100644 --- a/code/game/mecha/working/tools/tools.dm +++ b/code/game/mecha/working/tools/tools.dm @@ -139,6 +139,10 @@ if(T == chassis.loc && src == chassis.selected_tool) if(istype(target, /turf/simulated/wall/r_wall)) chassis.occupant_message("[target] is too durable to drill through.") + else if(istype(target, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = target + chassis.log_message("Drilled through [target]") + M.gets_drilled() else chassis.log_message("Drilled through [target]") target.ex_act(2) diff --git a/icons/misc/mech_bay.dmi b/icons/misc/mech_bay.dmi index f8fa7ab8f93..bc2a2c3e284 100644 Binary files a/icons/misc/mech_bay.dmi and b/icons/misc/mech_bay.dmi differ diff --git a/icons/misc/mech_construct.dmi b/icons/misc/mech_construct.dmi new file mode 100644 index 00000000000..f699ff95f06 Binary files /dev/null and b/icons/misc/mech_construct.dmi differ diff --git a/sound/misc/sadtrombone.ogg b/sound/misc/sadtrombone.ogg new file mode 100644 index 00000000000..788d263cba9 Binary files /dev/null and b/sound/misc/sadtrombone.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 432da285818..446c238e8d2 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -425,6 +425,7 @@ #include "code\game\mecha\global_iterator.dm" #include "code\game\mecha\mech_bay.dm" #include "code\game\mecha\mecha.dm" +#include "code\game\mecha\mecha_construction.dm" #include "code\game\mecha\mecha_wreckage.dm" #include "code\game\mecha\combat\combat.dm" #include "code\game\mecha\combat\gygax.dm"