Skip to content

Commit

Permalink
wtf
Browse files Browse the repository at this point in the history
  • Loading branch information
meemofcourse committed Feb 26, 2024
1 parent a7e6bba commit 3246dc0
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) (islist(L) ? L : list())
#define reverseList(L) reverseRange(L.Copy())
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V);
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += V;
#define LAZYADDASSOCLIST(L, K, V) if(!L) { L = list(); } L[K] += list(V);
#define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; }
#define LAZYACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null
Expand Down
2 changes: 1 addition & 1 deletion code/datums/chatmessage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
message.maptext = complete_text

// View the message
LAZYADDASSOC(owned_by.seen_messages, message_loc, src)
LAZYADDASSOCLIST(owned_by.seen_messages, message_loc, src)
owned_by.images |= message
animate(message, alpha = 255, time = CHAT_MESSAGE_SPAWN_TIME)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/progressbar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
user = User

LAZYADDASSOC(user.progressbars, bar_loc, src)
LAZYADDASSOCLIST(user.progressbars, bar_loc, src)
var/list/bars = user.progressbars[bar_loc]
listindex = bars.len

Expand Down
4 changes: 2 additions & 2 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
if(previous_virtual_z)
LAZYREMOVEASSOC(SSmobs.players_by_virtual_z, "[previous_virtual_z]", src)
if(new_virtual_z)
LAZYADDASSOC(SSmobs.players_by_virtual_z, "[new_virtual_z]", src)
LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[new_virtual_z]", src)
SSidlenpcpool.try_wakeup_virtual_z(new_virtual_z)

/mob/dead/on_virtual_z_change(new_virtual_z, previous_virtual_z)
Expand All @@ -570,7 +570,7 @@
if(previous_virtual_z)
LAZYREMOVEASSOC(SSmobs.dead_players_by_virtual_z, "[previous_virtual_z]", src)
if(new_virtual_z)
LAZYADDASSOC(SSmobs.dead_players_by_virtual_z, "[new_virtual_z]", src)
LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[new_virtual_z]", src)

// Make sure you know what you're doing if you call this, this is intended to only be called by byond directly.
// You probably want CanPass()
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/navbeacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
if(previous_virtual_z)
LAZYREMOVEASSOC(GLOB.navbeacons, "[previous_virtual_z]", src)
if(new_virtual_z)
LAZYADDASSOC(GLOB.navbeacons, "[new_virtual_z]", src)
LAZYADDASSOCLIST(GLOB.navbeacons, "[new_virtual_z]", src)
..()

// set the transponder codes assoc list from codes_txt
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/dead.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
. = ..()
if(!client)
return
LAZYADDASSOC(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src)
LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src)

/mob/dead/Logout()
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


var/virtual_z = virtual_z()
LAZYADDASSOC(SSmobs.players_by_virtual_z, "[virtual_z]", src)
LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[virtual_z]", src)
SSidlenpcpool.try_wakeup_virtual_z(virtual_z)

//Vents
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@

switch(togglestatus)
if(AI_Z_OFF)
LAZYADDASSOC(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src)
LAZYADDASSOCLIST(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src)

else
LAZYREMOVEASSOC(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@
for(var/listed_type in slowdown_type)
if(ispath(listed_type))
listed_type = "[listed_type]" //Path2String
LAZYADDASSOC(movespeed_mod_immunities, listed_type, source)
LAZYADDASSOCLIST(movespeed_mod_immunities, listed_type, source)
else
if(ispath(slowdown_type))
slowdown_type = "[slowdown_type]" //Path2String
LAZYADDASSOC(movespeed_mod_immunities, slowdown_type, source)
LAZYADDASSOCLIST(movespeed_mod_immunities, slowdown_type, source)
if(update)
update_movespeed()

Expand Down

0 comments on commit 3246dc0

Please sign in to comment.