Skip to content

Commit

Permalink
Tent Tweaks & Fixes! (#3918)
Browse files Browse the repository at this point in the history
# 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:
  • Loading branch information
ghostsheet committed Jul 24, 2023
1 parent 08ab444 commit 788da54
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 77 deletions.
7 changes: 7 additions & 0 deletions code/modules/tents/blockers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
42 changes: 38 additions & 4 deletions code/modules/tents/deployed_tents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions code/modules/tents/folded_tents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -123,15 +123,15 @@
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
name = "folded USCM Requisitions Tent"
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

Expand All @@ -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

Expand Down
82 changes: 20 additions & 62 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -119397,7 +119355,7 @@ bEi
bZr
bmD
ngw
gCu
pjG
boz
bpR
bpR
Expand Down Expand Up @@ -119600,7 +119558,7 @@ brp
bZr
bmD
xId
hBP
pjG
boz
bpR
bpR
Expand Down Expand Up @@ -120006,7 +119964,7 @@ buz
bZr
bmD
dmE
pvF
pjG
boz
bpR
bpR
Expand Down Expand Up @@ -120209,7 +120167,7 @@ bEm
bZr
bmD
hAc
vSr
pjG
boz
bpR
bpR
Expand Down
10 changes: 7 additions & 3 deletions maps/tents/tent_big.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions maps/tents/tent_cmd.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
/turf/template_noop,
/area/template_noop)
"p" = (
/obj/structure/blocker/tent/full_tile,
/turf/template_noop,
/area/template_noop)
"v" = (
Expand Down
1 change: 1 addition & 0 deletions maps/tents/tent_med.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/turf/template_noop,
/area/template_noop)
"p" = (
/obj/structure/blocker/tent/full_tile,
/turf/template_noop,
/area/template_noop)
"v" = (
Expand Down
Loading

0 comments on commit 788da54

Please sign in to comment.