mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
unsuitable_heat_damage = 20
|
||||
|
||||
ai_controller = /datum/ai_controller/basic_controller/alien
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
|
||||
///List of loot items to drop when deleted, if this is set then we apply DEL_ON_DEATH
|
||||
var/list/loot
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(staminaloss > 0)
|
||||
adjustStaminaLoss(-stamina_recovery * seconds_per_tick, forced = TRUE)
|
||||
adjust_stamina_loss(-stamina_recovery * seconds_per_tick, forced = TRUE)
|
||||
|
||||
/mob/living/basic/get_default_say_verb()
|
||||
return length(speak_emote) ? pick(speak_emote) : ..()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/// Root of shared behaviour for mobs spawned by blobs, is abstract and should not be spawned
|
||||
/mob/living/basic/blob_minion
|
||||
abstract_type = /mob/living/basic/blob_minion
|
||||
name = "Blob Error"
|
||||
desc = "A nonfunctional fungal creature created by bad code or celestial mistake. Point and laugh."
|
||||
icon = 'icons/mob/nonhuman-player/blob.dmi'
|
||||
@@ -7,7 +8,6 @@
|
||||
base_icon_state = "blob_head"
|
||||
unique_name = TRUE
|
||||
status_flags = CANPUSH
|
||||
pass_flags = PASSBLOB
|
||||
faction = list(ROLE_BLOB)
|
||||
combat_mode = TRUE
|
||||
bubble_icon = "blob"
|
||||
@@ -25,6 +25,11 @@
|
||||
var/death_cloud_size = BLOBMOB_CLOUD_NONE
|
||||
var/loot = /obj/item/food/spore_sack
|
||||
|
||||
/mob/living/basic/blob_minion/New(loc, blob_borne)
|
||||
. = ..()
|
||||
if(blob_borne)
|
||||
pass_flags = PASSBLOB
|
||||
|
||||
/mob/living/basic/blob_minion/Initialize(mapload)
|
||||
. = ..()
|
||||
add_traits(list(TRAIT_BLOB_ALLY, TRAIT_MUTE), INNATE_TRAIT)
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
/mob/living/basic/blob_minion/spore/proc/zombify(mob/living/carbon/human/target)
|
||||
visible_message(span_warning("The corpse of [target.name] suddenly rises!"))
|
||||
var/mob/living/basic/blob_minion/zombie/blombie = change_mob_type(zombie_type, loc, new_name = initial(zombie_type.name))
|
||||
blombie.pass_flags |= PASSBLOB //No way to pass the blob_borne info through change_mob_type() to Initilize(), so we just circumvent it here.
|
||||
blombie.faction |= faction //inherit the spore's faction in case it was spawned with a different one (eg gold core)
|
||||
blombie.set_name()
|
||||
if (istype(blombie)) // In case of badmin
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
qdel(victim.get_organ_slot(ORGAN_SLOT_LUNGS))
|
||||
qdel(victim.get_organ_slot(ORGAN_SLOT_HEART))
|
||||
qdel(victim.get_organ_slot(ORGAN_SLOT_LIVER))
|
||||
victim.adjustBruteLoss(500)
|
||||
victim.adjust_brute_loss(500)
|
||||
victim.death() //make sure they die
|
||||
victim.apply_status_effect(/datum/status_effect/gutted)
|
||||
return TRUE
|
||||
@@ -87,12 +87,12 @@
|
||||
/mob/living/basic/boss/ex_act(severity, target)
|
||||
switch (severity)
|
||||
if (EXPLODE_DEVASTATE)
|
||||
adjustBruteLoss(250)
|
||||
adjust_brute_loss(250)
|
||||
|
||||
if (EXPLODE_HEAVY)
|
||||
adjustBruteLoss(100)
|
||||
adjust_brute_loss(100)
|
||||
|
||||
if (EXPLODE_LIGHT)
|
||||
adjustBruteLoss(50)
|
||||
adjust_brute_loss(50)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -9,6 +9,7 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
#define SENTIENT_BOT_RESET_TIMER 45 SECONDS
|
||||
|
||||
/mob/living/basic/bot
|
||||
abstract_type = /mob/living/basic/bot
|
||||
icon = 'icons/mob/silicon/aibots.dmi'
|
||||
layer = MOB_LAYER
|
||||
gender = NEUTER
|
||||
@@ -770,7 +771,7 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
update_appearance()
|
||||
|
||||
/mob/living/basic/bot/rust_heretic_act()
|
||||
adjustBruteLoss(400)
|
||||
adjust_brute_loss(400)
|
||||
|
||||
/mob/living/basic/bot/proc/attempt_access(mob/bot, obj/door_attempt)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
action_cooldown = BOT_COMMISSIONED_SALUTE_DELAY
|
||||
|
||||
/datum/ai_behavior/find_and_set/valid_authority/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/valid_authority/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/mob/living/nearby_mob in oview(search_range, controller.pawn))
|
||||
if(!HAS_TRAIT(nearby_mob, TRAIT_COMMISSIONED))
|
||||
continue
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/datum/ai_behavior/find_and_set/in_list/clean_targets
|
||||
action_cooldown = 3 SECONDS
|
||||
|
||||
/datum/ai_behavior/find_and_set/in_list/clean_targets/search_tactic(datum/ai_controller/basic_controller/bot/controller, locate_paths, search_range)
|
||||
/datum/ai_behavior/find_and_set/in_list/clean_targets/search_tactic(datum/ai_controller/basic_controller/bot/controller, locate_paths, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/found = typecache_filter_list(oview(search_range, controller.pawn), locate_paths)
|
||||
var/list/ignore_list = controller.blackboard[BB_TEMPORARY_IGNORE_LIST]
|
||||
for(var/atom/found_item in found)
|
||||
@@ -101,7 +101,7 @@
|
||||
action_cooldown = 30 SECONDS
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
|
||||
/datum/ai_behavior/find_and_set/spray_target/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/spray_target/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/ignore_list = controller.blackboard[BB_TEMPORARY_IGNORE_LIST]
|
||||
for(var/mob/living/carbon/human/human_target in oview(search_range, controller.pawn))
|
||||
if(LAZYACCESS(ignore_list, human_target))
|
||||
@@ -178,7 +178,7 @@
|
||||
action_cooldown = 30 SECONDS
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
|
||||
/datum/ai_behavior/find_and_set/friendly_janitor/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/friendly_janitor/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
for(var/mob/living/carbon/human/human_target in oview(search_range, living_pawn))
|
||||
if(human_target.stat != CONSCIOUS || isnull(human_target.mind))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
habitable_atmos = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
minimum_survivable_temperature = (T0C - 10)
|
||||
maximum_survivable_temperature = (T0C + 100)
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
faction = list(FACTION_CLOWN)
|
||||
ai_controller = /datum/ai_controller/basic_controller/clown
|
||||
///list of stuff we drop on death
|
||||
@@ -470,10 +470,10 @@
|
||||
health += 10
|
||||
if(istype(eaten_atom, /obj/item/food/grown/banana))
|
||||
var/obj/item/food/grown/banana/banana_morsel = eaten_atom
|
||||
adjustBruteLoss(-(banana_morsel.seed.potency / 100 ) * maxHealth * 0.2)
|
||||
adjust_brute_loss(-(banana_morsel.seed.potency / 100 ) * maxHealth * 0.2)
|
||||
prank_pouch += banana_morsel.generate_trash(src)
|
||||
else
|
||||
adjustBruteLoss(-maxHealth * 0.1)
|
||||
adjust_brute_loss(-maxHealth * 0.1)
|
||||
qdel(eaten_atom)
|
||||
|
||||
playsound(loc,'sound/items/eatfood.ogg', rand(30,50), TRUE)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
lighting_cutoff_blue = 20
|
||||
ai_controller = /datum/ai_controller/basic_controller/vatbeast
|
||||
faction = list(FACTION_HOSTILE)
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
/// What can you feed a vatbeast to tame it?
|
||||
var/static/list/enjoyed_food = list(
|
||||
/obj/item/food/carrotfries,
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
Stun(70)
|
||||
to_chat(src, span_danger("<b>ER@%R: MME^RY CO#RU9T!</b> R&$b@0tin)..."))
|
||||
if(severity == 1)
|
||||
adjustBruteLoss(heavy_emp_damage)
|
||||
adjust_brute_loss(heavy_emp_damage)
|
||||
to_chat(src, span_userdanger("HeAV% DA%^MMA+G TO I/O CIR!%UUT!"))
|
||||
|
||||
/mob/living/basic/drone/proc/alarm_triggered(datum/source, alarm_type, area/source_area)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
drone.visible_message(span_notice("[drone] begins to cannibalize parts from [src]."), span_notice("You begin to cannibalize parts from [src]..."))
|
||||
if(do_after(drone, 6 SECONDS, 0, target = src))
|
||||
drone.visible_message(span_notice("[drone] repairs itself using [src]'s remains!"), span_notice("You repair yourself using [src]'s remains."))
|
||||
drone.adjustBruteLoss(-src.maxHealth)
|
||||
drone.adjust_brute_loss(-src.maxHealth)
|
||||
new /obj/effect/decal/cleanable/blood/splatter/oil(get_turf(src))
|
||||
ghostize(can_reenter_corpse = FALSE)
|
||||
qdel(src)
|
||||
@@ -93,7 +93,7 @@
|
||||
to_chat(user, span_warning("You need to remain still to tighten [src]'s screws!"))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
adjustBruteLoss(-getBruteLoss())
|
||||
adjust_brute_loss(-get_brute_loss())
|
||||
visible_message(span_notice("[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!"), span_notice("[src == user ? "You tighten" : "[user] tightens"] your loose screws."))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/datum/ai_behavior/find_and_set/bee_hive
|
||||
action_cooldown = 10 SECONDS
|
||||
|
||||
/datum/ai_behavior/find_and_set/bee_hive/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/bee_hive/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/valid_hives = list()
|
||||
var/mob/living/bee_pawn = controller.pawn
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
ai_controller = /datum/ai_controller/basic_controller/cow
|
||||
/// what this cow munches on, and what can be used to tame it.
|
||||
var/list/food_types = list(/obj/item/food/grown/wheat)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
attack_sound = 'sound/items/weapons/punch1.ogg'
|
||||
health = 75
|
||||
maxHealth = 75
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
ai_controller = /datum/ai_controller/basic_controller/deer
|
||||
/// Things that will scare us into being stationary. Vehicles are scary to deers because they might have headlights.
|
||||
var/static/list/stationary_scary_things = list(/obj/vehicle)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
minimum_survivable_temperature = COLD_ROOM_TEMP - 75 // enough so that they can survive the cold room spawn with plenty of room for comfort
|
||||
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
|
||||
ai_controller = /datum/ai_controller/basic_controller/goat
|
||||
/// How often will we develop an evil gleam in our eye?
|
||||
@@ -72,7 +72,7 @@
|
||||
if(!(living_target.mob_biotypes & MOB_PLANT))
|
||||
return
|
||||
|
||||
living_target.adjustBruteLoss(20)
|
||||
living_target.adjust_brute_loss(20)
|
||||
playsound(src, 'sound/items/eatfood.ogg', rand(30, 50), TRUE)
|
||||
var/obj/item/bodypart/edible_bodypart
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
/// Only set things geese will try to eat
|
||||
/datum/ai_behavior/find_and_set/in_list/goose_food
|
||||
|
||||
/datum/ai_behavior/find_and_set/in_list/goose_food/search_tactic(datum/ai_controller/controller, locate_paths, search_range)
|
||||
/datum/ai_behavior/find_and_set/in_list/goose_food/search_tactic(datum/ai_controller/controller, locate_paths, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/found = typecache_filter_list(oview(search_range, controller.pawn), locate_paths)
|
||||
if(!length(found))
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
ai_controller = /datum/ai_controller/basic_controller/pig
|
||||
|
||||
/datum/emote/pig
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
ai_controller = /datum/ai_controller/basic_controller/pony
|
||||
/// Do we register a unique rider?
|
||||
var/unique_tamer = FALSE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
ai_controller = /datum/ai_controller/basic_controller/sheep
|
||||
|
||||
/// Were we sacrificed by cultists?
|
||||
|
||||
@@ -191,9 +191,9 @@
|
||||
gib()
|
||||
return TRUE
|
||||
if (EXPLODE_HEAVY)
|
||||
adjustBruteLoss(60)
|
||||
adjust_brute_loss(60)
|
||||
if (EXPLODE_LIGHT)
|
||||
adjustBruteLoss(30)
|
||||
adjust_brute_loss(30)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
summoner.visible_message(span_bolddanger("Blood sprays from [summoner] as [src] takes damage!"))
|
||||
if(summoner.stat == UNCONSCIOUS || summoner.stat == HARD_CRIT)
|
||||
to_chat(summoner, span_bolddanger("Your head pounds, you can't take the strain of sustaining [src] in this condition!"))
|
||||
summoner.adjustOrganLoss(ORGAN_SLOT_BRAIN, amount * 0.5)
|
||||
summoner.adjust_organ_loss(ORGAN_SLOT_BRAIN, amount * 0.5)
|
||||
|
||||
/// When our owner is deleted, we go too.
|
||||
/mob/living/basic/guardian/proc/on_summoner_deletion(mob/living/source)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/mob/living/basic/guardian/protector/ex_act(severity)
|
||||
if(severity >= EXPLODE_DEVASTATE)
|
||||
adjustBruteLoss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner
|
||||
adjust_brute_loss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return modifier * damage_coeff[damage_type]
|
||||
return modifier
|
||||
|
||||
/mob/living/basic/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
|
||||
/mob/living/basic/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
|
||||
if(!can_adjust_brute_loss(amount, forced, required_bodytype))
|
||||
return 0
|
||||
if(forced)
|
||||
@@ -31,7 +31,7 @@
|
||||
else if(damage_coeff[BRUTE])
|
||||
. = adjust_health(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
|
||||
/mob/living/basic/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
|
||||
/mob/living/basic/adjust_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
|
||||
if(!can_adjust_fire_loss(amount, forced, required_bodytype))
|
||||
return 0
|
||||
if(forced)
|
||||
@@ -39,7 +39,7 @@
|
||||
else if(damage_coeff[BURN])
|
||||
. = adjust_health(amount * damage_coeff[BURN] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
|
||||
/mob/living/basic/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
|
||||
/mob/living/basic/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
|
||||
if(!can_adjust_oxy_loss(amount, forced, required_biotype, required_respiration_type))
|
||||
return 0
|
||||
if(forced)
|
||||
@@ -47,7 +47,7 @@
|
||||
else if(damage_coeff[OXY])
|
||||
. = adjust_health(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
|
||||
/mob/living/basic/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
|
||||
/mob/living/basic/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
|
||||
if(!can_adjust_tox_loss(amount, forced, required_biotype))
|
||||
return 0
|
||||
if(forced)
|
||||
@@ -55,7 +55,7 @@
|
||||
else if(damage_coeff[TOX])
|
||||
. = adjust_health(amount * damage_coeff[TOX] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
|
||||
/mob/living/basic/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
|
||||
/mob/living/basic/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
|
||||
if(!can_adjust_stamina_loss(amount, forced, required_biotype))
|
||||
return 0
|
||||
. = staminaloss
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
|
||||
/mob/living/basic/heretic_summon/ash_spirit/Life(seconds_per_tick, times_fired)
|
||||
. = ..()
|
||||
adjustBruteLoss(-3) // 3 health passively healing
|
||||
adjust_brute_loss(-3) // 3 health passively healing
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
back.on_arm_eaten()
|
||||
return
|
||||
|
||||
adjustBruteLoss(-maxHealth * 0.5, FALSE)
|
||||
adjustFireLoss(-maxHealth * 0.5, FALSE)
|
||||
adjust_brute_loss(-maxHealth * 0.5, FALSE)
|
||||
adjust_fire_loss(-maxHealth * 0.5, FALSE)
|
||||
|
||||
if(health < maxHealth * 0.8)
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
if(HAS_TRAIT(our_turf, TRAIT_RUSTY))
|
||||
adjustBruteLoss(-3 * seconds_per_tick)
|
||||
adjust_brute_loss(-3 * seconds_per_tick)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if(!do_after(src, 5 SECONDS, target))
|
||||
return
|
||||
target.gib(DROP_ALL_REMAINS)
|
||||
adjustBruteLoss(-1 * heal_on_cannibalize)
|
||||
adjust_brute_loss(-1 * heal_on_cannibalize)
|
||||
|
||||
///Ash whelp, the "lava" variant of ice whelps.
|
||||
/mob/living/basic/mining/ice_whelp/ash
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/// Standard Illusion behavior is primarily dependent on their context, whether they exist as a decoy or someone meant to retaliate against a threat (of varied origin)
|
||||
/// For the time being however, the AI is very simple and doesn't rely on any advanced tactics. Just go to thing it was assigned to attack and attack it (if assigned, else wander around)
|
||||
/// However, the action we undergo is based on the subtype of illusion we are and that's done on the mob subtype level.
|
||||
/datum/ai_controller/basic_controller/illusion
|
||||
blackboard = list(
|
||||
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
|
||||
)
|
||||
|
||||
ai_traits = DEFAULT_AI_FLAGS
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/escape_captivity,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree,
|
||||
)
|
||||
|
||||
/// Escape subtype of illusions are made to flee from threats rather than attack them. They do not undergo any retaliation behavior.
|
||||
/// We also want to account for the possibility of new threats attacking us and fleeing from those too, more randomness is ideal.
|
||||
/datum/ai_controller/basic_controller/illusion/escape
|
||||
blackboard = list(
|
||||
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, // we don't need the special illusion one here
|
||||
)
|
||||
|
||||
ai_traits = DEFAULT_AI_FLAGS
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/escape_captivity,
|
||||
/datum/ai_planning_subtree/target_retaliate/to_flee,
|
||||
/datum/ai_planning_subtree/flee_target/from_flee_key,
|
||||
)
|
||||
|
||||
/// Retaliate subtypes of escape illusions can fight back against threats that attack them, making them more dangerous.
|
||||
/datum/ai_controller/basic_controller/illusion/escape/retaliate
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/escape_captivity,
|
||||
/datum/ai_planning_subtree/flee_target,
|
||||
/datum/ai_planning_subtree/target_retaliate,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree,
|
||||
)
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/// Pretty genericky mob that just manifests itself as any sort of input living mob, used in several ways
|
||||
/// Has a basic AI that helps it attack targets that are assigned to it, but there's more flavor in the subtypes.
|
||||
/mob/living/basic/illusion
|
||||
name = "illusion"
|
||||
desc = "It's a fake!"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "static"
|
||||
icon_living = "static"
|
||||
icon_dead = "null"
|
||||
gender = NEUTER
|
||||
mob_biotypes = NONE
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
combat_mode = TRUE
|
||||
attack_verb_continuous = "gores"
|
||||
attack_verb_simple = "gore"
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
speed = 0
|
||||
faction = list(FACTION_ILLUSION)
|
||||
basic_mob_flags = DEL_ON_DEATH
|
||||
death_message = "vanishes into thin air! It was a fake!"
|
||||
ai_controller = /datum/ai_controller/basic_controller/illusion
|
||||
/// Weakref to what we're copying
|
||||
var/datum/weakref/parent_mob_ref
|
||||
/// Prob of getting a clone on attack
|
||||
var/multiply_chance = 0
|
||||
/// The blackboard key we want to set for our target
|
||||
var/target_key = BB_BASIC_MOB_CURRENT_TARGET
|
||||
|
||||
/mob/living/basic/illusion/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(on_preattack))
|
||||
RegisterSignal(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, PROC_REF(on_damage_taken))
|
||||
|
||||
/mob/living/basic/illusion/examine(mob/user)
|
||||
var/mob/living/parent_mob = parent_mob_ref?.resolve()
|
||||
if(parent_mob)
|
||||
return parent_mob.examine(user)
|
||||
return ..()
|
||||
|
||||
/// Signal handler for when we attack something. Hook for replicating on standard behavior, with additional behavior on subtypes.
|
||||
/mob/living/basic/illusion/proc/on_preattack(mob/living/source, atom/attacked_target)
|
||||
SIGNAL_HANDLER
|
||||
try_replicate()
|
||||
|
||||
/// Signal handler for when we are attacked.
|
||||
/mob/living/basic/illusion/proc/on_damage_taken(mob/living/source)
|
||||
SIGNAL_HANDLER
|
||||
try_replicate()
|
||||
|
||||
/// Full setup for illusion mobs to lessen code duplication in the individual files.
|
||||
/mob/living/basic/illusion/proc/full_setup(mob/living/original, mob/living/target_mob = null, list/faction = null, life = 5 SECONDS, hp = 100, damage = 0, replicate = 0)
|
||||
mock_as(original, life, hp, damage, replicate)
|
||||
set_faction(faction)
|
||||
set_target(target_mob)
|
||||
|
||||
/// Gives the illusion a target to focus on in whatever behavior it wants to engage as.
|
||||
/mob/living/basic/illusion/proc/set_target(mob/living/target_mob)
|
||||
if(target_mob == null)
|
||||
return
|
||||
ai_controller.set_blackboard_key(target_key, target_mob)
|
||||
|
||||
/// Sets the faction of the illusion
|
||||
/mob/living/basic/illusion/proc/set_faction(list/new_faction)
|
||||
if(!new_faction) // can be list with no length or null
|
||||
return
|
||||
faction = new_faction.Copy()
|
||||
|
||||
/// Does the actual work of setting up the illusion's appearance and some other functionality.
|
||||
/mob/living/basic/illusion/proc/mock_as(mob/living/original, life, hp, damage, replicate)
|
||||
if(QDELETED(original))
|
||||
return
|
||||
|
||||
parent_mob_ref = WEAKREF(original)
|
||||
appearance = original.appearance
|
||||
setDir(original.dir)
|
||||
|
||||
maxHealth = hp
|
||||
updatehealth() // re-cap health to new value
|
||||
|
||||
melee_damage_lower = damage
|
||||
melee_damage_upper = damage
|
||||
multiply_chance = replicate
|
||||
|
||||
faction -= FACTION_NEUTRAL
|
||||
transform = initial(transform)
|
||||
pixel_x = base_pixel_x
|
||||
pixel_y = base_pixel_y
|
||||
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/mob/living, death)), life)
|
||||
|
||||
/// See if we are able to replicate, and if so, do it.
|
||||
/mob/living/basic/illusion/proc/try_replicate()
|
||||
if(prob(multiply_chance))
|
||||
replicate()
|
||||
|
||||
/// Actually perform the replication of this illusion.
|
||||
/mob/living/basic/illusion/proc/replicate()
|
||||
var/mob/living/parent_mob = parent_mob_ref.resolve()
|
||||
if(QDELETED(parent_mob))
|
||||
return
|
||||
var/mob/living/basic/illusion/new_clone = new(loc)
|
||||
new_clone.full_setup(
|
||||
parent_mob,
|
||||
target_mob = ai_controller.blackboard[target_key],
|
||||
faction = faction,
|
||||
life = 8 SECONDS,
|
||||
hp = health / 2,
|
||||
damage = melee_damage_upper,
|
||||
replicate = multiply_chance / 2,
|
||||
)
|
||||
@@ -0,0 +1,35 @@
|
||||
/// instead of hitting with heavy object, we shove 'em
|
||||
/mob/living/basic/illusion/shover
|
||||
|
||||
/mob/living/basic/illusion/shover/on_preattack(mob/living/source, atom/attacked_target)
|
||||
. = ..()
|
||||
if(disarm(attacked_target))
|
||||
return COMPONENT_HOSTILE_NO_ATTACK
|
||||
|
||||
/// designed to run away as fast as possible
|
||||
/mob/living/basic/illusion/escape
|
||||
target_key = BB_BASIC_MOB_FLEE_TARGET
|
||||
ai_controller = /datum/ai_controller/basic_controller/illusion/escape
|
||||
|
||||
/mob/living/basic/illusion/escape/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/ai_retaliate)
|
||||
|
||||
/// will run away but isn't afraid to get some punches in as it gets out of dodge
|
||||
/mob/living/basic/illusion/escape/retaliate
|
||||
ai_controller = /datum/ai_controller/basic_controller/illusion/escape/retaliate
|
||||
|
||||
/mob/living/basic/illusion/escape/on_preattack(mob/living/source, atom/attacked_target)
|
||||
. = ..()
|
||||
var/mob/living/parent_mob = parent_mob_ref?.resolve()
|
||||
if(attacked_target == parent_mob) // we don't want to get our wires crossed and attack our owner ever.
|
||||
return COMPONENT_HOSTILE_NO_ATTACK
|
||||
|
||||
/// a mirage with a little more flair. not meant to move just to look cool
|
||||
/mob/living/basic/illusion/mirage
|
||||
ai_controller = null
|
||||
density = FALSE
|
||||
|
||||
/mob/living/basic/illusion/mirage/death(gibbed)
|
||||
do_sparks(rand(3, 6), FALSE, src)
|
||||
return ..()
|
||||
@@ -66,7 +66,7 @@
|
||||
. = ..()
|
||||
if(volume <= 5)
|
||||
return
|
||||
if(poisoned_mob.adjustToxLoss(2.5 * REM * seconds_per_tick, updating_health = FALSE))
|
||||
if(poisoned_mob.adjust_tox_loss(2.5 * REM * seconds_per_tick, updating_health = FALSE))
|
||||
return UPDATE_MOB_HEALTH
|
||||
|
||||
// bubble ability structure
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
var/mob/living/living_target = target_atom
|
||||
living_target.adjust_fire_stacks(0.2)
|
||||
living_target.ignite_mob()
|
||||
living_target.adjustFireLoss(30)
|
||||
living_target.adjust_fire_loss(30)
|
||||
|
||||
playsound(target_turf, 'sound/effects/magic/lightningbolt.ogg', 50, TRUE)
|
||||
if(!is_seedling)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/datum/ai_behavior/find_and_set/treatable_hydro
|
||||
action_cooldown = 5 SECONDS
|
||||
|
||||
/datum/ai_behavior/find_and_set/treatable_hydro/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/treatable_hydro/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/possible_trays = list()
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
var/waterlevel_threshold = controller.blackboard[BB_WATERLEVEL_THRESHOLD]
|
||||
@@ -102,7 +102,7 @@
|
||||
/datum/ai_behavior/find_and_set/beamable_hydroplants
|
||||
action_cooldown = 15 SECONDS
|
||||
|
||||
/datum/ai_behavior/find_and_set/beamable_hydroplants/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/beamable_hydroplants/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/possible_trays = list()
|
||||
|
||||
for(var/obj/machinery/hydroponics/hydro in oview(search_range, controller.pawn))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(!isvineimmune(L))
|
||||
L.adjustBruteLoss(5)
|
||||
L.adjust_brute_loss(5)
|
||||
to_chat(L, span_alert("You cut yourself on the thorny vines."))
|
||||
|
||||
/**
|
||||
@@ -197,7 +197,7 @@
|
||||
else if(vines_in_range)
|
||||
alert_shown = FALSE
|
||||
|
||||
adjustBruteLoss(vines_in_range ? -weed_heal : no_weed_damage) //every life tick take 20 damage if not near vines or heal 10 if near vines, 5 times out of weeds = u ded
|
||||
adjust_brute_loss(vines_in_range ? -weed_heal : no_weed_damage) //every life tick take 20 damage if not near vines or heal 10 if near vines, 5 times out of weeds = u ded
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/vine_tangle
|
||||
name = "Tangle"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
continue
|
||||
balloon_alert(victim, "grabbed")
|
||||
visible_message(span_danger("[src] grabs hold of [victim]!"))
|
||||
victim.adjustBruteLoss(rand(min_damage, max_damage))
|
||||
victim.adjust_brute_loss(rand(min_damage, max_damage))
|
||||
if (victim.apply_status_effect(/datum/status_effect/incapacitating/stun/goliath_tentacled, grapple_time, src))
|
||||
buckle_mob(victim, TRUE)
|
||||
SEND_SIGNAL(victim, COMSIG_GOLIATH_TENTACLED_GRABBED)
|
||||
|
||||
@@ -240,8 +240,8 @@
|
||||
grown.tamed()
|
||||
for(var/friend in ai_controller?.blackboard?[BB_FRIENDS_LIST])
|
||||
grown.befriend(friend)
|
||||
grown.setBruteLoss(getBruteLoss())
|
||||
grown.setFireLoss(getFireLoss())
|
||||
grown.set_brute_loss(get_brute_loss())
|
||||
grown.set_fire_loss(get_fire_loss())
|
||||
qdel(src) //We called change_mob_type without 'delete_old_mob = TRUE' since we had to pass down friends and damage
|
||||
|
||||
/mob/living/basic/mining/lobstrosity/juvenile/lava
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
///prototype for mining mobs
|
||||
/mob/living/basic/mining
|
||||
abstract_type = /mob/living/basic/mining
|
||||
icon = 'icons/mob/simple/lavaland/lavaland_monsters.dmi'
|
||||
combat_mode = TRUE
|
||||
status_flags = NONE //don't inherit standard basicmob flags
|
||||
|
||||
@@ -250,7 +250,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
|
||||
|
||||
/datum/ai_behavior/find_and_set/music_audience
|
||||
|
||||
/datum/ai_behavior/find_and_set/music_audience/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/music_audience/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/atom/home = controller.blackboard[BB_HOME_VILLAGE]
|
||||
for(var/mob/living/carbon/human/target in oview(search_range, controller.pawn))
|
||||
if(target.stat > UNCONSCIOUS || !target.mind)
|
||||
@@ -289,7 +289,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
|
||||
return
|
||||
controller.queue_behavior(/datum/ai_behavior/find_and_set/find_chief, BB_MOOK_TRIBAL_CHIEF, /mob/living/basic/mining/mook/worker/tribal_chief)
|
||||
|
||||
/datum/ai_behavior/find_and_set/find_chief/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/find_chief/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/mob/living/chief = locate(locate_path) in oview(search_range, controller.pawn)
|
||||
if(isnull(chief))
|
||||
return null
|
||||
|
||||
@@ -209,7 +209,7 @@ GLOBAL_LIST_EMPTY(raptor_population)
|
||||
|
||||
/mob/living/basic/raptor/proc/add_breeding_component()
|
||||
var/static/list/partner_types = typecacheof(list(/mob/living/basic/raptor))
|
||||
var/static/list/baby_types = list(/obj/item/food/egg = 1) ///raptor_egg = 1)
|
||||
var/static/list/baby_types = list(/obj/item/food/egg/raptor_egg = 1)
|
||||
AddComponent(\
|
||||
/datum/component/breed, \
|
||||
can_breed_with = partner_types, \
|
||||
|
||||
@@ -237,9 +237,6 @@ GLOBAL_LIST_INIT(raptor_colors, init_raptor_colors())
|
||||
if (!istype(user) || user.stat || user.body_position == LYING_DOWN || isnull(user.client))
|
||||
return FALSE
|
||||
|
||||
if (user.get_organ_slot(ORGAN_SLOT_EXTERNAL_WINGS))
|
||||
return FALSE
|
||||
|
||||
var/turf/location = get_turf(user)
|
||||
if (!istype(location))
|
||||
return FALSE
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
user.balloon_alert(user, "at full integrity!")
|
||||
return TRUE
|
||||
if(welder.use_tool(src, user, 0, volume=40))
|
||||
adjustBruteLoss(-15)
|
||||
adjust_brute_loss(-15)
|
||||
user.balloon_alert(user, "successfully repaired!")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/clear_bombing_zone
|
||||
|
||||
/datum/ai_behavior/find_and_set/clear_bombing_zone/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/clear_bombing_zone/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/obj/effect/temp_visual/minebot_target/target in oview(search_range, controller.pawn))
|
||||
if(isclosedturf(get_turf(target)))
|
||||
continue
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/miner_to_befriend
|
||||
|
||||
/datum/ai_behavior/find_and_set/miner_to_befriend/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/miner_to_befriend/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/mob/living/carbon/human/target in oview(search_range, controller.pawn))
|
||||
if(HAS_TRAIT(target, TRAIT_ROCK_STONER))
|
||||
return target
|
||||
@@ -112,7 +112,7 @@
|
||||
return SUBTREE_RETURN_FINISH_PLANNING
|
||||
controller.queue_behavior(/datum/ai_behavior/find_and_set/unconscious_human, BB_NEARBY_DEAD_MINER, /mob/living/carbon/human)
|
||||
|
||||
/datum/ai_behavior/find_and_set/unconscious_human/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/unconscious_human/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/mob/living/carbon/human/target in oview(search_range, controller.pawn))
|
||||
if(target.stat >= UNCONSCIOUS && target.mind)
|
||||
return target
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
//AI
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/mining
|
||||
/obj/item/slimepotion/sentience/mining
|
||||
name = "minebot AI upgrade"
|
||||
desc = "Can be used to grant sentience to minebots. It's incompatible with minebot armor and melee upgrades, and will override them."
|
||||
icon_state = "door_electronics"
|
||||
@@ -51,7 +51,7 @@
|
||||
///cooldown boost to add
|
||||
var/base_cooldown_add = 10
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/mining/after_success(mob/living/user, mob/living/basic_mob)
|
||||
/obj/item/slimepotion/sentience/mining/after_success(mob/living/user, mob/living/basic_mob)
|
||||
if(!istype(basic_mob, /mob/living/basic/mining_drone))
|
||||
return
|
||||
var/mob/living/basic/mining_drone/minebot = basic_mob
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(SPT_PROB(reside_chance, seconds_per_tick))
|
||||
controller.queue_behavior(/datum/ai_behavior/find_and_set/valid_home, BB_CAT_HOME, /obj/structure/cat_house)
|
||||
|
||||
/datum/ai_behavior/find_and_set/valid_home/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/valid_home/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/obj/structure/cat_house/home in oview(search_range, controller.pawn))
|
||||
if(home.resident_cat)
|
||||
continue
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
controller.queue_behavior(/datum/ai_behavior/find_and_set/cat_tresspasser, BB_TRESSPASSER_TARGET, /mob/living/basic/pet/cat)
|
||||
|
||||
/datum/ai_behavior/find_and_set/cat_tresspasser/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/cat_tresspasser/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/ignore_types = controller.blackboard[BB_BABIES_CHILD_TYPES]
|
||||
for(var/mob/living/basic/pet/cat/potential_enemy in oview(search_range, controller.pawn))
|
||||
if(potential_enemy.gender != MALE)
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/valid_kitten
|
||||
|
||||
/datum/ai_behavior/find_and_set/valid_kitten/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/valid_kitten/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/mob/living/kitten = locate(locate_path) in oview(search_range, controller.pawn)
|
||||
//kitten already has food near it, go feed another hungry kitten
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
controller.queue_behavior(/datum/ai_behavior/find_and_set/human_beg, BB_HUMAN_BEG_TARGET, /mob/living/carbon/human)
|
||||
|
||||
/datum/ai_behavior/find_and_set/human_beg/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/human_beg/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/locate_items = controller.blackboard[BB_HUNTABLE_PREY]
|
||||
for(var/mob/living/carbon/human/human_target in oview(search_range, controller.pawn))
|
||||
if(human_target.stat != CONSCIOUS || isnull(human_target.mind))
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
visible_message(span_warning("[src] arises again, revived by the dark magicks!"), \
|
||||
span_cult_large("RISE"))
|
||||
revive(ADMIN_HEAL_ALL) //also means that a dead Nars-Ian can consume a pet and revive
|
||||
adjustBruteLoss(-maxHealth)
|
||||
adjust_brute_loss(-maxHealth)
|
||||
|
||||
//LISA! SQUEEEEEEEEE~
|
||||
/mob/living/basic/pet/dog/corgi/lisa
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-4 * seconds_per_tick) //Fast life regen
|
||||
adjust_brute_loss(-4 * seconds_per_tick) //Fast life regen
|
||||
|
||||
for(var/mob/living/carbon/humanoid_entities in view(3, src)) //Mood aura which stay as long you do not wear Sanallite as hat or carry(I will try to make it work with hat someday(obviously weaker than normal one))
|
||||
humanoid_entities.add_mood_event("kobun", /datum/mood_event/kobun)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/find_playmate
|
||||
|
||||
/datum/ai_behavior/find_and_set/find_playmate/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/find_playmate/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/mob/living/basic/orbie/playmate in oview(search_range, controller.pawn))
|
||||
if(playmate == controller.pawn || playmate.stat == DEAD || isnull(playmate.ai_controller))
|
||||
continue
|
||||
|
||||
@@ -350,7 +350,7 @@ GLOBAL_LIST_INIT(strippable_parrot_items, create_strippable_list(list(
|
||||
return TRUE // we still ate it
|
||||
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-10)
|
||||
adjust_brute_loss(-10)
|
||||
speech_probability_rate *= 1.27
|
||||
speech_shuffle_rate += 10
|
||||
update_speech_blackboards()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/hoard_location
|
||||
|
||||
/datum/ai_behavior/find_and_set/hoard_location/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/hoard_location/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/turf/open/candidate in oview(search_range, controller.pawn))
|
||||
if(is_space_or_openspace(candidate))
|
||||
continue
|
||||
@@ -41,7 +41,7 @@
|
||||
action_cooldown = 5 SECONDS
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
|
||||
/datum/ai_behavior/find_and_set/hoard_item/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/hoard_item/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
if(!controller.blackboard_key_exists(BB_HOARD_LOCATION))
|
||||
return null
|
||||
var/turf/nest_turf = controller.blackboard[BB_HOARD_LOCATION]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/mob/living/basic/pet/penguin
|
||||
abstract_type = /mob/living/basic/pet/penguin
|
||||
|
||||
icon = 'icons/mob/simple/penguins.dmi'
|
||||
gender = FEMALE
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/datum/ai_planning_subtree/fish/drilled_ice
|
||||
find_fishable_behavior = /datum/ai_behavior/find_and_set/in_list/drilled_ice
|
||||
|
||||
/datum/ai_behavior/find_and_set/in_list/drilled_ice/search_tactic(datum/ai_controller/controller, locate_paths, search_range)
|
||||
/datum/ai_behavior/find_and_set/in_list/drilled_ice/search_tactic(datum/ai_controller/controller, locate_paths, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
for(var/atom/possible_ice as anything in RANGE_TURFS(search_range, controller.pawn))
|
||||
if(!istype(possible_ice, /turf/open/misc/ice))
|
||||
continue
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/mob/living/basic/pet
|
||||
abstract_type = /mob/living/basic/pet
|
||||
icon = 'icons/mob/simple/pets.dmi'
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
default_blood_volume = BLOOD_VOLUME_NORMAL
|
||||
basic_mob_flags = SENDS_DEATH_MOODLETS
|
||||
/// if the mob is protected from being renamed by collars.
|
||||
var/unique_pet = FALSE
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
action_cooldown = 5 SECONDS
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
|
||||
/datum/ai_behavior/find_and_set/friendly_cultist/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/friendly_cultist/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
for(var/mob/living/carbon/possible_cultist in oview(search_range, controller.pawn))
|
||||
if(IS_CULTIST(possible_cultist) && !(living_pawn.faction.Find(REF(possible_cultist))))
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/occupied_rune
|
||||
|
||||
/datum/ai_behavior/find_and_set/occupied_rune/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/occupied_rune/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/datum/team/cult/cult_team = controller.blackboard[BB_CULT_TEAM]
|
||||
if(isnull(cult_team))
|
||||
return null
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/dead_cultist
|
||||
|
||||
/datum/ai_behavior/find_and_set/dead_cultist/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/dead_cultist/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/datum/team/cult/cult_team = controller.blackboard[BB_CULT_TEAM]
|
||||
if(isnull(cult_team))
|
||||
return null
|
||||
|
||||
@@ -8,6 +8,7 @@ GLOBAL_LIST_INIT(animatable_blacklist, typecacheof(list(
|
||||
)))
|
||||
|
||||
/mob/living/basic/mimic
|
||||
abstract_type = /mob/living/basic/mimic
|
||||
response_help_continuous = "touches"
|
||||
response_help_simple = "touch"
|
||||
response_disarm_continuous = "pushes"
|
||||
@@ -287,7 +288,7 @@ GLOBAL_LIST_INIT(animatable_blacklist, typecacheof(list(
|
||||
if(!.) //dead or deleted
|
||||
return
|
||||
if(idledamage && !ckey && !ai_controller?.blackboard[BB_BASIC_MOB_CURRENT_TARGET]) //Objects eventually revert to normal if no one is around to terrorize
|
||||
adjustBruteLoss(0.5 * seconds_per_tick)
|
||||
adjust_brute_loss(0.5 * seconds_per_tick)
|
||||
for(var/mob/living/victim in contents) //a fix for animated statues from the flesh to stone spell
|
||||
death()
|
||||
return
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
///Handles the adverse effects of water on slimes
|
||||
/mob/living/basic/slime/proc/apply_water()
|
||||
adjustBruteLoss(rand(15,20))
|
||||
adjust_brute_loss(rand(15,20))
|
||||
discipline_slime()
|
||||
|
||||
///Stops the slime from feeding, and might remove rabidity and targets
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
if(nutrition == 0) //adjust nutrition ensures it can't go below 0
|
||||
if(SPT_PROB(50, seconds_per_tick))
|
||||
adjustBruteLoss(rand(0,5))
|
||||
adjust_brute_loss(rand(0,5))
|
||||
return
|
||||
|
||||
if (SLIME_GROW_NUTRITION <= nutrition)
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
target_slime.adjust_nutrition(-stolen_nutrition)
|
||||
our_slime.adjust_nutrition(stolen_nutrition)
|
||||
if(target_slime.health > 0)
|
||||
our_slime.adjustBruteLoss(is_adult_slime ? -20 : -10)
|
||||
our_slime.adjust_brute_loss(is_adult_slime ? -20 : -10)
|
||||
|
||||
|
||||
///Spawns a crossed slimecore item
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
icon_living = "headslug"
|
||||
icon_dead = "headslug_dead"
|
||||
gender = NEUTER
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
density = FALSE
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
max_stamina = 120
|
||||
|
||||
@@ -158,9 +158,9 @@
|
||||
investigate_log("has died from a devastating explosion.", INVESTIGATE_DEATHS)
|
||||
death()
|
||||
if(EXPLODE_HEAVY)
|
||||
adjustBruteLoss(60)
|
||||
adjust_brute_loss(60)
|
||||
if(EXPLODE_LIGHT)
|
||||
adjustBruteLoss(30)
|
||||
adjust_brute_loss(30)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return
|
||||
|
||||
if(istype(attack_target, /obj/item/food/grown/carrot))
|
||||
adjustBruteLoss(-5)
|
||||
adjust_brute_loss(-5)
|
||||
to_chat(src, span_warning("You eat [attack_target]! It restores some health!"))
|
||||
qdel(attack_target)
|
||||
return TRUE
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/datum/ai_behavior/find_and_set/hive_partner
|
||||
|
||||
/datum/ai_behavior/find_and_set/hive_partner/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/hive_partner/search_tactic(datum/ai_controller/controller, locate_path, search_range = 10)
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
var/list/hive_partners = list()
|
||||
for(var/mob/living/target in oview(10, living_pawn))
|
||||
for(var/mob/living/target in oview(search_range, living_pawn))
|
||||
if(!istype(target, locate_path))
|
||||
continue
|
||||
if(target.stat == DEAD)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
if (!(heal_biotypes & target.mob_biotypes))
|
||||
return FALSE
|
||||
if (!iscarbon(target))
|
||||
return target.getBruteLoss() > 0 || target.getFireLoss() > 0
|
||||
return target.get_brute_loss() > 0 || target.get_fire_loss() > 0
|
||||
var/mob/living/carbon/carbon_target = target
|
||||
for (var/obj/item/bodypart/part in carbon_target.bodyparts)
|
||||
if (!part.brute_dam && !part.burn_dam)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/level_gain = (consumed.powerlevel - powerlevel)
|
||||
if(level_gain >= 0 && !ckey && !consumed.bruised)//Player shrooms can't level up to become robust gods.
|
||||
consumed.level_up(level_gain)
|
||||
adjustBruteLoss(-consumed.maxHealth)
|
||||
adjust_brute_loss(-consumed.maxHealth)
|
||||
qdel(consumed)
|
||||
|
||||
/mob/living/basic/mushroom/revive(full_heal_flags = NONE, excess_healing = 0, force_grab_ghost = FALSE)
|
||||
@@ -144,11 +144,11 @@
|
||||
if(stat == DEAD)
|
||||
revive(HEAL_ALL)
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjust_brute_loss(-5)
|
||||
COOLDOWN_START(src, recovery_cooldown, 5 MINUTES)
|
||||
|
||||
/mob/living/basic/mushroom/proc/level_up(level_gain)
|
||||
adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level
|
||||
adjust_brute_loss(-maxHealth) //They'll always heal, even if they don't gain a level
|
||||
if(powerlevel > 9)
|
||||
return
|
||||
if(level_gain == 0)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/datum/ai_behavior/find_and_set/empty_paper
|
||||
action_cooldown = 10 SECONDS
|
||||
|
||||
/datum/ai_behavior/find_and_set/empty_paper/search_tactic(datum/ai_controller/controller, locate_path, search_range)
|
||||
/datum/ai_behavior/find_and_set/empty_paper/search_tactic(datum/ai_controller/controller, locate_path, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/empty_papers = list()
|
||||
|
||||
for(var/obj/item/paper/target_paper in oview(search_range, controller.pawn))
|
||||
@@ -123,7 +123,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!(attack_flags & (ATTACKER_STAMINA_ATTACK|ATTACKER_SHOVING)))
|
||||
attacker.adjustBruteLoss(20)
|
||||
attacker.adjust_brute_loss(20)
|
||||
to_chat(attacker, span_warning("The clone casts a spell to damage you before he dies!"))
|
||||
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
if(mob.reagents)
|
||||
mob.reagents.add_reagent(/datum/reagent/toxin/plasma, 5)
|
||||
else
|
||||
mob.adjustToxLoss(5)
|
||||
mob.adjust_tox_loss(5)
|
||||
for(var/obj/structure/spacevine/vine in victim) //Fucking with botanists, the ability.
|
||||
vine.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
|
||||
new /obj/effect/temp_visual/revenant(vine.loc)
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
if (severity != EXPLODE_DEVASTATE)
|
||||
return
|
||||
var/damage_coefficient = rand(devastation_damage_min_percentage, devastation_damage_max_percentage)
|
||||
adjustBruteLoss(initial(maxHealth)*damage_coefficient)
|
||||
adjust_brute_loss(initial(maxHealth)*damage_coefficient)
|
||||
return COMPONENT_CANCEL_EX_ACT // we handled it
|
||||
|
||||
/// Subtype used by the midround/event
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
grown.faction = faction.Copy()
|
||||
grown.directive = directive
|
||||
grown.set_name()
|
||||
grown.setBruteLoss(getBruteLoss())
|
||||
grown.setFireLoss(getFireLoss())
|
||||
grown.set_brute_loss(get_brute_loss())
|
||||
grown.set_fire_loss(get_fire_loss())
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
name = "Pirate Gunner"
|
||||
mob_spawner = /obj/effect/mob_spawn/corpse/human/pirate/ranged
|
||||
corpse = /obj/effect/mob_spawn/corpse/human/pirate/ranged
|
||||
r_hand = /obj/item/gun/energy/laser
|
||||
r_hand = /obj/item/gun/energy/laser/soul
|
||||
ai_controller = /datum/ai_controller/basic_controller/trooper/ranged
|
||||
/// Type of bullet we use
|
||||
var/projectiletype = /obj/projectile/beam/laser
|
||||
|
||||
@@ -218,7 +218,8 @@
|
||||
desc = "A small, twin-bladed machine capable of inflicting very deadly lacerations."
|
||||
icon_state = "viscerator_attack"
|
||||
icon_living = "viscerator_attack"
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
density = FALSE
|
||||
pass_flags = PASSTABLE | PASSMOB | PASSMACHINE | PASSFLAPS
|
||||
combat_mode = TRUE
|
||||
mob_biotypes = MOB_ROBOTIC
|
||||
basic_mob_flags = DEL_ON_DEATH
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/ai_behavior/find_and_set/in_list/mothroach_food
|
||||
|
||||
/datum/ai_behavior/find_and_set/in_list/mothroach_food/search_tactic(datum/ai_controller/controller, locate_paths, search_range)
|
||||
/datum/ai_behavior/find_and_set/in_list/mothroach_food/search_tactic(datum/ai_controller/controller, locate_paths, search_range = SEARCH_TACTIC_DEFAULT_RANGE)
|
||||
var/list/found = typecache_filter_list(oview(search_range, controller.pawn), locate_paths)
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
found -= living_pawn.loc
|
||||
|
||||
Reference in New Issue
Block a user