Skip to content

Commit

Permalink
[MIRROR] Lemon fixes ci [MDB IGNORE] (#565)
Browse files Browse the repository at this point in the history
* Lemon fixes ci (#79384)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: LemonInTheDark <[email protected]>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@ gmail.com>
  • Loading branch information
5 people authored Nov 12, 2023
1 parent 23033ac commit c1b1439
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 95 deletions.
76 changes: 34 additions & 42 deletions _maps/RandomRuins/SpaceRuins/russian_derelict.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@
"fU" = (
/turf/open/floor/iron,
/area/ruin/space/ks13/ai/corridor)
"gd" = (
/obj/machinery/portable_atmospherics/canister/plasma,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/singulo)
"ge" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/cable,
Expand Down Expand Up @@ -741,11 +745,6 @@
/obj/effect/mapping_helpers/broken_floor,
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/engineering/singulo)
"jD" = (
/obj/machinery/light/small/directional/east,
/obj/structure/closet/emcloset,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/dorms)
"jV" = (
/obj/effect/spawner/structure/window/hollow/reinforced/middle,
/turf/open/floor/plating/airless,
Expand Down Expand Up @@ -3625,15 +3624,6 @@
/obj/structure/cable,
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/security/cell)
"Cd" = (
/obj/machinery/light/small/directional/west,
/obj/structure/table_frame,
/obj/item/wallframe/apc{
pixel_x = -5;
pixel_y = 9
},
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/tech_storage)
"Ce" = (
/obj/effect/mapping_helpers/burnt_floor,
/obj/machinery/airalarm/directional/north,
Expand Down Expand Up @@ -4075,10 +4065,6 @@
},
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/science/rnd)
"EC" = (
/obj/machinery/portable_atmospherics/canister/plasma,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/singulo)
"ED" = (
/obj/machinery/door/airlock/maintenance{
name = "Atmospherics Access"
Expand Down Expand Up @@ -4248,11 +4234,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/hallway/aft)
"Fy" = (
/obj/machinery/light/small/directional/west,
/obj/effect/mapping_helpers/burnt_floor,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/singulo)
"FB" = (
/obj/machinery/light/small/directional/west,
/obj/structure/closet,
Expand Down Expand Up @@ -4549,6 +4530,13 @@
},
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/command/bridge)
"GW" = (
/obj/item/circuitboard/machine/smes,
/obj/structure/table,
/obj/effect/spawner/random/maintenance,
/obj/effect/mapping_helpers/burnt_floor,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/secure_storage)
"GY" = (
/obj/structure/cable,
/turf/open/floor/iron/chapel{
Expand Down Expand Up @@ -4888,6 +4876,10 @@
/obj/structure/cable,
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/engineering/singulo)
"IZ" = (
/obj/effect/mapping_helpers/burnt_floor,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/singulo)
"Jc" = (
/obj/effect/mapping_helpers/broken_floor,
/obj/effect/mapping_helpers/broken_floor,
Expand Down Expand Up @@ -4930,11 +4922,6 @@
/obj/item/wallframe/firealarm,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/atmos)
"Jm" = (
/obj/machinery/light/small/directional/east,
/obj/effect/mapping_helpers/burnt_floor,
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/engineering/singulo)
"Jp" = (
/obj/effect/spawner/structure/window/hollow/reinforced/middle{
dir = 4
Expand Down Expand Up @@ -6061,14 +6048,6 @@
/obj/structure/cable,
/turf/open/floor/iron,
/area/ruin/space/ks13/security/court)
"Ps" = (
/obj/machinery/light/small/directional/east,
/obj/item/circuitboard/machine/smes,
/obj/structure/table,
/obj/effect/spawner/random/maintenance,
/obj/effect/mapping_helpers/burnt_floor,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/secure_storage)
"Pt" = (
/obj/structure/cable,
/obj/effect/mapping_helpers/broken_floor,
Expand Down Expand Up @@ -6731,6 +6710,10 @@
/obj/structure/chair,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/security/court_hall)
"SI" = (
/obj/structure/closet/emcloset,
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/dorms)
"SJ" = (
/obj/structure/frame/computer{
anchored = 1;
Expand Down Expand Up @@ -7596,6 +7579,15 @@
"Xa" = (
/turf/open/floor/plating/airless,
/area/ruin/space/ks13/ai/corridor)
"Xb" = (
/obj/machinery/light/small/directional/west,
/obj/structure/table_frame,
/obj/item/wallframe/apc{
pixel_x = -5;
pixel_y = 9
},
/turf/open/floor/iron/airless,
/area/ruin/space/ks13/engineering/tech_storage)
"Xd" = (
/obj/structure/closet/crate/bin,
/obj/effect/decal/cleanable/dirt,
Expand Down Expand Up @@ -9601,7 +9593,7 @@ Fq
yq
rm
uf
jD
SI
oU
sm
wc
Expand Down Expand Up @@ -10939,7 +10931,7 @@ rk
QG
QG
Xt
Cd
Xb
DT
QG
QG
Expand Down Expand Up @@ -11381,7 +11373,7 @@ rk
rk
sU
sU
EC
gd
CX
PI
PI
Expand Down Expand Up @@ -11726,7 +11718,7 @@ PI
Ex
pi
FI
Fy
IZ
FI
FI
zv
Expand Down Expand Up @@ -12856,7 +12848,7 @@ fg
Jc
gB
PI
Jm
zv
zv
zv
HX
Expand Down Expand Up @@ -13651,7 +13643,7 @@ rk
rr
rr
ab
Ps
GW
DL
rr
rr
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ GLOBAL_VAR_INIT(glide_size_multiplier, 1.0)
///Is the loop moving the movable outside its control, like it's an external force? e.g. footsteps won't play if enabled.
#define MOVEMENT_LOOP_OUTSIDE_CONTROL (1<<4)

// Movement loop status flags
/// Has the loop been paused, soon to be resumed?
#define MOVELOOP_STATUS_PAUSED (1<<0)
/// Is the loop running? (Is true even when paused)
#define MOVELOOP_STATUS_RUNNING (1<<1)
/// Is the loop queued in a subsystem?
#define MOVELOOP_STATUS_QUEUED (1<<2)

/**
* Returns a bitfield containing flags both present in `flags` arg and the `processing_move_loop_flags` move_packet variable.
* Has no use outside of procs called within the movement proc chain.
Expand Down
22 changes: 14 additions & 8 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@
if(!category || QDELETED(src))
return

var/datum/weakref/master_ref
if(isdatum(new_master))
master_ref = WEAKREF(new_master)
var/atom/movable/screen/alert/thealert
if(alerts[category])
thealert = alerts[category]
if(thealert.override_alerts)
return thealert
if(new_master && new_master != thealert.master)
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [thealert.master]")
if(master_ref && thealert.master_ref && master_ref != thealert.master_ref)
var/datum/current_master = thealert.master_ref.resolve()
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [current_master]")

clear_alert(category)
return .()
Expand Down Expand Up @@ -55,7 +59,7 @@
new_master.layer = old_layer
new_master.plane = old_plane
thealert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
thealert.master = new_master
thealert.master_ref = master_ref
else
thealert.icon_state = "[initial(thealert.icon_state)][severity]"
thealert.severity = severity
Expand Down Expand Up @@ -774,13 +778,14 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
desc = "This can be clicked on to perform an action."
icon_state = "template"
timeout = 30 SECONDS
/// The target to use the action on
var/atom/target
/// Weakref to the target atom to use the action on
var/datum/weakref/target_ref
/// Which on click action to use
var/action = NOTIFY_JUMP

/atom/movable/screen/alert/notify_action/Click()
. = ..()
var/atom/target = target_ref?.resolve()
if(isnull(target))
return

Expand Down Expand Up @@ -910,14 +915,15 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(LAZYACCESS(modifiers, SHIFT_CLICK)) // screen objects don't do the normal Click() stuff so we'll cheat
to_chat(usr, span_boldnotice("[name]</span> - <span class='info'>[desc]"))
return FALSE
if(master && click_master)
return usr.client.Click(master, location, control, params)
var/datum/our_master = master_ref?.resolve()
if(our_master && click_master)
return usr.client.Click(our_master, location, control, params)

return TRUE

/atom/movable/screen/alert/Destroy()
. = ..()
severity = 0
master = null
master_ref = null
owner = null
screen_loc = ""
16 changes: 9 additions & 7 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
animate_movement = SLIDE_STEPS
speech_span = SPAN_ROBOT
appearance_flags = APPEARANCE_UI
/// A reference to the object in the slot. Grabs or items, generally.
var/obj/master = null
/// A reference to the object in the slot. Grabs or items, generally, but any datum will do.
var/datum/weakref/master_ref = null
/// A reference to the owner HUD, if any.
VAR_PRIVATE/datum/hud/hud = null
/**
Expand All @@ -42,7 +42,7 @@
hud = hud_owner

/atom/movable/screen/Destroy()
master = null
master_ref = null
hud = null
return ..()

Expand Down Expand Up @@ -249,10 +249,12 @@

/atom/movable/screen/close/Initialize(mapload, datum/hud/hud_owner, new_master)
. = ..()
master = new_master
master_ref = WEAKREF(new_master)

/atom/movable/screen/close/Click()
var/datum/storage/storage = master
var/datum/storage/storage = master_ref?.resolve()
if(!storage)
return
storage.hide_contents(usr)
return TRUE

Expand Down Expand Up @@ -394,10 +396,10 @@

/atom/movable/screen/storage/Initialize(mapload, datum/hud/hud_owner, new_master)
. = ..()
master = new_master
master_ref = WEAKREF(new_master)

/atom/movable/screen/storage/Click(location, control, params)
var/datum/storage/storage_master = master
var/datum/storage/storage_master = master_ref?.resolve()
if(!istype(storage_master))
return FALSE

Expand Down
11 changes: 7 additions & 4 deletions code/controllers/subsystem/movement/move_handler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ SUBSYSTEM_DEF(move_manager)

var/datum/controller/subsystem/movement/current_subsystem = running_loop.controller

current_subsystem.remove_loop(running_loop)
contesting_subsystem.add_loop(contestant)
var/current_running_loop = running_loop
running_loop = contestant
current_subsystem.remove_loop(current_running_loop)
if(running_loop != contestant) // A signal registrant could have messed with things
return FALSE
contesting_subsystem.add_loop(contestant)
return TRUE

///Tries to figure out the current favorite loop to run. More complex then just deciding between two different loops, assumes no running loop currently exists
Expand All @@ -138,7 +141,7 @@ SUBSYSTEM_DEF(move_manager)
var/datum/move_loop/checking = existing_loops[owner]
if(checking.flags & MOVEMENT_LOOP_IGNORE_PRIORITY)
continue
if(favorite && favorite.priority < checking.priority)
if(favorite && favorite.priority > checking.priority)
continue
favorite = checking

Expand All @@ -152,8 +155,8 @@ SUBSYSTEM_DEF(move_manager)

/datum/movement_packet/proc/remove_loop(datum/controller/subsystem/movement/remove_from, datum/move_loop/loop_to_remove)
if(loop_to_remove == running_loop)
remove_from.remove_loop(loop_to_remove)
running_loop = null
remove_from.remove_loop(loop_to_remove)
if(loop_to_remove.flags & MOVEMENT_LOOP_IGNORE_PRIORITY)
remove_from.remove_loop(loop_to_remove)
if(QDELETED(src))
Expand Down
Loading

0 comments on commit c1b1439

Please sign in to comment.