Skip to content

Commit

Permalink
and now its cached
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Oct 6, 2023
1 parent 6eb4c1a commit e73541a
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 0 deletions.
Binary file added goon/icons/mob/slasher.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/datum/action/cooldown/slasher
name = "Slasher Possession"
desc = "You've been possessed by the Slasher"
button_icon = 'goon/icons/mob/slasher.dmi'
background_icon_state = "slasher_background"
button_icon = 'goon/icons/mob/slasher.dmi'
button_icon_state = "slasher_template"
buttontooltipstyle = "cult"
transparent_when_unavailable = TRUE


/datum/action/cooldown/slasher/IsAvailable(feedback = FALSE)
return next_use_time <= world.time
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/datum/action/cooldown/slasher/blood_walk
name = "Blood Trail"
desc = "Begin trailing blood in your wake. Spooky! "
button_icon_state = "trail_blood"

cooldown_time = 30 SECONDS

/datum/action/cooldown/slasher/blood_walk/Activate(atom/target)
. = ..()
if(isliving(target))
var/mob/living/mob_target = target
mob_target.set_timed_status_effect(15 SECONDS, /datum/status_effect/blood_trial)


/datum/status_effect/blood_trial
id = "confusion"
alert_type = null

/datum/status_effect/blood_trial/on_creation(mob/living/new_owner, duration = 15 SECONDS)
src.duration = duration
return ..()

/datum/status_effect/blood_trial/on_apply()
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
return TRUE

/datum/status_effect/blood_trial/on_remove()
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)


/datum/status_effect/blood_trial/proc/find_pool_by_blood_state(turf/turfLoc, typeFilter = null)
for(var/obj/effect/decal/cleanable/blood/pool in turfLoc)
if(pool.blood_state == BLOOD_STATE_HUMAN && (!typeFilter || istype(pool, typeFilter)))
return pool


/datum/status_effect/blood_trial/proc/on_move(atom/movable/mover, turf/old_loc)
SIGNAL_HANDLER

var/turf/oldLocTurf = get_turf(old_loc)
var/obj/effect/decal/cleanable/blood/footprints/oldLocFP = find_pool_by_blood_state(oldLocTurf, /obj/effect/decal/cleanable/blood/footprints)
if(oldLocFP)
// Footprints found in the tile we left, add us to it
if (!(oldLocFP.exited_dirs & mover.dir))
oldLocFP.exited_dirs |= mover.dir
oldLocFP.update_appearance()

else
oldLocFP = new(oldLocTurf)
if(!QDELETED(oldLocFP)) ///prints merged
oldLocFP.blood_state = BLOOD_STATE_HUMAN
oldLocFP.exited_dirs |= mover.dir
oldLocFP.bloodiness = 100
oldLocFP.update_appearance()

var/obj/effect/decal/cleanable/blood/footprints/FP = new(get_turf(100))
if(!QDELETED(FP)) ///prints merged
FP.blood_state = BLOOD_STATE_HUMAN
FP.entered_dirs |= mover.dir
FP.bloodiness = 100
FP.update_appearance()

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/datum/action/cooldown/slasher/incorporealize
name = "Incorporealize"
desc = " Become incorporeal, capable of moving through walls and being completely invisible, but unable to interact with the world. Can only be used when corporeal and when not in view of any human being. "
button_icon_state = "incorporealize"
cooldown_time = 20 SECONDS

var/flipped = FALSE

/datum/action/cooldown/slasher/incorporealize/PreActivate(atom/target)
. = ..()
if(!do_after(target, 1.5 SECONDS, get_turf(target)))
return FALSE

if(!flipped)
for(var/mob/living/watchers in view(9, target) - target)
target.balloon_alert(owner, "you can only vanish unseen.")
return FALSE
return TRUE

/datum/action/cooldown/slasher/incorporealize/Activate(atom/target)
. = ..()

flipped = !flipped

if(flipped)
name = "Corporealize"
desc = "Manifest your being from your incorporeal state."
button_icon_state = "corporealize"
else
name = "Incorporealize"
desc = " Become incorporeal, capable of moving through walls and being completely invisible, but unable to interact with the world. Can only be used when corporeal and when not in view of any human being. "
button_icon_state = "incorporealize"
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
ui_interact(user)

/obj/item/sea_map/ui_interact(mob/user, datum/tgui/ui)
user.client << browse_rsc(SShotspots.map, "trenchmap.png")
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "TrenchMap", name)
Expand Down
3 changes: 3 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6023,6 +6023,9 @@
#include "monkestation\code\modules\mob\living\carbon\human\species_type\zombies.dm"
#include "monkestation\code\modules\mob\living\simple_animal\pets\bees.dm"
#include "monkestation\code\modules\mob\living\simple_animal\pets\honk_platinum.dm"
#include "monkestation\code\modules\new_antagonists\slasher\abilities\_slasher_base.dm"
#include "monkestation\code\modules\new_antagonists\slasher\abilities\blood_walk.dm"
#include "monkestation\code\modules\new_antagonists\slasher\abilities\incorporealize.dm"
#include "monkestation\code\modules\ocean_content\department_consoles\engineering.dm"
#include "monkestation\code\modules\ocean_content\fluff\barrier.dm"
#include "monkestation\code\modules\ocean_content\fluff\base_turf_editor.dm"
Expand Down

0 comments on commit e73541a

Please sign in to comment.