Merge branch 'master' of https://github.com/PolarisSS13/Polaris into ATaleofBlobsandMen

# FixConflicts:
#	polaris.dme
This commit is contained in:
Mechoid
2020-04-09 22:55:42 -07:00
773 changed files with 30521 additions and 10522 deletions
+42
View File
@@ -0,0 +1,42 @@
/datum/modifier/feysight
name = "feysight"
desc = "You are filled with an inner peace, and widened sight."
client_color = "#42e6ca"
on_created_text = "<span class='alien'>You feel an inner peace as your mind's eye expands!</span>"
on_expired_text = "<span class='notice'>Your sight returns to what it once was.</span>"
stacks = MODIFIER_STACK_EXTEND
accuracy = -15
accuracy_dispersion = 1
/datum/modifier/feysight/on_applied()
holder.see_invisible = 60
holder.see_invisible_default = 60
/datum/modifier/feysight/on_expire()
holder.see_invisible_default = initial(holder.see_invisible_default)
holder.see_invisible = holder.see_invisible_default
/datum/modifier/feysight/can_apply(var/mob/living/L)
if(L.stat)
to_chat(L, "<span class='warning'>You can't be unconscious or dead to experience tranquility.</span>")
return FALSE
if(!L.is_sentient())
return FALSE // Drones don't feel anything.
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.species.name == "Diona")
to_chat(L, "<span class='warning'>You feel strange for a moment, but it passes.</span>")
return FALSE // Happy trees aren't affected by tranquility.
return ..()
/datum/modifier/feysight/tick()
..()
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
H.druggy = min(15, H.druggy + 4)
+4 -1
View File
@@ -32,8 +32,11 @@
expire()
else if(holder.fire_stacks > 0)
holder.fire_stacks -= 1
holder.fire_stacks -= 0.5
/datum/modifier/fire/stack_managed/intense
mob_overlay_state = "on_fire_intense"
damage_per_tick = 10
/datum/modifier/fire/stack_managed/weak
damage_per_tick = 1
+4 -3
View File
@@ -61,7 +61,7 @@
// Checks if the modifier should be allowed to be applied to the mob before attaching it.
// Override for special criteria, e.g. forbidding robots from receiving it.
/datum/modifier/proc/can_apply(var/mob/living/L)
/datum/modifier/proc/can_apply(var/mob/living/L, var/suppress_output = FALSE)
return TRUE
// Checks to see if this datum should continue existing.
@@ -115,7 +115,8 @@
// Call this to add a modifier to a mob. First argument is the modifier type you want, second is how long it should last, in ticks.
// Third argument is the 'source' of the modifier, if it's from someone else. If null, it will default to the mob being applied to.
// The SECONDS/MINUTES macro is very helpful for this. E.g. M.add_modifier(/datum/modifier/example, 5 MINUTES)
/mob/living/proc/add_modifier(var/modifier_type, var/expire_at = null, var/mob/living/origin = null)
// The fourth argument is a boolean to suppress failure messages, set it to true if the modifier is repeatedly applied (as chem-based modifiers are) to prevent chat-spam
/mob/living/proc/add_modifier(var/modifier_type, var/expire_at = null, var/mob/living/origin = null, var/suppress_failure = FALSE)
// First, check if the mob already has this modifier.
for(var/datum/modifier/M in modifiers)
if(ispath(modifier_type, M))
@@ -132,7 +133,7 @@
// If we're at this point, the mob doesn't already have it, or it does but stacking is allowed.
var/datum/modifier/mod = new modifier_type(src, origin)
if(!mod.can_apply(src))
if(!mod.can_apply(src, suppress_failure))
qdel(mod)
return
if(expire_at)
@@ -112,16 +112,18 @@ the artifact triggers the rage.
var/mob/living/carbon/human/H = holder
H.shock_stage = last_shock_stage
/datum/modifier/berserk/can_apply(var/mob/living/L)
/datum/modifier/berserk/can_apply(var/mob/living/L, var/suppress_failure = FALSE)
if(L.stat)
to_chat(L, "<span class='warning'>You can't be unconscious or dead to berserk.</span>")
if(!suppress_failure)
to_chat(L, "<span class='warning'>You can't be unconscious or dead to berserk.</span>")
return FALSE // It would be weird to see a dead body get angry all of a sudden.
if(!L.is_sentient())
return FALSE // Drones don't feel anything.
if(L.has_modifier_of_type(/datum/modifier/berserk_exhaustion))
to_chat(L, "<span class='warning'>You recently berserked, and cannot do so again while exhausted.</span>")
if(!suppress_failure)
to_chat(L, "<span class='warning'>You recently berserked, and cannot do so again while exhausted.</span>")
return FALSE // On cooldown.
if(L.isSynthetic())
@@ -135,7 +137,8 @@ the artifact triggers the rage.
return FALSE // Happy trees aren't affected by blood rages.
if(L.nutrition < nutrition_cost)
to_chat(L, "<span class='warning'>You are too hungry to berserk.</span>")
if(!suppress_failure)
to_chat(L, "<span class='warning'>You are too hungry to berserk.</span>")
return FALSE // Too hungry to enrage.
return ..()