Cult Fixes for Construct Icons and Spells

This commit is contained in:
CitadelStationBot
2017-05-22 10:49:33 -05:00
parent 1d8f9b31ee
commit 4533d31e34
8 changed files with 20 additions and 14 deletions
@@ -386,7 +386,6 @@
background_icon_state = "bg_demon"
buttontooltipstyle = "cult"
button_icon_state = "cult_mark"
var/tracking = FALSE
var/mob/living/simple_animal/hostile/construct/harvester/the_construct
/datum/action/innate/seek_prey/Grant(var/mob/living/C)
@@ -396,12 +395,10 @@
/datum/action/innate/seek_prey/Activate()
if(GLOB.cult_narsie == null)
return
if(tracking)
if(the_construct.seeking)
desc = "None can hide from Nar'Sie, activate to track a survivor attempting to flee the red harvest!"
button_icon_state = "cult_mark"
tracking = FALSE
the_construct.seeking = FALSE
the_construct.master = GLOB.cult_narsie
to_chat(the_construct, "<span class='cultitalic'>You are now tracking Nar'Sie, return to reap the harvest!</span>")
return
else
@@ -413,7 +410,6 @@
return
desc = "Activate to track Nar'Sie!"
button_icon_state = "sintouch"
tracking = TRUE
the_construct.seeking = TRUE
+7 -5
View File
@@ -203,7 +203,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
charge_counter-- //returns the charge if the targets selecting fails
if("holdervar")
adjust_var(user, holder_var_type, holder_var_amount)
if(action)
action.UpdateButtonIcon()
return 1
/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
@@ -249,16 +250,13 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
return TRUE
/obj/effect/proc_holder/spell/proc/start_recharge()
if(action)
action.UpdateButtonIcon()
recharging = TRUE
if(action)
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/process()
if(recharging && charge_type == "recharge" && (charge_counter < charge_max))
charge_counter += 2 //processes 5 times per second instead of 10.
if(charge_counter >= charge_max)
action.UpdateButtonIcon()
charge_counter = charge_max
recharging = FALSE
@@ -276,6 +274,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
else
cast(targets,user=user)
after_cast(targets)
if(action)
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/proc/before_cast(list/targets)
if(overlay)
@@ -332,6 +332,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
charge_counter++
if("holdervar")
adjust_var(user, holder_var_type, -holder_var_amount)
if(action)
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
if (!istype(target))