Funny actions
This commit is contained in:
@@ -194,6 +194,16 @@
|
||||
add_fingerprint(user)
|
||||
fire_act(I.get_temperature())
|
||||
|
||||
/obj/item/paper/DoRevenantThrowEffects(atom/target)
|
||||
sleep(5)
|
||||
if(HAS_TRAIT(src, TRAIT_SPOOKY_THROW))
|
||||
sleep(5)
|
||||
DoRevenantThrowEffects(atom/target)
|
||||
return
|
||||
var/obj/item/paperplane/plane = new(get_turf(src))
|
||||
qdel(src)
|
||||
plane.safe_throw_at(over, 10, 2)
|
||||
|
||||
/obj/item/paper/attackby(obj/item/P, mob/living/user, params)
|
||||
if(burn_paper_product_attackby_check(P, user))
|
||||
SStgui.close_uis(src)
|
||||
|
||||
@@ -146,7 +146,8 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='danger'>*click*</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>*click*</span>")
|
||||
playsound(src, "gun_dry_fire", 30, 1)
|
||||
|
||||
/obj/item/gun/proc/shoot_live_shot(mob/living/user, pointblank = FALSE, mob/pbtarget, message = 1, stam_cost = 0)
|
||||
@@ -175,7 +176,7 @@
|
||||
|
||||
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
. = ..()
|
||||
if(!CheckAttackCooldown(user, target))
|
||||
if(user && !CheckAttackCooldown(user, target))
|
||||
return
|
||||
process_afterattack(target, user, flag, params)
|
||||
|
||||
@@ -184,6 +185,8 @@
|
||||
return
|
||||
if(firing)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
var/stamloss = user.getStaminaLoss()
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
@@ -290,7 +293,8 @@
|
||||
return busy_action || firing || ((last_fire + fire_delay) > world.time)
|
||||
|
||||
/obj/item/gun/proc/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0)
|
||||
add_fingerprint(user)
|
||||
if(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(on_cooldown())
|
||||
return
|
||||
@@ -328,7 +332,7 @@
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
else
|
||||
if(get_dist(user, target) <= 1) //Making sure whether the target is in vicinity for the pointblank shot
|
||||
if(user && get_dist(user, target) <= 1) //Making sure whether the target is in vicinity for the pointblank shot
|
||||
shoot_live_shot(user, 1, target, message, stam_cost)
|
||||
else
|
||||
shoot_live_shot(user, 0, target, message, stam_cost)
|
||||
@@ -342,29 +346,29 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/proc/do_burst_shot(mob/living/user, atom/target, message = TRUE, params=null, zone_override = "", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0, stam_cost = 0)
|
||||
if(!user || !firing)
|
||||
firing = FALSE
|
||||
if(!firing)
|
||||
return FALSE
|
||||
if(!issilicon(user))
|
||||
if(user && !issilicon(user))
|
||||
if(iteration > 1 && !(user.is_holding(src))) //for burst firing
|
||||
firing = FALSE
|
||||
return FALSE
|
||||
if(chambered && chambered.BB)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal.
|
||||
if(chambered.harmful) // Is the bullet chambered harmful?
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
return
|
||||
if(randomspread)
|
||||
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
else //Smart spread
|
||||
sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread), 1)
|
||||
before_firing(target,user)
|
||||
before_firing(target, user)
|
||||
if(!chambered.fire_casing(target, user, params, ,suppressed, zone_override, sprd, src))
|
||||
shoot_with_empty_chamber(user)
|
||||
firing = FALSE
|
||||
return FALSE
|
||||
else
|
||||
if(get_dist(user, target) <= 1) //Making sure whether the target is in vicinity for the pointblank shot
|
||||
if(user && get_dist(user, target) <= 1) //Making sure whether the target is in vicinity for the pointblank shot
|
||||
shoot_live_shot(user, 1, target, message, stam_cost)
|
||||
else
|
||||
shoot_live_shot(user, 0, target, message, stam_cost)
|
||||
@@ -621,3 +625,11 @@
|
||||
. = recoil
|
||||
if(user && !user.has_gravity())
|
||||
. = recoil*5
|
||||
|
||||
/obj/item/gun/DoRevenantThrowEffects(atom/target)
|
||||
while(HAS_TRAIT(src, TRAIT_SPOOKY_THROW))
|
||||
var/target
|
||||
var/list/possible_targets = range(3,src)
|
||||
target = pick(possible_targets)
|
||||
if(target)
|
||||
process_fire(null, target)
|
||||
|
||||
Reference in New Issue
Block a user