From ebf8a657c82df83a0e2c562960c532e61cf05785 Mon Sep 17 00:00:00 2001 From: homexp13 Date: Fri, 7 Jun 2024 16:30:03 +0300 Subject: [PATCH 01/10] walls --- modular_RUtgmc/code/__HELPERS/game.dm | 16 ++++++++++ .../code/game/objects/structures/xeno.dm | 1 + .../mob/living/carbon/xenomorph/abilities.dm | 31 ++++++++++++++++++- modular_RUtgmc/includes.dm | 1 + 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 modular_RUtgmc/code/__HELPERS/game.dm diff --git a/modular_RUtgmc/code/__HELPERS/game.dm b/modular_RUtgmc/code/__HELPERS/game.dm new file mode 100644 index 0000000000000..b242407834319 --- /dev/null +++ b/modular_RUtgmc/code/__HELPERS/game.dm @@ -0,0 +1,16 @@ +/proc/supports_adjacent(turf/T) + var/supports = 0 + for(var/D in GLOB.cardinals) + var/turf/TS = get_step(T,D) + if(!TS) + continue + if(TS.density || locate(/obj/structure/mineral_door/resin) in TS) + supports++ + return supports + +/proc/doors_around(turf/T) + var/doors = 0 + for(var/turf/TS in RANGE_TURFS(1, T)) + if(locate(/obj/structure/mineral_door/resin) in TS) + doors++ + return doors diff --git a/modular_RUtgmc/code/game/objects/structures/xeno.dm b/modular_RUtgmc/code/game/objects/structures/xeno.dm index 1a81d41762dbb..de0b4f703f137 100644 --- a/modular_RUtgmc/code/game/objects/structures/xeno.dm +++ b/modular_RUtgmc/code/game/objects/structures/xeno.dm @@ -7,6 +7,7 @@ //Resin Doors /obj/structure/mineral_door/resin icon = 'modular_RUtgmc/icons/obj/smooth_objects/resin-door.dmi' + soft_armor = list(MELEE = 15, BULLET = 50, LASER = 40, ENERGY = 0, BOMB = 15, BIO = 0, FIRE = 0, ACID = 0) /obj/structure/mineral_door/resin/attack_alien(mob/living/carbon/xenomorph/X, damage_amount = X.xeno_caste.melee_damage, damage_type = BRUTE, damage_flag = "", effects = TRUE, armor_penetration = 0, isrightclick = FALSE) var/turf/cur_loc = X.loc diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 08fa01799400f..78b3d6bad7e41 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -59,8 +59,22 @@ for(var/obj/structure/bed/nest/xeno_nest in range (2,T)) owner.balloon_alert(owner, span_notice("Another nest is too close!")) return + if(X.selected_resin == /obj/structure/mineral_door/resin) + if(supports_adjacent(T) > 2) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + return + var/turf/TS + for(var/i in GLOB.cardinals) + TS = get_step(T, i) + if(!istype(TS)) + continue + var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS + if(door) + if(supports_adjacent(get_turf(door)) > 1) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + return + ..() - return ..() /// A version of build_resin with the plasma drain and distance checks removed. /datum/action/ability/activable/xeno/secrete_resin/proc/preshutter_build_resin(turf/T) @@ -112,6 +126,21 @@ owner.balloon_alert(owner, span_notice("Another nest is too close!")) return + if(X.selected_resin == /obj/structure/mineral_door/resin) + if(supports_adjacent(T) > 2) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + return + var/turf/TS + for(var/i in GLOB.cardinals) + TS = get_step(T, i) + if(!istype(TS)) + continue + var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS + if(door) + if(supports_adjacent(get_turf(door)) > 1) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + return + var/atom/new_resin if(ispath(X.selected_resin, /turf)) // We should change turfs, not spawn them in directly var/list/baseturfs = islist(T.baseturfs) ? T.baseturfs : list(T.baseturfs) diff --git a/modular_RUtgmc/includes.dm b/modular_RUtgmc/includes.dm index 6c1d89d168802..8f10c35ac7d1a 100644 --- a/modular_RUtgmc/includes.dm +++ b/modular_RUtgmc/includes.dm @@ -1,5 +1,6 @@ #include "code\__HELPERS\text.dm" #include "code\__HELPERS\unsorted.dm" +#include "code\__HELPERS\game.dm" #include "code\_globalvars\lists\flavor_misc.dm" #include "code\_globalvars\lists\mapping.dm" #include "code\_globalvars\lists\mobs.dm" From 7f930903c657d443a5e5f06175eef68a67490f9d Mon Sep 17 00:00:00 2001 From: homexp13 Date: Tue, 11 Jun 2024 19:04:35 +0300 Subject: [PATCH 02/10] fix --- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 78b3d6bad7e41..5dc4a32a18ea1 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -73,7 +73,7 @@ if(supports_adjacent(get_turf(door)) > 1) owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) return - ..() + return ..() /// A version of build_resin with the plasma drain and distance checks removed. From a6420dc7d64dd9d632d7875d3604d41580057bf1 Mon Sep 17 00:00:00 2001 From: homexp13 <52973135+homexp13@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:52:26 +0300 Subject: [PATCH 03/10] Update modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> --- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 5dc4a32a18ea1..35baf09284a2d 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -61,7 +61,7 @@ return if(X.selected_resin == /obj/structure/mineral_door/resin) if(supports_adjacent(T) > 2) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return var/turf/TS for(var/i in GLOB.cardinals) From 815ce704e7e73c7f7ab257103321c148ddf4aeea Mon Sep 17 00:00:00 2001 From: homexp13 Date: Tue, 11 Jun 2024 20:56:20 +0300 Subject: [PATCH 04/10] small fixes --- modular_RUtgmc/code/__HELPERS/game.dm | 7 ------- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/modular_RUtgmc/code/__HELPERS/game.dm b/modular_RUtgmc/code/__HELPERS/game.dm index b242407834319..daedc497220e5 100644 --- a/modular_RUtgmc/code/__HELPERS/game.dm +++ b/modular_RUtgmc/code/__HELPERS/game.dm @@ -7,10 +7,3 @@ if(TS.density || locate(/obj/structure/mineral_door/resin) in TS) supports++ return supports - -/proc/doors_around(turf/T) - var/doors = 0 - for(var/turf/TS in RANGE_TURFS(1, T)) - if(locate(/obj/structure/mineral_door/resin) in TS) - doors++ - return doors diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 35baf09284a2d..2f76e3c1f9fe9 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -128,7 +128,7 @@ if(X.selected_resin == /obj/structure/mineral_door/resin) if(supports_adjacent(T) > 2) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return var/turf/TS for(var/i in GLOB.cardinals) @@ -138,7 +138,7 @@ var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS if(door) if(supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports!")) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) return var/atom/new_resin From cb92d6d8bce55a004525dd13c5d6f4e17671799a Mon Sep 17 00:00:00 2001 From: homexp13 Date: Tue, 11 Jun 2024 21:04:30 +0300 Subject: [PATCH 05/10] if && --- .../mob/living/carbon/xenomorph/abilities.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 2f76e3c1f9fe9..b81a0bdb816ff 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -69,10 +69,9 @@ if(!istype(TS)) continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS - if(door) - if(supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) - return + if(door && supports_adjacent(get_turf(door)) > 1) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + return return ..() @@ -136,10 +135,9 @@ if(!istype(TS)) continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS - if(door) - if(supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) - return + if(door && supports_adjacent(get_turf(door)) > 1) + owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + return var/atom/new_resin if(ispath(X.selected_resin, /turf)) // We should change turfs, not spawn them in directly From ee0728065a05c7efdf1a5fe32e4e06619dbf56dd Mon Sep 17 00:00:00 2001 From: homexp13 Date: Tue, 11 Jun 2024 21:10:39 +0300 Subject: [PATCH 06/10] name --- modular_RUtgmc/code/__HELPERS/game.dm | 4 ++-- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modular_RUtgmc/code/__HELPERS/game.dm b/modular_RUtgmc/code/__HELPERS/game.dm index daedc497220e5..f675519d5b887 100644 --- a/modular_RUtgmc/code/__HELPERS/game.dm +++ b/modular_RUtgmc/code/__HELPERS/game.dm @@ -1,7 +1,7 @@ /proc/supports_adjacent(turf/T) var/supports = 0 - for(var/D in GLOB.cardinals) - var/turf/TS = get_step(T,D) + for(var/diraction in GLOB.cardinals) + var/turf/TS = get_step(T,diraction) if(!TS) continue if(TS.density || locate(/obj/structure/mineral_door/resin) in TS) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index b81a0bdb816ff..80aa66119f054 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -64,8 +64,8 @@ owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return var/turf/TS - for(var/i in GLOB.cardinals) - TS = get_step(T, i) + for(var/diraction in GLOB.cardinals) + TS = get_step(T, diraction) if(!istype(TS)) continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS @@ -130,8 +130,8 @@ owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return var/turf/TS - for(var/i in GLOB.cardinals) - TS = get_step(T, i) + for(var/diraction in GLOB.cardinals) + TS = get_step(T, diraction) if(!istype(TS)) continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS From e5d755784bbde018735a0a1e7ae636494c985986 Mon Sep 17 00:00:00 2001 From: homexp13 <52973135+homexp13@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:25:41 +0300 Subject: [PATCH 07/10] Update modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> --- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 80aa66119f054..8264cb900d0ef 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -70,7 +70,7 @@ continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS if(door && supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + owner.balloon_alert(owner, span_notice("Too many adjacent supports for door!")) return return ..() From 169e5babf389c305e707bc8117ee6e77bc8233b7 Mon Sep 17 00:00:00 2001 From: homexp13 <52973135+homexp13@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:25:50 +0300 Subject: [PATCH 08/10] Update modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> --- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 8264cb900d0ef..3a7d4a1bc2c14 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -136,7 +136,7 @@ continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS if(door && supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + owner.balloon_alert(owner, span_notice("Too many adjecent supports for door!")) return var/atom/new_resin From 0a128916ddf37d3943f2b8c94e558a3236b3e6ab Mon Sep 17 00:00:00 2001 From: homexp13 <52973135+homexp13@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:20:05 +0300 Subject: [PATCH 09/10] Update modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com> --- .../code/modules/mob/living/carbon/xenomorph/abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 3a7d4a1bc2c14..e139b41379156 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -136,7 +136,7 @@ continue var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS if(door && supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjecent supports for door!")) + owner.balloon_alert(owner, span_notice("Too many adjacent supports for door!")) return var/atom/new_resin From 09230c4506b145c0bb568c6c358195ed3bc8927e Mon Sep 17 00:00:00 2001 From: homexp13 Date: Wed, 12 Jun 2024 23:01:53 +0300 Subject: [PATCH 10/10] side_turf --- modular_RUtgmc/code/__HELPERS/game.dm | 6 +++--- .../mob/living/carbon/xenomorph/abilities.dm | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modular_RUtgmc/code/__HELPERS/game.dm b/modular_RUtgmc/code/__HELPERS/game.dm index f675519d5b887..9c9313e5cdae9 100644 --- a/modular_RUtgmc/code/__HELPERS/game.dm +++ b/modular_RUtgmc/code/__HELPERS/game.dm @@ -1,9 +1,9 @@ /proc/supports_adjacent(turf/T) var/supports = 0 for(var/diraction in GLOB.cardinals) - var/turf/TS = get_step(T,diraction) - if(!TS) + var/turf/side_turf = get_step(T,diraction) + if(!side_turf) continue - if(TS.density || locate(/obj/structure/mineral_door/resin) in TS) + if(side_turf.density || locate(/obj/structure/mineral_door/resin) in side_turf) supports++ return supports diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm index 80aa66119f054..ee47e12460372 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -63,12 +63,12 @@ if(supports_adjacent(T) > 2) owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return - var/turf/TS + var/turf/side_turf for(var/diraction in GLOB.cardinals) - TS = get_step(T, diraction) - if(!istype(TS)) + side_turf = get_step(T, diraction) + if(!istype(side_turf)) continue - var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS + var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in side_turf if(door && supports_adjacent(get_turf(door)) > 1) owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) return @@ -129,14 +129,14 @@ if(supports_adjacent(T) > 2) owner.balloon_alert(owner, span_notice("Too many adjacent supports!")) return - var/turf/TS + var/turf/side_turf for(var/diraction in GLOB.cardinals) - TS = get_step(T, diraction) - if(!istype(TS)) + side_turf = get_step(T, diraction) + if(!istype(side_turf)) continue - var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in TS + var/obj/structure/mineral_door/resin/door = locate(/obj/structure/mineral_door/resin) in side_turf if(door && supports_adjacent(get_turf(door)) > 1) - owner.balloon_alert(owner, span_notice("Too many adjaecent supports for door!")) + owner.balloon_alert(owner, span_notice("Too many adjacent supports for door!")) return var/atom/new_resin