From 996091bebccf344d027b36d865bebdeb2fa0ef9d Mon Sep 17 00:00:00 2001 From: cheesePizza2 <34486300+cheesePizza2@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:24:33 -0500 Subject: [PATCH] Turnstiles (#2502) Implements the turnstile icons sprited by Infra. They block entry coming from the sides (although, chances are you'll have walls there anyways) and the wrong direction. Taking enough damage will break the bars off (if you have a high enough move_force, you can just walk through it and it'll break itself). You can also hop over one in a second. --- mojave/icons/obstacles/turnstile.dmi | Bin 0 -> 1489 bytes mojave/structures/obstacles.dm | 104 +++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 mojave/icons/obstacles/turnstile.dmi diff --git a/mojave/icons/obstacles/turnstile.dmi b/mojave/icons/obstacles/turnstile.dmi new file mode 100644 index 0000000000000000000000000000000000000000..550f9457a7dec1205c079d962c164b34d5f9a895 GIT binary patch literal 1489 zcmV;?1upuDP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+ z(=$pSoZ^zil2jm5sU*L&C@-_HG_^#Di!&v&s2HS^i!-e#F*g;&Hbf{b$_KJC^U|>^ zv;c~x<|I~v^yr{KF3z0%`~p<7l2Y?gNLX3;?w}I-ZxL|K|Vz1jb23K~#90 z?VL@QlSmYXL5GtqHzcRFrdto&p`-S8qG)eHW%2`bSf|p-xqpB7Dkx%vx&_2;Q}2cf zVrHpZvS?@z7vCdR2}4*&XD_mKJfK={Xq=!QFV}KIz#SX z9vFrn#2_D42YIF&NbUa?pp$>e$c6lMqz)wYy)+G+&uRK28>B(;It}vIkypI#3%T#z z+yoXP@@#Mu6t8armYpbP`hnE`JV{pNAp4c8`XJAAhTNZjc~hRw-c(u0-(72_8%XWf zr;l^~B`>^TtE~=DwJ%Q3wgKPg1)q7x9UZ9L7pM399?AkdGM^4q?u*m7V4}b`NCztS z#c6xNMS*QxI#9VkudZTy(-ao2JktZD_Upg&4Y0DnVWD%;JRp{R#6#yr15g%@Ns`2t zwagCNojlV6r1t9%zHAC{d!`#m?W6dI0m~7#PV@tZ_DxJot}(_JpFi+<`l16D_C;q6 zG+)fG-$A~}LL>pbOz~R2=MsSyhN{5A>Sp-9<$K|$7+iH<%#SGdlSrC5EtFP=Ap2gt zNWVt}U#tdo|7)07G+(qCAL5J1KmT`8U)))+B=}+sT0qeU1SPp)E8%?(su}TP<9mUIFTQ+$+NP9%mZV>I8h@m3c@2blr%hD~BELfo zUwo0(Yv6v@(HHOIFJIC3&i8E>n|}9?QAYB`Gx}zH(Zs~$YBRPk_GWCGda^*?0@^MW zXuGPwO0xE@tY1slBI#QOj2mxLDu6EoV`)aMZ!ML9rSsUHY(qO~My+qn8jVsb@R8OR z$?tG-U~P4>@3m)0{rE}WMAyf*uH3DVsed{e0}gVldqmV z5g@x9u&^lGw}0tQ){$brEU?yZMF(QYRr}gT+X9BD z+}HIzCy{*-)%%*hmxS*$eNoT%{{6vF(--yD2V<~in(K?X?>z<@YfA_S;(k&Z&T%~JNg;_k&M_a8FuUcvrDSYCGjp}lSHC*>M~ zO5T5XJQj|D2#UE{fE;2!TmqsTsU_W`L&|ygvB!fdhTf0Dp?GI!E@sNS+xRSXtez?0a|e%*d&% z&Ix4S^P*;EbfC0Rs`fp~LWm|%`*}6mK;7rnXajYhSECKoeO`?=Q1^K?bl||})zE= MOVE_FORCE_STRONG) + // 20 damage at FORCE_STRONG, +10 for every step above that + take_damage(10 * mover.move_force / MOVE_FORCE_DEFAULT) + + // taking damage could have broken the bars + if(!broken) + return + + return TRUE + +/obj/structure/ms13/turnstile/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) + if ((to_dir == turn(dir, 90)) || (to_dir == turn(dir, -90))) + return FALSE + return ..() + +/obj/structure/ms13/turnstile/atom_break() + . = ..() + broken = TRUE + icon_state = "bent" + +/obj/structure/ms13/turnstile/atom_fix() + . = ..() + broken = FALSE + icon_state = "tourniquet"