Merge branch 'master' of https://github.com/tgstation/tgstation into TiredOfTheInconsistency

This commit is contained in:
Cyberboss
2017-03-24 16:34:20 -04:00
71 changed files with 522 additions and 399 deletions
+5 -1
View File
@@ -333,6 +333,10 @@
/datum/action/item_action/hands_free/shift_nerves
name = "Shift Nerves"
/datum/action/item_action/explosive_implant
check_flags = 0
name = "Activate Explosive Implant"
/datum/action/item_action/toggle_research_scanner
name = "Toggle Research Scanner"
button_icon_state = "scan_mode"
@@ -467,4 +471,4 @@
/datum/action/item_action/bhop
name = "Activate Jump Boots"
desc = "Activates the jump boot's internal propulsion system, allowing the user to dash over 4-wide gaps."
button_icon_state = "jetboot"
button_icon_state = "jetboot"
+3 -1
View File
@@ -44,6 +44,7 @@
id = "vanguard"
duration = 200
tick_interval = 0 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/vanguard
var/datum/progressbar/progbar
@@ -58,7 +59,8 @@
if(istype(L)) //this is probably more safety than actually needed
var/vanguard = L.stun_absorption["vanguard"]
desc = initial(desc)
desc += "<br><b>[vanguard["stuns_absorbed"] * 2]</b> seconds of stuns held back.<br><b>[round(min(vanguard["stuns_absorbed"] * 0.25, 20)) * 2]</b> seconds of stun will affect you."
desc += "<br><b>[vanguard["stuns_absorbed"] * 2]</b> seconds of stuns held back.\
[ratvar_awakens ? "":"<br><b>[round(min(vanguard["stuns_absorbed"] * 0.25, 20)) * 2]</b> seconds of stun will affect you."]"
..()
/datum/status_effect/vanguard_shield/Destroy()
+1 -1
View File
@@ -1,7 +1,7 @@
/datum/status_effect/freon
id = "frozen"
duration = 100
unique = TRUE
status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/freon
var/icon/cube
+11 -3
View File
@@ -9,7 +9,7 @@ var/global/list/all_status_effects = list() //a list of all status effects, if f
var/duration = -1 //How long the status effect lasts in DECISECONDS. Enter -1 for an effect that never ends unless removed through some means.
var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second.
var/mob/living/owner //The mob affected by the status effect.
var/unique = TRUE //If there can be multiple status effects of this type on one mob.
var/status_type = STATUS_EFFECT_UNIQUE //How many of the effect can be on one mob, and what happens when you try to add another
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
/datum/status_effect/New(mob/living/new_owner)
@@ -57,6 +57,11 @@ var/global/list/all_status_effects = list() //a list of all status effects, if f
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied.
/datum/status_effect/proc/tick() //Called every tick.
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed.
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
owner = null
qdel(src)
////////////////
// ALERT HOOK //
@@ -76,8 +81,11 @@ var/global/list/all_status_effects = list() //a list of all status effects, if f
var/datum/status_effect/S1 = effect
LAZYINITLIST(status_effects)
for(var/datum/status_effect/S in status_effects)
if(S.id == initial(S1.id) && initial(S1.unique))
return
if(S.id == initial(S1.id) && S.status_type)
if(S.status_type == STATUS_EFFECT_REPLACE)
S.be_replaced()
else
return
S1 = new effect(src)
. = S1