Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@
#define MOVABLE_SAY_QUOTE_MESSAGE 1
#define MOVABLE_SAY_QUOTE_MESSAGE_SPANS 2
#define MOVABLE_SAY_QUOTE_MESSAGE_MODS 3

/// from /datum/thrownthing/tick()
#define COMSIG_MOVABLE_THROW_TICK "movable_throw_tick"
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@

///from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone, blocked, wound_bonus, bare_wound_bonus, sharpness, attack_direction)
#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage"
/// Cancels incoming damage.
#define COMPONENT_NO_APPLY_DAMAGE (1<<0)
///from adjust procs and bodypart heal_damage(): (amount, damtype)
#define COMSIG_MOB_APPLY_HEALING "mob_apply_healing"
///from base of /mob/living/attack_alien(): (user)
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ SUBSYSTEM_DEF(throwing)

last_move = world.time

SEND_SIGNAL(AM, COMSIG_MOVABLE_THROW_TICK)

//calculate how many tiles to move, making up for any missed ticks.
var/tilestomove = CEILING(min(((((world.time+world.tick_lag) - start_time + delayed_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed*MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait), 1)
while (tilestomove-- > 0)
Expand Down
10 changes: 5 additions & 5 deletions code/datums/martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
///current thing being targetted for combos, switches if the user hits a different opponent
var/current_target
var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary
///chance to deflect bullets
var/deflection_chance = 0
///check for if deflected bullets should be destroyed (false) or redirected (true)
var/reroute_deflection = FALSE
///chance for the martial art to block a melee attack when throw is on
var/block_chance = 0
///used for CQC's restrain combo
Expand All @@ -40,6 +36,8 @@
var/list/gun_exceptions = list()
///list of traits given to the martial art user
var/list/martial_traits = list()
///the mob that uses this martial art
var/mob/living/martial_owner

/**
* martial art specific disarm attacks
Expand Down Expand Up @@ -156,7 +154,7 @@
* gives the user the martial art, if it's a temporary one it will only temporarily override an older martial art rather than replacing it
* unless the current art won't allow a temporary override
*/
/datum/martial_art/proc/teach(mob/living/carbon/human/H,make_temporary=0)
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary=0)
if(!istype(H) || !H.mind)
return FALSE
if(H.mind.martial_art)
Expand All @@ -173,6 +171,7 @@
if(LAZYLEN(martial_traits))
H.add_traits(martial_traits, id)
H.mind.martial_art = src
martial_owner = H
if(no_guns)
for(var/mob/living/simple_animal/hostile/guardian/guardian in H.hasparasites())
guardian.stats.ranged = FALSE
Expand Down Expand Up @@ -201,6 +200,7 @@
if(!istype(H) || !H.mind || H.mind.martial_art != src)
return
on_remove(H)
martial_owner = null
H.mind.martial_art = null
if(base)
base.teach(H)
Expand Down
Loading