diff --git a/code/__DEFINES/vampire_defines.dm b/code/__DEFINES/vampire_defines.dm index 19a973739a73..2d03f3b1bd36 100644 --- a/code/__DEFINES/vampire_defines.dm +++ b/code/__DEFINES/vampire_defines.dm @@ -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. diff --git a/code/datums/ai/_ai_controller.dm b/code/datums/ai/_ai_controller.dm index 1c593352916b..43d454c147db 100644 --- a/code/datums/ai/_ai_controller.dm +++ b/code/datums/ai/_ai_controller.dm @@ -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() @@ -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 diff --git a/code/datums/ai/generic/generic_behaviors.dm b/code/datums/ai/generic/generic_behaviors.dm index c6ec3c89a7d6..0ae7b9980a74 100644 --- a/code/datums/ai/generic/generic_behaviors.dm +++ b/code/datums/ai/generic/generic_behaviors.dm @@ -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)) diff --git a/code/datums/ai/idle_behaviors/idle_dog.dm b/code/datums/ai/idle_behaviors/idle_dog.dm index c69b34015304..97f55dfb6d60 100644 --- a/code/datums/ai/idle_behaviors/idle_dog.dm +++ b/code/datums/ai/idle_behaviors/idle_dog.dm @@ -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 @@ -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) diff --git a/code/datums/components/irradiated.dm b/code/datums/components/irradiated.dm index b583b1ed7dc7..141867e0e5f5 100644 --- a/code/datums/components/irradiated.dm +++ b/code/datums/components/irradiated.dm @@ -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) diff --git a/code/game/gamemodes/blood_plague_outbreak.dm b/code/game/gamemodes/blood_plague_outbreak.dm index a5724f7de457..fe0fef496033 100644 --- a/code/game/gamemodes/blood_plague_outbreak.dm +++ b/code/game/gamemodes/blood_plague_outbreak.dm @@ -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 diff --git a/code/modules/antagonists/vampire/vampire_actions/neck_bite.dm b/code/modules/antagonists/vampire/vampire_actions/neck_bite.dm index 702915d3df62..108c80b0437f 100644 --- a/code/modules/antagonists/vampire/vampire_actions/neck_bite.dm +++ b/code/modules/antagonists/vampire/vampire_actions/neck_bite.dm @@ -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! diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 4d7724fd525c..2d0c483f0e9e 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 41af2c5ac007..71ab882cc320 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -181,9 +181,8 @@ 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) @@ -191,8 +190,9 @@ There are several things that need to be remembered: 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