Funny actions
This commit is contained in:
@@ -71,6 +71,8 @@ SUBSYSTEM_DEF(throwing)
|
||||
target = null
|
||||
thrower = null
|
||||
callback = null
|
||||
if(HAS_TRAIT(thrownthing, TRAIT_SPOOKY_THROW)
|
||||
REMOVE_TRAIT(thrownthing, TRAIT_SPOOKY_THROW)
|
||||
return ..()
|
||||
|
||||
/datum/thrownthing/proc/tick()
|
||||
|
||||
+10
-30
@@ -475,17 +475,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
spooker.stun(10)
|
||||
spooker.reveal(30)
|
||||
spooker.telekinesis_cooldown = TRUE
|
||||
float(TRUE, 2)
|
||||
float(TRUE, 1)
|
||||
sleep(10)
|
||||
safe_throw_at(over, 10, 2)
|
||||
ADD_TRAIT(src, TRAIT_SPOOKY_THROW)
|
||||
src.DoRevenantThrowEffects()
|
||||
DoRevenantThrowEffects(over)
|
||||
log_combat(usr, over, "spooky telekinesised at", src)
|
||||
var/obj/effect/temp_visual/telekinesis/T = new(get_turf(src))
|
||||
T.color = purple
|
||||
addtimer(CALLBACK(src, /atom/movable.proc/float, FALSE), 2)
|
||||
addtimer(CALLBACK(spooker, /mob/living/simple_animal/revenant.proc/telekinesis_cooldown_end), 50)
|
||||
sleep(2)
|
||||
REMOVE_TRAIT(src, TRAIT_SPOOKY_THROW)
|
||||
return
|
||||
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
@@ -493,32 +492,13 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
over.MouseDrop_T(src,usr)
|
||||
return
|
||||
/obj/item/proc/DoRevenantThrowEffects()
|
||||
var/hijink_to_do
|
||||
switch(istype)
|
||||
if(obj/item/gun)
|
||||
hijink_to_do = "shoot"
|
||||
if(obj/item/storage)
|
||||
if(GetComponent(datum/component/storage))
|
||||
hijink_to_do = "scatter items"
|
||||
if(obj/item/card/id)
|
||||
hijink_to_do = "flash id"
|
||||
if(obj/item/weldingtool)
|
||||
hijink_to_do = "welder toggle"
|
||||
if(obj/item/tank)
|
||||
hijink_to_do = "toggle tank"
|
||||
if(obj/item/paper)
|
||||
hijink_to_do = "paper into plane"
|
||||
if(obj/item/paper_bin)
|
||||
hijink_to_do = "paperbin scatter"
|
||||
if(obj/item/assembly/flash)
|
||||
hijink_to_do = "flash randomly"
|
||||
if(obj/item/flashlight)
|
||||
hijinks_to_do = "toggle flashlight"
|
||||
if(obj/item/grenade/flashbang)
|
||||
|
||||
if(obj/item/grenade/stingbang)
|
||||
while(HAS_TRAIT(src, TRAIT_SPOOKY_THROW))
|
||||
|
||||
//Use this for effects you want to happen when a revenant throws itself, check the TRAIT_SPOOKY_THROW if you want to know if its still being thrown
|
||||
/obj/item/proc/DoRevenantThrowEffects(atom/target)
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
|
||||
|
||||
// called after an item is placed in an equipment slot
|
||||
// user is mob that equipped it
|
||||
// slot uses the slot_X defines found in setup.dm
|
||||
|
||||
@@ -82,4 +82,8 @@
|
||||
/obj/item/candle/infinite/hugbox
|
||||
heats_space = FALSE
|
||||
|
||||
/obj/item/candle/DoRevenantThrowEffects(atom/target)
|
||||
if(!infinite)
|
||||
put_out_candle()
|
||||
|
||||
#undef CANDLE_LUMINOSITY
|
||||
|
||||
@@ -136,6 +136,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/DoRevenantThrowEffects(atom/target)
|
||||
attackby(src)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/W, mob/user, params)
|
||||
if(!lit && smoketime > 0)
|
||||
var/lighting_text = W.ignition_effect(src, user)
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
if(.)
|
||||
new /obj/item/toy/eightball/haunted(loc)
|
||||
|
||||
/obj/item/toy/eightball/DoRevenantThrowEffects(atom/target)
|
||||
MakeHaunted()
|
||||
|
||||
/obj/item/toy/eightball/attack_self(mob/user)
|
||||
if(shaking)
|
||||
return
|
||||
|
||||
@@ -235,16 +235,23 @@
|
||||
return
|
||||
EmptyExtinguisher(user)
|
||||
|
||||
/obj/item/extinguisher/proc/EmptyExtinguisher(var/mob/user)
|
||||
if(loc == user && reagents.total_volume)
|
||||
/obj/item/extinguisher/DoRevenantThrowEffects(atom/target)
|
||||
EmptyExtinguisher()
|
||||
|
||||
/obj/item/extinguisher/proc/EmptyExtinguisher(mob/user)
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(loc == user || !user)
|
||||
reagents.clear_reagents()
|
||||
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isopenturf(T))
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] by using its release valve.</span>")
|
||||
if(user)
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] by using its release valve.</span>")
|
||||
else
|
||||
user.visible_message("The release valve of \the [src] suddenly opens and sprays it's contents on the floor!")
|
||||
|
||||
//firebot assembly
|
||||
/obj/item/extinguisher/attackby(obj/O, mob/user, params)
|
||||
|
||||
@@ -30,9 +30,13 @@
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
/obj/item/pinpointer/DoRevenantThrowEffects(atom/target)
|
||||
attack_self()
|
||||
|
||||
/obj/item/pinpointer/attack_self(mob/living/user)
|
||||
active = !active
|
||||
user.visible_message("<span class='notice'>[user] [active ? "" : "de"]activates [user.p_their()] pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
if(user)
|
||||
user.visible_message("<span class='notice'>[user] [active ? "" : "de"]activates [user.p_their()] pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
if(active)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
return
|
||||
set_snowflake_from_config(id)
|
||||
|
||||
/obj/item/toy/plush/DoRevenantThrowEffects(atom/target)
|
||||
var/datum/component/squeak/squeaker = GetComponent(datum/component/squeak)
|
||||
squeaker.do_play_squeak(TRUE)
|
||||
|
||||
/obj/item/toy/plush/Initialize(mapload, set_snowflake_id)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, squeak_override)
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
/obj/item/pneumatic_cannon/proc/init_charge() //wrapper so it can be vv'd easier
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/pneumatic_cannon/DoRevenantThrowEffects(atom/target)
|
||||
var/target
|
||||
var/list/possible_targets = range(3,src)
|
||||
target = pick(possible_targets)
|
||||
if(target)
|
||||
discharge = TRUE
|
||||
Fire(null, target)
|
||||
|
||||
/obj/item/pneumatic_cannon/process()
|
||||
if(++charge_tick >= charge_ticks && charge_type)
|
||||
fill_with_type(charge_type, charge_amount)
|
||||
@@ -134,21 +142,29 @@
|
||||
Fire(user, target)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/Fire(mob/living/user, var/atom/target)
|
||||
if(!istype(user) && !target)
|
||||
if(!target)
|
||||
return
|
||||
if(user)
|
||||
if(!isliving(user))
|
||||
return
|
||||
var/discharge = 0
|
||||
if(!can_trigger_gun(user))
|
||||
return
|
||||
if(!loadedItems || !loadedWeightClass)
|
||||
to_chat(user, "<span class='warning'>\The [src] has nothing loaded.</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>\The [src] has nothing loaded.</span>")
|
||||
return
|
||||
if(!tank && checktank)
|
||||
to_chat(user, "<span class='warning'>\The [src] can't fire without a source of gas.</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>\The [src] can't fire without a source of gas.</span>")
|
||||
return
|
||||
if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting))
|
||||
to_chat(user, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
|
||||
else
|
||||
visible_message(src, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
|
||||
if(user && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] loses [C.p_their()] grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
|
||||
C.dropItemToGround(src, TRUE)
|
||||
@@ -157,15 +173,19 @@
|
||||
else
|
||||
var/list/possible_targets = range(3,src)
|
||||
target = pick(possible_targets)
|
||||
discharge = 1
|
||||
discharge = TRUE
|
||||
if(!discharge)
|
||||
user.visible_message("<span class='danger'>[user] fires \the [src]!</span>", \
|
||||
"<span class='danger'>You fire \the [src]!</span>")
|
||||
log_combat(user, target, "fired at", src)
|
||||
if(user)
|
||||
log_combat(user, target, "fired at", src)
|
||||
var/turf/T = get_target(target, get_turf(src))
|
||||
playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
fire_items(T, user)
|
||||
if(pressureSetting >= 3 && iscarbon(user))
|
||||
playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, TRUE)
|
||||
if(user)
|
||||
fire_items(T, user)
|
||||
else
|
||||
fire_items(T)
|
||||
if(user && pressureSetting >= 3 && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
C.DefaultCombatKnockdown(60)
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
cell = new preload_cell_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/baton/DoRevenantThrowEffects(atom/target)
|
||||
switch_status()
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
//Only mob/living types have stun handling
|
||||
|
||||
@@ -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