From fcb94a650f2a09a54bcc965183b7ef2081fe0c13 Mon Sep 17 00:00:00 2001 From: Aroliacue Date: Wed, 2 Aug 2023 21:38:43 +1000 Subject: [PATCH 1/2] new decoratives --- baystation12.dme | 1 + code/game/objects/structures/catwalk.dm | 68 ++++++++++++++++++++++ code/game/objects/structures/lattice.dm | 21 +++++-- code/modules/halo/icons/railing.dmi | Bin 0 -> 716 bytes code/modules/halo/structures/barricade.dm | 35 +++++++++++ code/modules/multiz/movement.dm | 2 +- code/modules/multiz/turf.dm | 20 +++++-- icons/obj/catwalks.dmi | Bin 0 -> 6149 bytes 8 files changed, 138 insertions(+), 9 deletions(-) create mode 100644 code/game/objects/structures/catwalk.dm create mode 100644 code/modules/halo/icons/railing.dmi create mode 100644 icons/obj/catwalks.dmi diff --git a/baystation12.dme b/baystation12.dme index 22a6ea8a0cae0..988586cccee59 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -887,6 +887,7 @@ #include "code\game\objects\random\random.dm" #include "code\game\objects\structures\barsign.dm" #include "code\game\objects\structures\bedsheet_bin.dm" +#include "code\game\objects\structures\catwalk.dm" #include "code\game\objects\structures\coathanger.dm" #include "code\game\objects\structures\curtains.dm" #include "code\game\objects\structures\displaycase.dm" diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm new file mode 100644 index 0000000000000..36f8180b364f6 --- /dev/null +++ b/code/game/objects/structures/catwalk.dm @@ -0,0 +1,68 @@ +/obj/structure/catwalk + name = "catwalk" + desc = "Cats really don't like these things." + icon = 'icons/obj/catwalks.dmi' + icon_state = "catwalk" + density = 0 + anchored = 1.0 + plane = ABOVE_PLATING_PLANE + layer = LATTICE_LAYER + +/obj/structure/catwalk/Initialize() + . = ..() + for(var/obj/structure/catwalk/C in get_turf(src)) + if(C != src) + qdel(C) + update_icon() + redraw_nearby_catwalks() + + +/obj/structure/catwalk/Destroy() + redraw_nearby_catwalks() + return ..() + +/obj/structure/catwalk/proc/redraw_nearby_catwalks() + for(var/direction in GLOB.alldirs) + var/obj/structure/catwalk/L = locate() in get_step(src, direction) + if(L) + L.update_icon() //so siding get updated properly + + +/obj/structure/catwalk/update_icon() + var/connectdir = 0 + for(var/direction in GLOB.cardinal) + if(locate(/obj/structure/catwalk, get_step(src, direction))) + connectdir |= direction + + //Check the diagonal connections for corners, where you have, for example, connections both north and east. In this case it checks for a north-east connection to determine whether to add a corner marker or not. + var/diagonalconnect = 0 //1 = NE; 2 = SE; 4 = NW; 8 = SW + var/dirs = list(1,2,4,8) + var/i = 1 + for(var/diag in list(NORTHEAST, SOUTHEAST,NORTHWEST,SOUTHWEST)) + if((connectdir & diag) == diag) + if(locate(/obj/structure/catwalk, get_step(src, diag))) + diagonalconnect |= dirs[i] + i += 1 + + icon_state = "catwalk[connectdir]-[diagonalconnect]" + + +/obj/structure/catwalk/ex_act(severity) + switch(severity) + if(1) + new /obj/item/stack/rods(src.loc) + qdel(src) + if(2) + new /obj/item/stack/rods(src.loc) + qdel(src) + +/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob) + if (istype(C, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = C + if(WT.remove_fuel(0, user)) + playsound(src, 'sound/items/Welder.ogg', 100, 1) + to_chat(user, "Slicing catwalk joints ...") + new /obj/item/stack/rods(src.loc) + new /obj/item/stack/rods(src.loc) + new /obj/structure/lattice/(src.loc) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index bab3013f79a30..01f08284d006e 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -62,7 +62,18 @@ to_chat(user, "Slicing lattice joints ...") new /obj/item/stack/rods(loc) qdel(src) - + if (istype(C, /obj/item/stack/rods)) + var/obj/item/stack/rods/R = C + if(R.amount <= 2) + return + else + R.use(2) + to_chat(user, "You start connecting [R.name] to [src.name] ...") + if(do_after(user,50)) + src.alpha = 0 + new /obj/structure/catwalk(src.loc) + qdel(src) + return return /obj/structure/lattice/proc/updateOverlays() @@ -73,12 +84,14 @@ var/dir_sum = 0 + var/turf/T for (var/direction in GLOB.cardinal) - if(locate(/obj/structure/lattice, get_step(src, direction))) + T = get_step(src, direction) + if(locate(/obj/structure/lattice, T) || locate(/obj/structure/catwalk, T)) dir_sum += direction else - if(!(istype(get_step(src, direction), /turf/space))) + if(!(istype(get_step(src, direction), /turf/space)) && !(istype(get_step(src, direction), /turf/simulated/open))) dir_sum += direction icon_state = "lattice[dir_sum]" - return + return \ No newline at end of file diff --git a/code/modules/halo/icons/railing.dmi b/code/modules/halo/icons/railing.dmi new file mode 100644 index 0000000000000000000000000000000000000000..550c7b2ca0291e2d3795a6b6646c1781560f6e5a GIT binary patch literal 716 zcmV;-0yF)IP)004jj0{{R3@ePWI0000CP)t-s1qB75 zprBGxQvd(|QCUUe00001bW%=J06^y0W&i*Hk$O~EbVOxyV{&P5bZKvH004NLQ&wiF1 zGbb}IJw7)xB_$_SiHkEOv#1!Pn~O88C^0t`#5TlGPOQ54R2;?zbT9g%B{anCd0{~U{S3wsgOgjJo0ntfBK~z|U?Up@q!Y~kp{WF8dlgTl1 z5A~@%lXPzA)6u$5Lr2L~d<0kSJYzUST4F_(S(_*ECLtsyc?|-6XxH*;^@8B2MILYp zOAgDPmzg5K_|S=4Gh){J2+pnd9XSeBRg(NYu-!f0QD9wfHWb)2s}&b||H_4)!#;iu z)CKGQ%b`~{)JMP#E;Bu!J?pXeP?csr)Z<8bKxO8mAI{O+?s7A~2-aqhnxE_1S%=Cj z9h-0M&RK^tS@`N6`cLur7~J-sh1t;11x7D0$5SvZ$sCi2%rQv=q~CT{t^@w}#kqia zMS=wj#yJVz7bN)R;7-6N7ufE}dTbi99!C;=(=XAJ2BD;7Pa1@_LH49UaAPAi^vywW zPUeVSKFkr76U_0PDp$GPG}!J)u&zn4Y1q(v5}d<6eg?D`I4)NS_Ljg{2M=gXMhU%| z0Ih9N&`-*T*^)V0Yjrk9E1V-JiX8gMuFR(Qa|fks30O_<=PqolP{`?(HhviSMke5R zdpuwlHY@@H9Ovi(FQ4OB;>x=z(0@M*Q|G^*g-!JPMPWSseopzG9 literal 0 HcmV?d00001 diff --git a/code/modules/halo/structures/barricade.dm b/code/modules/halo/structures/barricade.dm index ed6e6b195bfa3..d1f76cc8d111f 100644 --- a/code/modules/halo/structures/barricade.dm +++ b/code/modules/halo/structures/barricade.dm @@ -83,3 +83,38 @@ icon_state = "covenant_dmg1" else icon_state = "covenant_dmg2" + +/obj/structure/destructible/railing // Really shittily-coded railings. My condolences to whoever looks at this. + name = "railing" + desc = "A metal railing." + icon = 'code/modules/halo/icons/railing.dmi' + icon_state = "railing" + flags = ON_BORDER + maxHealth = 150 // Less health than regular barricades. + health = 150 + cover_rating = 15 // Significantly less cover value than barricades + repair_material_name = "steel" + +/obj/structure/destructible/railing/corner + name = "railing corner" + desc = "A corner of a metal railing." + icon_state = "railing_corner" + flags = ON_BORDER + +/obj/structure/destructible/railing/middle + name = "middle railing" + desc = "Half of a metal railing, connected to the corners." + icon_state = "railing_middle" + flags = ON_BORDER + +/obj/structure/destructible/railing/halfleft + name = "half-left railing" + desc = "Half of a metal railing, connected to the corners." + icon_state = "railing_half_left" + flags = ON_BORDER + +/obj/structure/destructible/railing/halfright + name = "half-right railing" + desc = "Half of a metal railing, connected to the corners." + icon_state = "railing_half_right" + flags = ON_BORDER \ No newline at end of file diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 2f489c706c9cc..10a3dce6e2109 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -156,7 +156,7 @@ if(anchored) return FALSE - if(locate(/obj/structure/lattice, loc)) + if(locate(/obj/structure/lattice, loc) || locate(/obj/structure/catwalk, loc)) return FALSE // See if something prevents us from falling. diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index d58e6c8c87bfc..6ca038366adf0 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -23,12 +23,24 @@ plane = ABOVE_PLATING_PLANE layer = ABOVE_WIRE_LAYER -/turf/simulated/open/CanZPass(atom, direction) - UpdateMobSector(atom) +/turf/simulated/open/CanZPass(atom/A, direction) + if(locate(/obj/structure/catwalk, src)) + if(z == A.z) + if(direction == DOWN) + return 0 + else if(direction == UP) + return 0 + UpdateMobSector(A) return 1 -/turf/space/CanZPass(atom, direction) - UpdateMobSector(atom) +/turf/space/CanZPass(atom/A, direction) + if(locate(/obj/structure/catwalk, src)) + if(z == A.z) + if(direction == DOWN) + return 0 + else if(direction == UP) + return 0 + UpdateMobSector(A) return 1 /turf/simulated/open diff --git a/icons/obj/catwalks.dmi b/icons/obj/catwalks.dmi new file mode 100644 index 0000000000000000000000000000000000000000..9e3d3d977caec0270cadf955a39622a0cfa5f85c GIT binary patch literal 6149 zcmZ{IcU+R)+c?Bi^w^-%va-O2X~U70_83E3w%w^IVrg2=%*X+#W#vk#)J#pWrQ$%7 z+=*qG<*Y|SaYSh@Zj}@P0m1jC?{B>CAMfYGxXv}sxz0J)Jn=SXtyZXQRD(buD^46g zVh8^JP<@v!0e?5@`~HMLpvxm1oUb3b6yka9%GK*vf&w9suqSD0?P`rit8RC;+wX}; zzMl1gbJ)=C0djV8;W5|w7}GI;^n1rrld8Y4jZ+;RUIsvW<-jSXU;FOluHWS2`jHQ^ zCNNLz3@fS|y(pUuC^Gjv_Dj8rwq$%nXq8`}Fyr&t_Xkes`<4rP28JZ_iMx{59pGPO z4_)@KIr>#c$xpDv?164`3f%oz=e45_-?4Cs{#6~1*B@MWPdn;OFJikkAB6&A;s#Ic8!n4M%dEno4XfyWbe~IWBAj@|rT&ypiid0u*oL&nJAYWVq`7LrHED2cCbDkRt4qIRPt#79! zG@RSj)7yJ!YsQCH&#i(Zv|}c%4u;K#!7&(Jqxp`$>JZ?@c5LeD!C8wXh;!X#H8nTi z$5MYhU#97MzSeU{hPa^sIe(9QR_~Ra;R6SBLLc>V&YfFTi7h_Lb&3o&AfRJ+U-Iz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zO{>{nCHG=)@LauX5v$Osr@->E{S_0;!F(&If^+EX%1?(#!sQ!-odtzjk+*g3l* zX$b@2DqfK^mwX0Ura0 zmL>0HYp%YOH%jqBX#21eJy%h=Vh;c)0^f22v-M<|v4%-mz;7&JWICPBTU&Wd@A? zta;SwbI|Z>1t|S8xdvJ%z0CGMi0G^!WBbD68Q-kiPw>h6d@C^{p^7ka5iK)?t>PfH z31riA=WzSY+z`hpm~;J%g^S)RMbUlK8ygw$*(ChTUu}_ldFppFGVV)rjN006w@DUX z0+Vb8aV!2qV2kVkc?Uz(pe~Iz{WyO?8WzlvWa9-KyjnGvWMKieJP8P(vdoLY=Y7bD Mqi2sW4td=AFCB8(;{X5v literal 0 HcmV?d00001 From 19fbe33443292fe31087eb7cf31069b041a2b739 Mon Sep 17 00:00:00 2001 From: Aroliacue Date: Wed, 2 Aug 2023 22:06:39 +1000 Subject: [PATCH 2/2] Allows railings to be dodged over --- code/modules/halo/structures/_destructible.dm | 7 +++++++ code/modules/halo/structures/barricade.dm | 1 + 2 files changed, 8 insertions(+) diff --git a/code/modules/halo/structures/_destructible.dm b/code/modules/halo/structures/_destructible.dm index b54b902110e71..0147d82238048 100644 --- a/code/modules/halo/structures/_destructible.dm +++ b/code/modules/halo/structures/_destructible.dm @@ -21,6 +21,7 @@ var/mob_climb_time = 3 SECONDS var/bump_climb = 0 var/climbable = 1 + var/dodge_pass = 0 /obj/structure/destructible/New() . = ..() @@ -166,6 +167,9 @@ if(mover.throwing) return climbable + if(dodge_pass && (mover.checkpass(PASSTABLE))) + return 1 + return 0 return 1 @@ -206,6 +210,9 @@ if(mover.throwing) return climbable + if(dodge_pass && (mover.checkpass(PASSTABLE))) + return 1 + return 0 return 1 diff --git a/code/modules/halo/structures/barricade.dm b/code/modules/halo/structures/barricade.dm index d1f76cc8d111f..6995409da81f1 100644 --- a/code/modules/halo/structures/barricade.dm +++ b/code/modules/halo/structures/barricade.dm @@ -93,6 +93,7 @@ maxHealth = 150 // Less health than regular barricades. health = 150 cover_rating = 15 // Significantly less cover value than barricades + dodge_pass = 1 repair_material_name = "steel" /obj/structure/destructible/railing/corner