Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into upstream-merge-26720
This commit is contained in:
@@ -1,87 +1,49 @@
|
||||
//The Datum, Antagonist. Handles various antag things via a datum.
|
||||
/datum/antagonist
|
||||
var/mob/living/owner //who's our owner and accordingly an antagonist
|
||||
var/some_flufftext = "yer an antag larry"
|
||||
var/prevented_antag_datum_type //the type of antag datum that this datum can't coexist with; should probably be a list
|
||||
var/silent_update = FALSE //if we suppress messages during on_gain, apply_innate_effects, remove_innate_effects, and on_remove
|
||||
var/name = "Antagonist"
|
||||
|
||||
/datum/antagonist/New()
|
||||
if(!prevented_antag_datum_type)
|
||||
prevented_antag_datum_type = type
|
||||
var/datum/mind/owner //Mind that owns this datum
|
||||
|
||||
/datum/antagonist/Destroy()
|
||||
owner = null
|
||||
return ..()
|
||||
var/silent = FALSE //Silent will prevent the gain/lose texts to show
|
||||
|
||||
/datum/antagonist/proc/can_be_owned(mob/living/new_body)
|
||||
return new_body && !new_body.has_antag_datum(prevented_antag_datum_type, TRUE)
|
||||
var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum
|
||||
var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with
|
||||
|
||||
/datum/antagonist/proc/give_to_body(mob/living/new_body) //tries to give an antag datum to a mob. cancels out if it can't be owned by the new body
|
||||
if(new_body && can_be_owned(new_body))
|
||||
new_body.antag_datums += src
|
||||
owner = new_body
|
||||
on_gain()
|
||||
. = src //return the datum if successful
|
||||
else
|
||||
qdel(src)
|
||||
. = FALSE
|
||||
|
||||
/datum/antagonist/proc/on_gain() //on initial gain of antag datum, do this. should only be called once per datum
|
||||
apply_innate_effects()
|
||||
if(!silent_update && some_flufftext)
|
||||
to_chat(owner, some_flufftext)
|
||||
/datum/antagonist/New(datum/mind/new_owner)
|
||||
. = ..()
|
||||
typecache_datum_blacklist = typecacheof(typecache_datum_blacklist)
|
||||
if(new_owner)
|
||||
owner = new_owner
|
||||
|
||||
/datum/antagonist/proc/apply_innate_effects() //applies innate effects to the owner, may be called multiple times due to mind transferral, but should only be called once per mob
|
||||
//antag huds would go here if antag huds were less completely unworkable as-is
|
||||
/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
|
||||
remove_innate_effects(old_body)
|
||||
apply_innate_effects(new_body)
|
||||
|
||||
/datum/antagonist/proc/remove_innate_effects() //removes innate effects from the owner, may be called multiple times due to mind transferral, but should only be called once per mob
|
||||
//also antag huds but see above antag huds a shit
|
||||
//This handles the application of antag huds/special abilities
|
||||
/datum/antagonist/proc/apply_innate_effects(mob/living/mob_override)
|
||||
return
|
||||
|
||||
/datum/antagonist/proc/on_remove() //totally removes the antag datum from the owner; can only be called once per owner
|
||||
//This handles the removal of antag huds/special abilities
|
||||
/datum/antagonist/proc/remove_innate_effects(mob/living/mob_override)
|
||||
return
|
||||
|
||||
//Proc called when the datum is given to a mind.
|
||||
/datum/antagonist/proc/on_gain()
|
||||
if(owner && owner.current)
|
||||
if(!silent)
|
||||
greet()
|
||||
apply_innate_effects()
|
||||
|
||||
/datum/antagonist/proc/on_removal()
|
||||
remove_innate_effects()
|
||||
owner.antag_datums -= src
|
||||
if(owner)
|
||||
owner.antag_datums -= src
|
||||
if(!silent && owner.current)
|
||||
farewell()
|
||||
qdel(src)
|
||||
|
||||
/datum/antagonist/proc/transfer_to_new_body(mob/living/new_body)
|
||||
remove_innate_effects()
|
||||
if(!islist(new_body.antag_datums))
|
||||
new_body.antag_datums = list()
|
||||
new_body.antag_datums += src
|
||||
owner.antag_datums -= src
|
||||
owner = new_body
|
||||
apply_innate_effects()
|
||||
/datum/antagonist/proc/greet()
|
||||
return
|
||||
|
||||
//mob var and helper procs/Destroy override
|
||||
/mob/living
|
||||
var/list/antag_datums
|
||||
|
||||
/mob/living/Destroy() //TODO: merge this with the living/Destroy() in code\modules\mob\living\living.dm (currently line 29)
|
||||
if(islist(antag_datums))
|
||||
for(var/i in antag_datums)
|
||||
qdel(i)
|
||||
antag_datums = null
|
||||
return ..()
|
||||
|
||||
/mob/living/proc/can_have_antag_datum(datum_type) //if we can have this specific antagonist datum; neccessary, but requires creating a new antag datum each time.
|
||||
var/datum/antagonist/D = new datum_type()
|
||||
. = D.can_be_owned(src) //we can't exactly cache the results, either, because conditions might change. avoid use? TODO: better proc
|
||||
qdel(D)
|
||||
|
||||
/mob/living/proc/gain_antag_datum(datum_type) //tries to give a mob a specific antagonist datum; returns the datum if successful.
|
||||
if(!islist(antag_datums))
|
||||
antag_datums = list()
|
||||
var/datum/antagonist/D = new datum_type()
|
||||
. = D.give_to_body(src)
|
||||
|
||||
/mob/living/proc/has_antag_datum(type, check_subtypes) //checks this mob for if it has the antagonist datum. can either check specific type or subtypes
|
||||
if(!islist(antag_datums))
|
||||
return FALSE
|
||||
for(var/i in antag_datums)
|
||||
var/datum/antagonist/D = i
|
||||
if(check_subtypes)
|
||||
if(istype(D, type))
|
||||
return D //if it finds the datum, will return it so you can mess with it
|
||||
else
|
||||
if(D.type == type)
|
||||
return D
|
||||
return FALSE
|
||||
/datum/antagonist/proc/farewell()
|
||||
return
|
||||
@@ -1,92 +1,57 @@
|
||||
//CLOCKCULT PROOF OF CONCEPT
|
||||
|
||||
/datum/antagonist/clockcultist
|
||||
prevented_antag_datum_type = /datum/antagonist/clockcultist
|
||||
some_flufftext = null
|
||||
/datum/antagonist/clockcult
|
||||
var/datum/action/innate/hierophant/hierophant_network = new()
|
||||
|
||||
/datum/antagonist/clockcultist/silent
|
||||
silent_update = TRUE
|
||||
/datum/antagonist/clockcult/silent
|
||||
silent = TRUE
|
||||
|
||||
/datum/antagonist/clockcultist/Destroy()
|
||||
/datum/antagonist/clockcult/Destroy()
|
||||
qdel(hierophant_network)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/clockcultist/can_be_owned(mob/living/new_body)
|
||||
. = ..()
|
||||
if(.)
|
||||
. = is_eligible_servant(new_body)
|
||||
|
||||
/datum/antagonist/clockcultist/give_to_body(mob/living/new_body)
|
||||
if(iscyborg(new_body))
|
||||
var/mob/living/silicon/robot/R = new_body
|
||||
if(R.deployed)
|
||||
var/mob/living/silicon/ai/AI = R.mainframe
|
||||
R.undeploy()
|
||||
var/converted = add_servant_of_ratvar(AI, silent_update)
|
||||
to_chat(AI, "<span class='userdanger'>Anomaly Detected. Returned to core!</span>") //The AI needs to be in its core to properly be converted
|
||||
return converted
|
||||
if(!silent_update)
|
||||
if(issilicon(new_body))
|
||||
to_chat(new_body, "<span class='heavy_brass'>You are unable to compute this truth. Your vision glows a brilliant yellow, and all at once it comes to you. Ratvar, the Clockwork Justiciar, \
|
||||
lies in exile, derelict and forgotten in an unseen realm.</span>")
|
||||
else
|
||||
to_chat(new_body, "<span class='heavy_brass'>[iscarbon(new_body) ? "Your mind is racing! Your body feels incredibly light! ":""]Your world glows a brilliant yellow! All at once it comes to you. \
|
||||
Ratvar, the Clockwork Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>")
|
||||
. = ..()
|
||||
if(!silent_update && new_body)
|
||||
if(.)
|
||||
new_body.visible_message("<span class='heavy_brass'>[new_body]'s eyes glow a blazing yellow!</span>")
|
||||
to_chat(new_body, "<span class='heavy_brass'>Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork Justiciar above all else. \
|
||||
Perform his every whim without hesitation.</span>")
|
||||
else
|
||||
new_body.visible_message("<span class='boldwarning'>[new_body] seems to resist an unseen force!</span>")
|
||||
to_chat(new_body, "<span class='userdanger'>And yet, you somehow push it all away.</span>")
|
||||
|
||||
/datum/antagonist/clockcultist/on_gain()
|
||||
if(SSticker && SSticker.mode && owner.mind)
|
||||
SSticker.mode.servants_of_ratvar += owner.mind
|
||||
SSticker.mode.update_servant_icons_added(owner.mind)
|
||||
if(jobban_isbanned(owner, ROLE_SERVANT_OF_RATVAR))
|
||||
INVOKE_ASYNC(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR)
|
||||
if(owner.mind)
|
||||
owner.mind.special_role = "Servant of Ratvar"
|
||||
owner.log_message("<font color=#BE8700>Has been converted to the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(issilicon(owner))
|
||||
/datum/antagonist/clockcult/on_gain()
|
||||
if(!owner)
|
||||
return
|
||||
var/mob/living/current = owner.current
|
||||
if(!istype(current))
|
||||
return
|
||||
if(jobban_isbanned(current, ROLE_SERVANT_OF_RATVAR))
|
||||
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR), 0)
|
||||
owner.current.log_message("<font color=#BE8700>Has been converted to the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = owner
|
||||
if(iscyborg(S) && !silent_update)
|
||||
to_chat(S, "<span class='boldwarning'>You have been desynced from your master AI.\n\
|
||||
In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.</span>")
|
||||
if(iscyborg(S) && !silent)
|
||||
to_chat(S, "<span class='boldwarning'>You have been desynced from your master AI.</span>")
|
||||
to_chat(S, "<span class='boldwarning'>In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.</span>")
|
||||
if(isAI(S))
|
||||
to_chat(S, "<span class='boldwarning'>You are able to use your cameras to listen in on conversations.</span>")
|
||||
to_chat(S, "<span class='heavy_brass'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
|
||||
else if(isbrain(owner) || isclockmob(owner))
|
||||
to_chat(owner, "<span class='nezbere'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
|
||||
else if(isbrain(current) || isclockmob(current))
|
||||
to_chat(current, "<span class='nezbere'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
|
||||
..()
|
||||
if(istype(SSticker.mode, /datum/game_mode/clockwork_cult))
|
||||
var/datum/game_mode/clockwork_cult/C = SSticker.mode
|
||||
C.present_tasks(owner) //Memorize the objectives
|
||||
|
||||
/datum/antagonist/clockcultist/apply_innate_effects()
|
||||
GLOB.all_clockwork_mobs += owner
|
||||
owner.faction |= "ratvar"
|
||||
owner.grant_language(/datum/language/ratvar)
|
||||
owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
|
||||
if(issilicon(owner))
|
||||
var/mob/living/silicon/S = owner
|
||||
/datum/antagonist/clockcult/apply_innate_effects(mob/living/mob_override)
|
||||
. = ..()
|
||||
var/mob/living/current = owner.current
|
||||
if(istype(mob_override))
|
||||
current = mob_override
|
||||
GLOB.all_clockwork_mobs += current
|
||||
SSticker.mode.update_servant_icons_added(owner)
|
||||
current.faction |= "ratvar"
|
||||
current.grant_language(/datum/language/ratvar)
|
||||
current.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = current
|
||||
if(iscyborg(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
if(!R.shell)
|
||||
R.UnlinkSelf()
|
||||
R.UnlinkSelf()
|
||||
R.module.rebuild_modules()
|
||||
else if(isAI(S))
|
||||
var/mob/living/silicon/ai/A = S
|
||||
A.can_be_carded = FALSE
|
||||
A.requires_power = POWER_REQ_CLOCKCULT
|
||||
var/list/AI_frame = list(mutable_appearance('icons/mob/clockwork_mobs.dmi', "aiframe")) //make the AI's cool frame
|
||||
for(var/d in GLOB.cardinal)
|
||||
AI_frame += image('icons/mob/clockwork_mobs.dmi', A, "eye[rand(1, 10)]", dir = d) //the eyes are randomly fast or slow
|
||||
A.add_overlay(AI_frame)
|
||||
if(!A.lacks_power())
|
||||
A.ai_restore_power()
|
||||
if(A.eyeobj)
|
||||
@@ -106,58 +71,55 @@
|
||||
hierophant_network.title = "Silicon"
|
||||
hierophant_network.span_for_name = "nezbere"
|
||||
hierophant_network.span_for_message = "brass"
|
||||
else if(isbrain(owner))
|
||||
hierophant_network.Grant(owner)
|
||||
else if(isbrain(current))
|
||||
hierophant_network.Grant(current)
|
||||
hierophant_network.title = "Vessel"
|
||||
hierophant_network.span_for_name = "nezbere"
|
||||
hierophant_network.span_for_message = "alloy"
|
||||
else if(isclockmob(owner))
|
||||
hierophant_network.Grant(owner)
|
||||
else if(isclockmob(current))
|
||||
hierophant_network.Grant(current)
|
||||
hierophant_network.title = "Construct"
|
||||
hierophant_network.span_for_name = "nezbere"
|
||||
hierophant_network.span_for_message = "brass"
|
||||
owner.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
|
||||
current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
|
||||
if(!GLOB.clockwork_gateway_activated)
|
||||
owner.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
|
||||
..()
|
||||
current.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
|
||||
update_slab_info()
|
||||
|
||||
/datum/antagonist/clockcultist/remove_innate_effects()
|
||||
GLOB.all_clockwork_mobs -= owner
|
||||
owner.faction -= "ratvar"
|
||||
owner.remove_language(/datum/language/ratvar)
|
||||
owner.clear_alert("clockinfo")
|
||||
owner.clear_alert("scripturereq")
|
||||
for(var/datum/action/innate/function_call/F in owner.actions) //Removes any bound Ratvarian spears
|
||||
|
||||
/datum/antagonist/clockcult/remove_innate_effects(mob/living/mob_override)
|
||||
var/mob/living/current = owner.current
|
||||
if(istype(mob_override))
|
||||
current = mob_override
|
||||
GLOB.all_clockwork_mobs -= current
|
||||
current.faction -= "ratvar"
|
||||
current.remove_language(/datum/language/ratvar)
|
||||
current.clear_alert("clockinfo")
|
||||
current.clear_alert("scripturereq")
|
||||
for(var/datum/action/innate/function_call/F in owner.current.actions) //Removes any bound Ratvarian spears
|
||||
qdel(F)
|
||||
if(issilicon(owner))
|
||||
var/mob/living/silicon/S = owner
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = current
|
||||
if(isAI(S))
|
||||
var/mob/living/silicon/ai/A = S
|
||||
A.can_be_carded = initial(A.can_be_carded)
|
||||
A.requires_power = initial(A.requires_power)
|
||||
A.cut_overlays()
|
||||
S.make_laws()
|
||||
S.update_icons()
|
||||
S.show_laws()
|
||||
var/mob/living/temp_owner = owner
|
||||
var/mob/living/temp_owner = current
|
||||
..()
|
||||
if(iscyborg(temp_owner))
|
||||
var/mob/living/silicon/robot/R = temp_owner
|
||||
R.module.rebuild_modules()
|
||||
if(temp_owner)
|
||||
temp_owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons
|
||||
update_slab_info()
|
||||
|
||||
/datum/antagonist/clockcultist/on_remove()
|
||||
if(!silent_update)
|
||||
owner.visible_message("<span class='big'>[owner] seems to have remembered their true allegiance!</span>", \
|
||||
/datum/antagonist/clockcult/on_removal()
|
||||
. = ..()
|
||||
if(!silent)
|
||||
owner.current.visible_message("<span class='big'>[owner] seems to have remembered their true allegiance!</span>", \
|
||||
"<span class='userdanger'>A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.</span>")
|
||||
if(SSticker && SSticker.mode && owner.mind)
|
||||
SSticker.mode.servants_of_ratvar -= owner.mind
|
||||
SSticker.mode.update_servant_icons_removed(owner.mind)
|
||||
if(owner.mind)
|
||||
owner.mind.wipe_memory()
|
||||
owner.mind.special_role = null
|
||||
owner.log_message("<font color=#BE8700>Has renounced the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(iscyborg(owner))
|
||||
to_chat(owner, "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>")
|
||||
..()
|
||||
owner.current.log_message("<font color=#BE8700>Has renounced the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(iscyborg(owner.current))
|
||||
to_chat(owner.current, "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>")
|
||||
@@ -1,50 +1,33 @@
|
||||
/datum/antagonist/cultist
|
||||
prevented_antag_datum_type = /datum/antagonist/cultist
|
||||
some_flufftext = null
|
||||
var/datum/action/innate/cultcomm/communion = new()
|
||||
/datum/antagonist/cult
|
||||
var/datum/action/innate/cultcomm/communion = new
|
||||
|
||||
/datum/antagonist/cultist/Destroy()
|
||||
/datum/antagonist/cult/Destroy()
|
||||
qdel(communion)
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/cultist/can_be_owned(mob/living/new_body)
|
||||
/datum/antagonist/cult/on_gain()
|
||||
. = ..()
|
||||
if(.)
|
||||
. = is_convertable_to_cult(new_body)
|
||||
if(!owner)
|
||||
return
|
||||
if(jobban_isbanned(owner.current, ROLE_CULTIST))
|
||||
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_CULTIST, ROLE_CULTIST), 0)
|
||||
owner.current.log_message("<font color=#960000>Has been converted to the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
/datum/antagonist/cultist/on_gain()
|
||||
if(SSticker && SSticker.mode && owner.mind)
|
||||
SSticker.mode.cult += owner.mind
|
||||
SSticker.mode.update_cult_icons_added(owner.mind)
|
||||
if(istype(SSticker.mode, /datum/game_mode/cult))
|
||||
var/datum/game_mode/cult/C = SSticker.mode
|
||||
C.memorize_cult_objectives(owner.mind)
|
||||
if(jobban_isbanned(owner, ROLE_CULTIST))
|
||||
INVOKE_ASYNC(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_CULTIST, ROLE_CULTIST)
|
||||
if(owner.mind)
|
||||
owner.mind.special_role = "Cultist"
|
||||
owner.log_message("<font color=#960000>Has been converted to the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
..()
|
||||
|
||||
/datum/antagonist/cultist/apply_innate_effects()
|
||||
owner.faction |= "cult"
|
||||
owner.verbs += /mob/living/proc/cult_help
|
||||
/datum/antagonist/cult/apply_innate_effects()
|
||||
. = ..()
|
||||
owner.current.faction |= "cult"
|
||||
owner.current.verbs += /mob/living/proc/cult_help
|
||||
communion.Grant(owner)
|
||||
..()
|
||||
|
||||
/datum/antagonist/cultist/remove_innate_effects()
|
||||
owner.faction -= "cult"
|
||||
owner.verbs -= /mob/living/proc/cult_help
|
||||
..()
|
||||
/datum/antagonist/cult/remove_innate_effects()
|
||||
. = ..()
|
||||
owner.current.faction -= "cult"
|
||||
owner.current.verbs -= /mob/living/proc/cult_help
|
||||
|
||||
/datum/antagonist/cultist/on_remove()
|
||||
if(owner.mind)
|
||||
owner.mind.wipe_memory()
|
||||
if(SSticker && SSticker.mode)
|
||||
SSticker.mode.cult -= owner.mind
|
||||
SSticker.mode.update_cult_icons_removed(owner.mind)
|
||||
|
||||
/datum/antagonist/cult/on_removal()
|
||||
. = ..()
|
||||
to_chat(owner, "<span class='userdanger'>An unfamiliar white light flashes through your mind, cleansing the taint of the Dark One and all your memories as its servant.</span>")
|
||||
owner.log_message("<font color=#960000>Has renounced the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(!silent_update)
|
||||
owner.visible_message("<span class='big'>[owner] looks like [owner.p_they()] just reverted to their old faith!</span>")
|
||||
..()
|
||||
owner.current.log_message("<font color=#960000>Has renounced the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
if(!silent)
|
||||
owner.current.visible_message("<span class='big'>[owner] looks like [owner.current.p_they()] just reverted to their old faith!</span>")
|
||||
+13
-15
@@ -27,7 +27,7 @@
|
||||
. += "---"
|
||||
.["Call Proc"] = "?_src_=vars;proc_call=\ref[src]"
|
||||
.["Mark Object"] = "?_src_=vars;mark_object=\ref[src]"
|
||||
.["Delete"] = "?_src_=vars;delete=\ref[src]"
|
||||
.["Delete"] = "?_src_=vars;delete=\ref[src]"
|
||||
|
||||
|
||||
/datum/proc/on_reagent_change()
|
||||
@@ -94,7 +94,6 @@
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
STAMINA:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=stamina'>[M.getStaminaLoss()]</a>
|
||||
AROUSAL:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=arousal'>[M.getArousalLoss()]</a>
|
||||
</font>
|
||||
"}
|
||||
else
|
||||
@@ -447,7 +446,7 @@
|
||||
var/list/L = value
|
||||
var/list/items = list()
|
||||
|
||||
if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150)))
|
||||
if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150)))
|
||||
for (var/i in 1 to L.len)
|
||||
var/key = L[i]
|
||||
var/val
|
||||
@@ -527,16 +526,16 @@
|
||||
if(T)
|
||||
callproc_datum(T)
|
||||
|
||||
else if(href_list["delete"])
|
||||
if(!check_rights(R_DEBUG, 0))
|
||||
return
|
||||
|
||||
var/datum/D = locate(href_list["delete"])
|
||||
if(!D)
|
||||
to_chat(usr, "Unable to locate item!")
|
||||
admin_delete(D)
|
||||
href_list["datumrefresh"] = href_list["delete"]
|
||||
|
||||
else if(href_list["delete"])
|
||||
if(!check_rights(R_DEBUG, 0))
|
||||
return
|
||||
|
||||
var/datum/D = locate(href_list["delete"])
|
||||
if(!D)
|
||||
to_chat(usr, "Unable to locate item!")
|
||||
admin_delete(D)
|
||||
href_list["datumrefresh"] = href_list["delete"]
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0))
|
||||
return
|
||||
@@ -1166,8 +1165,6 @@
|
||||
L.adjustCloneLoss(amount)
|
||||
if("stamina")
|
||||
L.adjustStaminaLoss(amount)
|
||||
if("arousal")
|
||||
L.adjustArousalLoss(amount)
|
||||
else
|
||||
to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]")
|
||||
return
|
||||
@@ -1178,3 +1175,4 @@
|
||||
message_admins(msg)
|
||||
admin_ticket_log(L, msg)
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/line in testmerge)
|
||||
if(line)
|
||||
log_world("Test merge active of PR #[line]")
|
||||
feedback_add_details("testmerged_prs","[line]")
|
||||
SSblackbox.add_details("testmerged_prs","[line]")
|
||||
log_world("Based off master commit [parentcommit]")
|
||||
else
|
||||
log_world(parentcommit)
|
||||
@@ -89,7 +89,7 @@
|
||||
to_chat(src, "Enforce Continuous Rounds: [config.continuous.len] of [config.modes.len] roundtypes")
|
||||
to_chat(src, "Allow Midround Antagonists: [config.midround_antag.len] of [config.modes.len] roundtypes")
|
||||
if(config.show_game_type_odds)
|
||||
if(SSticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SSticker.IsRoundInProgress())
|
||||
var/prob_sum = 0
|
||||
var/current_odds_differ = FALSE
|
||||
var/list/probs = list()
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return FALSE
|
||||
|
||||
//For spawning mineral sheets; internal use only
|
||||
/datum/material_container/proc/retrieve(sheet_amt, datum/material/M)
|
||||
/datum/material_container/proc/retrieve(sheet_amt, datum/material/M, target = null)
|
||||
if(!M.sheet_type)
|
||||
return 0
|
||||
if(sheet_amt > 0)
|
||||
@@ -149,26 +149,28 @@
|
||||
use_amount_type(sheet_amt * MINERAL_MATERIAL_AMOUNT, M.id)
|
||||
sheet_amt -= MAX_STACK_SIZE
|
||||
if(round((sheet_amt * MINERAL_MATERIAL_AMOUNT) / MINERAL_MATERIAL_AMOUNT))
|
||||
new M.sheet_type(get_turf(owner), sheet_amt)
|
||||
var/obj/item/stack/sheet/s = new M.sheet_type(get_turf(owner), sheet_amt)
|
||||
if(target)
|
||||
s.forceMove(target)
|
||||
count += sheet_amt
|
||||
use_amount_type(sheet_amt * MINERAL_MATERIAL_AMOUNT, M.id)
|
||||
return count
|
||||
return 0
|
||||
|
||||
/datum/material_container/proc/retrieve_sheets(sheet_amt, id)
|
||||
/datum/material_container/proc/retrieve_sheets(sheet_amt, id, target = null)
|
||||
if(materials[id])
|
||||
return retrieve(sheet_amt, materials[id])
|
||||
return retrieve(sheet_amt, materials[id], target)
|
||||
return 0
|
||||
|
||||
/datum/material_container/proc/retrieve_amount(amt, id)
|
||||
return retrieve_sheets(amount2sheet(amt), id)
|
||||
/datum/material_container/proc/retrieve_amount(amt, id, target)
|
||||
return retrieve_sheets(amount2sheet(amt), id, target)
|
||||
|
||||
/datum/material_container/proc/retrieve_all()
|
||||
/datum/material_container/proc/retrieve_all(target = null)
|
||||
var/result = 0
|
||||
var/datum/material/M
|
||||
for(var/MAT in materials)
|
||||
M = materials[MAT]
|
||||
result += retrieve_sheets(amount2sheet(M.amount), MAT)
|
||||
result += retrieve_sheets(amount2sheet(M.amount), MAT, target)
|
||||
return result
|
||||
|
||||
/datum/material_container/proc/has_space(amt = 0)
|
||||
|
||||
+50
-4
@@ -54,6 +54,7 @@
|
||||
var/linglink
|
||||
|
||||
var/miming = 0 // Mime's vow of silence
|
||||
var/list/antag_datums = list()
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
|
||||
var/datum/gang/gang_datum //Which gang this mind belongs to, if any
|
||||
@@ -86,13 +87,13 @@
|
||||
if(new_character.mind) //disassociate any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
|
||||
if(istype(current) && islist(current.antag_datums)) //wow apparently current isn't always living good fucking job SOMEONE
|
||||
for(var/i in current.antag_datums)
|
||||
var/datum/antagonist/D = i
|
||||
D.transfer_to_new_body(new_character)
|
||||
var/datum/atom_hud/antag/hud_to_transfer = antag_hud//we need this because leave_hud() will clear this list
|
||||
var/mob/living/old_current = current
|
||||
current = new_character //associate ourself with our new body
|
||||
new_character.mind = src //and associate our new body with ourself
|
||||
for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body
|
||||
var/datum/antagonist/A = a
|
||||
A.on_body_transfer(old_current, current)
|
||||
if(iscarbon(new_character))
|
||||
var/mob/living/carbon/C = new_character
|
||||
C.last_mind = src
|
||||
@@ -108,6 +109,51 @@
|
||||
/datum/mind/proc/wipe_memory()
|
||||
memory = null
|
||||
|
||||
// Datum antag mind procs
|
||||
/datum/mind/proc/add_antag_datum(datum_type, on_gain = TRUE)
|
||||
if(!datum_type)
|
||||
return
|
||||
if(!can_hold_antag_datum(datum_type))
|
||||
return
|
||||
var/datum/antagonist/A = new datum_type(src)
|
||||
antag_datums += A
|
||||
if(on_gain)
|
||||
A.on_gain()
|
||||
|
||||
/datum/mind/proc/remove_antag_datum(datum_type)
|
||||
if(!datum_type)
|
||||
return
|
||||
var/datum/antagonist/A = has_antag_datum(datum_type)
|
||||
if(A)
|
||||
A.on_removal()
|
||||
|
||||
/datum/mind/proc/remove_all_antag_datums() //For the Lazy amongst us.
|
||||
for(var/a in antag_datums)
|
||||
var/datum/antagonist/A = a
|
||||
A.on_removal()
|
||||
|
||||
/datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE)
|
||||
if(!datum_type)
|
||||
return
|
||||
. = FALSE
|
||||
for(var/a in antag_datums)
|
||||
var/datum/antagonist/A = a
|
||||
if(check_subtypes && istype(A, datum_type))
|
||||
return A
|
||||
else if(A.type == datum_type)
|
||||
return A
|
||||
|
||||
/datum/mind/proc/can_hold_antag_datum(datum_type)
|
||||
if(!datum_type)
|
||||
return
|
||||
. = TRUE
|
||||
if(has_antag_datum(datum_type))
|
||||
return FALSE
|
||||
for(var/i in antag_datums)
|
||||
var/datum/antagonist/A = i
|
||||
if(is_type_in_typecache(A, A.typecache_datum_blacklist))
|
||||
return FALSE
|
||||
|
||||
|
||||
/*
|
||||
Removes antag type's references from a mind.
|
||||
|
||||
@@ -43,6 +43,13 @@
|
||||
name = "Asteroid 5"
|
||||
description = "Oh my god, another giant rock!"
|
||||
|
||||
/datum/map_template/ruin/space/deep_storage
|
||||
id = "deep-storage"
|
||||
suffix = "deepstorage.dmm"
|
||||
name = "Survivalist Bunker"
|
||||
description = "Assume the best, prepare for the worst. Generally, you should do so by digging a three man heavily fortified bunker into a giant unused asteroid. \
|
||||
Then make it self sufficient, mask any evidence of construction, hook it covertly into the telecommunications network and hope for the best."
|
||||
|
||||
/datum/map_template/ruin/space/bigderelict1
|
||||
id = "bigderelict1"
|
||||
suffix = "bigderelict1.dmm"
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
add_logs(owner, null, "gained Vanguard stun immunity")
|
||||
owner.add_stun_absorption("vanguard", 200, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
||||
owner.SetStunned(0, FALSE)
|
||||
owner.SetWeakened(0)
|
||||
progbar = new(owner, duration, owner)
|
||||
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
|
||||
progbar.update(duration - world.time)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
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/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/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
|
||||
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)
|
||||
@@ -21,8 +22,9 @@
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
if(owner)
|
||||
owner.clear_alert(id)
|
||||
on_remove()
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
on_remove()
|
||||
owner = null
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/proc/start_ticking()
|
||||
@@ -52,8 +54,8 @@
|
||||
|
||||
/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
|
||||
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
|
||||
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
|
||||
owner.clear_alert(id)
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
owner = null
|
||||
|
||||
Reference in New Issue
Block a user