More funshit
This commit is contained in:
@@ -65,14 +65,14 @@ SUBSYSTEM_DEF(throwing)
|
||||
var/last_move = 0
|
||||
|
||||
/datum/thrownthing/Destroy()
|
||||
if(HAS_TRAIT_FROM(thrownthing, TRAIT_SPOOKY_THROW, "revenant"))
|
||||
REMOVE_TRAIT(thrownthing, TRAIT_SPOOKY_THROW, "revenant")
|
||||
SSthrowing.processing -= thrownthing
|
||||
thrownthing.throwing = null
|
||||
thrownthing = null
|
||||
target = null
|
||||
thrower = null
|
||||
callback = null
|
||||
if(HAS_TRAIT(thrownthing, TRAIT_SPOOKY_THROW)
|
||||
REMOVE_TRAIT(thrownthing, TRAIT_SPOOKY_THROW)
|
||||
return ..()
|
||||
|
||||
/datum/thrownthing/proc/tick()
|
||||
|
||||
@@ -449,6 +449,10 @@
|
||||
// this must come before the screen objects only block, dunno why it wasn't before
|
||||
if(over_object == M)
|
||||
user_show_to_mob(M)
|
||||
return
|
||||
if(isrevenant(M))
|
||||
RevenantThrow(over_object, M, source)
|
||||
return
|
||||
if(!M.incapacitated())
|
||||
if(!istype(over_object, /obj/screen))
|
||||
dump_content_at(over_object, M)
|
||||
|
||||
@@ -492,13 +492,13 @@
|
||||
return TRUE
|
||||
|
||||
//TODO: Better floating
|
||||
/atom/movable/proc/float(on, float_height)
|
||||
if(throwing)
|
||||
/atom/movable/proc/float(on, throw_override)
|
||||
if(throwing || !throw_override)
|
||||
return
|
||||
if(on && (!(movement_type & FLOATING) || floating_need_update))
|
||||
animate(src, pixel_y = pixel_y + 2 + float_height, time = 10, loop = -1)
|
||||
animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1)
|
||||
sleep(10)
|
||||
animate(src, pixel_y = pixel_y - 2 - float_height, time = 10, loop = -1)
|
||||
animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
|
||||
if(!(movement_type & FLOATING))
|
||||
setMovetype(movement_type | FLOATING)
|
||||
else if (!on && movement_type & FLOATING)
|
||||
|
||||
@@ -469,22 +469,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
usr.FlushCurrentAction()
|
||||
return TRUE //returning TRUE as a "is this overridden?" flag
|
||||
if(isrevenant(usr))
|
||||
var/mob/living/simple_animal/revenant/spooker = usr
|
||||
if(!anchored && !spooker.telekinesis_cooldown)
|
||||
spooker.change_essence_amount(-5, FALSE, "telekinesis")
|
||||
spooker.stun(10)
|
||||
spooker.reveal(30)
|
||||
spooker.telekinesis_cooldown = TRUE
|
||||
float(TRUE, 1)
|
||||
sleep(10)
|
||||
safe_throw_at(over, 10, 2)
|
||||
ADD_TRAIT(src, TRAIT_SPOOKY_THROW)
|
||||
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)
|
||||
if(RevenantThrow(over, usr, src))
|
||||
return
|
||||
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
@@ -493,12 +478,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
over.MouseDrop_T(src,usr)
|
||||
return
|
||||
|
||||
//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
|
||||
|
||||
@@ -137,7 +137,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/DoRevenantThrowEffects(atom/target)
|
||||
attackby(src)
|
||||
if(lit)
|
||||
attackby()
|
||||
else
|
||||
light()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/W, mob/user, params)
|
||||
if(!lit && smoketime > 0)
|
||||
@@ -520,6 +523,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
overlay_state = pick(overlay_list)
|
||||
update_icon()
|
||||
|
||||
/obj/item/lighter/DoRevenantThrowEffects(atom/target)
|
||||
set_lit()
|
||||
|
||||
/obj/item/lighter/suicide_act(mob/living/carbon/user)
|
||||
if (lit)
|
||||
user.visible_message("<span class='suicide'>[user] begins holding \the [src]'s flame up to [user.p_their()] face! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
@@ -37,11 +37,14 @@
|
||||
/obj/item/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
playsound(user, on ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, 1)
|
||||
playsound(src, on ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, TRUE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/flashlight/DoRevenantThrowEffects(atom/target)
|
||||
attack_self()
|
||||
|
||||
/obj/item/flashlight/suicide_act(mob/living/carbon/human/user)
|
||||
if (user.eye_blind)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
set_snowflake_from_config(id)
|
||||
|
||||
/obj/item/toy/plush/DoRevenantThrowEffects(atom/target)
|
||||
var/datum/component/squeak/squeaker = GetComponent(datum/component/squeak)
|
||||
var/datum/component/squeak/squeaker = GetComponent(/datum/component/squeak)
|
||||
squeaker.do_play_squeak(TRUE)
|
||||
|
||||
/obj/item/toy/plush/Initialize(mapload, set_snowflake_id)
|
||||
|
||||
@@ -44,12 +44,11 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/pneumatic_cannon/DoRevenantThrowEffects(atom/target)
|
||||
var/target
|
||||
var/picked_target
|
||||
var/list/possible_targets = range(3,src)
|
||||
target = pick(possible_targets)
|
||||
picked_target = pick(possible_targets)
|
||||
if(target)
|
||||
discharge = TRUE
|
||||
Fire(null, target)
|
||||
Fire(null, picked_target)
|
||||
|
||||
/obj/item/pneumatic_cannon/process()
|
||||
if(++charge_tick >= charge_ticks && charge_type)
|
||||
@@ -148,7 +147,7 @@
|
||||
if(!isliving(user))
|
||||
return
|
||||
var/discharge = 0
|
||||
if(!can_trigger_gun(user))
|
||||
if(user && !can_trigger_gun(user))
|
||||
return
|
||||
if(!loadedItems || !loadedWeightClass)
|
||||
if(user)
|
||||
@@ -174,14 +173,13 @@
|
||||
var/list/possible_targets = range(3,src)
|
||||
target = pick(possible_targets)
|
||||
discharge = TRUE
|
||||
if(!discharge)
|
||||
if(!discharge && user)
|
||||
user.visible_message("<span class='danger'>[user] fires \the [src]!</span>", \
|
||||
"<span class='danger'>You fire \the [src]!</span>")
|
||||
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, TRUE)
|
||||
if(user)
|
||||
log_combat(user, target, "fired at", src)
|
||||
fire_items(T, user)
|
||||
else
|
||||
fire_items(T)
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/DoRevenantThrowEffects(atom/target)
|
||||
attack_self()
|
||||
|
||||
/obj/item/weldingtool/update_overlays()
|
||||
. = ..()
|
||||
if(change_icons)
|
||||
@@ -208,12 +211,14 @@
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
|
||||
@@ -441,6 +441,30 @@
|
||||
qdel(revenant)
|
||||
..()
|
||||
|
||||
/proc/RevenantThrow(over, mob/user, obj/item/throwable)
|
||||
var/mob/living/simple_animal/revenant/spooker = user
|
||||
if(!istype(throwable))
|
||||
return
|
||||
if(!throwable.anchored && !spooker.telekinesis_cooldown && spooker.castcheck(-5))
|
||||
spooker.change_essence_amount(-5, FALSE, "telekinesis")
|
||||
spooker.stun(20)
|
||||
spooker.reveal(50)
|
||||
spooker.telekinesis_cooldown = TRUE
|
||||
throwable.float(TRUE)
|
||||
sleep(10)
|
||||
throwable.DoRevenantThrowEffects(over)
|
||||
throwable.throw_at(over, 10, 2)
|
||||
ADD_TRAIT(throwable, TRAIT_SPOOKY_THROW, "revenant")
|
||||
throwable.float(FALSE, TRUE)
|
||||
log_combat(throwable, over, "spooky telekinesised at", throwable)
|
||||
var/obj/effect/temp_visual/telekinesis/T = new(get_turf(throwable))
|
||||
T.color = "#8715b4"
|
||||
addtimer(CALLBACK(spooker, /mob/living/simple_animal/revenant.proc/telekinesis_cooldown_end), 50)
|
||||
|
||||
//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)
|
||||
return TRUE
|
||||
|
||||
//objectives
|
||||
/datum/objective/revenant
|
||||
var/targetAmount = 100
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
attack(user,user)
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/assembly/flash/DoRevenantThrowEffects(atom/target)
|
||||
AOE_flash()
|
||||
|
||||
/obj/item/assembly/flash/update_icon(flash = FALSE)
|
||||
cut_overlays()
|
||||
attached_overlays = list()
|
||||
|
||||
@@ -193,16 +193,13 @@
|
||||
user.visible_message(ignition_message)
|
||||
add_fingerprint(user)
|
||||
fire_act(I.get_temperature())
|
||||
|
||||
//I would have it become a paper plane before the throw, but that would risk runtimes
|
||||
/obj/item/paper/DoRevenantThrowEffects(atom/target)
|
||||
sleep(5)
|
||||
sleep(10)
|
||||
if(HAS_TRAIT(src, TRAIT_SPOOKY_THROW))
|
||||
sleep(5)
|
||||
DoRevenantThrowEffects(atom/target)
|
||||
return
|
||||
var/obj/item/paperplane/plane = new(get_turf(src))
|
||||
new /obj/item/paperplane(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))
|
||||
|
||||
@@ -626,10 +626,10 @@
|
||||
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)
|
||||
var/picked_target
|
||||
var/list/possible_targets = range(3,src)
|
||||
picked_target = pick(possible_targets)
|
||||
if(picked_target)
|
||||
process_fire(null, picked_target)
|
||||
|
||||
Reference in New Issue
Block a user