Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
-87
View File
@@ -1,87 +0,0 @@
//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
/datum/antagonist/New()
if(!prevented_antag_datum_type)
prevented_antag_datum_type = type
/datum/antagonist/Destroy()
owner = null
return ..()
/datum/antagonist/proc/can_be_owned(mob/living/new_body)
return new_body && !new_body.has_antag_datum(prevented_antag_datum_type, TRUE)
/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)
owner << some_flufftext
/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/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
/datum/antagonist/proc/on_remove() //totally removes the antag datum from the owner; can only be called once per owner
remove_innate_effects()
owner.antag_datums -= src
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()
//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
-152
View File
@@ -1,152 +0,0 @@
//CLOCKCULT PROOF OF CONCEPT
/datum/antagonist/clockcultist
prevented_antag_datum_type = /datum/antagonist/clockcultist
some_flufftext = null
var/datum/action/innate/hierophant/hierophant_network = new()
/datum/antagonist/clockcultist/silent
silent_update = TRUE
/datum/antagonist/clockcultist/Destroy()
qdel(hierophant_network)
..()
/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(!silent_update)
if(issilicon(new_body))
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
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>")
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>")
new_body << "<span class='userdanger'>And yet, you somehow push it all away.</span>"
/datum/antagonist/clockcultist/on_gain()
if(ticker && ticker.mode && owner.mind)
ticker.mode.servants_of_ratvar += owner.mind
ticker.mode.update_servant_icons_added(owner.mind)
if(jobban_isbanned(owner, ROLE_SERVANT_OF_RATVAR))
addtimer(ticker.mode, "replace_jobbaned_player", 0, TIMER_NORMAL, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR)
if(owner.mind)
owner.mind.special_role = "Servant of Ratvar"
owner.attack_log += "\[[time_stamp()]\] <font color=#BE8700>Has been converted to the cult of Ratvar!</font>"
if(issilicon(owner))
var/mob/living/silicon/S = owner
if(iscyborg(S) && !silent_update)
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(isAI(S))
S << "<span class='boldwarning'>You are able to use your cameras to listen in on conversations.</span>"
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))
owner << "<span class='nezbere'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>"
..()
if(istype(ticker.mode, /datum/game_mode/clockwork_cult))
var/datum/game_mode/clockwork_cult/C = ticker.mode
C.present_tasks(owner) //Memorize the objectives
/datum/antagonist/clockcultist/apply_innate_effects()
all_clockwork_mobs += owner
owner.faction |= "ratvar"
owner.languages_spoken |= RATVAR
owner.languages_understood |= 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
if(iscyborg(S))
var/mob/living/silicon/robot/R = S
R.UnlinkSelf()
R.module.rebuild_modules()
else if(isAI(S))
var/mob/living/silicon/ai/A = S
A.requires_power = POWER_REQ_CLOCKCULT
if(!A.lacks_power())
A.ai_restore_power()
if(A.eyeobj)
A.eyeobj.relay_speech = TRUE
for(var/C in A.connected_robots)
var/mob/living/silicon/robot/R = C
if(R.connected_ai == A)
R.visible_message("<span class='heavy_brass'>[R]'s eyes glow a blazing yellow!</span>", \
"<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>")
R << "<span class='boldwarning'>Your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.</span>"
add_servant_of_ratvar(R, TRUE)
S.laws = new/datum/ai_laws/ratvar
S.laws.associate(S)
S.update_icons()
S.show_laws()
hierophant_network.Grant(S)
hierophant_network.title = "Silicon"
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "brass"
else if(isbrain(owner))
hierophant_network.Grant(owner)
hierophant_network.title = "Vessel"
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "alloy"
else if(isclockmob(owner))
hierophant_network.Grant(owner)
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)
if(!clockwork_gateway_activated)
owner.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
update_slab_info()
..()
/datum/antagonist/clockcultist/remove_innate_effects()
all_clockwork_mobs -= owner
owner.faction -= "ratvar"
owner.languages_spoken &= ~RATVAR
owner.languages_understood &= ~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
qdel(F)
if(issilicon(owner))
var/mob/living/silicon/S = owner
if(isAI(S))
var/mob/living/silicon/ai/A = S
A.requires_power = initial(A.requires_power)
S.make_laws()
S.update_icons()
S.show_laws()
var/mob/living/temp_owner = owner
..()
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>", \
"<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(ticker && ticker.mode && owner.mind)
ticker.mode.servants_of_ratvar -= owner.mind
ticker.mode.update_servant_icons_removed(owner.mind)
if(owner.mind)
owner.mind.wipe_memory()
owner.mind.special_role = null
owner.attack_log += "\[[time_stamp()]\] <font color=#BE8700>Has renounced the cult of Ratvar!</font>"
if(iscyborg(owner))
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>"
..()
-50
View File
@@ -1,50 +0,0 @@
/datum/antagonist/cultist
prevented_antag_datum_type = /datum/antagonist/cultist
some_flufftext = null
var/datum/action/innate/cultcomm/communion = new()
/datum/antagonist/cultist/Destroy()
qdel(communion)
return ..()
/datum/antagonist/cultist/can_be_owned(mob/living/new_body)
. = ..()
if(.)
. = is_convertable_to_cult(new_body)
/datum/antagonist/cultist/on_gain()
if(ticker && ticker.mode && owner.mind)
ticker.mode.cult += owner.mind
ticker.mode.update_cult_icons_added(owner.mind)
if(istype(ticker.mode, /datum/game_mode/cult))
var/datum/game_mode/cult/C = ticker.mode
C.memorize_cult_objectives(owner.mind)
if(jobban_isbanned(owner, ROLE_CULTIST))
addtimer(ticker.mode, "replace_jobbaned_player", 0, TIMER_NORMAL, owner, ROLE_CULTIST, ROLE_CULTIST)
if(owner.mind)
owner.mind.special_role = "Cultist"
owner.attack_log += "\[[time_stamp()]\] <font color=#960000>Has been converted to the cult of Nar'Sie!</font>"
..()
/datum/antagonist/cultist/apply_innate_effects()
owner.faction |= "cult"
owner.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/cultist/on_remove()
if(owner.mind)
owner.mind.wipe_memory()
if(ticker && ticker.mode)
ticker.mode.cult -= owner.mind
ticker.mode.update_cult_icons_removed(owner.mind)
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.attack_log += "\[[time_stamp()]\] <font color=#960000>Has renounced the cult of Nar'Sie!</font>"
if(!silent_update)
owner.visible_message("<span class='big'>[owner] looks like [owner.p_they()] just reverted to their old faith!</span>")
..()