Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

02/22/25 Bugs #1217

Merged
merged 8 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions code/__DEFINES/vampire_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

// Point thresholds to change stages. 1 point = 1 second
#define THIRST_THRESHOLD_BLOODLUST 0
#define THIRST_THRESHOLD_SATED 300
#define THIRST_THRESHOLD_HUNGRY (THIRST_THRESHOLD_SATED + 300)
#define THIRST_THRESHOLD_STARVING (THIRST_THRESHOLD_HUNGRY + 300)
#define THIRST_THRESHOLD_WASTING (THIRST_THRESHOLD_STARVING + 300)
#define THIRST_THRESHOLD_DEAD (THIRST_THRESHOLD_WASTING + 450)
#define THIRST_THRESHOLD_SATED 240
#define THIRST_THRESHOLD_HUNGRY (THIRST_THRESHOLD_SATED + 900)
#define THIRST_THRESHOLD_STARVING (THIRST_THRESHOLD_HUNGRY + 420)
#define THIRST_THRESHOLD_WASTING (THIRST_THRESHOLD_STARVING + 420)
#define THIRST_THRESHOLD_DEAD (THIRST_THRESHOLD_WASTING + 420)

/// How much blood we can siphon from a target per VAMPIRE_BLOOD_SAME_TARGET_COOLDOWN
#define VAMPIRE_BLOOD_DRAIN_PER_TARGET 100
/// Drain per second
#define VAMPIRE_BLOOD_DRAIN_RATE 5
/// Coeff for calculating thirst satiation per unit of blood.
#define VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF 18 // A full drain is equivalent to 15 minutes of life.
#define VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF 15 // A full drain is equivalent to 25 minutes of life. (100 * 15 / 60 = 25)
/// The amount of time before a victim can be fully drained again.
#define VAMPIRE_BLOOD_SAME_TARGET_COOLDOWN (10 MINUTES)
/// Calculate how much of a mob's blood budget will have been regenerated over a given time.
Expand Down
8 changes: 8 additions & 0 deletions code/datums/ai/_ai_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ multiple modular subtrees with behaviors
#endif

/datum/ai_controller/New(atom/new_pawn)
if(default_behavior)
default_behavior = GET_AI_BEHAVIOR(default_behavior)

change_ai_movement_type(ai_movement)
init_subtrees()

Expand Down Expand Up @@ -161,6 +164,11 @@ multiple modular subtrees with behaviors
SSmove_manager.stop_looping(pawn) //stop moving
return //this should remove them from processing in the future through event-based stuff.

if(!length(current_behaviors) && default_behavior && behavior_cooldowns[default_behavior] < world.time)
var/action_seconds_per_tick = max(default_behavior.get_cooldown(src) * 0.1, delta_time)
ProcessBehavior(action_seconds_per_tick, default_behavior)
return

for(var/datum/ai_behavior/current_behavior as anything in current_behaviors)

// Convert the current behaviour action cooldown to realtime seconds from deciseconds.current_behavior
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ai/generic/generic_behaviors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
if(QDELETED(controller.pawn))
return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS

// if(controller.blackboard_key_exists(set_key))
// return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS
if(controller.blackboard_key_exists(set_key))
return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS

var/find_this_thing = search_tactic(controller, locate_path, search_range)
if(isnull(find_this_thing))
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ai/idle_behaviors/idle_dog.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///Dog specific idle behavior.
/datum/ai_behavior/idle_dog
action_cooldown = 10 SECONDS
//action_cooldown = 10 SECONDS

/datum/ai_behavior/idle_dog/perform(delta_time, datum/ai_controller/dog/controller)
var/mob/living/living_pawn = controller.pawn
Expand All @@ -20,7 +20,7 @@
var/move_dir = pick(GLOB.alldirs)
controller.MovePawn(get_step(living_pawn, move_dir), move_dir)

else if(DT_PROB(10, delta_time))
else if(DT_PROB(0.5, delta_time))
living_pawn.manual_emote(pick("dances around.","chases [living_pawn.p_their()] tail!"))
living_pawn.AddComponent(/datum/component/spinny)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/irradiated.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
if (should_halt_effects(parent))
return

if (human_parent.stat > DEAD)
if (human_parent.stat != DEAD)
human_parent.dna?.species?.handle_radiation(human_parent, world.time - beginning_of_irradiation, delta_time)

process_tox_damage(human_parent, delta_time)
Expand Down
25 changes: 0 additions & 25 deletions code/game/gamemodes/blood_plague_outbreak.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,3 @@

antagonist_pop_ratio = 0.1
antag_selector = /datum/antagonist_selector/vampire

/datum/game_mode/one_antag/blood_plague/check_finished()
. = ..()
if(.)
return

if(EMERGENCY_AT_LEAST_DOCKED || SSshuttle.emergency?.mode == SHUTTLE_CALL)
return TRUE

// If there's no non-vampires left alive, end the round.
// If this becomes too common, something is wrong, this is NOT a conversion antagonist.
for(var/mob/living/carbon/human in GLOB.human_list)
if(!human.ckey)
continue

var/turf/pos = get_turf(human)
if(isnull(pos) || !(is_station_level(pos.z) || isshuttleturf(pos)))
continue

if(IS_VAMPIRE(human))
continue

return FALSE

return TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
// Draining an opposing vampire really, really messes them up.
var/datum/antagonist/vampire/victim_vamp_datum = victim.mind?.has_antag_datum(/datum/antagonist/vampire)
if(victim_vamp_datum)
victim_vamp_datum.thirst_level.add_points(-(VAMPIRE_BLOOD_DRAIN_RATE * VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF))
victim_vamp_datum.thirst_level.add_points(VAMPIRE_BLOOD_DRAIN_RATE * VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF)
victim_vamp_datum.update_thirst_stage()

else if(prob(1)) // A chance to spread the plague!
Expand Down
4 changes: 0 additions & 4 deletions code/modules/mob/living/carbon/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,12 @@
/mob/living/carbon/getBruteLoss()
var/amount = 0
for(var/obj/item/bodypart/BP as anything in bodyparts)
if(!IS_ORGANIC_LIMB(BP))
continue
amount += BP.brute_dam
return amount

/mob/living/carbon/getFireLoss()
var/amount = 0
for(var/obj/item/bodypart/BP as anything in bodyparts)
if(!IS_ORGANIC_LIMB(BP))
continue
amount += BP.burn_dam
return amount

Expand Down
10 changes: 5 additions & 5 deletions code/modules/mob/living/carbon/human/human_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,18 @@ There are several things that need to be remembered:
inv.update_icon()

//Bloody hands begin
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
cut_overlay(bloody_overlay)
if(!gloves && blood_in_hands && (num_hands > 0))
if(isnull(gloves) && blood_in_hands && num_hands > 0)
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
bloody_overlay.color = get_blood_dna_color(return_blood_DNA()) || COLOR_HUMAN_BLOOD
if(num_hands < 2)
if(has_left_hand(FALSE))
bloody_overlay.icon_state = "bloodyhands_left"
else if(has_right_hand(FALSE))
bloody_overlay.icon_state = "bloodyhands_right"

add_overlay(bloody_overlay)
overlays_standing[GLOVES_LAYER] = bloody_overlay
apply_overlay(GLOVES_LAYER)
return
//Bloody hands end

var/mutable_appearance/gloves_overlay
Expand Down
Loading