Skip to content

Commit

Permalink
Fixes human bullet act, fixes cooldown of stealth module, ups it (Par…
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwertytoforty authored Dec 16, 2023
1 parent 66db7b3 commit 3b21140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
return FALSE

/mob/living/bullet_act(obj/item/projectile/P, def_zone)
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
//Armor
var/armor = run_armor_check(def_zone, P.flag, armour_penetration_flat = P.armour_penetration_flat, armour_penetration_percentage = P.armour_penetration_percentage)
if(!P.nodamage)
Expand Down
6 changes: 4 additions & 2 deletions code/modules/mod/modules/modules_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
active_power_cost = DEFAULT_CHARGE_DRAIN * 2
use_power_cost = DEFAULT_CHARGE_DRAIN * 10
incompatible_modules = list(/obj/item/mod/module/stealth)
cooldown_time = 5 SECONDS
cooldown_time = 10 SECONDS
origin_tech = "combat=6;materials=6;powerstorage=5;bluespace=5;syndicate=2" //Printable at 3
/// Whether or not the cloak turns off on bumping.
var/bumpoff = TRUE
Expand All @@ -286,7 +286,7 @@
if(bumpoff)
RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, PROC_REF(unstealth))
RegisterSignal(mod.wearer, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, PROC_REF(on_unarmed_attack))
RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act)) //TODO QWERTY: A LOT OF THESE SIGNALS AINT TRIGGERING. or at least this one.
RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act))
RegisterSignals(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW), PROC_REF(unstealth))
animate(mod.wearer, alpha = stealth_alpha, time = 1.5 SECONDS)
drain_power(use_power_cost)
Expand All @@ -306,6 +306,7 @@
to_chat(mod.wearer, "<span class='warning'>[src] gets discharged from contact!</span>")
do_sparks(2, TRUE, src)
drain_power(use_power_cost)
COOLDOWN_START(src, cooldown_timer, cooldown_time) //Put it on cooldown.
on_deactivation(display_message = TRUE, deleting = FALSE)

/obj/item/mod/module/stealth/proc/on_unarmed_attack(datum/source, atom/target)
Expand All @@ -330,6 +331,7 @@
icon_state = "cloak_ninja"
bumpoff = FALSE
stealth_alpha = 10
cooldown_time = 5 SECONDS
active_power_cost = DEFAULT_CHARGE_DRAIN
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
cooldown_time = 3 SECONDS
Expand Down

0 comments on commit 3b21140

Please sign in to comment.