From 788da540f0aa84b5e2a0e91f7fa42889b45e76ab Mon Sep 17 00:00:00 2001 From: ghostsheet <43085828+ghostsheet@users.noreply.github.com> Date: Tue, 25 Jul 2023 07:57:47 +1000 Subject: [PATCH] Tent Tweaks & Fixes! (#3918) # About the pull request Marines can destroy tents with an E-tool or shovel Scattered the 4 tents to (the four corners) their own respective department with the big tent being in Bravo Bunks You can no longer stand behind tent, (increases all tent height by 1) Re-wrote xeno attacks on tents so it gives more feedback and is handled similarly to cades being attacked Fixed bug where xenos can't slash the tent (or people in the tents) from the sides Fixed bug where tent would possibly block bullets Fixed bug where staying inside a tent that's being deleted will give your permanent see-through roof vision # Explain why it's good for the game Tents were soft-griefing the marines by being poorly placed with no way to remove them. This will allow marines to take down poorly placed tents While pushing the responsibility of the tents onto the department that decides to take it down. Big tent (RP tent) is in bravo bunks as it is an all access area where anyone can grab it, from bravo marines to CL or mess sergeant The north walls of tents are now full density blocks no one should be able to enter or hide behind it (or hide traps/sentry items behind there) Bug bad for the rest # Changelog :cl: ghostsheet add: Tents can be destroyed with an E-tool. add: Tents are now in their respective department, Big tent is now in Bravo Bunks. add: You can no longer stand behind a tent. fix: Xenos can now slash tents from the side. fix: Tents no longer randomly block bullets. fix: Staying inside a tent when it is destroyed no longer give your permanent see-through roof vision. /:cl: --- code/modules/tents/blockers.dm | 7 ++ code/modules/tents/deployed_tents.dm | 42 +++++++++-- code/modules/tents/folded_tents.dm | 8 +-- maps/map_files/USS_Almayer/USS_Almayer.dmm | 82 ++++++---------------- maps/tents/tent_big.dmm | 10 ++- maps/tents/tent_cmd.dmm | 1 + maps/tents/tent_med.dmm | 1 + maps/tents/tent_reqs.dmm | 12 ++-- 8 files changed, 86 insertions(+), 77 deletions(-) diff --git a/code/modules/tents/blockers.dm b/code/modules/tents/blockers.dm index 3301768d9147..24765ca2a284 100644 --- a/code/modules/tents/blockers.dm +++ b/code/modules/tents/blockers.dm @@ -7,6 +7,7 @@ invisibility = INVISIBILITY_MAXIMUM density = TRUE opacity = FALSE // Unfortunately this doesn't behave as we'd want with ON_BORDER so we can't make tent opaque + throwpass = TRUE // Needs this so xenos can attack through the blocker and hit the tents or people inside /// The tent this blocker relates to, will be destroyed along with it var/obj/structure/tent/linked_tent @@ -36,3 +37,9 @@ /obj/structure/blocker/tent/get_projectile_hit_boolean(obj/item/projectile/P) . = ..() return FALSE // Always fly through the tent + +//Blocks all direction, basically an invisible wall +/obj/structure/blocker/tent/full_tile + flags_atom = NO_FLAGS + icon = 'icons/landmarks.dmi' + icon_state = "invisible_wall" diff --git a/code/modules/tents/deployed_tents.dm b/code/modules/tents/deployed_tents.dm index c81beb318d5a..28bf11a38a6a 100644 --- a/code/modules/tents/deployed_tents.dm +++ b/code/modules/tents/deployed_tents.dm @@ -3,6 +3,7 @@ /obj/structure/tent name = "tent" icon = 'icons/obj/structures/tents_deployed_classic.dmi' + desc = "Can be torn down with an entrenching tool." opacity = FALSE // Seems only the initial turf blocks light, not all of the multitile. Therefore, useless. layer = INTERIOR_WALL_SOUTH_LAYER // This should be below FLY_LAYER but just thank chairs and other bs health = 200 @@ -11,7 +12,7 @@ /// Turf dimensions along the X axis, beginning from left, at ground level var/x_dim = 2 /// Turf dimensions along the Y axis, beginning from bottom, at ground level - var/y_dim = 3 + var/y_dim = 4 /// How much cold protection to add to entering humans - Full body clothing means complete (1) protection var/cold_protection_factor = 0.4 @@ -55,6 +56,7 @@ return var/mob/subject_mob = subject RegisterSignal(subject_mob, list(COMSIG_MOVABLE_TURF_ENTERED, COMSIG_GHOST_MOVED), PROC_REF(mob_moved), override = TRUE) // Must override because we can't know if mob was already inside tent without keeping an awful ref list + subject_mob.RegisterSignal(src, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob, tent_deletion_clean_up), override = TRUE) var/atom/movable/screen/plane_master/roof/roof_plane = subject_mob.hud_used.plane_masters["[ROOF_PLANE]"] roof_plane?.invisibility = INVISIBILITY_MAXIMUM if(ishuman(subject)) @@ -71,28 +73,60 @@ /obj/structure/tent/proc/mob_exited_tent(mob/subject) UnregisterSignal(subject, list(COMSIG_MOVABLE_TURF_ENTERED, COMSIG_GHOST_MOVED, COMSIG_HUMAN_COLD_PROTECTION_APPLY_MODIFIERS)) + subject.UnregisterSignal(src, COMSIG_PARENT_QDELETING) var/atom/movable/screen/plane_master/roof/roof_plane = subject.hud_used.plane_masters["[ROOF_PLANE]"] roof_plane?.invisibility = 0 +/mob/proc/tent_deletion_clean_up(obj/structure/tent/deleting_tent) + SIGNAL_HANDLER + deleting_tent.mob_exited_tent(src) + /obj/structure/tent/attack_alien(mob/living/carbon/xenomorph/M) if(unslashable) return - health -= 20 + + M.animation_attack_on(src) + health -= rand(M.melee_damage_lower, M.melee_damage_upper) + playsound(src, 'sound/items/paper_ripped.ogg', 25, 1) + + M.visible_message(SPAN_DANGER("[M] [M.slashes_verb] [src]!"), \ + SPAN_DANGER("You [M.slash_verb] [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT) + if(health <= 0) visible_message(SPAN_BOLDWARNING("The [src] collapses!")) qdel(src) + return XENO_ATTACK_ACTION + +/obj/structure/tent/attackby(obj/item/item, mob/user) + var/obj/item/tool/shovel/shovel = item + if(!istype(shovel) || shovel.folded) + return + visible_message(SPAN_HIGHDANGER("[user] is trying to tear down the [src]")) + playsound(src, 'sound/items/paper_ripped.ogg', 25, 1) + + if(user.action_busy || !do_after(user, 150, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE, src) || QDELETED(src)) + return + + visible_message(SPAN_HIGHDANGER("[user] tears down the [src]")) + playsound(src, 'sound/items/paper_ripped.ogg', 25, 1) + qdel(src) + +/obj/structure/tent/get_projectile_hit_boolean(obj/item/projectile/P) + . = ..() + return FALSE // Always fly through the tent + /// Command tent, providing basics for field command: a phone, and an overwatch console /obj/structure/tent/cmd icon_state = "cmd_interior" roof_state = "cmd_top" - desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. It is very frail, do not burn, expose to sharp objects, or explosives." + desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. It is very frail, do not burn, expose to sharp objects, or explosives. Can be torn down with an entrenching tool." /// Medical tent, procures a buff to surgery speed /obj/structure/tent/med icon_state = "med_interior" roof_state = "med_top" - desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. It is very fragile however and won't withstand the rigors of war." + desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. It is very fragile however and won't withstand the rigors of war. Can be torn down with an entrenching tool." var/surgery_speed_mult = 0.9 var/surgery_pain_reduction = 5 diff --git a/code/modules/tents/folded_tents.dm b/code/modules/tents/folded_tents.dm index d6f1dbca9fd9..08b8142ab358 100644 --- a/code/modules/tents/folded_tents.dm +++ b/code/modules/tents/folded_tents.dm @@ -114,7 +114,7 @@ icon_state = "cmd" desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. Unfold in a suitable location to maximize usefulness. Staff Officer not included. ENTRANCE TO THE SOUTH." dim_x = 2 - dim_y = 3 + dim_y = 4 off_x = -1 template = /datum/map_template/tent/cmd @@ -123,7 +123,7 @@ icon_state = "med" desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. Unfold in a suitable location to maximize health gains. Surgical Tray not included. ENTRANCE TO THE SOUTH." dim_x = 2 - dim_y = 3 + dim_y = 4 template = /datum/map_template/tent/med /obj/item/folded_tent/reqs @@ -131,7 +131,7 @@ icon_state = "req" desc = "A standard USCM Requisitions Tent. Now, you can enjoy req line anywhere you go! Unfold in a suitable location to maximize resource distribution. ASRS not included. ENTRANCE TO THE SOUTH." dim_x = 4 - dim_y = 3 + dim_y = 4 off_x = -2 template = /datum/map_template/tent/reqs @@ -140,7 +140,7 @@ icon_state = "big" desc = "A standard USCM Tent. This one is just a bigger, general purpose version. Unfold in a suitable location for maximum FOB vibes. Mess Tech not included. ENTRANCE TO THE SOUTH." dim_x = 3 - dim_y = 3 + dim_y = 4 off_x = -2 template = /datum/map_template/tent/big diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index 0e5546879dcb..80262ec61937 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -5938,6 +5938,7 @@ /obj/item/device/radio/marine, /obj/item/device/radio/marine, /obj/item/device/radio/marine, +/obj/item/folded_tent/cmd, /turf/open/floor/almayer{ icon_state = "redfull" }, @@ -15896,6 +15897,10 @@ desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; name = "Surgery Cleaner" }, +/obj/item/folded_tent/med{ + pixel_x = -8; + pixel_y = 14 + }, /turf/open/floor/almayer{ dir = 8; icon_state = "sterile_green_corner" @@ -29660,11 +29665,6 @@ pixel_x = 9 }, /obj/item/reagent_container/pill/happy, -/obj/item/stack/tile/plasteel{ - layer = 2.5; - pixel_x = -8; - pixel_y = 4 - }, /obj/item/clothing/glasses/disco_fever{ pixel_x = -3; pixel_y = -2 @@ -37958,18 +37958,6 @@ icon_state = "plate" }, /area/almayer/hallways/vehiclehangar) -"gCu" = ( -/obj/structure/disposalpipe/segment{ - dir = 8 - }, -/obj/structure/pipes/standard/simple/hidden/supply{ - dir = 4 - }, -/obj/item/folded_tent/cmd, -/turf/open/floor/almayer{ - icon_state = "plating_striped" - }, -/area/almayer/squads/req) "gCw" = ( /obj/item/reagent_container/food/drinks/cans/beer{ pixel_x = 10 @@ -40122,18 +40110,6 @@ /obj/structure/pipes/standard/manifold/hidden/supply, /turf/open/floor/plating/plating_catwalk, /area/almayer/hallways/hangar) -"hBP" = ( -/obj/structure/disposalpipe/segment{ - dir = 8 - }, -/obj/structure/pipes/standard/simple/hidden/supply{ - dir = 4 - }, -/obj/item/folded_tent/med, -/turf/open/floor/almayer{ - icon_state = "plating_striped" - }, -/area/almayer/squads/req) "hBU" = ( /obj/structure/largecrate/random/secure, /obj/effect/decal/warning_stripes{ @@ -42135,8 +42111,9 @@ /area/almayer/squads/delta) "ixN" = ( /obj/structure/largecrate, -/obj/item/prop/almayer/handheld1{ - pixel_y = 12 +/obj/item/folded_tent/reqs{ + pixel_x = -3; + pixel_y = 10 }, /turf/open/floor/almayer{ icon_state = "test_floor4" @@ -57166,18 +57143,6 @@ icon_state = "green" }, /area/almayer/hallways/aft_hallway) -"pvF" = ( -/obj/structure/disposalpipe/segment{ - dir = 8 - }, -/obj/structure/pipes/standard/simple/hidden/supply{ - dir = 4 - }, -/obj/item/folded_tent/reqs, -/turf/open/floor/almayer{ - icon_state = "plating_striped" - }, -/area/almayer/squads/req) "pvJ" = ( /obj/structure/disposalpipe/segment{ dir = 4 @@ -71715,18 +71680,6 @@ icon_state = "plate" }, /area/almayer/living/grunt_rnr) -"vSr" = ( -/obj/structure/disposalpipe/segment{ - dir = 8 - }, -/obj/structure/pipes/standard/simple/hidden/supply{ - dir = 4 - }, -/obj/item/folded_tent/big, -/turf/open/floor/almayer{ - icon_state = "plating_striped" - }, -/area/almayer/squads/req) "vSE" = ( /obj/structure/closet/secure_closet/personal, /turf/open/floor/almayer{ @@ -74846,12 +74799,17 @@ desc = "A supply crate containing everything you need to stop a CLF uprising."; name = "\improper USCM crate 'FOB supplies'" }, -/obj/item/storage/box/mousetraps{ - pixel_y = 12 - }, /obj/structure/sign/arcturianstopsign{ pixel_y = 32 }, +/obj/item/folded_tent/big{ + pixel_y = 10; + pixel_x = -6 + }, +/obj/item/storage/box/mousetraps{ + pixel_y = 12; + pixel_x = 3 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -119397,7 +119355,7 @@ bEi bZr bmD ngw -gCu +pjG boz bpR bpR @@ -119600,7 +119558,7 @@ brp bZr bmD xId -hBP +pjG boz bpR bpR @@ -120006,7 +119964,7 @@ buz bZr bmD dmE -pvF +pjG boz bpR bpR @@ -120209,7 +120167,7 @@ bEm bZr bmD hAc -vSr +pjG boz bpR bpR diff --git a/maps/tents/tent_big.dmm b/maps/tents/tent_big.dmm index f341e67ce2aa..acf19e26a98e 100644 --- a/maps/tents/tent_big.dmm +++ b/maps/tents/tent_big.dmm @@ -7,6 +7,10 @@ /obj/structure/tent_curtain, /turf/template_noop, /area/template_noop) +"k" = ( +/obj/structure/blocker/tent/full_tile, +/turf/template_noop, +/area/template_noop) "n" = ( /obj/structure/blocker/tent{ dir = 4 @@ -59,19 +63,19 @@ /area/template_noop) (1,1,1) = {" -O +k J v a "} (2,1,1) = {" -O +k S O x "} (3,1,1) = {" -O +k n s G diff --git a/maps/tents/tent_cmd.dmm b/maps/tents/tent_cmd.dmm index e7260ca9bccf..0dbd6a6ef330 100644 --- a/maps/tents/tent_cmd.dmm +++ b/maps/tents/tent_cmd.dmm @@ -30,6 +30,7 @@ /turf/template_noop, /area/template_noop) "p" = ( +/obj/structure/blocker/tent/full_tile, /turf/template_noop, /area/template_noop) "v" = ( diff --git a/maps/tents/tent_med.dmm b/maps/tents/tent_med.dmm index fcb446a68e25..527f3dc7bc05 100644 --- a/maps/tents/tent_med.dmm +++ b/maps/tents/tent_med.dmm @@ -16,6 +16,7 @@ /turf/template_noop, /area/template_noop) "p" = ( +/obj/structure/blocker/tent/full_tile, /turf/template_noop, /area/template_noop) "v" = ( diff --git a/maps/tents/tent_reqs.dmm b/maps/tents/tent_reqs.dmm index 7d9cf926e698..2dc47531ed37 100644 --- a/maps/tents/tent_reqs.dmm +++ b/maps/tents/tent_reqs.dmm @@ -70,6 +70,10 @@ }, /turf/template_noop, /area/template_noop) +"R" = ( +/obj/structure/blocker/tent/full_tile, +/turf/template_noop, +/area/template_noop) "S" = ( /obj/structure/blocker/tent{ dir = 8 @@ -83,25 +87,25 @@ /area/template_noop) (1,1,1) = {" -a +R B S m "} (2,1,1) = {" -a +R J a c "} (3,1,1) = {" -a +R w U k "} (4,1,1) = {" -a +R n d k