mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
|
||||
#define DEVILRESURRECTTIME 600
|
||||
|
||||
var/global/list/allDevils = list()
|
||||
var/global/list/lawlorify = list (
|
||||
GLOBAL_LIST_EMPTY(allDevils)
|
||||
GLOBAL_LIST_INIT(lawlorify, list (
|
||||
LORE = list(
|
||||
OBLIGATION_FOOD = "This devil seems to always offer it's victims food before slaughtering them.",
|
||||
OBLIGATION_FIDDLE = "This devil will never turn down a musical challenge.",
|
||||
@@ -77,7 +77,7 @@ var/global/list/lawlorify = list (
|
||||
BANISH_DESTRUCTION = "If your corpse is destroyed, you will be unable to resurrect.",
|
||||
BANISH_FUNERAL_GARB = "If your corpse is clad in funeral garments, you will be unable to resurrect."
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
/datum/devilinfo
|
||||
var/datum/mind/owner = null
|
||||
@@ -111,11 +111,11 @@ var/global/list/lawlorify = list (
|
||||
return devil
|
||||
|
||||
/proc/devilInfo(name, saveDetails = 0)
|
||||
if(allDevils[lowertext(name)])
|
||||
return allDevils[lowertext(name)]
|
||||
if(GLOB.allDevils[lowertext(name)])
|
||||
return GLOB.allDevils[lowertext(name)]
|
||||
else
|
||||
var/datum/devilinfo/devil = randomDevilInfo(name)
|
||||
allDevils[lowertext(name)] = devil
|
||||
GLOB.allDevils[lowertext(name)] = devil
|
||||
devil.exists = saveDetails
|
||||
return devil
|
||||
|
||||
@@ -444,9 +444,9 @@ var/global/list/lawlorify = list (
|
||||
D.oldform.revive() // Heal the old body too, so the devil doesn't resurrect, then immediately regress into a dead body.
|
||||
if(body.stat == DEAD) // Not sure why this would happen
|
||||
create_new_body()
|
||||
else if(blobstart.len > 0)
|
||||
else if(GLOB.blobstart.len > 0)
|
||||
// teleport the body so repeated beatdowns aren't an option)
|
||||
body.forceMove(get_turf(pick(blobstart)))
|
||||
body.forceMove(get_turf(pick(GLOB.blobstart)))
|
||||
// give them the devil lawyer outfit in case they got stripped
|
||||
if(ishuman(body))
|
||||
var/mob/living/carbon/human/H = body
|
||||
@@ -456,8 +456,8 @@ var/global/list/lawlorify = list (
|
||||
check_regression()
|
||||
|
||||
/datum/devilinfo/proc/create_new_body()
|
||||
if(blobstart.len > 0)
|
||||
var/turf/targetturf = get_turf(pick(blobstart))
|
||||
if(GLOB.blobstart.len > 0)
|
||||
var/turf/targetturf = get_turf(pick(GLOB.blobstart))
|
||||
var/mob/currentMob = owner.current
|
||||
if(QDELETED(currentMob))
|
||||
currentMob = owner.get_ghost()
|
||||
@@ -511,10 +511,10 @@ var/global/list/lawlorify = list (
|
||||
to_chat(owner, "<span class='boldwarning'>However, your infernal form is not without weaknesses.</span>")
|
||||
to_chat(owner, "You may not use violence to coerce someone into selling their soul.")
|
||||
to_chat(owner, "You may not directly and knowingly physically harm a devil, other than yourself.")
|
||||
to_chat(owner,lawlorify[LAW][bane])
|
||||
to_chat(owner,lawlorify[LAW][ban])
|
||||
to_chat(owner,lawlorify[LAW][obligation])
|
||||
to_chat(owner,lawlorify[LAW][banish])
|
||||
to_chat(owner,GLOB.lawlorify[LAW][bane])
|
||||
to_chat(owner,GLOB.lawlorify[LAW][ban])
|
||||
to_chat(owner,GLOB.lawlorify[LAW][obligation])
|
||||
to_chat(owner,GLOB.lawlorify[LAW][banish])
|
||||
to_chat(owner, "<br/><br/><span class='warning'>Remember, the crew can research your weaknesses if they find out your devil name.</span><br>")
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/trueName= randomDevilName()
|
||||
devil_mind.devilinfo = devilInfo(trueName, 1)
|
||||
devil_mind.devilinfo.ascendable = ascendable
|
||||
devil_mind.store_memory("Your diabolical true name is [devil_mind.devilinfo.truename]<br>[lawlorify[LAW][devil_mind.devilinfo.ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[lawlorify[LAW][devil_mind.devilinfo.bane]]<br>[lawlorify[LAW][devil_mind.devilinfo.obligation]]<br>[lawlorify[LAW][devil_mind.devilinfo.banish]]<br>")
|
||||
devil_mind.store_memory("Your diabolical true name is [devil_mind.devilinfo.truename]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.bane]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.banish]]<br>")
|
||||
devil_mind.devilinfo.link_with_mob(devil_mind.current)
|
||||
if(devil_mind.assigned_role == "Clown")
|
||||
to_chat(devil_mind.current, "Your infernal nature allows you to wield weapons without harming yourself.")
|
||||
@@ -47,8 +47,8 @@
|
||||
var/mob/living/silicon/S = devil_mind.current
|
||||
S.laws.set_sixsixsix_law("You may not use violence to coerce someone into selling their soul.")
|
||||
S.laws.set_sixsixsix_law("You may not directly and knowingly physically harm a devil, other than yourself.")
|
||||
S.laws.set_sixsixsix_law("[lawlorify[LAW][devil_mind.devilinfo.ban]]")
|
||||
S.laws.set_sixsixsix_law("[lawlorify[LAW][devil_mind.devilinfo.obligation]]")
|
||||
S.laws.set_sixsixsix_law("[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]")
|
||||
S.laws.set_sixsixsix_law("[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]")
|
||||
S.laws.set_sixsixsix_law("Accomplish your objectives at all costs.")
|
||||
|
||||
// unsure about the second "quantity" arg and how it fits with the antag refactor
|
||||
@@ -76,18 +76,18 @@
|
||||
return "Target is not a devil."
|
||||
var/text = "</br>The devil's true name is: [ply.devilinfo.truename]</br>"
|
||||
text += "The devil's bans were:</br>"
|
||||
text += " [lawlorify[LORE][ply.devilinfo.ban]]</br>"
|
||||
text += " [lawlorify[LORE][ply.devilinfo.bane]]</br>"
|
||||
text += " [lawlorify[LORE][ply.devilinfo.obligation]]</br>"
|
||||
text += " [lawlorify[LORE][ply.devilinfo.banish]]</br></br>"
|
||||
text += " [GLOB.lawlorify[LORE][ply.devilinfo.ban]]</br>"
|
||||
text += " [GLOB.lawlorify[LORE][ply.devilinfo.bane]]</br>"
|
||||
text += " [GLOB.lawlorify[LORE][ply.devilinfo.obligation]]</br>"
|
||||
text += " [GLOB.lawlorify[LORE][ply.devilinfo.banish]]</br></br>"
|
||||
return text
|
||||
|
||||
/datum/game_mode/proc/update_devil_icons_added(datum/mind/devil_mind)
|
||||
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_DEVIL]
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_DEVIL]
|
||||
hud.join_hud(devil_mind.current)
|
||||
set_antag_hud(devil_mind.current, "huddevil")
|
||||
|
||||
/datum/game_mode/proc/update_devil_icons_removed(datum/mind/devil_mind)
|
||||
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_DEVIL]
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_DEVIL]
|
||||
hud.leave_hud(devil_mind.current)
|
||||
set_antag_hud(devil_mind.current, null)
|
||||
|
||||
Reference in New Issue
Block a user