Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
262af7c
Fixing base unarmed attack list on species.
MistakeNot4892 Jan 15, 2025
f2d6d66
Adding grindstones and whetstones.
MistakeNot4892 Jan 9, 2025
57f5e91
Making all edge/sharpness checks use getters.
MistakeNot4892 Jan 9, 2025
929804b
Ensuring sharpness is not deducated multiple times on a hit.
MistakeNot4892 Jan 9, 2025
a039aaf
Reworking attack force procs to separate getting it for a check, and …
MistakeNot4892 Jan 16, 2025
c399005
Applying dev species icon patterns to staging, adding missing avian a…
MistakeNot4892 Jan 16, 2025
5c81e9f
Fixing erroneous medical alt suit inhands.
MistakeNot4892 Jan 16, 2025
6b67711
Fix accidentally-removed barren turfs
out-of-phaze Jan 17, 2025
72787c0
Fix space turfs on ERT base
out-of-phaze Jan 17, 2025
785a250
Fix starlight not working
out-of-phaze Jan 17, 2025
13b00e0
Fix ore deposits spreading into ramps
out-of-phaze Jan 17, 2025
7f10b4e
Fix lighting overlays being built multiple times per turf
out-of-phaze Jan 17, 2025
e1a1d93
Revert to cheaper ambient light corner generation code
out-of-phaze Jan 17, 2025
62472e1
Fix space turfs having starlight blocked by a roof
out-of-phaze Jan 17, 2025
bbcf32d
Fix CI example config
out-of-phaze Jan 17, 2025
4108ae9
Update create & destroy UT to latest TG
out-of-phaze Jan 10, 2025
53adcea
Allow QDEL_IN to use DPC
out-of-phaze Jan 10, 2025
8f73c4c
Fix global init datum harddeling
out-of-phaze Jan 10, 2025
64c73b0
Remove unnecessary image Destroy override
out-of-phaze Jan 12, 2025
e05c4c2
Fix GC failures in slime code
out-of-phaze Jan 16, 2025
218fb22
Fix bookcases causing harddels
out-of-phaze Jan 17, 2025
bb908f8
Fix graphs and graph tests causing harddels
out-of-phaze Jan 14, 2025
776d6f5
Fix vomit causing harddels
out-of-phaze Jan 18, 2025
6f4f633
Merge pull request #4761 from MistakeNot4892/devupdate
MistakeNot4892 Jan 19, 2025
33074a8
Automatic changelog generation [ci skip]
NebulaSS13Bot Jan 19, 2025
469c1df
Reverting sharp/edge var rename in favour of VAR_PROTECTED.
MistakeNot4892 Jan 19, 2025
762b036
Attack dexterity is bypassed for items in rigs.
MistakeNot4892 Jan 15, 2025
b6ba8e1
Allowing targets like tables to override required attack dexterity.
MistakeNot4892 Jan 19, 2025
8ba42a2
Fixes mundane fountains being a light source.
MistakeNot4892 Jan 19, 2025
a4408fb
Replacing cultannounce with a macro.
MistakeNot4892 Jan 19, 2025
02fa990
Robot debris reskin for fantasy map.
MistakeNot4892 Jan 19, 2025
ec2e8d2
Updating the random trash spawner for the fantasy map.
MistakeNot4892 Jan 19, 2025
f29c324
Oil updates color on spawn.
MistakeNot4892 Jan 19, 2025
bf6a0a3
Hugs only count for goals if both parties are players and unincapacit…
MistakeNot4892 Jan 19, 2025
ec4e13e
Adding basic handling to forage maps for snow and dirt.
MistakeNot4892 Jan 19, 2025
92ea88d
Butchering carcasses puts blood on the knife.
MistakeNot4892 Jan 19, 2025
523ccfc
Pref updates will now refresh the HUD.
MistakeNot4892 Jan 19, 2025
89e1952
Selecting UI style will reset to default color/alpha if set.
MistakeNot4892 Jan 19, 2025
d2a4596
Rags will now wipe down turfs.
MistakeNot4892 Jan 19, 2025
10639e4
All UI styles will default to white and fully opaque.
MistakeNot4892 Jan 19, 2025
8001f94
Merge pull request #4755 from out-of-phaze/fix/stable-opt-fixes
MistakeNot4892 Jan 19, 2025
9f55447
Merge pull request #4757 from out-of-phaze/fix/misc-opt-stuff
MistakeNot4892 Jan 19, 2025
3d2098e
Fix muddy footprints being made of blood
out-of-phaze Jan 19, 2025
c8e2e3a
Add snowy footsteps
out-of-phaze Jan 19, 2025
9075edd
Split walking contaminants between all feet
out-of-phaze Jan 19, 2025
6350970
Merge pull request #4737 from MistakeNot4892/fix/unarmed
out-of-phaze Jan 19, 2025
8e20e51
Merge pull request #4745 from MistakeNot4892/fix/speciesicons
out-of-phaze Jan 19, 2025
512efa8
Changes oil update color to update_icon().
MistakeNot4892 Jan 19, 2025
d868212
Merge pull request #4767 from NebulaSS13/stable
MistakeNot4892 Jan 20, 2025
d4847b8
Merge pull request #4756 from out-of-phaze/fix/lighting-dupe
MistakeNot4892 Jan 20, 2025
31f18eb
Automatic changelog generation [ci skip]
NebulaSS13Bot Jan 20, 2025
925d7cd
Merge pull request #4718 from out-of-phaze/fix/gc-fixes-again
MistakeNot4892 Jan 20, 2025
12030c7
Merge pull request #4762 from out-of-phaze/fix/muddy-prints
MistakeNot4892 Jan 20, 2025
08f44b5
Automatic changelog generation for PR #4762 [ci skip]
NebulaSS13Bot Jan 20, 2025
52b299f
Cleans up modular_computer attackby.
MistakeNot4892 Jan 20, 2025
46a458a
Spent casings are called 'spent casing'.
MistakeNot4892 Jan 20, 2025
d59e9b7
Allows toggling the common channel on or off.
MistakeNot4892 Jan 20, 2025
cc87b77
Ensuring all HUDs get an intent selector.
MistakeNot4892 Jan 20, 2025
6fa0a07
Refactoring tray growth rate and fixing turfs on Tradeship.
MistakeNot4892 Jan 20, 2025
c5ec9e5
Lowers some ore smelting temperatures for the sake of the medieval map.
MistakeNot4892 Jan 20, 2025
a2a062b
Guns use get_stored_ammo_count() where possible.
MistakeNot4892 Jan 16, 2025
114ad7d
Various MRE fixes.
MistakeNot4892 Jan 16, 2025
e8494b1
Cigboxes will use their empty state when empty.
MistakeNot4892 Jan 16, 2025
d7a3aaa
Proper fix for MRE opening.
MistakeNot4892 Jan 16, 2025
790a1e5
Actually fixes gun ammo checking.
MistakeNot4892 Jan 16, 2025
dd35234
Fixes seeds using seed ID instead of display name.
MistakeNot4892 Jan 16, 2025
33fdcba
Vended tea/coffee just uses a generic 'cup of tea' name.
MistakeNot4892 Jan 16, 2025
4e34276
Adds an attack_hand override to dump transit pod contents.
MistakeNot4892 Jan 16, 2025
b1f5b50
Tweaks to reagent interactions.
MistakeNot4892 Jan 16, 2025
25e3da6
Fixing issues with augment and cavity surgery.
MistakeNot4892 Jan 16, 2025
5ea9306
Updates fluids and atoms on turf height change.
MistakeNot4892 Jan 19, 2025
cebe029
Catwalks now prevent falling into trenches.
MistakeNot4892 Jan 19, 2025
3c4aac5
Updating catwalk checks to use a turf proc.
MistakeNot4892 Jan 19, 2025
bf68522
Updating snow to be diggable.
MistakeNot4892 Jan 19, 2025
51c8f1a
Fixing issues with is_fundament().
MistakeNot4892 Jan 19, 2025
c401227
More work on turf height being bypassed by catwalks.
MistakeNot4892 Jan 19, 2025
3fc0f3e
Fixes flicker in hand slot screen elements.
MistakeNot4892 Jan 19, 2025
a6d3c7e
Changing floor height will clear footprints.
MistakeNot4892 Jan 19, 2025
5cd6a30
Footprints cannot be placed in fluids.
MistakeNot4892 Jan 19, 2025
50ec1d1
Fixes poster directional offsets.
MistakeNot4892 Jan 20, 2025
2d802d0
Merge branch 'staging' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 20, 2025
f9290d4
Integrating immune_to_floor_hazards() into water crossing logic.
MistakeNot4892 Jan 20, 2025
ae7d77f
Merge branch 'dev' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 20, 2025
709f22a
Fixes paper dispenser only working on tables. Let paper be free.
MistakeNot4892 Jan 20, 2025
88340b3
You can now deploy a rig that doesn't require shoes, while wearing sh…
MistakeNot4892 Jan 20, 2025
42ac5a3
Merge pull request #4781 from MistakeNot4892/devupdate
MistakeNot4892 Jan 20, 2025
7d998cb
Moving unarmed attacks onto limbs.
MistakeNot4892 Jan 15, 2025
4261bc5
Fixing drakes losing their mouth slot.
MistakeNot4892 Jan 19, 2025
f772186
Generalizing sharpening material.
MistakeNot4892 Jan 19, 2025
f3bc922
Merge pull request #4780 from MistakeNot4892/fixes/staging
out-of-phaze Jan 20, 2025
efec300
Merge branch 'staging' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 21, 2025
81b3367
Merge pull request #4783 from MistakeNot4892/devupdate
MistakeNot4892 Jan 21, 2025
e1d7453
Automatic changelog generation [ci skip]
NebulaSS13Bot Jan 21, 2025
6dcfcd7
Merge pull request #4712 from MistakeNot4892/feature/grindstone
out-of-phaze Jan 21, 2025
184163b
Automatic changelog generation for PR #4712 [ci skip]
NebulaSS13Bot Jan 21, 2025
a2f1632
Remove unnecessary spawn()s before qdel
out-of-phaze Jan 19, 2025
ca40142
Replace sleep/spawn delayed qdels with QDEL_IN
out-of-phaze Jan 19, 2025
7d8f3b4
Permit qdeling images
out-of-phaze Jan 19, 2025
5fd4321
Remove unnecessary trait name check
out-of-phaze Jan 19, 2025
7f9ddfd
Make map templates use abstract_type properly
out-of-phaze Jan 19, 2025
b68c097
Make shuttles use abstract_type
out-of-phaze Jan 19, 2025
48a49c7
Make attack filters datums
out-of-phaze Jan 19, 2025
b821f4c
Make prometheus metrics use decls
out-of-phaze Jan 19, 2025
29d6f43
Make ailments use abstract_type
out-of-phaze Jan 19, 2025
0f70602
Adjust some old comments
out-of-phaze Jan 19, 2025
ef8271e
Make unit tests use abstract types
out-of-phaze Jan 19, 2025
6d73ca0
Fix horse coloration
out-of-phaze Jan 19, 2025
24ded4f
Fix double words in strings and comments
out-of-phaze Jan 19, 2025
562e324
Optimize roundstart atom initialization
out-of-phaze Jan 17, 2025
e7e85ff
Simplify duplicate level data setup code
out-of-phaze Jan 17, 2025
a02c41c
Optimize map template atom init processing
out-of-phaze Jan 17, 2025
7bb7fbd
Optimize the map reader
out-of-phaze Jan 17, 2025
1de8263
Merge pull request #4739 from MistakeNot4892/fix/rigdex
out-of-phaze Jan 22, 2025
802b6c3
Merge pull request #4764 from MistakeNot4892/fix/pyrelight
out-of-phaze Jan 22, 2025
95a2c76
Automatic changelog generation for PR #4739 [ci skip]
NebulaSS13Bot Jan 22, 2025
c7fb19d
Automatic changelog generation [ci skip]
NebulaSS13Bot Jan 22, 2025
64f73ba
Merge branch 'stable' of github.com:NebulaSS13/Nebula into stagingupdate
MistakeNot4892 Jan 22, 2025
15faf13
Merge branch 'stagingupdate' of github.com:MistakeNot4892/Nebula into…
MistakeNot4892 Jan 22, 2025
15ddd12
Merge pull request #4785 from MistakeNot4892/stagingupdate
MistakeNot4892 Jan 22, 2025
ebd0bdf
Merge branch 'staging' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 22, 2025
67aaa7d
Merge pull request #4786 from MistakeNot4892/devupdate
MistakeNot4892 Jan 22, 2025
e38f119
Optimize ATMOS_CANPASS_TURF
out-of-phaze Jan 17, 2025
ac7e52d
Optimize update_air_properties and its callsites
out-of-phaze Jan 17, 2025
252e498
Stub out alpha mask logic for unsim turfs
out-of-phaze Jan 17, 2025
edd3b79
Optimize _fetch_icon_state_cache_entry
out-of-phaze Jan 17, 2025
2f4aaac
Merge pull request #4766 from out-of-phaze/codequality/spawn-qdel
MistakeNot4892 Jan 22, 2025
3fccc7e
Fixing borer infestation logic.
MistakeNot4892 Jan 23, 2025
e6f947b
Updating holster code, adding quick interaction for holsters and hols…
MistakeNot4892 Jan 23, 2025
de4df0c
Cleaning up HE pipes.
MistakeNot4892 Jan 23, 2025
6992db4
Prevents borers moving in a host from breaking them completely.
MistakeNot4892 Jan 23, 2025
e22125b
Merge pull request #4795 from MistakeNot4892/cleanup/he_pipes
out-of-phaze Jan 23, 2025
93e7ba4
Merge pull request #4792 from MistakeNot4892/fixes/borers
out-of-phaze Jan 23, 2025
a807d65
Merge pull request #4794 from MistakeNot4892/fixes/holster
out-of-phaze Jan 23, 2025
edf7c7f
Fix redundant code in supply pack setup
out-of-phaze Jan 17, 2025
3859858
Replace unnecessary 'in world' loops
out-of-phaze Jan 17, 2025
d6b37ee
Replace uses of direct_output with specialized helpers
out-of-phaze Jan 17, 2025
08f76b0
Remove unnecessary uses of tag var
out-of-phaze Jan 17, 2025
5cd03cc
Improve git grep code quality checks
out-of-phaze Jan 17, 2025
c8ff480
Simplify unit test dummy mob creation
out-of-phaze Jan 21, 2025
a8c82f3
Merge pull request #4738 from MistakeNot4892/rework/unarmed
out-of-phaze Jan 23, 2025
b2b42ef
Merge pull request #4760 from out-of-phaze/codequality/grep-checks-redux
MistakeNot4892 Jan 23, 2025
300690e
Fix blood mixing with muddy footsteps
out-of-phaze Jan 21, 2025
210eefd
Fix coating overlay color being shared globally between identical items
out-of-phaze Jan 21, 2025
aa75817
Fix missing phase argument in add_to_reagents
out-of-phaze Jan 21, 2025
3bb4000
Fix clothing ensemble examine name missing an article
out-of-phaze Jan 21, 2025
4f4f496
Fixes bad istype() in hand slot code.
MistakeNot4892 Jan 22, 2025
01133c3
Fixing issues with robot brainmobs.
MistakeNot4892 Jan 23, 2025
ead9e47
Unify floor turf reagent handling
out-of-phaze Jan 23, 2025
c86a66c
Cleaning up/generalizing some procs for electrical shock to handle mo…
MistakeNot4892 Jan 22, 2025
3e47c07
Merge branch 'stable' of github.com:NebulaSS13/Nebula into stagingupdate
MistakeNot4892 Jan 25, 2025
e626efe
Merge branch 'stagingupdate' of github.com:MistakeNot4892/Nebula into…
MistakeNot4892 Jan 25, 2025
e54abb3
Merge pull request #4804 from MistakeNot4892/stagingupdate
MistakeNot4892 Jan 25, 2025
ddf2688
Merge branch 'staging' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 25, 2025
36e2640
Merge branch 'dev' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Jan 25, 2025
471587d
Merge pull request #4803 from MistakeNot4892/devupdate
MistakeNot4892 Jan 25, 2025
c216ddc
Merge branch 'dev' of github.com:NebulaSS13/Nebula into fork/pyrelight
MistakeNot4892 Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary.
// 1 will enable set background. 0 will disable set background.
#define BACKGROUND_ENABLED 0

