Skip to content
Open
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
b7c3543
bayonet component (#84246)
Feb 28, 2026
c4b5cee
oopsie
Feb 28, 2026
191e0bf
Fixes magazine overflow and russian roulette starting with 6(7) bullets
SmArtKar Oct 29, 2024
7e1290c
handle_atom_del stuffs
Feb 28, 2026
1727875
Magazines now lazyload their contents in order to save on gun init times
Feb 28, 2026
f136bbc
Guncode Agony #2: Fixes harddels caused by certain projectiles (collo…
Feb 28, 2026
32182e7
Guncode Agony 3: Projectile code cleanup (#87628)
SmArtKar Nov 3, 2024
aad546a
Guncode Agony 4: The Great Projectile Purge (#87740)
SmArtKar Nov 23, 2024
64e4da0
fixes
Mar 1, 2026
7b96bf0
Fixing embedding for projectiles. (#77674)
Ghommie Aug 20, 2023
c4a12ea
Setting a few things straight with embedding and caseless ammo. (#77450)
Ghommie Aug 10, 2023
3365c1d
more fixes
Mar 1, 2026
fc943a7
fix soulscythe dupe..
Mar 1, 2026
6f62268
guh
Mar 1, 2026
c3e20e4
embed stuff + fixes
Mar 1, 2026
1d55100
readd stuff i removed on accident
Mar 1, 2026
0b89cad
guhh
Mar 1, 2026
4b35a9d
arrow
Mar 1, 2026
96023a9
guh
Mar 1, 2026
f9988d4
viking axes
Mar 1, 2026
1006733
remove caseless and reusable
Mar 1, 2026
39d10b4
minor fixes for now
Mar 1, 2026
bceea39
more embed fixes
Mar 1, 2026
10c2f39
rod fix
Mar 1, 2026
72dcca9
fixes more embeds
Mar 1, 2026
9740e75
bring back fauna mod
Mar 1, 2026
30d1624
armor ignorance
Mar 1, 2026
4ee213f
my bad....
Mar 1, 2026
d15a547
Event Horizon Anti-Existential Beam Rifle. The ultimate conclusion to…
necromanceranne Jun 20, 2024
579e7d5
ehh
Mar 1, 2026
05ac8e0
stuffs
Mar 1, 2026
2fbc468
Fixes wendigo lag at cost of its attacks' visuals
Mar 1, 2026
6f03736
[NO GBP] Embedding hotfix
Mar 1, 2026
146031d
[NO GBP] Fixes parrying, this time for real
Mar 1, 2026
770253c
[NO GBP] Fixes projectile homing
Mar 1, 2026
f79e402
IM STUPID
Mar 1, 2026
f0cbfcc
i'm stupid part 2
Mar 1, 2026
b363317
Fixes projectiles inheriting gun's pixel offsets when fired
Mar 1, 2026
f348a9c
accidentally removed fauna mod here...
Mar 1, 2026
10d0144
tether reworks
Mar 1, 2026
bdd16ea
more tether stuff
Mar 1, 2026
5488ccf
more stuffs
Mar 1, 2026
02947db
Guncode Agony 4.1: Portal Intermission (#87803)
SmArtKar Nov 14, 2024
9032568
Guncode Agony 4.2: Firing Effect Intervallo (#88072)
SmArtKar Nov 24, 2024
21a5c56
surgical tape fix
Mar 1, 2026
25f3b3b
ae
Mar 1, 2026
ab1d4f2
Wendigo Mob Abilities (#83325)
Whoneedspacee May 27, 2024
87c0848
Merge branch 'master' into guncode-hell
Mar 1, 2026
3e50680
parry fix
Mar 1, 2026
d4e305b
yeah
Mar 1, 2026
06cf003
wendigo stuff and fix
Mar 1, 2026
3a89323
beh
Mar 1, 2026
787e6e7
ammo boxes fix
Mar 1, 2026
541e8fd
guncode agony 4.4
Mar 1, 2026
d100d2a
damage falloffs
Mar 2, 2026
fcf07c4
revert what i did because it broke everything (somehow)
Mar 2, 2026
8cc9c59
linter fix
Mar 2, 2026
e872f4b
ok yeah dont give lethal ammo stamina falloff...
Mar 2, 2026
eba76aa
apparently monke value for this is 0 yikes
Mar 2, 2026
eb1d1a8
fix reloading
Mar 2, 2026
58f25f5
revert to old behavior
Mar 2, 2026
c704ab1
fix dj station just crashing your fucking game what the fuck??
Mar 3, 2026
f3c0fba
fix stupid fucking revolver run time finally
Mar 3, 2026
45771c9
Implements datumized embedding handlers in place of element-component…
SmArtKar Jan 2, 2025
10d04bb
beh
Mar 6, 2026
78f0d8f
Improves hitscan projectile chunking (#89616)
SmArtKar Feb 23, 2025
323ce7b
Merge branch 'master' into guncode-hell
Mar 6, 2026
b52f1b7
fix explorer gun
Mar 6, 2026
7b22bfb
oops
Mar 6, 2026
a49cf3f
bring back wall integrity stuff (also bandaid fix to emitters looping…
Mar 6, 2026
30c4748
ehh would be weird to leave it like that
Mar 6, 2026
5560960
fix self shooting and thaumaturgy stuff
Mar 6, 2026
452fa00
revert tesla cannon change
Mar 6, 2026
98f3959
fix finger guns having casings
Mar 6, 2026
bb4a85b
fix bows more or less
Mar 6, 2026
2904176
fix atlatl and bow runtime
Mar 7, 2026
0e9a6e8
wendigo fix
Mar 7, 2026
99f59aa
value fixes + just make falloff not delete the projectile
Mar 7, 2026
fb6d357
unbuff hellfire (oops)
Mar 7, 2026
374a741
increase bullet speed
Mar 7, 2026
a7e2772
readd mixer channel + kiss fix
Mar 7, 2026
6c1c898
fix
Mar 7, 2026
9964968
set light
Mar 7, 2026
46ee8da
wah
Mar 7, 2026
4dbdfba
fix plasma cutters
Mar 7, 2026
619e7dd
fix projectile planes
Mar 7, 2026
f50aff4
fix bingle pit and some projectile speed vars
Mar 7, 2026
020453c
fix colossus killing himself
Mar 8, 2026
63dc3ee
pellets are no longer sharp pointy by default
Mar 8, 2026
d426ec0
fix rebar bolts
Mar 8, 2026
0ffb116
set proper values for microfusion
Mar 8, 2026
d2a736d
fix bingle pit leaving projectiles when eating guns
Mar 9, 2026
3f475b8
better fix no runtimes edition
Mar 9, 2026
154a233
ugh
Mar 9, 2026
c26c1f8
fix these values
Mar 9, 2026
cb39013
revert guns back to attackby because it breaks ammo boxes
Mar 10, 2026
d5c4a41
fix this speed value
Mar 10, 2026
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
#/code/game/area/ @san7890
#/icons/area/ @san7890

# SmArtKar

/code/modules/projectiles/projectile.dm @SmArtKar

# stylemistake

#/code/__DEFINES/chat.dm @stylemistake
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/Graveyard/Graveyard.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5204,7 +5204,7 @@
pixel_x = 9;
pixel_y = 9
},
/obj/item/ammo_casing/caseless/rocket{
/obj/item/ammo_casing/rocket{
desc = "Your grandpappy brought this home after the war. You're pretty sure it's a dud.";
name = "Dud Rocket";
pixel_x = 4;
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3971,7 +3971,7 @@
pixel_x = -3;
pixel_y = 10
},
/obj/item/ammo_casing/caseless/rocket{
/obj/item/ammo_casing/rocket{
desc = "Your grandpappy brought this home after the war. You're pretty sure it's a dud.";
name = "Dud Rocket";
pixel_x = -4;
Expand Down
30 changes: 15 additions & 15 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -22169,7 +22169,7 @@
/obj/item/gun/energy/tesla_cannon,
/obj/item/gun/energy/laser/thermal/inferno,
/obj/item/gun/energy/laser/thermal/cryo,
/obj/item/gun/energy/beam_rifle,
/obj/item/gun/energy/event_horizon,
/obj/item/gun/ballistic/rifle/sniper_rifle,
/turf/open/floor/iron/dark/herringbone,
/area/centcom/central_command_areas/adminroom)
Expand Down Expand Up @@ -25119,18 +25119,18 @@
pixel_x = 32
},
/obj/machinery/light/small/directional/east,
/obj/item/ammo_casing/caseless/rocket/heap,
/obj/item/ammo_casing/rocket/heap,
/obj/structure/closet/cabinet,
/obj/item/ammo_casing/caseless/rocket,
/obj/item/ammo_casing/caseless/rocket,
/obj/item/ammo_casing/rocket,
/obj/item/ammo_casing/rocket,
/obj/item/gun/ballistic/rocketlauncher/nobackblast{
pin = /obj/item/firing_pin
},
/obj/item/ammo_casing/caseless/rocket,
/obj/item/ammo_casing/caseless/rocket,
/obj/item/ammo_casing/caseless/rocket/heap,
/obj/item/ammo_casing/caseless/rocket/weak,
/obj/item/ammo_casing/caseless/rocket/weak,
/obj/item/ammo_casing/rocket,
/obj/item/ammo_casing/rocket,
/obj/item/ammo_casing/rocket/heap,
/obj/item/ammo_casing/rocket/weak,
/obj/item/ammo_casing/rocket/weak,
/obj/item/clothing/under/rank/centcom/official,
/obj/item/clothing/glasses/sunglasses,
/obj/item/radio/headset/headset_cent/alt,
Expand Down Expand Up @@ -25702,19 +25702,19 @@
pixel_x = -8;
pixel_y = 20
},
/obj/item/ammo_casing/caseless/rocket{
/obj/item/ammo_casing/rocket{
pixel_x = 0;
pixel_y = 2
},
/obj/item/ammo_casing/caseless/rocket{
/obj/item/ammo_casing/rocket{
pixel_x = 4;
pixel_y = 2
},
/obj/item/ammo_casing/caseless/rocket{
/obj/item/ammo_casing/rocket{
pixel_x = 9;
pixel_y = 2
},
/obj/item/ammo_casing/caseless/rocket/heap{
/obj/item/ammo_casing/rocket/heap{
pixel_x = -6;
pixel_y = 1
},
Expand Down Expand Up @@ -26579,7 +26579,7 @@
/obj/structure/guncase,
/obj/item/gun/energy/xray,
/obj/item/gun/energy/ionrifle,
/obj/item/gun/energy/beam_rifle,
/obj/item/gun/energy/event_horizon,
/obj/item/gun/ballistic/rifle/sniper_rifle,
/turf/open/floor/iron/dark/herringbone,
/area/centcom/central_command_areas/adminroom)
Expand Down Expand Up @@ -28254,7 +28254,7 @@
/obj/structure/guncase,
/obj/item/gun/energy/wormhole_projector/core_inserted,
/obj/item/gun/energy/ionrifle/carbine,
/obj/item/gun/energy/beam_rifle,
/obj/item/gun/energy/event_horizon,
/obj/item/gun/ballistic/rifle/sniper_rifle,
/turf/open/floor/iron/dark/herringbone,
/area/centcom/central_command_areas/adminroom)
Expand Down
2 changes: 1 addition & 1 deletion _maps/minigame/Deathmatch/arena_station.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@
/area/deathmatch/fullbright)
"LY" = (
/obj/structure/closet/secure_closet,
/obj/item/gun/energy/beam_rifle,
/obj/item/gun/energy/xray,
/turf/open/indestructible/vault,
/area/deathmatch/fullbright)
"Mc" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/emergency_cruise.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,7 @@
},
/obj/structure/table/reinforced/plastitaniumglass,
/obj/effect/turf_decal/tile/dark_blue/opposingcorners,
/obj/item/ammo_casing/caseless/rocket/heap,
/obj/item/ammo_casing/rocket/heap,
/turf/open/floor/iron/dark/textured_large,
/area/shuttle/escape/luxury)
"Uo" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/virtual_domains/xeno_nest.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
/area/ruin/space/has_grav/powered/virtual_domain)
"F" = (
/obj/structure/table/greyscale,
/obj/item/gun/energy/beam_rifle,
/obj/item/gun/energy/xray,
/obj/item/gun/energy/laser{
pixel_x = 4;
pixel_y = -6
Expand Down
34 changes: 2 additions & 32 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,37 +178,11 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(

//Combat object defines

//Embedded objects
///Chance for embedded objects to cause pain (damage user)
#define EMBEDDED_PAIN_CHANCE 15
///Chance for embedded object to fall out (causing pain but removing the object)
#define EMBEDDED_ITEM_FALLOUT 5
///Chance for an object to embed into somebody when thrown
#define EMBED_CHANCE 45
///Coefficient of multiplication for the damage the item does while embedded (this*item.w_class)
#define EMBEDDED_PAIN_MULTIPLIER 2
///Coefficient of multiplication for the damage the item does when it first embeds (this*item.w_class)
#define EMBEDDED_IMPACT_PAIN_MULTIPLIER 4
///The minimum value of an item's throw_speed for it to embed (Unless it has embedded_ignore_throwspeed_threshold set to 1)
/// The minimum value of an item's throw_speed for it to embed (Unless it has embedded_ignore_throwspeed_threshold set to 1)
#define EMBED_THROWSPEED_THRESHOLD 4
///Coefficient of multiplication for the damage the item does when it falls out or is removed without a surgery (this*item.w_class)
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 6
///A Time in ticks, total removal time = (this*item.w_class)
#define EMBEDDED_UNSAFE_REMOVAL_TIME 30
///Chance for embedded objects to cause pain every time they move (jostle)
#define EMBEDDED_JOSTLE_CHANCE 5
///Coefficient of multiplication for the damage the item does while
#define EMBEDDED_JOSTLE_PAIN_MULTIPLIER 1
///This percentage of all pain will be dealt as stam damage rather than brute (0-1)
#define EMBEDDED_PAIN_STAM_PCT 0.0
///For thrown weapons, every extra speed it's thrown at above its normal throwspeed will add this to the embed chance
/// For thrown embedding weapons, every extra speed it's thrown at above its normal throwspeed will add this to the embed chance
#define EMBED_CHANCE_SPEED_BONUS 10

#define EMBED_HARMLESS list("pain_mult" = 0, "jostle_pain_mult" = 0, "ignore_throwspeed_threshold" = TRUE)
#define EMBED_HARMLESS_SUPERIOR list("pain_mult" = 0, "jostle_pain_mult" = 0, "ignore_throwspeed_threshold" = TRUE, "embed_chance" = 100, "fall_chance" = 0.1)
#define EMBED_POINTY list("ignore_throwspeed_threshold" = TRUE)
#define EMBED_POINTY_SUPERIOR list("embed_chance" = 100, "ignore_throwspeed_threshold" = TRUE)

//Gun weapon weight
#define WEAPON_LIGHT 1
#define WEAPON_MEDIUM 2
Expand Down Expand Up @@ -248,10 +222,6 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define SUPPRESSED_QUIET 1 ///standard suppressed
#define SUPPRESSED_VERY 2 /// no message

//Projectile Reflect
#define REFLECT_NORMAL (1<<0)
#define REFLECT_FAKEPROJECTILE (1<<1)

//His Grace.
#define HIS_GRACE_SATIATED 0 //He hungers not. If bloodthirst is set to this, His Grace is asleep.
#define HIS_GRACE_PECKISH 20 //Slightly hungry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define COMPONENT_MOVABLE_IMPACT_NEVERMIND (1<<1) //return true if you destroyed whatever it was you're impacting and there won't be anything for hitby() to run on
///from base of mob/living/hitby(): (mob/living/target, hit_zone, blocked, datum/thrownthing/throwingdatum)
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone"
#define MOVABLE_IMPACT_ZONE_OVERRIDE (1<<0)
///from /atom/movable/proc/buckle_mob(): (mob/living/M, force, check_loc, buckle_mob_flags)
#define COMSIG_MOVABLE_PREBUCKLE "prebuckle" // this is the last chance to interrupt and block a buckle before it finishes
#define COMPONENT_BLOCK_BUCKLE (1<<0)
Expand Down
22 changes: 10 additions & 12 deletions code/__DEFINES/dcs/signals/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@
#define COMSIG_TOOL_IN_USE "tool_in_use"
///from base of [/obj/item/proc/tool_start_check]: (mob/living/user)
#define COMSIG_TOOL_START_USE "tool_start_use"
///from [/obj/item/proc/disableEmbedding]:
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed"
///from [/obj/effect/mine/proc/triggermine]:
#define COMSIG_MINE_TRIGGERED "minegoboom"
///from [/obj/structure/closet/supplypod/proc/preOpen]:
Expand Down Expand Up @@ -174,12 +172,15 @@
#define COMSIG_GUN_CHAMBER_PROCESSED "gun_chamber_processed"
///called in /obj/item/gun/ballistic/process_chamber (casing)
#define COMSIG_CASING_EJECTED "casing_ejected"
///called in /obj/item/gun/ballistic/sawoff(mob/user, obj/item/saw, handle_modifications) : (mob/user)
#define COMSIG_GUN_BEING_SAWNOFF "gun_being_sawnoff"
#define COMPONENT_CANCEL_SAWING_OFF (1<<0)
#define COMSIG_GUN_SAWN_OFF "gun_sawn_off"

///sent to targets during the process_hit proc of projectiles
#define COMSIG_FIRE_CASING "fire_casing"
///from the base of /obj/item/ammo_casing/ready_proj() : (atom/target, mob/living/user, quiet, zone_override, atom/fired_from)
#define COMSIG_CASING_READY_PROJECTILE "casing_ready_projectile"
///sent to the projectile after an item is spawned by the projectile_drop element: (new_item)
#define COMSIG_PROJECTILE_ON_SPAWN_DROP "projectile_on_spawn_drop"

// Jetpack things
// Please kill me
Expand Down Expand Up @@ -210,10 +211,7 @@
///called in /obj/item/gun/process_fire (user, target, params, zone_override)
#define COMSIG_GRENADE_ARMED "grenade_armed"

///from [/obj/item/proc/tryEmbed] sent when trying to force an embed (mainly for projectiles and eating glass)
#define COMSIG_EMBED_TRY_FORCE "item_try_embed"
#define COMPONENT_EMBED_SUCCESS (1<<1)
// FROM [/obj/item/proc/updateEmbedding] sent when an item's embedding properties are changed : ()
// FROM [/obj/item/proc/set_embed] sent when an item's embedding properties are changed : ()
#define COMSIG_ITEM_EMBEDDING_UPDATE "item_embedding_update"

#define COMSIG_ITEM_ATTACK "item_attack"
Expand All @@ -234,12 +232,12 @@
#define COMSIG_ITEM_ATTACK_SECONDARY "item_attack_secondary"
///from base of [obj/item/attack()]: (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_ITEM_AFTERATTACK "item_afterattack"
///from base of obj/item/embedded(): (atom/target, obj/item/bodypart/part)
///from base of datum/embedding/proc/embed_into(): (mob/living/carbon/victim, obj/item/bodypart/limb)
#define COMSIG_ITEM_EMBEDDED "item_embedded"
///from base of datum/component/embedded/safeRemove(): (mob/living/carbon/victim)
///from base of datum/embedding/proc/remove_embedding(): (mob/living/carbon/victim, obj/item/bodypart/limb)
#define COMSIG_ITEM_UNEMBEDDED "item_unembedded"
/// from base of obj/item/failedEmbed()
#define COMSIG_ITEM_FAILED_EMBED "item_failed_embed"
///from base of datum/embedding/proc/failed_embed(): (mob/living/carbon/victim, hit_zone)
#define COMSIG_ITEM_FAILED_EMBED "item_unembedded"

/// from base of datum/element/disarm_attack/secondary_attack(), used to prevent shoving: (victim, user, send_message)
#define COMSIG_ITEM_CAN_DISARM_ATTACK "item_pre_disarm_attack"
Expand Down
4 changes: 0 additions & 4 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@
///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent)
#define COMSIG_CARBON_UNEQUIP_SHOECOVER "carbon_unequip_shoecover"
#define COMSIG_CARBON_EQUIP_SHOECOVER "carbon_equip_shoecover"
///defined twice, in carbon and human's topics, fired when interacting with a valid embedded_object to pull it out (mob/living/carbon/target, /obj/item, /obj/item/bodypart/L)
#define COMSIG_CARBON_EMBED_RIP "item_embed_start_rip"
///called when removing a given item from a mob, from mob/living/carbon/remove_embedded_object(mob/living/carbon/target, /obj/item)
#define COMSIG_CARBON_EMBED_REMOVAL "item_embed_remove_safe"
///Called when someone attempts to cuff a carbon
#define COMSIG_CARBON_CUFF_ATTEMPTED "carbon_attempt_cuff"
#define COMSIG_CARBON_CUFF_PREVENT (1<<0)
Expand Down
24 changes: 14 additions & 10 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@

// /obj/projectile signals (sent to the firer)

///from base of /obj/projectile/proc/on_hit(), like COMSIG_PROJECTILE_ON_HIT but on the projectile itself and with the hit limb (if any): (atom/movable/firer, atom/target, angle, hit_limb)
///from base of /obj/projectile/proc/on_hit(), like COMSIG_PROJECTILE_ON_HIT but on the projectile itself and with the hit limb (if any): (atom/movable/firer, atom/target, angle, hit_limb, blocked, pierce_hit)
#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit"
///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, angle, hit_limb)
///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, angle, hit_limb, blocked, pierce_hit)
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit"
///from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target)
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire"
Expand All @@ -176,18 +176,25 @@
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit"
#define PROJECTILE_INTERRUPT_HIT (1<<0)
///from /obj/projectile/pixel_move(): ()
#define COMSIG_PROJECTILE_PIXEL_STEP "projectile_pixel_step"
#define PROJECTILE_INTERRUPT_HIT_PHASE (1<<1)
///from /obj/projectile/process_movement(): ()
#define COMSIG_PROJECTILE_MOVE_PROCESS_STEP "projectile_move_process_step"
///sent to self during the process_hit proc of projectiles
#define COMSIG_PROJECTILE_SELF_PREHIT "com_proj_prehit"
///from the base of /obj/projectile/Range(): ()
///from the base of /obj/projectile/reduce_range(): ()
#define COMSIG_PROJECTILE_RANGE "projectile_range"
///from the base of /obj/projectile/on_range(): ()
#define COMSIG_PROJECTILE_RANGE_OUT "projectile_range_out"
///from the base of /obj/projectile/process(): ()
#define COMSIG_PROJECTILE_BEFORE_MOVE "projectile_before_move"
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init"

///sent to the projectile after an item is spawned by the projectile_drop element: (new_casing)
#define COMSIG_PROJECTILE_ON_SPAWN_DROP "projectile_on_spawn_drop"

///sent to the projectile when spawning the item (shrapnel) that may be embedded: (new_item, victim)
#define COMSIG_PROJECTILE_ON_SPAWN_EMBEDDED "projectile_on_spawn_embedded"
///sent to the projectile when successfully embedding into something: (new_item, victim)
#define COMSIG_PROJECTILE_ON_EMBEDDED "projectile_on_embedded"

// /obj/vehicle/sealed/car/vim signals

Expand Down Expand Up @@ -219,9 +226,6 @@
/// Prevents click from happening.
#define COMPONENT_CANCEL_EQUIPMENT_CLICK (1<<0)

/// from /obj/structure/sign/poster/trap_succeeded() : (mob/user)
#define COMSIG_POSTER_TRAP_SUCCEED "poster_trap_succeed"

/// from /obj/machinery/mineral/ore_redemption/pickup_item when it successfully picks something up
#define COMSIG_ORM_COLLECTED_ORE "orm_collected_ore"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
/// Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive
#define SIGN(x) ( ((x) > 0) - ((x) < 0) )

/// Returns the integer closest to 0 from a division
#define SIGNED_FLOOR_DIVISION(x, y) (SIGN(x) * FLOOR(abs(x) / y, 1))

#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )

#define ROUND_UP(x) ( -round(-(x)))
Expand Down
21 changes: 18 additions & 3 deletions code/__DEFINES/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,27 @@
#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)

#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))

///The self charging rate of energy guns that magically recharge themselves, in watts.
#define STANDARD_ENERGY_GUN_SELF_CHARGE_RATE (0.05 * STANDARD_CELL_CHARGE)

/// Macro to turn a number of laser shots into an energy cost, based on the above define
/// e.g. LASER_SHOTS(12, STANDARD_CELL_CHARGE) means 12 shots
#define LASER_SHOTS(X, MAX_CHARGE) (((100 * MAX_CHARGE) - ((100 * MAX_CHARGE) % X)) / (100 * X)) // I wish I could just use round, but it can't be used in datum members

/// How far do the projectile hits the prone mob
#define MAX_RANGE_HIT_PRONE_TARGETS 10

/// Queued for impact deletion (simple qdel)
#define PROJECTILE_IMPACT_DELETE "impact_delete"
/// Queued for range deletion (on_range call)
#define PROJECTILE_RANGE_DELETE "range_delete"

/// Projectile either hasn't impacted anything, or pierced through the target
#define PROJECTILE_IMPACT_PASSED "impact_passed"
/// Projectile has been "deleted" before bullet_act call has occured
#define PROJECTILE_IMPACT_INTERRUPTED "impact_interrupted"
/// Projectile has successfully impacted something and is scheduled for deletion
#define PROJECTILE_IMPACT_SUCCESSFUL "impact_successful"

/// For how long projectile tracers linger
#define PROJECTILE_TRACER_DURATION 0.3 SECONDS
2 changes: 1 addition & 1 deletion code/__DEFINES/research/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MAX_CORES_BLUESPACE 8
#define MAX_CORES_GRAVITATIONAL 8
#define MAX_CORES_FLUX 8
#define MAX_CORES_VORTEX 8
#define MAX_CORES_VORTEX 1
#define MAX_CORES_PYRO 8
#define MAX_CORES_HALLUCINATION 8
#define MAX_CORES_BIOSCRAMBLER 8
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
///Trait which allows mobs to parry mining mob projectiles
#define TRAIT_MINING_PARRYING "mining_parrying"

/// This atom has a tether attached to it
#define TRAIT_TETHER_ATTACHED "tether_attached"

/**
*
* This trait is used in some interactions very high in the interaction chain to allow
Expand Down
17 changes: 17 additions & 0 deletions code/__HELPERS/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,23 @@
if(sign == -1)
return min(new_value, threshold * -1)

/// Takes two values x and y, and returns 1/((1/x) + y)
/// Useful for providing an additive modifier to a value that is used as a divisor
/proc/reciprocal_add(x, y)
return 1/((1/x)+y)

/// Returns a text string containing N prefixed with a series of zeros with length equal to max_zeros minus log(10, N), rounded down.
/proc/prefix_zeros_to_number(number, max_zeros)
var/zeros = ""
var/how_many_zeros = max_zeros - round(log(10, number))
for(var/zero in 1 to how_many_zeros)
zeros += "0"
return "[zeros][number]"

/// 180s an angle
/proc/reverse_angle(angle)
return (angle + 180) % 360

/proc/poisson_noise(width, height, radius, seed)
. = list()
if(!seed)
Expand Down
Loading
Loading