mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Datumized vampires (#17166)
Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: dearmochi <1496804+dearmochi@users.noreply.github.com>
This commit is contained in:
@@ -76,11 +76,16 @@
|
||||
|
||||
var/datum/mind/mind = M.mind
|
||||
if(user.antagHUD)
|
||||
// If a mind is many antags at once, we'll display all of them, each
|
||||
// under their own antag sub-section.
|
||||
// This is arguably better, than picking one of the antag datums at random.
|
||||
/*
|
||||
If a mind is many antags at once, we'll display all of them, each
|
||||
under their own antag sub-section.
|
||||
This is arguably better, than picking one of the antag datums at random.
|
||||
|
||||
// Traitors - the only antags in `.antag_datums` at the time of writing.
|
||||
list of antags that are datumised:
|
||||
- traitor
|
||||
- mindslaves/vampire thralls
|
||||
- vampire
|
||||
*/
|
||||
for(var/_A in mind.antag_datums)
|
||||
var/datum/antagonist/A = _A
|
||||
var/antag_serialized = serialized.Copy()
|
||||
@@ -90,8 +95,7 @@
|
||||
// Not-very-datumized antags follow
|
||||
// Associative list of antag name => whether this mind is this antag
|
||||
var/other_antags = list(
|
||||
"Changeling" = (mind.changeling != null),
|
||||
"Vampire" = (mind.vampire != null),
|
||||
"Changeling" = (mind.changeling != null)
|
||||
)
|
||||
if(SSticker && SSticker.mode)
|
||||
other_antags += list(
|
||||
|
||||
@@ -207,9 +207,10 @@
|
||||
stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
|
||||
stat("Absorbed DNA", mind.changeling.absorbedcount)
|
||||
|
||||
if(mind.vampire)
|
||||
stat("Total Blood", "[mind.vampire.bloodtotal]")
|
||||
stat("Usable Blood", "[mind.vampire.bloodusable]")
|
||||
var/datum/antagonist/vampire/V = mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V)
|
||||
stat("Total Blood", "[V.bloodtotal]")
|
||||
stat("Usable Blood", "[V.bloodusable]")
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity)
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -36,8 +36,9 @@
|
||||
name = get_visible_name()
|
||||
pulse = handle_pulse(times_fired)
|
||||
|
||||
if(mind?.vampire)
|
||||
mind.vampire.handle_vampire()
|
||||
var/datum/antagonist/vampire/V = mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V)
|
||||
V.handle_vampire()
|
||||
if(life_tick == 1)
|
||||
regenerate_icons() // Make sure the inventory updates
|
||||
|
||||
@@ -363,8 +364,9 @@
|
||||
bodytemperature += 11
|
||||
else
|
||||
bodytemperature += (BODYTEMP_HEATING_MAX + (fire_stacks * 12))
|
||||
if(mind?.vampire && !mind.vampire.get_ability(/datum/vampire_passive/full) && stat != DEAD)
|
||||
mind.vampire.bloodusable = max(mind.vampire.bloodusable - 5, 0)
|
||||
var/datum/antagonist/vampire/V = mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V && !V.get_ability(/datum/vampire_passive/full) && stat != DEAD) // V?. doesn't work here because `has_antag_datum` return FALSE if there is no datum and ?. doesn't like that
|
||||
V.bloodusable = max(V.bloodusable - 5, 0)
|
||||
|
||||
/mob/living/carbon/human/proc/get_thermal_protection()
|
||||
if(HAS_TRAIT(src, TRAIT_RESISTHEAT))
|
||||
@@ -788,7 +790,7 @@
|
||||
/mob/living/carbon/human/proc/handle_nutrition_alerts() //This is a terrible abuse of the alert system; something like this should be a HUD element
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||
return
|
||||
if(mind?.vampire && (mind in SSticker.mode.vampires)) //Vampires
|
||||
if(mind?.has_antag_datum(/datum/antagonist/vampire)) //Vampires
|
||||
switch(nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
throw_alert("nutrition", /obj/screen/alert/fat/vampire)
|
||||
|
||||
@@ -434,18 +434,19 @@
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
|
||||
return FALSE
|
||||
//Vampire code
|
||||
if(user.mind && user.mind.vampire && (user.mind in SSticker.mode.vampires) && !user.mind.vampire.draining && user.zone_selected == "head" && target != user)
|
||||
var/datum/antagonist/vampire/V = user?.mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V && !V.draining && user.zone_selected == "head" && target != user)
|
||||
if((NO_BLOOD in target.dna.species.species_traits) || target.dna.species.exotic_blood || !target.blood_volume)
|
||||
to_chat(user, "<span class='warning'>They have no blood!</span>")
|
||||
return
|
||||
if(target.mind && target.mind.vampire && (target.mind in SSticker.mode.vampires))
|
||||
if(target.mind && target.mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
to_chat(user, "<span class='warning'>Your fangs fail to pierce [target.name]'s cold flesh</span>")
|
||||
return
|
||||
if(HAS_TRAIT(target, TRAIT_SKELETONIZED))
|
||||
to_chat(user, "<span class='warning'>There is no blood in a skeleton!</span>")
|
||||
return
|
||||
//we're good to suck the blood, blaah
|
||||
user.mind.vampire.handle_bloodsucking(target)
|
||||
V.handle_bloodsucking(target)
|
||||
add_attack_logs(user, target, "vampirebit")
|
||||
return
|
||||
//end vampire codes
|
||||
@@ -856,16 +857,17 @@ It'll return null if the organ doesn't correspond, so include null checks when u
|
||||
if(A.update_remote_sight(H)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
if(H.mind?.vampire)
|
||||
if(H.mind.vampire.get_ability(/datum/vampire_passive/xray))
|
||||
var/datum/antagonist/vampire/V = H.mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V)
|
||||
if(V.get_ability(/datum/vampire_passive/xray))
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark += 8
|
||||
H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
else if(V.get_ability(/datum/vampire_passive/full))
|
||||
H.sight |= SEE_MOBS
|
||||
H.see_in_dark += 8
|
||||
H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
|
||||
else if(V.get_ability(/datum/vampire_passive/vision))
|
||||
H.sight |= SEE_MOBS
|
||||
H.see_in_dark += 1 // base of 2, 2+1 is 3
|
||||
H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
/datum/species/diona/handle_life(mob/living/carbon/human/H)
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
var/is_vamp = H.mind?.vampire != null
|
||||
var/is_vamp = H.mind && H.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(isturf(H.loc)) //else, there's considered to be no light
|
||||
var/turf/T = H.loc
|
||||
light_amount = min(1, T.get_lumcount()) - 0.5
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
/mob/living/carbon/handle_sleeping()
|
||||
if(..())
|
||||
if(mind?.vampire)
|
||||
if(mind?.has_antag_datum(/datum/antagonist/vampire))
|
||||
if(istype(loc, /obj/structure/closet/coffin))
|
||||
adjustBruteLoss(-1, FALSE)
|
||||
adjustFireLoss(-1, FALSE)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
SSticker.mode.remove_cultist(mind, 1)
|
||||
SSticker.mode.remove_wizard(mind)
|
||||
SSticker.mode.remove_changeling(mind)
|
||||
SSticker.mode.remove_vampire(mind)
|
||||
mind.remove_antag_datum(/datum/antagonist/vampire)
|
||||
SSticker.mode.remove_thrall(mind, 0)
|
||||
SSticker.mode.remove_shadowling(mind)
|
||||
SSticker.mode.remove_abductor(mind)
|
||||
|
||||
@@ -1499,11 +1499,6 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
|
||||
if(!mind)
|
||||
return FALSE
|
||||
|
||||
//Allows fullpower vampires to bypass holy areas
|
||||
var/datum/vampire/vampire = mind.vampire
|
||||
if(vampire && vampire.get_ability(/datum/vampire_passive/full))
|
||||
return FALSE
|
||||
|
||||
//Allows cult to bypass holy areas once they summon
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
if(iscultist(src) && gamemode.cult_objs.cult_status == NARSIE_HAS_RISEN)
|
||||
|
||||
Reference in New Issue
Block a user