Skip to content

Commit de40c8e

Browse files
authored
02/22/25 Bugs (#1217)
* fix bloodyhands stacking infinitely * fix default behaviors not being used * buff vamp * i like this fix more * fuck it i dont care * why is this a thing? will it break anything if i remove it? * lol
1 parent 3f6878a commit de40c8e

File tree

9 files changed

+25
-46
lines changed

9 files changed

+25
-46
lines changed

code/__DEFINES/vampire_defines.dm

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
// Point thresholds to change stages. 1 point = 1 second
88
#define THIRST_THRESHOLD_BLOODLUST 0
9-
#define THIRST_THRESHOLD_SATED 300
10-
#define THIRST_THRESHOLD_HUNGRY (THIRST_THRESHOLD_SATED + 300)
11-
#define THIRST_THRESHOLD_STARVING (THIRST_THRESHOLD_HUNGRY + 300)
12-
#define THIRST_THRESHOLD_WASTING (THIRST_THRESHOLD_STARVING + 300)
13-
#define THIRST_THRESHOLD_DEAD (THIRST_THRESHOLD_WASTING + 450)
9+
#define THIRST_THRESHOLD_SATED 240
10+
#define THIRST_THRESHOLD_HUNGRY (THIRST_THRESHOLD_SATED + 900)
11+
#define THIRST_THRESHOLD_STARVING (THIRST_THRESHOLD_HUNGRY + 420)
12+
#define THIRST_THRESHOLD_WASTING (THIRST_THRESHOLD_STARVING + 420)
13+
#define THIRST_THRESHOLD_DEAD (THIRST_THRESHOLD_WASTING + 420)
1414

1515
/// How much blood we can siphon from a target per VAMPIRE_BLOOD_SAME_TARGET_COOLDOWN
1616
#define VAMPIRE_BLOOD_DRAIN_PER_TARGET 100
1717
/// Drain per second
1818
#define VAMPIRE_BLOOD_DRAIN_RATE 5
1919
/// Coeff for calculating thirst satiation per unit of blood.
20-
#define VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF 18 // A full drain is equivalent to 15 minutes of life.
20+
#define VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF 15 // A full drain is equivalent to 25 minutes of life. (100 * 15 / 60 = 25)
2121
/// The amount of time before a victim can be fully drained again.
2222
#define VAMPIRE_BLOOD_SAME_TARGET_COOLDOWN (10 MINUTES)
2323
/// Calculate how much of a mob's blood budget will have been regenerated over a given time.

code/datums/ai/_ai_controller.dm

+8
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ multiple modular subtrees with behaviors
6868
#endif
6969

7070
/datum/ai_controller/New(atom/new_pawn)
71+
if(default_behavior)
72+
default_behavior = GET_AI_BEHAVIOR(default_behavior)
73+
7174
change_ai_movement_type(ai_movement)
7275
init_subtrees()
7376

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

167+
if(!length(current_behaviors) && default_behavior && behavior_cooldowns[default_behavior] < world.time)
168+
var/action_seconds_per_tick = max(default_behavior.get_cooldown(src) * 0.1, delta_time)
169+
ProcessBehavior(action_seconds_per_tick, default_behavior)
170+
return
171+
164172
for(var/datum/ai_behavior/current_behavior as anything in current_behaviors)
165173

166174
// Convert the current behaviour action cooldown to realtime seconds from deciseconds.current_behavior

code/datums/ai/generic/generic_behaviors.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@
185185
if(QDELETED(controller.pawn))
186186
return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS
187187

188-
// if(controller.blackboard_key_exists(set_key))
189-
// return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS
188+
if(controller.blackboard_key_exists(set_key))
189+
return BEHAVIOR_PERFORM_COOLDOWN | BEHAVIOR_PERFORM_SUCCESS
190190

191191
var/find_this_thing = search_tactic(controller, locate_path, search_range)
192192
if(isnull(find_this_thing))

code/datums/ai/idle_behaviors/idle_dog.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///Dog specific idle behavior.
22
/datum/ai_behavior/idle_dog
3-
action_cooldown = 10 SECONDS
3+
//action_cooldown = 10 SECONDS
44

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

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

code/datums/components/irradiated.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
if (should_halt_effects(parent))
9191
return
9292

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

9696
process_tox_damage(human_parent, delta_time)

code/game/gamemodes/blood_plague_outbreak.dm

-25
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,3 @@
55

66
antagonist_pop_ratio = 0.1
77
antag_selector = /datum/antagonist_selector/vampire
8-
9-
/datum/game_mode/one_antag/blood_plague/check_finished()
10-
. = ..()
11-
if(.)
12-
return
13-
14-
if(EMERGENCY_AT_LEAST_DOCKED || SSshuttle.emergency?.mode == SHUTTLE_CALL)
15-
return TRUE
16-
17-
// If there's no non-vampires left alive, end the round.
18-
// If this becomes too common, something is wrong, this is NOT a conversion antagonist.
19-
for(var/mob/living/carbon/human in GLOB.human_list)
20-
if(!human.ckey)
21-
continue
22-
23-
var/turf/pos = get_turf(human)
24-
if(isnull(pos) || !(is_station_level(pos.z) || isshuttleturf(pos)))
25-
continue
26-
27-
if(IS_VAMPIRE(human))
28-
continue
29-
30-
return FALSE
31-
32-
return TRUE

code/modules/antagonists/vampire/vampire_actions/neck_bite.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
// Draining an opposing vampire really, really messes them up.
104104
var/datum/antagonist/vampire/victim_vamp_datum = victim.mind?.has_antag_datum(/datum/antagonist/vampire)
105105
if(victim_vamp_datum)
106-
victim_vamp_datum.thirst_level.add_points(-(VAMPIRE_BLOOD_DRAIN_RATE * VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF))
106+
victim_vamp_datum.thirst_level.add_points(VAMPIRE_BLOOD_DRAIN_RATE * VAMPIRE_BLOOD_THIRST_EXCHANGE_COEFF)
107107
victim_vamp_datum.update_thirst_stage()
108108

109109
else if(prob(1)) // A chance to spread the plague!

code/modules/mob/living/carbon/damage_procs.dm

-4
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,12 @@
7575
/mob/living/carbon/getBruteLoss()
7676
var/amount = 0
7777
for(var/obj/item/bodypart/BP as anything in bodyparts)
78-
if(!IS_ORGANIC_LIMB(BP))
79-
continue
8078
amount += BP.brute_dam
8179
return amount
8280

8381
/mob/living/carbon/getFireLoss()
8482
var/amount = 0
8583
for(var/obj/item/bodypart/BP as anything in bodyparts)
86-
if(!IS_ORGANIC_LIMB(BP))
87-
continue
8884
amount += BP.burn_dam
8985
return amount
9086

code/modules/mob/living/carbon/human/human_update_icons.dm

+5-5
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,18 @@ There are several things that need to be remembered:
181181
inv.update_icon()
182182

183183
//Bloody hands begin
184-
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
185-
cut_overlay(bloody_overlay)
186-
if(!gloves && blood_in_hands && (num_hands > 0))
184+
if(isnull(gloves) && blood_in_hands && num_hands > 0)
185+
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
187186
bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
188187
bloody_overlay.color = get_blood_dna_color(return_blood_DNA()) || COLOR_HUMAN_BLOOD
189188
if(num_hands < 2)
190189
if(has_left_hand(FALSE))
191190
bloody_overlay.icon_state = "bloodyhands_left"
192191
else if(has_right_hand(FALSE))
193192
bloody_overlay.icon_state = "bloodyhands_right"
194-
195-
add_overlay(bloody_overlay)
193+
overlays_standing[GLOVES_LAYER] = bloody_overlay
194+
apply_overlay(GLOVES_LAYER)
195+
return
196196
//Bloody hands end
197197

198198
var/mutable_appearance/gloves_overlay

0 commit comments

Comments
 (0)