mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
WOLOLO Cleanup v2
Moves the timer (and deconversion) to the mind datum instead of on the staff. Rewrites nullrod reskin list-building to instead rely on a variable set on the subtype of nullrod to determine whether or not to include it by default. - By default, all nullrod subtypes EXCEPT fluff subtypes and the missionary_staff subtype have this set to TRUE. - Fluff subtypes still re-add themselves to the list as appropriate through their fluff_transformations list entries, like they previously did. - This also allows future coders to potentially make new nullrod variants that are not reskin options (such as for admin-only versions, or special away mission reward versions) with better stats / effects by simply setting "reskin_selectable = FALSE" in the subtype declaration instead of manually removing the path from the list
This commit is contained in:
+23
-3
@@ -1530,7 +1530,7 @@
|
||||
if(G)
|
||||
G.reenter_corpse()
|
||||
|
||||
/datum/mind/proc/make_zealot(mob/living/carbon/human/missionary)
|
||||
/datum/mind/proc/make_zealot(mob/living/carbon/human/missionary, convert_duration = 6000, team_color = "red")
|
||||
if(!missionary || !istype(missionary)) //better provide a proper missionary or the rest of this is gonna break
|
||||
return 0
|
||||
|
||||
@@ -1566,13 +1566,33 @@
|
||||
slaved.serv += current
|
||||
slaved.add_serv_hud(missionary.mind, "master") //handles master servent icons
|
||||
slaved.add_serv_hud(src, "mindslave")
|
||||
|
||||
var/obj/item/clothing/under/jumpsuit = null
|
||||
if(ishuman(current)) //only bother with the jumpsuit stuff if we are a human type, since we won't have the slot otherwise
|
||||
var/mob/living/carbon/human/H = current
|
||||
if(H.w_uniform)
|
||||
jumpsuit = H.w_uniform
|
||||
jumpsuit.color = team_color
|
||||
H.update_inv_w_uniform(0,0)
|
||||
|
||||
log_admin("[ckey(missionary.key)] has converted [ckey(current.key)] as a zealot.")
|
||||
addtimer(src, "remove_zealot", convert_duration, FALSE, jumpsuit) //deconverts after the timer expires
|
||||
|
||||
return 1
|
||||
|
||||
/datum/mind/proc/remove_zealot()
|
||||
/datum/mind/proc/remove_zealot(obj/item/clothing/under/jumpsuit = null)
|
||||
if(!zealot_master) //if they aren't a zealot, we can't remove their zealot status, obviously. don't bother with the rest so we don't confuse them with the messages
|
||||
return
|
||||
zealot_master = null
|
||||
ticker.mode.remove_traitor_mind(src)
|
||||
log_admin("[ckey(current.key)] has deconverted and is no longer a zealot of [ckey(zealot_master.key)].")
|
||||
zealot_master = null
|
||||
|
||||
if(jumpsuit)
|
||||
jumpsuit.color = initial(jumpsuit.color) //reset the jumpsuit no matter where our mind is
|
||||
if(ishuman(current)) //but only try updating us if we are still a human type since it is a human proc
|
||||
var/mob/living/carbon/human/H = current
|
||||
H.update_inv_w_uniform(0,0)
|
||||
|
||||
to_chat(current, "<span class='warning'>You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.</span>")
|
||||
to_chat(current, "<span class='warning'>This means you don't remember who you were working for or what you were doing.</span>")
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
throwforce = 10
|
||||
w_class = 1
|
||||
var/reskinned = FALSE
|
||||
var/reskin_selectable = TRUE //set to FALSE if a subtype is meant to not normally be available as a reskin option (fluff ones will get re-added through their list)
|
||||
var/list/fluff_transformations = list() //does it have any special transformations only accessible to it? Should only be subtypes of /obj/item/weapon/nullrod
|
||||
|
||||
/obj/item/weapon/nullrod/suicide_act(mob/user)
|
||||
@@ -31,7 +32,11 @@
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod) - typesof(/obj/item/weapon/nullrod/fluff)
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
|
||||
for(var/entry in holy_weapons_list)
|
||||
var/obj/item/weapon/nullrod/variant = entry
|
||||
if(initial(variant.reskin_selectable) == FALSE)
|
||||
holy_weapons_list -= variant
|
||||
if(fluff_transformations.len)
|
||||
for(var/thing in fluff_transformations)
|
||||
holy_weapons_list += thing
|
||||
@@ -57,6 +62,9 @@
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/nullrod/fluff //fluff subtype to be used for all donator nullrods
|
||||
reskin_selectable = FALSE
|
||||
|
||||
/obj/item/weapon/nullrod/godhand
|
||||
name = "god hand"
|
||||
icon_state = "disintegrate"
|
||||
@@ -446,12 +454,13 @@
|
||||
to_chat(M, "<span class='userdanger'>Being in the presence of [holder]'s [src] is interfering with your powers!</span>")
|
||||
|
||||
/obj/item/weapon/nullrod/missionary_staff
|
||||
reskinned = TRUE
|
||||
icon_state = "godstaff-red"
|
||||
item_state = "godstaff-red"
|
||||
name = "holy staff"
|
||||
desc = "It has a mysterious, protective aura."
|
||||
description_antag = "This seemingly standard holy staff is actually a disguised neurotransmitter capable of inducing blind zealotry in its victims. It must be allowed to recharge in the presence of a linked set of missionary robes. Activate the staff while wearing robes to link, then aim the staff at your victim to try and convert them."
|
||||
reskinned = TRUE
|
||||
reskin_selectable = FALSE
|
||||
icon_state = "godstaff-red"
|
||||
item_state = "godstaff-red"
|
||||
w_class = 5
|
||||
force = 5
|
||||
slot_flags = SLOT_BACK
|
||||
@@ -558,27 +567,8 @@
|
||||
to_chat(missionary, "<span class='notice'>You successfully convert [target] to your cause. The following grows because of your faith!</span>")
|
||||
faith -= 100
|
||||
//if you made it this far: congratulations! you are now a religious zealot!
|
||||
target.mind.make_zealot(missionary)
|
||||
target.mind.make_zealot(missionary, convert_duration, team_color)
|
||||
|
||||
target << sound('sound/misc/wololo.ogg', 0, 1, 25)
|
||||
missionary.say("WOLOLO!")
|
||||
missionary << sound('sound/misc/wololo.ogg', 0, 1, 25)
|
||||
|
||||
var/obj/item/clothing/under/jumpsuit = null
|
||||
|
||||
if(target.w_uniform)
|
||||
jumpsuit = target.w_uniform
|
||||
jumpsuit.color = team_color
|
||||
target.update_inv_w_uniform(0,0)
|
||||
|
||||
log_admin("[ckey(missionary.key)] has converted [ckey(target.key)] as a zealot.")
|
||||
addtimer(src, "do_deconvert", convert_duration, FALSE, target, missionary, jumpsuit) //deconverts after the timer expires
|
||||
|
||||
/obj/item/weapon/nullrod/missionary_staff/proc/do_deconvert(mob/living/carbon/human/target, mob/living/carbon/human/missionary, obj/item/clothing/under/jumpsuit)
|
||||
if(!target || !istype(target)) //if we didn't supply a target (or a non-human target), stop here
|
||||
return 0
|
||||
if(jumpsuit)
|
||||
jumpsuit.color = initial(jumpsuit.color)
|
||||
target.update_inv_w_uniform(0,0)
|
||||
target.mind.remove_zealot()
|
||||
log_admin("[ckey(target.key)] has deconverted and is no longer a zealot of [ckey(missionary.key)].")
|
||||
Reference in New Issue
Block a user