From 882cbc2f5310910fe3e7b86f2ec1be17fcb92fe5 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Fri, 19 Jan 2024 22:15:05 +0500 Subject: [PATCH 01/11] Feat: Lockermech --- modular_ss220/objects/_objects.dme | 4 + .../objects/code/mecha/lockermech.dm | 182 ++++++++++++++++++ modular_ss220/objects/icons/mech.dmi | Bin 0 -> 1914 bytes 3 files changed, 186 insertions(+) create mode 100644 modular_ss220/objects/code/mecha/lockermech.dm create mode 100644 modular_ss220/objects/icons/mech.dmi diff --git a/modular_ss220/objects/_objects.dme b/modular_ss220/objects/_objects.dme index 697afd755731..56083ab10a68 100644 --- a/modular_ss220/objects/_objects.dme +++ b/modular_ss220/objects/_objects.dme @@ -1,5 +1,9 @@ #include "_objects.dm" +// Mechs +#include "code/mecha/lockermech.dm" + +// Miscellaneous #include "code/beach_umbrella.dm" #include "code/beretta.dm" #include "code/big_bed.dm" diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm new file mode 100644 index 000000000000..597de2f34840 --- /dev/null +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -0,0 +1,182 @@ +// Makeshift (Lockermech) +/obj/mecha/lockermech + name = "Шкафомех" + desc = "Шкафчик с украденными проводами, стойками, электроникой и шлюзовыми сервоприводами, грубо собранными в нечто, напоминающее мех." + icon = 'modular_ss220/objects/icons/mech.dmi' + icon_state = "lockermech" + initial_icon = "lockermech" + max_integrity = 100 // Its made of scraps + lights_power = 5 + step_in = 4 // Same speed as a Ripley, for now. + var/fast_pressure_step_in = 2 //step_in while in normal pressure conditions + var/slow_pressure_step_in = 4 //step_in while in better pressure conditions + armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, rad = 0, fire = 70, acid = 60) + internal_damage_threshold = 30 //Its got shitty durability + max_equip = 2 // You only have two arms and the control system is shitty + wreckage = /obj/structure/mecha_wreckage/lockermech + var/list/cargo = new + var/cargo_capacity = 5 // You can fit a few things in this locker but not much. + +/obj/mecha/lockermech/go_out() + ..() + update_icon(UPDATE_OVERLAYS) + +/obj/mecha/lockermech/moved_inside(mob/living/carbon/human/H) + ..() + update_icon(UPDATE_OVERLAYS) + +/obj/mecha/lockermech/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user) + ..() + update_icon(UPDATE_OVERLAYS) + +/obj/mecha/lockermech/Move() + . = ..() + if(.) + collect_ore() + update_pressure() + +/obj/mecha/lockermech/proc/collect_ore() + if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech) 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/lockermech/proc/update_pressure() + if(thrusters_active) + return // Don't calculate this if they have thrusters on, this is calculated right after domove because of course it is + + 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/lockermech/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/lockermech/drill in equipment) + drill.equip_cooldown = initial(drill.equip_cooldown) + +/obj/mecha/lockermech/Exit(atom/movable/O) + if(O in cargo) + return FALSE + return ..() + +/obj/mecha/lockermech/get_stats_part() + var/output = ..() + output += "Cargo Compartment Contents:
" + if(length(cargo)) + for(var/obj/O in cargo) + output += "Unload : [O]
" + else + output += "Nothing" + output += "
" + return output + +/obj/mecha/lockermech/Topic(href, href_list) + ..() + if(href_list["drop_from_cargo"]) + var/obj/O = locate(href_list["drop_from_cargo"]) + if(O && (O in cargo)) + occupant_message("You unload [O].") + O.loc = get_turf(src) + cargo -= O + var/turf/T = get_turf(O) + if(T) + T.Entered(O) + log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") + return + +/obj/mecha/lockermech/Destroy() + for(var/atom/movable/A in cargo) + A.forceMove(loc) + step_rand(A) + cargo.Cut() + return ..() + +/obj/mecha/lockermech/ex_act(severity) + ..() + for(var/X in cargo) + var/obj/O = X + if(prob(30 / severity)) + cargo -= O + O.forceMove(drop_location()) + +/obj/mecha/lockermech/emag_act(mob/user) + if(!emagged) + emagged = TRUE + desc += "
The mech's equipment slots spark dangerously!" + return ..() + +// Crafting +/datum/crafting_recipe/lockermech + name = "Locker Mech" + result = list(/obj/mecha/lockermech) + reqs = list(/obj/item/stack/cable_coil = 20, + /obj/item/stack/sheet/metal = 10, + /obj/item/storage/toolbox = 2, // For feet + /obj/item/tank/internals/oxygen = 1, // For air + /obj/item/airlock_electronics = 1, // You are stealing the motors from airlocks + /obj/item/extinguisher = 1, // For bastard pnumatics + /obj/item/c_tube = 1, // To make it airtight + /obj/item/flashlight = 1, // For the mech light + /obj/item/stack/tape_roll = 25, // ¯\_(ツ)_/¯ + /obj/item/stock_parts/cell/high = 1, + /obj/item/stack/rods = 4) // To mount the equipment + tools = list(TOOL_WELDER, TOOL_SCREWDRIVER) + time = 200 + category = CAT_ROBOT + +/datum/crafting_recipe/lockermech_drill + name = "Locker Mech Exosuit Drill" + result = list(/obj/item/mecha_parts/mecha_equipment/drill/lockermech) + reqs = list(/obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/metal = 2, + /obj/item/surgicaldrill = 1) + tools = list(TOOL_SCREWDRIVER) + time = 50 + category = CAT_ROBOT + +/datum/crafting_recipe/lockermech_clamp + name = "Locker Mech Exosuit Clamp" + result = list(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech) + reqs = list(/obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/metal = 2, + /obj/item/wirecutters = 1) // Don't ask, its just for the grabby grabby thing + tools = list(TOOL_SCREWDRIVER) + time = 50 + category = CAT_ROBOT + +// Wreckage +/obj/structure/mecha_wreckage/lockermech + name = "\improper Обломки Шкафомеха" + desc = "Владелец данного изделия, на что он надеялся?..." + icon = 'modular_ss220/objects/icons/mech.dmi' + icon_state = "lockermech-broken" + +// Equipment +/obj/item/mecha_parts/mecha_equipment/drill/lockermech + name = "locker mech exosuit drill" + desc = "Собранная из, скорее всего, краденых деталей, эта дрель не сравнится по эффективности с настоящей." + equip_cooldown = 60 // Its slow as shit + force = 10 // Its not very strong + drill_delay = 15 + +/obj/item/mecha_parts/mecha_equipment/drill/lockermech/can_attach(obj/mecha/M as obj) + if(istype(M, /obj/mecha/lockermech)) + if(M.equipment.len < M.max_equip) + return TRUE + return FALSE + +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech + name = "locker mech clamp" + desc = "Беспорядочное расположение собранных вместе деталей, напоминающее зажим." + equip_cooldown = 25 + dam_force = 10 + +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech/can_attach(obj/mecha/M as obj) + if(istype(M, /obj/mecha/lockermech)) + if(M.equipment.len < M.max_equip) + return TRUE + return FALSE diff --git a/modular_ss220/objects/icons/mech.dmi b/modular_ss220/objects/icons/mech.dmi new file mode 100644 index 0000000000000000000000000000000000000000..0bf1578d0628a84f1ef496dd6935e6a3a0c4d68e GIT binary patch literal 1914 zcmV-=2Zi{FP)-p~x*QndMM$aByg6XA%+@Z*OmbfPjF2fCvZ+IyyQpE-qbSZ#X$cL`!60U|>Bq zG$S!?Fy@(1P*8b!c^n)hy}iB3$pEM5V_Yt_J`O<~lCjU^+`T&roRIiV4y#tWV zjL1fSQ0o-+f&VPTk6kPs@JQlVRbH2*NCN{`ff2VlC;F@*^>Aq=EW zJKZFFT&@_EdZgDoGFU7U{^=9v@Hxr=0HCMq^*Uz{4~Y#Z3c8`FcYsj_j71D4JZ?GP z@-0qaA!DY_P-o!%@bH8H9MN)F-T*Mz7?T1m(?VZ-utk^3{4 zvkC$A4x+{h6%38^`Fj3Lp9_f6){BCzQ^w}G^mhPOd8N*P^G5;5SJoxUtFkDId^M*f zL;<>a3Cj}v=V?06Zvez0Y<++Ntsyv127rR4EN2x^Jb)^%1z^D+@g_n*omaLl-4&y> zbvS@Dt!lPP_j@;BSMO(W_Y`pc>ug`|Oh64fUlbzXT9u&JhW`0wQyl6lPZc3{0vZkY zt#JU#rqofCHlQe8Uy)F!>k0wQ4Z!bCK!MNGGhK2tumKW#sH%EbS0g~%wg9MX08Fhw z==56Z3Lws)?sSMH-TX0YdV&RLkH@1h;L<)8XMiIhv`U94i^by4mlt)^I3jfgIGs-C zvmorMGyE|CRMkObz~Mgn3qEECZP4lR_L0#Tx+I+NkG4euZ0&qJo-Dw*t`Cp_JO%I= zJZ=$C*XJH^#tm?Bip3>LF~_~2dcggWq&}^bU?V(KPa90^gz}3q3jPRl>Fvu zh->|W)~T<*2!gIZ2t|EQ=O6M^uO%p$x1n8q3*EShQFj2k{vgEqp0d^Qqg;*VP18(C zmSz7yzy~q=2eb#BpiX<;kwFiD3^ueV6aZFdnFPFj`}QUc`V4SF)&a7&x8MdKTqrhLS@NVfn0Bh4dv_Uoczix_R2#C83;sKzM z03`>uZUaR5tqR@lkTYq}5dK{Sw*Z7IfTc6$0(Ab(464NC5U}kGw#4ioNG1rx(iz(s z{R0Np_tj4LpRvB*&@teL3IXW*2hssdoz-S}5B^xAV`*O<01VPe`QtZ%2u^R2w%h5(~~z!}-ap|b%%MSC0q#Dm7I-vhIMz!{fptg`{YQ{TgK z@m0aecOAs)9|#xUM#cox@%!|v0q~Z7eFlB)ORWBZaPe(qOprS3`-d9iAK0H`{y#N3J07*qoM6N<$f^Bea AhyVZp literal 0 HcmV?d00001 From fd509ca7091a4b39c1e1b662a2130c7ffbba0091 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 03:46:11 +0500 Subject: [PATCH 02/11] =?UTF-8?q?=D0=92=D1=8B=D1=80=D0=B5=D0=B7=20=D0=BC?= =?UTF-8?q?=D0=B0=D0=B9=D0=BD=D0=B8=D0=BD=D0=B3=D0=B0,=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B8=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BE=D0=B4=D0=BD=D0=BE=D0=B1=D1=83=D0=BA=D0=B2?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../objects/code/mecha/lockermech.dm | 60 ++++++++----------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 597de2f34840..f9c852034a33 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -8,10 +8,10 @@ max_integrity = 100 // Its made of scraps lights_power = 5 step_in = 4 // Same speed as a Ripley, for now. - var/fast_pressure_step_in = 2 //step_in while in normal pressure conditions - var/slow_pressure_step_in = 4 //step_in while in better pressure conditions + var/fast_pressure_step_in = 2 // step_in while in normal pressure conditions + var/slow_pressure_step_in = 4 // step_in while in better pressure conditions armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, rad = 0, fire = 70, acid = 60) - internal_damage_threshold = 30 //Its got shitty durability + internal_damage_threshold = 30 // Its got shitty durability max_equip = 2 // You only have two arms and the control system is shitty wreckage = /obj/structure/mecha_wreckage/lockermech var/list/cargo = new @@ -31,25 +31,15 @@ /obj/mecha/lockermech/Move() . = ..() - if(.) - collect_ore() update_pressure() -/obj/mecha/lockermech/proc/collect_ore() - if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech) 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/lockermech/proc/update_pressure() if(thrusters_active) return // Don't calculate this if they have thrusters on, this is calculated right after domove because of course it is - var/turf/T = get_turf(loc) + var/turf/target_turf = get_turf(loc) - if(lavaland_equipment_pressure_check(T)) + if(lavaland_equipment_pressure_check(target_turf)) step_in = fast_pressure_step_in for(var/obj/item/mecha_parts/mecha_equipment/drill/lockermech/drill in equipment) drill.equip_cooldown = initial(drill.equip_cooldown)/2 @@ -58,8 +48,8 @@ for(var/obj/item/mecha_parts/mecha_equipment/drill/lockermech/drill in equipment) drill.equip_cooldown = initial(drill.equip_cooldown) -/obj/mecha/lockermech/Exit(atom/movable/O) - if(O in cargo) +/obj/mecha/lockermech/Exit(atom/movable/object) + if(object in cargo) return FALSE return ..() @@ -67,8 +57,8 @@ var/output = ..() output += "Cargo Compartment Contents:
" if(length(cargo)) - for(var/obj/O in cargo) - output += "Unload : [O]
" + for(var/obj/object in cargo) + output += "Unload : [object]
" else output += "Nothing" output += "
" @@ -77,31 +67,31 @@ /obj/mecha/lockermech/Topic(href, href_list) ..() if(href_list["drop_from_cargo"]) - var/obj/O = locate(href_list["drop_from_cargo"]) - if(O && (O in cargo)) - occupant_message("You unload [O].") - O.loc = get_turf(src) - cargo -= O - var/turf/T = get_turf(O) - if(T) - T.Entered(O) - log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") + var/obj/object = locate(href_list["drop_from_cargo"]) + if(object && (object in cargo)) + occupant_message("You unload [object].") + object.loc = get_turf(src) + cargo -= object + var/turf/target_turf = get_turf(object) + if(target_turf) + target_turf.Entered(object) + log_message("Unloaded [object]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") return /obj/mecha/lockermech/Destroy() - for(var/atom/movable/A in cargo) - A.forceMove(loc) - step_rand(A) + for(var/atom/movable/thing in cargo) + thing.forceMove(loc) + step_rand(thing) cargo.Cut() return ..() /obj/mecha/lockermech/ex_act(severity) ..() - for(var/X in cargo) - var/obj/O = X + for(var/thing in cargo) + var/obj/object = thing if(prob(30 / severity)) - cargo -= O - O.forceMove(drop_location()) + cargo -= object + object.forceMove(drop_location()) /obj/mecha/lockermech/emag_act(mob/user) if(!emagged) From 24822da94b20c5b9e09dbd7437684b2ab4667b1f Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:40:02 +0500 Subject: [PATCH 03/11] lazyinits --- modular_ss220/objects/code/mecha/lockermech.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index f9c852034a33..7441facbff58 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -14,7 +14,7 @@ internal_damage_threshold = 30 // Its got shitty durability max_equip = 2 // You only have two arms and the control system is shitty wreckage = /obj/structure/mecha_wreckage/lockermech - var/list/cargo = new + var/list/cargo var/cargo_capacity = 5 // You can fit a few things in this locker but not much. /obj/mecha/lockermech/go_out() @@ -49,11 +49,13 @@ drill.equip_cooldown = initial(drill.equip_cooldown) /obj/mecha/lockermech/Exit(atom/movable/object) + LAZYINITLIST(cargo) if(object in cargo) return FALSE return ..() /obj/mecha/lockermech/get_stats_part() + LAZYINITLIST(cargo) var/output = ..() output += "Cargo Compartment Contents:
" if(length(cargo)) @@ -66,6 +68,7 @@ /obj/mecha/lockermech/Topic(href, href_list) ..() + LAZYINITLIST(cargo) if(href_list["drop_from_cargo"]) var/obj/object = locate(href_list["drop_from_cargo"]) if(object && (object in cargo)) @@ -79,6 +82,7 @@ return /obj/mecha/lockermech/Destroy() + LAZYINITLIST(cargo) for(var/atom/movable/thing in cargo) thing.forceMove(loc) step_rand(thing) @@ -87,6 +91,7 @@ /obj/mecha/lockermech/ex_act(severity) ..() + LAZYINITLIST(cargo) for(var/thing in cargo) var/obj/object = thing if(prob(30 / severity)) From 89112d2d4f453d30e9921ce80aeace4d884ae8c4 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:48:20 +0500 Subject: [PATCH 04/11] Update modular_ss220/objects/code/mecha/lockermech.dm Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/objects/code/mecha/lockermech.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 7441facbff58..c483e8f24419 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -57,7 +57,7 @@ /obj/mecha/lockermech/get_stats_part() LAZYINITLIST(cargo) var/output = ..() - output += "Cargo Compartment Contents:
" + output += "Cargo Compartment Contents:
" if(length(cargo)) for(var/obj/object in cargo) output += "Unload : [object]
" From 42d69f4b679403ae9fc26498dec01e837e669857 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:48:26 +0500 Subject: [PATCH 05/11] Update modular_ss220/objects/code/mecha/lockermech.dm Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/objects/code/mecha/lockermech.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index c483e8f24419..90c2c207a95c 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -59,8 +59,8 @@ var/output = ..() output += "Cargo Compartment Contents:
" if(length(cargo)) - for(var/obj/object in cargo) - output += "Unload : [object]
" + for(var/obj/cargo_item as anything in cargo) + output += "Unload : [cargo_item]
" else output += "Nothing" output += "
" From 248167702db3368753edc5bc234b09fec2c86201 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:48:54 +0500 Subject: [PATCH 06/11] Update modular_ss220/objects/code/mecha/lockermech.dm Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/objects/code/mecha/lockermech.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 90c2c207a95c..bd843c30adf4 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -90,7 +90,7 @@ return ..() /obj/mecha/lockermech/ex_act(severity) - ..() + . = ..() LAZYINITLIST(cargo) for(var/thing in cargo) var/obj/object = thing From 31989a4d09b4dbeb18e003c6031811fc1a54a9ba Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:48:59 +0500 Subject: [PATCH 07/11] Update modular_ss220/objects/code/mecha/lockermech.dm Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/objects/code/mecha/lockermech.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index bd843c30adf4..5bcc8d45ebee 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -159,10 +159,7 @@ drill_delay = 15 /obj/item/mecha_parts/mecha_equipment/drill/lockermech/can_attach(obj/mecha/M as obj) - if(istype(M, /obj/mecha/lockermech)) - if(M.equipment.len < M.max_equip) - return TRUE - return FALSE + return istype(M, /obj/mecha/lockermech) && M.equipment.len < M.max_equip /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech name = "locker mech clamp" From 3e4a3b6314e1062227d08d3b06a85c75c1dcaf43 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:49:07 +0500 Subject: [PATCH 08/11] Update modular_ss220/objects/code/mecha/lockermech.dm Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/objects/code/mecha/lockermech.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 5bcc8d45ebee..45a82d657b47 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -168,7 +168,4 @@ dam_force = 10 /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech/can_attach(obj/mecha/M as obj) - if(istype(M, /obj/mecha/lockermech)) - if(M.equipment.len < M.max_equip) - return TRUE - return FALSE + return istype(M, /obj/mecha/lockermech) && M.equipment.len < M.max_equip From 4d5fae91db5ff32fb294483b608389a69b8b625d Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:52:01 +0500 Subject: [PATCH 09/11] Update lockermech.dm --- .../objects/code/mecha/lockermech.dm | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 45a82d657b47..bd51b62c1b97 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -8,12 +8,12 @@ max_integrity = 100 // Its made of scraps lights_power = 5 step_in = 4 // Same speed as a Ripley, for now. - var/fast_pressure_step_in = 2 // step_in while in normal pressure conditions - var/slow_pressure_step_in = 4 // step_in while in better pressure conditions armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, rad = 0, fire = 70, acid = 60) internal_damage_threshold = 30 // Its got shitty durability max_equip = 2 // You only have two arms and the control system is shitty wreckage = /obj/structure/mecha_wreckage/lockermech + var/fast_pressure_step_in = 2 // step_in while in normal pressure conditions + var/slow_pressure_step_in = 4 // step_in while in better pressure conditions var/list/cargo var/cargo_capacity = 5 // You can fit a few things in this locker but not much. @@ -67,19 +67,19 @@ return output /obj/mecha/lockermech/Topic(href, href_list) - ..() + . = ..() LAZYINITLIST(cargo) - if(href_list["drop_from_cargo"]) - var/obj/object = locate(href_list["drop_from_cargo"]) - if(object && (object in cargo)) - occupant_message("You unload [object].") - object.loc = get_turf(src) - cargo -= object - var/turf/target_turf = get_turf(object) - if(target_turf) - target_turf.Entered(object) - log_message("Unloaded [object]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") - return + if(!href_list["drop_from_cargo"]) + return + + var/obj/cargo_to_unload = locateUID(href_list["drop_from_cargo"]) + if(!cargo_to_unload|| !(cargo_to_unloadin cargo)) + return + + occupant_message("You unload [cargo_to_unload].") + cargo_to_unload.forceMove(get_turf(src)) + cargo -= cargo_to_unload + log_message("Unloaded [cargo_to_unload]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") /obj/mecha/lockermech/Destroy() LAZYINITLIST(cargo) @@ -158,7 +158,7 @@ force = 10 // Its not very strong drill_delay = 15 -/obj/item/mecha_parts/mecha_equipment/drill/lockermech/can_attach(obj/mecha/M as obj) +/obj/item/mecha_parts/mecha_equipment/drill/lockermech/can_attach(obj/mecha/M) return istype(M, /obj/mecha/lockermech) && M.equipment.len < M.max_equip /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech @@ -167,5 +167,5 @@ equip_cooldown = 25 dam_force = 10 -/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech/can_attach(obj/mecha/M as obj) +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/lockermech/can_attach(obj/mecha/M) return istype(M, /obj/mecha/lockermech) && M.equipment.len < M.max_equip From c59bb22ffd8aabd71419c69e19ec1f10b1f0115a Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sun, 21 Jan 2024 18:55:12 +0500 Subject: [PATCH 10/11] Update lockermech.dm --- modular_ss220/objects/code/mecha/lockermech.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index bd51b62c1b97..0a4b08c02473 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -73,7 +73,7 @@ return var/obj/cargo_to_unload = locateUID(href_list["drop_from_cargo"]) - if(!cargo_to_unload|| !(cargo_to_unloadin cargo)) + if(!cargo_to_unload || !(cargo_to_unload in cargo)) return occupant_message("You unload [cargo_to_unload].") From 143d21a79a972aa386c7f86330bb367ae1c80a51 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Thu, 25 Jan 2024 03:54:14 +0500 Subject: [PATCH 11/11] update comments --- .../objects/code/mecha/lockermech.dm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modular_ss220/objects/code/mecha/lockermech.dm b/modular_ss220/objects/code/mecha/lockermech.dm index 0a4b08c02473..0f4dfe8be19e 100644 --- a/modular_ss220/objects/code/mecha/lockermech.dm +++ b/modular_ss220/objects/code/mecha/lockermech.dm @@ -5,17 +5,22 @@ icon = 'modular_ss220/objects/icons/mech.dmi' icon_state = "lockermech" initial_icon = "lockermech" - max_integrity = 100 // Its made of scraps + // It's made of scraps + max_integrity = 100 lights_power = 5 - step_in = 4 // Same speed as a Ripley, for now. + // Same speed as Ripley + step_in = 4 armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, rad = 0, fire = 70, acid = 60) - internal_damage_threshold = 30 // Its got shitty durability - max_equip = 2 // You only have two arms and the control system is shitty + internal_damage_threshold = 30 + max_equip = 2 wreckage = /obj/structure/mecha_wreckage/lockermech - var/fast_pressure_step_in = 2 // step_in while in normal pressure conditions - var/slow_pressure_step_in = 4 // step_in while in better pressure conditions + /// step_in while in normal pressure conditions + var/fast_pressure_step_in = 2 + /// step_in while in better pressure conditions + var/slow_pressure_step_in = 4 var/list/cargo - var/cargo_capacity = 5 // You can fit a few things in this locker but not much. + /// You can fit a few things in this locker but not much. + var/cargo_capacity = 5 /obj/mecha/lockermech/go_out() ..()