Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] The OFD can't launch closets #1654

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion code/__defines/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
#define OVERMAP_WEAKNESS_EMP 2
#define OVERMAP_WEAKNESS_MINING 4
#define OVERMAP_WEAKNESS_EXPLOSIVE 8
#define OVERMAP_WEAKNESS_DROPPOD 16
18 changes: 4 additions & 14 deletions code/modules/overmap/disperser/disperser_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,13 @@
return get_next_shot_seconds() * 1000 / coolinterval

/obj/machinery/computer/ship/disperser/proc/get_charge_type()
var/obj/structure/ship_munition/disperser_charge/B = locate() in get_turf(back)
if(B)
return B.chargetype
var/obj/structure/closet/C = locate() in get_turf(back)
if(C)
return OVERMAP_WEAKNESS_DROPPOD
var/obj/structure/ship_munition/disperser_charge/charge = get_charge()
if (charge)
return charge.chargetype
return OVERMAP_WEAKNESS_NONE

/obj/machinery/computer/ship/disperser/proc/get_charge()
var/obj/structure/ship_munition/disperser_charge/B = locate() in get_turf(back)
if(B)
return B

var/obj/structure/closet/C = locate() in get_turf(back)
return C
return locate(/obj/structure/ship_munition/disperser_charge) in get_turf(back)

/obj/machinery/computer/ship/disperser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = TRUE)
if(!linked)
Expand Down Expand Up @@ -184,8 +176,6 @@
switch(get_charge_type())
if(OVERMAP_WEAKNESS_NONE)
charge = "[SPAN_BOLD("ERROR")]: No valid charge detected."
if(OVERMAP_WEAKNESS_DROPPOD)
charge = "HERMES"
else
var/obj/structure/ship_munition/disperser_charge/B = get_charge()
charge = B.chargedesc
Expand Down
49 changes: 3 additions & 46 deletions code/modules/overmap/disperser/disperser_fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,12 @@
handle_beam(start, direction)
handle_overbeam()

if (chargetype != OVERMAP_WEAKNESS_DROPPOD)
qdel(atomcharge)
qdel(atomcharge)

if(prob(cool_failchance()))
explosion(middle, rand(6, 9))
next_shot = coolinterval + world.time

if(prob(100 - accuracy))
if(chargetype == OVERMAP_WEAKNESS_DROPPOD)
// Remove it in case it's a droppod.
atomcharge.forceMove(locate(rand(1,world.maxx),rand(1,world.maxy), GLOB.using_map.get_empty_zlevel()))
return TRUE

reset_calibration()

var/turf/overmaptarget = get_step(linked, overmapdir)
Expand Down Expand Up @@ -161,44 +154,8 @@
targetturf = areaturf

log_and_message_admins("Disperser beam hit sector at [targetturf.loc.name].", location=targetturf)
if(chargetype == OVERMAP_WEAKNESS_DROPPOD)
if(targetturf.density)
targetturf.ex_act(EX_ACT_DEVASTATING)
for(var/atom/A in targetturf)
A.ex_act(EX_ACT_LIGHT)

for(var/mob/M in GLOB.player_list)
if(!AreConnectedZLevels(get_z(M), get_z(targetturf)))
continue
shake_camera(M, 25)
if(!isdeaf(M))
sound_to(M, sound('sound/effects/explosionfar.ogg', volume=10))

if(M.can_be_floored())
var/shouldstumble = FALSE
var/sincelastmove = world.time - M.l_move_time

if(sincelastmove > QUICK_TO_STANDING SECONDS)
shouldstumble = prob(STANDING_FALL_PROB)
else if(sincelastmove > DELIBERATE_TO_STANDING)
shouldstumble = MOVING_QUICKLY(M) ? prob(RUNNING_FALL_PROB) : prob(STANDING_FALL_PROB)
else
shouldstumble = MOVING_QUICKLY(M) ? prob(RUNNING_FALL_PROB) : prob(WALKING_FALL_PROB)

if(shouldstumble)
to_chat(M, SPAN_DANGER("You stumble onto the floor from the shaking!"))
M.AdjustStunned(2)
M.AdjustWeakened(2)

charge.forceMove(targetturf)
// The disperser is not a taxi
for(var/mob/living/L in charge)
to_chat(L, SPAN_DANGER("Your body shakes violently, immense and agonising forces tearing it apart."))
L.forceMove(targetturf)
L.ex_act(EX_ACT_DEVASTATING)
else
charge.fire(targetturf, strength, range)
qdel(charge)
charge.fire(targetturf, strength, range)
qdel(charge)

/obj/machinery/computer/ship/disperser/proc/handle_beam(turf/start, direction)
set waitfor = FALSE
Expand Down
11 changes: 2 additions & 9 deletions maps/torch/torch3_deck3.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -17343,13 +17343,6 @@
},
/turf/simulated/floor/tiled,
/area/hallway/primary/thirddeck/fore)
"Rl" = (
/obj/floor_decal/industrial/hatch,
/obj/structure/closet/crate{
name = "hermes crate"
},
/turf/simulated/floor/tiled/dark,
/area/command/disperser)
"Rm" = (
/obj/structure/cable/green{
d1 = 4;
Expand Down Expand Up @@ -42765,11 +42758,11 @@ aI
aa
Qq
Qq
Rl
Pp
Pp
Pp
Rl
Pp
Pp
Qq
Qq
aa
Expand Down