// If REFTRACK_IN_CI is defined, the reftracker will run in CI.
#define REFTRACK_IN_CI
#if defined(REFTRACK_IN_CI) && defined(UNIT_TEST) && !defined(SPACEMAN_DMM)
Expand Down
32 changes: 14 additions & 18 deletions code/__defines/ZAS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,25 @@
}

#ifdef MULTIZAS

var/global/list/csrfz_check = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, NORTHUP, EASTUP, WESTUP, SOUTHUP, NORTHDOWN, EASTDOWN, WESTDOWN, SOUTHDOWN)
var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST, UP, DOWN)
#define ZAS_CSRFZ_CHECK global.cornerdirsz
#define ZAS_GZN_CHECK global.cardinalz

#define ATMOS_CANPASS_TURF(ret, A, B) \
if (A.blocks_air & AIR_BLOCKED || B.blocks_air & AIR_BLOCKED) { \
ret = BLOCKED; \
} \
else if (B.z != A.z) { \
if (B.z < A.z) { \
ret = (A.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else { \
ret = (B.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (B.z < A.z) { \
ret = (A.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (A.blocks_air & ZONE_BLOCKED || B.blocks_air & ZONE_BLOCKED) { \
ret = (A.z == B.z) ? ZONE_BLOCKED : AIR_BLOCKED; \
else if(B.z > A.z) { \
ret = (B.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (A.contents.len) { \
else if ((A.blocks_air & ZONE_BLOCKED) || (B.blocks_air & ZONE_BLOCKED)) { \
ret = ZONE_BLOCKED; \
} \
else if (length(A.contents)) { \
ret = 0;\
for (var/thing in A) { \
var/atom/movable/AM = thing; \
for (var/atom/movable/AM as anything in A) { \
ATMOS_CANPASS_MOVABLE(ret, AM, B); \
if (ret == BLOCKED) { \
break;\
Expand All @@ -88,8 +84,8 @@ var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST, UP, DOWN)
}
#else

var/global/list/csrfz_check = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST)
#define ZAS_CSRFZ_CHECK global.cornerdirs
#define ZAS_GZN_CHECK global.cardinal

#define ATMOS_CANPASS_TURF(ret, A, B) \
if (A.blocks_air & AIR_BLOCKED || B.blocks_air & AIR_BLOCKED) { \
Expand All @@ -98,7 +94,7 @@ var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST)
else if (A.blocks_air & ZONE_BLOCKED || B.blocks_air & ZONE_BLOCKED) { \
ret = ZONE_BLOCKED; \
} \
else if (A.contents.len) { \
else if (length(A.contents)) { \
ret = 0;\
for (var/thing in A) { \
var/atom/movable/AM = thing; \
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The latter will result in a linter warning and will not work correctly.
#define ITEM_FLAG_NOCUFFS BITFLAG(11) // Gloves that have this flag prevent cuffs being applied
#define ITEM_FLAG_CAN_HIDE_IN_SHOES BITFLAG(12) // Items that can be hidden in shoes that permit it
#define ITEM_FLAG_PADDED BITFLAG(13) // When set on gloves, will act like pulling punches in unarmed combat.
#define ITEM_FLAG_CAN_TAPE BITFLAG(14) // Whether the item can be be taped onto something using tape
#define ITEM_FLAG_CAN_TAPE BITFLAG(14) // Whether the item can be taped onto something using tape
#define ITEM_FLAG_IS_WEAPON BITFLAG(15) // Item is considered a weapon. Currently only used for force-based worth calculation.

// Flags for pass_flags (/atom/var/pass_flags)
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define CHOOSE_GAMEMODE_RETRY 2 // The gamemode could not be chosen; we will use the next most popular option voted in, or the default.
#define CHOOSE_GAMEMODE_REVOTE 3 // The gamemode could not be chosen; we need to have a revote.
#define CHOOSE_GAMEMODE_RESTART 4 // The gamemode could not be chosen; we will restart the server.
#define CHOOSE_GAMEMODE_SILENT_REDO 5 // The gamemode could not be chosen; we request to have the the proc rerun on the next tick.
#define CHOOSE_GAMEMODE_SILENT_REDO 5 // The gamemode could not be chosen; we request to have the proc rerun on the next tick.

//End game state, to manage round end.
#define END_GAME_NOT_OVER 1
Expand Down
15 changes: 15 additions & 0 deletions code/__defines/item_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Identifiers for various categories of item effects.
#define IE_CAT_DAMAGE "weff_damage"
#define IE_CAT_STRIKE "weff_strike"
#define IE_CAT_PARRY "weff_parry"
#define IE_CAT_USED "weff_used"
#define IE_CAT_WIELDED "weff_wield"
#define IE_CAT_VISUAL "weff_visual"
#define IE_CAT_LISTENER "weff_listener"
#define IE_CAT_EXAMINE "weff_visible"
#define IE_CAT_RANGED "weff_ranged"
#define IE_CAT_PROCESS "weff_process"

// Identifiers for parameters for item effects.
#define IE_PAR_USES "uses"
#define IE_PAR_MAX_USES "max_uses"
14 changes: 9 additions & 5 deletions code/__defines/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@
#define GC_QUEUE_ITEM_GCD_DESTROYED 3 //! Item's gc_destroyed var value. Used to detect ref reuse.
#define GC_QUEUE_ITEM_INDEX_COUNT 3 //! Number of item indexes, used for allocating the nested lists. Don't forget to increase this if you add a new queue item index

#define GC_QUEUED_FOR_HARD_DEL -1
#define GC_CURRENTLY_BEING_QDELETED -2
// Defines for the time an item has to get its reference cleaned before it fails the queue and moves to the next.
#define GC_FILTER_QUEUE (1 SECONDS)
#define GC_CHECK_QUEUE (5 MINUTES)
#define GC_DEL_QUEUE (10 SECONDS)

#define GC_CURRENTLY_BEING_QDELETED -1

#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (isnull(X) || QDELING(X))
#define QDESTROYING(X) (isnull(X) || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)

//Qdel helper macros.
#define QDEL_IN(item, time) if(!isnull(item)) {addtimer(CALLBACK(item, TYPE_PROC_REF(/datum, qdel_self)), time, TIMER_STOPPABLE)}
#define QDEL_IN_CLIENT_TIME(item, time) if(!isnull(item)) {addtimer(CALLBACK(item, TYPE_PROC_REF(/datum, qdel_self)), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)}
#define QDEL_IN(item, time) if(!isnull(item)) {addtimer(CALLBACK(item, TYPE_PROC_REF(/datum, qdel_self)), time)}
#define QDEL_IN_CLIENT_TIME(item, time) if(!isnull(item)) {addtimer(CALLBACK(item, TYPE_PROC_REF(/datum, qdel_self)), time, TIMER_CLIENT_TIME)}
#define QDEL_NULL(item) if(item) {qdel(item); item = null}
#define QDEL_NULL_SCREEN(item) if(client) { client.screen -= item; }; QDEL_NULL(item)
#define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) }}; if(x) {x.Cut(); x = null } // Second x check to handle items that LAZYREMOVE on qdel.
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }

Expand Down
3 changes: 2 additions & 1 deletion code/__defines/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#define HOLLOW_OBJECT_MATTER_MULTIPLIER 0.05
#define BASE_OBJECT_MATTER_MULTPLIER 0.25

#define GENERIC_SMELTING_HEAT_POINT 1350 CELSIUS
#define LOW_SMELTING_HEAT_POINT 1150 CELSIUS // Reachable with coal in a kiln on the medieval maps.
#define GENERIC_SMELTING_HEAT_POINT 1350 CELSIUS // Reachable with coal and a bellows in a kiln on medieval maps.
#define HIGH_SMELTING_HEAT_POINT 4000 CELSIUS // must be at least 4074K (3800 C) to melt graphite

#define TECH_MATERIAL "materials"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define SPECIES_FLAG_NO_BLOCK BITFLAG(6) // Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB BITFLAG(7) // This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_LOW_GRAV_ADAPTED BITFLAG(8) // This species is used to lower than standard gravity, affecting stamina in high-grav
#define SPECIES_FLAG_ABSORB_ELECTRICITY BITFLAG(9) // This species can absorb electricity; snowflake flag for old slime people.

// Species spawn flags
#define SPECIES_IS_WHITELISTED BITFLAG(0) // Must be whitelisted to play.
Expand Down
5 changes: 2 additions & 3 deletions code/__defines/subsystems.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
#define INITIALIZATION_INSSATOMS_LATE 1 //New should not call Initialize; after the first pass is complete (handled differently)
#define INITIALIZATION_INNEW_MAPLOAD 2 //New should call Initialize(TRUE)
#define INITIALIZATION_INNEW_REGULAR 3 //New should call Initialize(FALSE)
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)
#define INITIALIZATION_INNEW_REGULAR 2 //New should call Initialize(FALSE)

#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/files.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Sends resource files to client cache
/client/proc/getFiles()
for(var/file in args)
direct_output(src, browse_rsc(file))
send_rsc(src, file, null)

/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list(".txt",".log",".htm"))
var/path = root
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ mob
// Send the icon to src's local cache
send_rsc(src, getFlatIcon(src), iconName)
// Display the icon in their browser
direct_output(src, browse("<body bgcolor='#000000'><p><img src='[iconName]'></p></body>"))
show_browser(src, "<body bgcolor='#000000'><p><img src='[iconName]'></p></body>")

Output_Icon()
set name = "2. Output Icon"
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var/global/log_end= world.system_type == UNIX ? ascii2text(13) : ""
to_world_log("## TESTING: [msg][log_end]")

/proc/game_log(category, text)
direct_output(diary, "\[[time_stamp()]] [game_id] [category]: [text][log_end]")
to_file(diary, "\[[time_stamp()]] [game_id] [category]: [text][log_end]")

/proc/log_admin(text)
global.admin_log.Add(text)
Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/profiling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
lines += "[entry] => [num2text(data[STAT_ENTRY_TIME], 10)]ms ([data[STAT_ENTRY_COUNT]]) (avg:[num2text(data[STAT_ENTRY_TIME]/(data[STAT_ENTRY_COUNT] || 1), 99)])"

if (user)
direct_output(user, browse("<ol><li>[lines.Join("</li><li>")]</li></ol>", "window=[url_encode("stats:[ref(stats)]")]"))
show_browser(user, "<ol><li>[lines.Join("</li><li>")]</li></ol>", "window=[url_encode("stats:[ref(stats)]")]")

. = lines.Join("\n")

Expand Down
2 changes: 1 addition & 1 deletion code/_helpers/sorts/__main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ reverse a descending sequence without violating stability.
var/r = 0 //becomes 1 if any bits are shifted off
while(n >= MIN_MERGE)
r |= (n & 1)
n >>= 1
n = BITSHIFT_RIGHT(n, 1)
return n + r

//Examines the stack of runs waiting to be merged and merges adjacent runs until the stack invariants are reestablished:
Expand Down
16 changes: 5 additions & 11 deletions code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -692,23 +692,17 @@ Turf and target are seperate in case you want to teleport some distance from a t
return zone_to_descriptor_mapping[zone] || zone

//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O)
if (!O) return 0
if (O.sharp) return 1
if (O.edge) return 1
return 0
/obj/proc/is_sharp()
return FALSE

//Whether or not the given item counts as cutting with an edge in terms of removing limbs
/proc/has_edge(obj/O)
if (!O) return 0
if (O.edge) return 1
return 0

/obj/proc/has_edge()
return FALSE

//For items that can puncture e.g. thick plastic but aren't necessarily sharp
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
/obj/item/proc/can_puncture()
return sharp
return is_sharp()

/obj/item/screwdriver/can_puncture()
return 1
Expand Down
64 changes: 36 additions & 28 deletions code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@
#define show_image(target, image) target << (image)
#define send_rsc(target, rsc_content, rsc_name) target << browse_rsc(rsc_content, rsc_name)
#define open_link(target, url) target << link(url)
#define ftp_to(target, file_entry, suggested_name) target << ftp(file_entry, suggested_name)
#define open_file_for(target, file) target << run(file)
#define to_savefile(target, key, value) target[(key)] << (value)
#define from_savefile(target, key, value) target[(key)] >> (value)
#define to_output(target, output_content, output_args) target << output((output_content), (output_args))
// Avoid using this where possible, prefer the other helpers instead.
#define direct_output(target, value) target << (value)

/proc/html_icon(var/thing) // Proc instead of macro to avoid precompiler problems.
Expand Down Expand Up @@ -147,34 +150,35 @@
#define SPAN_STYLE(S, X) "<span style='[S]'>[X]</span>"

#define SPAN_CLASS(C, X) "<span class='[C]'>[X]</span>"
#define SPAN_ITALIC(X) SPAN_CLASS("italic", X)
#define SPAN_BOLD(X) SPAN_CLASS("bold", X)
#define SPAN_NOTICE(X) SPAN_CLASS("notice", X)
#define SPAN_WARNING(X) SPAN_CLASS("warning", X)
#define SPAN_DANGER(X) SPAN_CLASS("danger", X)
#define SPAN_ROSE(X) SPAN_CLASS("rose", X)
#define SPAN_OCCULT(X) SPAN_CLASS("cult", X)
#define SPAN_MFAUNA(X) SPAN_CLASS("mfauna", X)
#define SPAN_SUBTLE(X) SPAN_CLASS("subtle", X)
#define SPAN_INFO(X) SPAN_CLASS("info", X)
#define SPAN_RED(X) SPAN_CLASS("font_red", X)
#define SPAN_ORANGE(X) SPAN_CLASS("font_orange", X)
#define SPAN_YELLOW(X) SPAN_CLASS("font_yellow", X)
#define SPAN_GREEN(X) SPAN_CLASS("font_green", X)
#define SPAN_BLUE(X) SPAN_CLASS("font_blue", X)
#define SPAN_VIOLET(X) SPAN_CLASS("font_violet", X)
#define SPAN_PURPLE(X) SPAN_CLASS("font_purple", X)
#define SPAN_GREY(X) SPAN_CLASS("font_grey", X)
#define SPAN_MAROON(X) SPAN_CLASS("font_maroon", X)
#define SPAN_PINK(X) SPAN_CLASS("font_pink", X)
#define SPAN_PALEPINK(X) SPAN_CLASS("font_palepink", X)
#define SPAN_SINISTER(X) SPAN_CLASS("sinister", X)
#define SPAN_MODERATE(X) SPAN_CLASS("moderate", X)
#define SPAN_ITALIC(X) SPAN_CLASS("italic", X)
#define SPAN_BOLD(X) SPAN_CLASS("bold", X)
#define SPAN_NOTICE(X) SPAN_CLASS("notice", X)
#define SPAN_WARNING(X) SPAN_CLASS("warning", X)
#define SPAN_DANGER(X) SPAN_CLASS("danger", X)
#define SPAN_ROSE(X) SPAN_CLASS("rose", X)
#define SPAN_OCCULT(X) SPAN_CLASS("cult", X)
#define SPAN_CULT_ANNOUNCE(X) SPAN_CLASS("cultannounce", X)
#define SPAN_MFAUNA(X) SPAN_CLASS("mfauna", X)
#define SPAN_SUBTLE(X) SPAN_CLASS("subtle", X)
#define SPAN_INFO(X) SPAN_CLASS("info", X)
#define SPAN_RED(X) SPAN_CLASS("font_red", X)
#define SPAN_ORANGE(X) SPAN_CLASS("font_orange", X)
#define SPAN_YELLOW(X) SPAN_CLASS("font_yellow", X)
#define SPAN_GREEN(X) SPAN_CLASS("font_green", X)
#define SPAN_BLUE(X) SPAN_CLASS("font_blue", X)
#define SPAN_VIOLET(X) SPAN_CLASS("font_violet", X)
#define SPAN_PURPLE(X) SPAN_CLASS("font_purple", X)
#define SPAN_GREY(X) SPAN_CLASS("font_grey", X)
#define SPAN_MAROON(X) SPAN_CLASS("font_maroon", X)
#define SPAN_PINK(X) SPAN_CLASS("font_pink", X)
#define SPAN_PALEPINK(X) SPAN_CLASS("font_palepink", X)
#define SPAN_SINISTER(X) SPAN_CLASS("sinister", X)
#define SPAN_MODERATE(X) SPAN_CLASS("moderate", X)
// placeholders
#define SPAN_GOOD(X) SPAN_GREEN(X)
#define SPAN_NEUTRAL(X) SPAN_BLUE(X)
#define SPAN_BAD(X) SPAN_RED(X)
#define SPAN_HARDSUIT(X) SPAN_BLUE(X)
#define SPAN_GOOD(X) SPAN_GREEN(X)
#define SPAN_NEUTRAL(X) SPAN_BLUE(X)
#define SPAN_BAD(X) SPAN_RED(X)
#define SPAN_HARDSUIT(X) SPAN_BLUE(X)

#define CSS_CLASS_RADIO "radio"

Expand All @@ -194,4 +198,8 @@

#define FONT_GIANT(X) "<font size='5'>[X]</font>"

#define PRINT_STACK_TRACE(X) get_stack_trace(X, __FILE__, __LINE__)
#define PRINT_STACK_TRACE(X) get_stack_trace(X, __FILE__, __LINE__)

/// Checks if potential_weakref is a weakref of thing.
/// NOTE: These argments are the opposite order of TG's, because I think TG's are counterintuitive.
#define IS_WEAKREF_OF(potential_weakref, thing) (istype(thing, /datum) && !isnull(potential_weakref) && thing.weakref == potential_weakref)
4 changes: 2 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@
return A.CtrlClick(src)

/atom/proc/CtrlClick(var/mob/user)
if(loc == user)
if(get_recursive_loc_of_type(/mob) == user)
var/decl/interaction_handler/handler = get_quick_interaction_handler(user)
if(handler)
var/using_item = user.get_active_held_item() || user.get_usable_hand_slot_organ()
var/using_item = user.get_active_held_item()
if(handler.is_possible(src, user, using_item))
return handler.invoked(src, user, using_item)
return FALSE
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/mob/living/silicon/ai
hud_used = /datum/hud/ai

/datum/hud/ai
action_intent_type = null // no selector

/datum/hud/ai/FinalizeInstantiation()
var/list/ai_hud_data = decls_repository.get_decls_of_subtype(/decl/ai_hud)
for(var/elem_type in ai_hud_data)
Expand Down
2 changes: 0 additions & 2 deletions code/_onclick/hud/animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@
move_intent = new(null, mymob, ui_style, ui_color, ui_alpha, UI_ICON_MOVEMENT)
move_intent.icon_state = mymob.move_intent.hud_icon_state
adding += move_intent
action_intent = new(null, mymob, ui_style, ui_color, ui_alpha)
adding += action_intent
..()
13 changes: 12 additions & 1 deletion code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@

var/list/hand_hud_objects
var/list/swaphand_hud_objects
var/obj/screen/intent/action_intent
var/obj/screen/movement/move_intent
var/obj/screen/stamina/stamina_bar

var/action_intent_type = /obj/screen/intent
var/obj/screen/intent/action_intent

var/list/adding = list()
var/list/other = list()
var/list/hud_elements = list()
Expand Down Expand Up @@ -118,9 +120,17 @@
return FALSE

/datum/hud/proc/FinalizeInstantiation()

SHOULD_CALL_PARENT(TRUE)

if(!action_intent && action_intent_type) // Everyone needs an intent selector.
action_intent = new action_intent_type(null, mymob)
adding |= action_intent
hud_elements |= action_intent

BuildInventoryUI()
BuildHandsUI()

if(mymob.client)
mymob.client.screen = list()
if(length(hand_hud_objects))
Expand All @@ -133,6 +143,7 @@
mymob.client.screen |= adding
if(length(hotkeybuttons))
mymob.client.screen |= hotkeybuttons

hide_inventory()

/datum/hud/proc/get_ui_style_data()
Expand Down
Loading