Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Dec 18, 2023
1 parent f6536a2 commit d2bfe9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 56 deletions.
8 changes: 3 additions & 5 deletions code/datums/status_effects/_status_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
/// Do we self-terminate when a fullheal is called? // CM note: this is rejuvenate
var/remove_on_fullheal = FALSE

/* Unimplemented features - add as needed
/* Unimplemented feature: Our Rejuv needs refactoring to work with this
/// If remove_on_fullheal is TRUE, what flag do we need to be removed?
var/heal_flag_necessary = HEAL_STATUS
/// A particle effect, for things like embers - Should be set on update_particles()
var/obj/effect/abstract/particle_holder/particle_effect
*/

/* Particle effects feature was cut due to lacking backend, feel free to add when we have backend */

/// Timer ID for triggering the effect end precisely
var/timerid

Expand Down Expand Up @@ -95,8 +95,6 @@
on_remove()
UnregisterSignal(owner, COMSIG_LIVING_REJUVENATED)
owner = null
// if(particle_effect)
// QDEL_NULL(particle_effect)
return ..()

// Status effect process. Handles adjusting its duration and ticks.
Expand Down
4 changes: 0 additions & 4 deletions code/datums/status_effects/debuffs/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, TRAIT_STATUS_EFFECT(id))
return ..()

// /datum/status_effect/incapacitating/unconscious/tick(seconds_between_ticks)
// if(owner.getStaminaLoss())
// owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds

/atom/movable/screen/alert/status_effect/unconscious
name = "Unconscious"
desc = "You've been knocked out."
Expand Down
49 changes: 2 additions & 47 deletions code/datums/status_effects/stacking_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,8 @@
/// Set to true once the stack_threshold is crossed, and false once it falls back below
var/threshold_crossed = FALSE

/* DISABLED
Feel free to use if you can make it work with our stuff or better yet port /tg/ overlay system
Search for //o for relevant lines further down
/// Icon file for overlays applied when the status effect is applied
var/overlay_file
/// Icon file for underlays applied when the status effect is applied
var/underlay_file
/// Icon state for overlays applied when the status effect is applied
/// States in the file must be given a name, followed by a number which corresponds to a number of stacks.
/// Put the state name without the number in these state vars
var/overlay_state
/// Icon state for underlays applied when the status effect is applied
/// The number is concatonated onto the string based on the number of stacks to get the correct state name.
var/underlay_state
/// A reference to our overlay appearance
var/mutable_appearance/status_overlay
/// A referenceto our underlay appearance
var/mutable_appearance/status_underlay
*/
/* This implementation is missing effects overlays because we did not have
/tg/ overlays backend available at the time. Feel free to add them when we do! */

/// Effects that occur when the stack count crosses stack_threshold
/datum/status_effect/stacking/proc/threshold_cross_effect()
Expand Down Expand Up @@ -91,8 +72,6 @@
/datum/status_effect/stacking/proc/add_stacks(stacks_added)
if(stacks_added > 0 && !can_gain_stacks())
return FALSE
//o owner.cut_overlay(status_overlay)
//o owner.underlays -= status_underlay
stacks += stacks_added
if(stacks > 0)
if(stacks >= stack_threshold && !threshold_crossed) //threshold_crossed check prevents threshold effect from occuring if changing from above threshold to still above threshold
Expand All @@ -106,10 +85,6 @@
if(stacks_added > 0)
tick_interval += delay_before_decay //refreshes time until decay
stacks = min(stacks, max_stacks)
//o status_overlay.icon_state = "[overlay_state][stacks]"
//o status_underlay.icon_state = "[underlay_state][stacks]"
//o owner.add_overlay(status_overlay)
//o owner.underlays += status_underlay
else
fadeout_effect()
qdel(src) //deletes status if stacks fall under one
Expand All @@ -122,25 +97,5 @@
/datum/status_effect/stacking/on_apply()
if(!can_have_status())
return FALSE
//o status_overlay = mutable_appearance(overlay_file, "[overlay_state][stacks]")
//o status_underlay = mutable_appearance(underlay_file, "[underlay_state][stacks]")
//o var/icon/I = icon(owner.icon, owner.icon_state, owner.dir)
//o var/icon_height = I.Height()
//o status_overlay.pixel_x = -owner.pixel_x
//o status_overlay.pixel_y = FLOOR(icon_height * 0.25, 1)
//o status_overlay.transform = matrix() * (icon_height/world.icon_size) //scale the status's overlay size based on the target's icon size
//o status_underlay.pixel_x = -owner.pixel_x
//o status_underlay.transform = matrix() * (icon_height/world.icon_size) * 3
//o status_underlay.alpha = 40
//o owner.add_overlay(status_overlay)
//o owner.underlays += status_underlay
return ..()

/*
/datum/status_effect/stacking/Destroy()
//o if(owner)
//o owner.cut_overlay(status_overlay)
//o owner.underlays -= status_underlay
//o QDEL_NULL(status_overlay)
//o return ..()
*/

0 comments on commit d2bfe9b

Please sign in to comment.