Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs

# Conflicts:
#	icons/mob/feet.dmi
#	paradise.dme
This commit is contained in:
Mark van Alphen
2019-05-23 19:04:09 +02:00
49 changed files with 232 additions and 176 deletions
+4 -2
View File
@@ -906,9 +906,11 @@
if(src in SSticker.mode.changelings)
SSticker.mode.changelings -= src
special_role = null
current.remove_changeling_powers()
if(changeling)
current.remove_changeling_powers()
qdel(changeling)
changeling = null
SSticker.mode.update_change_icons_removed(src)
if(changeling) qdel(changeling)
to_chat(current, "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</B></FONT>")
log_admin("[key_name(usr)] has de-changelinged [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-changelinged [key_name_admin(current)]")
+19 -7
View File
@@ -62,6 +62,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/charge_type = "recharge" //can be recharge or charges, see charge_max and charge_counter descriptions; can also be based on the holder's vars now, use "holder_var" for that
var/charge_max = 100 //recharge time in deciseconds if charge_type = "recharge" or starting charges if charge_type = "charges"
var/starts_charged = TRUE //Does this spell start ready to go?
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each decisecond if charge_type = "recharge" or -- each cast if charge_type = "charges"
var/still_recharging_msg = "<span class='notice'>The spell is still recharging.</span>"
@@ -167,6 +168,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
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
@@ -193,9 +196,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/New()
..()
action = new(src)
still_recharging_msg = "<span class='notice'>[name] is still recharging.</span>"
charge_counter = charge_max
if(starts_charged)
charge_counter = charge_max
else
start_recharge()
/obj/effect/proc_holder/spell/Destroy()
QDEL_NULL(action)
@@ -212,9 +217,14 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/proc/start_recharge()
if(action)
action.UpdateButtonIcon()
while(charge_counter < charge_max)
sleep(1)
charge_counter++
START_PROCESSING(SSfastprocess, src)
/obj/effect/proc_holder/spell/process()
charge_counter += 2
if(charge_counter < charge_max)
return
STOP_PROCESSING(SSfastprocess, src)
charge_counter = charge_max
if(action)
action.UpdateButtonIcon()
@@ -235,6 +245,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
else
cast(targets, user = user)
after_cast(targets)
if(action)
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/proc/before_cast(list/targets)
if(overlay)
@@ -291,8 +303,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
charge_counter++
if("holdervar")
adjust_var(user, holder_var_type, -holder_var_amount)
return
if(action)
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/proc/updateButtonIcon()
if(action)