Skip to content

Commit

Permalink
Merge branch 'master' into Patch-Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AmoryBlaine committed Aug 23, 2024
2 parents 1d851b9 + 45c1aa2 commit 78e90dc
Show file tree
Hide file tree
Showing 50 changed files with 1,630 additions and 265 deletions.
30 changes: 30 additions & 0 deletions code/__DEFINES/strippable.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// All of these must be matched in StripMenu.js.
#define STRIPPABLE_ITEM_HEAD "head"
#define STRIPPABLE_ITEM_BACK "back"
#define STRIPPABLE_ITEM_MASK "wear_mask"
#define STRIPPABLE_ITEM_EYES "glasses"
#define STRIPPABLE_ITEM_L_EAR "wear_l_ear"
#define STRIPPABLE_ITEM_R_EAR "wear_r_ear"
#define STRIPPABLE_ITEM_JUMPSUIT "w_uniform"
#define STRIPPABLE_ITEM_SUIT "wear_suit"
#define STRIPPABLE_ITEM_GLOVES "gloves"
#define STRIPPABLE_ITEM_FEET "shoes"
#define STRIPPABLE_ITEM_SUIT_STORAGE "j_store"
#define STRIPPABLE_ITEM_ID "id"
#define STRIPPABLE_ITEM_BELT "belt"
#define STRIPPABLE_ITEM_LPOCKET "l_store"
#define STRIPPABLE_ITEM_RPOCKET "r_store"
#define STRIPPABLE_ITEM_LHAND "l_hand"
#define STRIPPABLE_ITEM_RHAND "r_hand"
#define STRIPPABLE_ITEM_HANDCUFFS "handcuffs"
#define STRIPPABLE_ITEM_LEGCUFFS "legcuffs"


/// This slot is not obscured.
#define STRIPPABLE_OBSCURING_NONE 0

/// This slot is completely obscured, and cannot be accessed.
#define STRIPPABLE_OBSCURING_COMPLETELY 1

/// This slot can't be seen, but can be accessed.
#define STRIPPABLE_OBSCURING_HIDDEN 2
5 changes: 5 additions & 0 deletions code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
#define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; }
///Accesses an associative list, returns null if nothing is found
#define LAZYACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null
///Performs an insertion on the given lazy list with the given key and value. If the value already exists, a new one will not be made.
#define LAZYORASSOCLIST(lazy_list, key, value) \
LAZYINITLIST(lazy_list); \
LAZYINITLIST(lazy_list[key]); \
lazy_list[key] |= value;

// Insert an object A into a sorted list using cmp_proc (/code/_helpers/cmp.dm) for comparison.
#define ADD_SORTED(list, A, cmp_proc) if(!list.len) {list.Add(A)} else {list.Insert(FindElementIndex(A, list, cmp_proc), A)}
Expand Down
5 changes: 2 additions & 3 deletions code/_onclick/click_hold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@

/client/MouseDrop(datum/over_object, datum/src_location, over_location, src_control, over_control, params)
. = ..()
if(over_object)
SEND_SIGNAL(over_object, COMSIG_ATOM_DROP_ON, src_location, src)

if(src_location)
SEND_SIGNAL(src_location, COMSIG_ATOM_DROPPED_ON, over_object, src)

if(over_object)
SEND_SIGNAL(over_object, COMSIG_ATOM_DROP_ON, src_location, src)
1 change: 1 addition & 0 deletions code/_onclick/drag_drop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
/atom/MouseDrop(atom/over)
if(!usr || !over) return

if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows

spawn(0)
Expand Down
Loading

0 comments on commit 78e90dc

Please sign in to comment.