[MIRROR] Sintouched antag datums (#6096)

* Sintouched antag datums (#36561)

* Sintouched stuff

* hudz

* These are boring and when they happen they happen en masse so let's just list them

* undefs

* Sintouched antag datums
This commit is contained in:
CitadelStationBot
2018-03-26 04:19:49 -05:00
committed by Poojawa
parent 3e25c34dbc
commit 4f254f181f
9 changed files with 98 additions and 59 deletions
-12
View File
@@ -552,18 +552,6 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
parts += printobjectives(owner)
return parts.Join("<br>")
/datum/antagonist/devil/roundend_report_footer()
//sintouched go here for now as a hack , TODO proper antag datum for these
var/list/parts = list()
if(SSticker.mode.sintouched.len)
parts += "<span class='header'>The sintouched were:</span>"
var/list/sintouchedUnique = uniqueList(SSticker.mode.sintouched)
for(var/S in sintouchedUnique)
var/datum/mind/sintouched_mind = S
parts += printplayer(sintouched_mind)
parts += printobjectives(sintouched_mind)
return parts.Join("<br>")
//A simple super light weight datum for the codex gigas.
/datum/fakeDevil
var/truename
@@ -0,0 +1,83 @@
#define SIN_ACEDIA "acedia"
#define SIN_GLUTTONY "gluttony"
#define SIN_GREED "greed"
#define SIN_SLOTH "sloth"
#define SIN_WRATH "wrath"
#define SIN_ENVY "envy"
#define SIN_PRIDE "pride"
/datum/antagonist/sintouched
name = "sintouched"
roundend_category = "sintouched"
antagpanel_category = "Devil"
var/sin
var/static/list/sins = list(SIN_ACEDIA,SIN_GLUTTONY,SIN_GREED,SIN_SLOTH,SIN_WRATH,SIN_ENVY,SIN_PRIDE)
/datum/antagonist/sintouched/New()
. = ..()
sin = pick(sins)
/datum/antagonist/sintouched/proc/forge_objectives()
var/datum/objective/sintouched/O
switch(sin)//traditional seven deadly sins... except lust.
if(SIN_ACEDIA)
O = new /datum/objective/sintouched/acedia
if(SIN_GLUTTONY)
O = new /datum/objective/sintouched/gluttony
if(SIN_GREED)
O = new /datum/objective/sintouched/greed
if(SIN_SLOTH)
O = new /datum/objective/sintouched/sloth
if(SIN_WRATH)
O = new /datum/objective/sintouched/wrath
if(SIN_ENVY)
O = new /datum/objective/sintouched/envy
if(SIN_PRIDE)
O = new /datum/objective/sintouched/pride
objectives += O
/datum/antagonist/sintouched/on_gain()
forge_objectives()
. = ..()
/datum/antagonist/sintouched/greet()
owner.announce_objectives()
/datum/antagonist/sintouched/roundend_report()
return printplayer(owner)
/datum/antagonist/sintouched/admin_add(datum/mind/new_owner,mob/admin)
var/choices = sins + "Random"
var/chosen_sin = input(admin,"What kind ?","Sin kind") as null|anything in choices
if(!chosen_sin)
return
if(chosen_sin in sins)
sin = chosen_sin
. = ..()
/datum/antagonist/sintouched/apply_innate_effects(mob/living/mob_override)
. = ..()
add_hud()
/datum/antagonist/sintouched/remove_innate_effects(mob/living/mob_override)
remove_hud()
. = ..()
/datum/antagonist/sintouched/proc/add_hud()
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_SINTOUCHED]
hud.join_hud(owner.current)
set_antag_hud(owner.current, "sintouched")
/datum/antagonist/sintouched/proc/remove_hud()
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_SINTOUCHED]
hud.leave_hud(owner.current)
set_antag_hud(owner.current, null)
#undef SIN_ACEDIA
#undef SIN_ENVY
#undef SIN_GLUTTONY
#undef SIN_GREED
#undef SIN_PRIDE
#undef SIN_SLOTH
#undef SIN_WRATH
@@ -824,34 +824,6 @@
dna.remove_mutation(HM.name)
..()
/mob/living/carbon/human/proc/influenceSin()
var/datum/objective/sintouched/O
switch(rand(1,7))//traditional seven deadly sins... except lust.
if(1) // acedia
log_game("[src] was influenced by the sin of Acedia.")
O = new /datum/objective/sintouched/acedia
if(2) // Gluttony
log_game("[src] was influenced by the sin of gluttony.")
O = new /datum/objective/sintouched/gluttony
if(3) // Greed
log_game("[src] was influenced by the sin of greed.")
O = new /datum/objective/sintouched/greed
if(4) // sloth
log_game("[src] was influenced by the sin of sloth.")
O = new /datum/objective/sintouched/sloth
if(5) // Wrath
log_game("[src] was influenced by the sin of wrath.")
O = new /datum/objective/sintouched/wrath
if(6) // Envy
log_game("[src] was influenced by the sin of envy.")
O = new /datum/objective/sintouched/envy
if(7) // Pride
log_game("[src] was influenced by the sin of pride.")
O = new /datum/objective/sintouched/pride
SSticker.mode.sintouched += src.mind
src.mind.objectives += O
src.mind.announce_objectives()
/mob/living/carbon/human/check_weakness(obj/item/weapon, mob/living/attacker)
. = ..()
if (dna && dna.species)
+3 -4
View File
@@ -927,10 +927,9 @@
return 1
/mob/living/proc/check_acedia()
if(src.mind && src.mind.objectives)
for(var/datum/objective/sintouched/acedia/A in src.mind.objectives)
return 1
return 0
if(mind && mind.has_objective(/datum/objective/sintouched/acedia))
return TRUE
return FALSE
/mob/living/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
stop_pulling()
+2 -2
View File
@@ -193,11 +193,11 @@
for(var/mob/living/carbon/human/H in targets)
if(!H.mind)
continue
if(locate(/datum/objective/sintouched) in H.mind.objectives)
if(H.mind.has_antag_datum(/datum/antagonist/sintouched))
continue
if(H.anti_magic_check(FALSE, TRUE))
continue
H.influenceSin()
H.mind.add_antag_datum(/datum/antagonist/sintouched)
H.Knockdown(400)