mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Merge branch 'master' of github.com:tgstation/tgstation into upstream-2026-06-23
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
initial_language_holder = /datum/language_holder/empty
|
||||
can_buckle_to = FALSE
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, STAMINA = 0, OXY = 1)
|
||||
pull_force = 0
|
||||
pull_force = MOVE_FORCE_NONE
|
||||
/// Size of cloud produced from a dying spore
|
||||
var/death_cloud_size = BLOBMOB_CLOUD_NONE
|
||||
var/loot = /obj/item/food/spore_sack
|
||||
|
||||
@@ -12,16 +12,17 @@ Difficulty: Medium
|
||||
/mob/living/basic/boss/blood_drunk_miner
|
||||
name = "blood-drunk miner"
|
||||
desc = "A miner destined to wander forever, engaged in an endless hunt."
|
||||
health = 900
|
||||
maxHealth = 900
|
||||
health = 1300
|
||||
maxHealth = 1300
|
||||
icon_state = "miner"
|
||||
icon_living = "miner"
|
||||
base_icon_state = "miner"
|
||||
icon = 'icons/mob/simple/broadMobs.dmi'
|
||||
health_doll_icon = "miner"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_SPECIAL|MOB_MINING
|
||||
light_color = COLOR_LIGHT_GRAYISH_RED
|
||||
speak_emote = list("roars")
|
||||
speed = 3
|
||||
speed = 2.5
|
||||
pixel_x = -16
|
||||
base_pixel_x = -16
|
||||
basic_mob_flags = DEL_ON_DEATH
|
||||
@@ -43,7 +44,7 @@ Difficulty: Medium
|
||||
victor_memory_type = /datum/memory/megafauna_slayer
|
||||
|
||||
crusher_loot = list(/obj/item/crusher_trophy/miner_eye, /obj/item/knife/hunting/wildhunter)
|
||||
regular_loot = list(/obj/item/melee/cleaving_saw, /obj/item/gun/energy/recharge/kinetic_accelerator)
|
||||
regular_loot = list(/obj/item/melee/cleaving_saw, /obj/item/gun/energy/recharge/kinetic_accelerator/bdm)
|
||||
|
||||
/// Their little saw
|
||||
var/obj/item/melee/cleaving_saw/miner/miner_saw
|
||||
@@ -87,9 +88,9 @@ Difficulty: Medium
|
||||
|
||||
/// Returns a list of innate actions for the blood-drunk miner.
|
||||
/mob/living/basic/boss/blood_drunk_miner/proc/get_innate_actions()
|
||||
var/static/list/innate_abilities = list(
|
||||
/datum/action/cooldown/mob_cooldown/dash = BB_BDM_DASH_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/kinetic_accelerator = BB_BDM_KINETIC_ACCELERATOR_ABILITY,
|
||||
var/list/innate_abilities = list(
|
||||
/datum/action/cooldown/mob_cooldown/charge/basic_charge/blood_drunk_miner = BB_BDM_DASH_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator = BB_BDM_KINETIC_ACCELERATOR_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/dash_attack = BB_BDM_DASH_ATTACK_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/transform_weapon = BB_BDM_TRANSFORM_WEAPON_ABILITY,
|
||||
)
|
||||
@@ -101,6 +102,13 @@ Difficulty: Medium
|
||||
|
||||
INVOKE_ASYNC(ai_controller.blackboard[BB_BDM_TRANSFORM_WEAPON_ABILITY], TYPE_PROC_REF(/datum/action, Trigger), src, NONE)
|
||||
|
||||
/mob/living/basic/boss/blood_drunk_miner/proc/transform_saw()
|
||||
miner_saw.attack_self(src)
|
||||
var/saw_open = HAS_TRAIT(miner_saw, TRAIT_TRANSFORM_ACTIVE)
|
||||
rapid_melee_hits = saw_open ? 3 : 5
|
||||
icon_state = "[base_icon_state][saw_open ? "_transformed":""]"
|
||||
icon_living = "[base_icon_state][saw_open ? "_transformed":""]"
|
||||
|
||||
/mob/living/basic/boss/blood_drunk_miner/ex_act(severity, target)
|
||||
var/datum/action/cooldown/mob_cooldown/dash_ability = ai_controller.blackboard[BB_BDM_DASH_ABILITY]
|
||||
if(dash_ability.Trigger(target = target))
|
||||
@@ -145,28 +153,58 @@ Difficulty: Medium
|
||||
/// Namely, we just use the miner saw to rapidly hit the target multiple times
|
||||
/mob/living/basic/boss/blood_drunk_miner/proc/attack_override(mob/living/source, atom/target, proximity, modifiers)
|
||||
SIGNAL_HANDLER
|
||||
if(!istype(target, /mob/living))
|
||||
|
||||
if(!isliving(target))
|
||||
return
|
||||
|
||||
var/mob/living/victim = target
|
||||
if(should_devour(target))
|
||||
devour(target)
|
||||
if(should_devour(victim))
|
||||
devour(victim)
|
||||
return COMPONENT_HOSTILE_NO_ATTACK
|
||||
|
||||
do_chain_attack(victim, modifiers)
|
||||
return COMPONENT_HOSTILE_NO_ATTACK
|
||||
|
||||
/mob/living/basic/boss/blood_drunk_miner/proc/do_chain_attack(mob/living/victim, modifiers, sequence_hit = 1)
|
||||
if (!Adjacent(victim))
|
||||
post_attack_effects(victim, modifiers)
|
||||
return
|
||||
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
victim.visible_message(
|
||||
span_danger("[src] slashes at [victim] with [p_their()] cleaving saw!"),
|
||||
span_userdanger("You are slashed at by [src]'s cleaving saw!"),
|
||||
)
|
||||
|
||||
var/datum/callback/melee_callback = CALLBACK(miner_saw, TYPE_PROC_REF(/obj/item/melee/cleaving_saw/miner, melee_attack_chain), src, victim, modifiers)
|
||||
var/delay = 0.2 SECONDS
|
||||
for(var/i in 1 to rapid_melee_hits)
|
||||
addtimer(melee_callback, (i - 1) * delay)
|
||||
var/delay = HAS_TRAIT(miner_saw, TRAIT_TRANSFORM_ACTIVE) ? 0.5 SECONDS : 0.3 SECONDS
|
||||
apply_status_effect(/datum/status_effect/saw_slashes_slowdown, delay)
|
||||
INVOKE_ASYNC(miner_saw, TYPE_PROC_REF(/obj/item/melee/cleaving_saw/miner, melee_attack_chain), src, victim, modifiers)
|
||||
|
||||
post_attack_effects(victim, modifiers)
|
||||
if (sequence_hit >= rapid_melee_hits)
|
||||
post_attack_effects(victim, modifiers)
|
||||
return
|
||||
|
||||
return COMPONENT_HOSTILE_NO_ATTACK
|
||||
addtimer(CALLBACK(src, PROC_REF(do_chain_attack), victim, modifiers, sequence_hit + 1), delay)
|
||||
|
||||
/datum/status_effect/saw_slashes_slowdown
|
||||
id = "saw_slashes_slowdown"
|
||||
alert_type = null
|
||||
status_type = STATUS_EFFECT_REFRESH
|
||||
|
||||
/datum/status_effect/saw_slashes_slowdown/on_creation(mob/living/new_owner, new_duration)
|
||||
duration = new_duration
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/saw_slashes_slowdown/refresh(effect, new_duration)
|
||||
duration = new_duration
|
||||
|
||||
/datum/status_effect/saw_slashes_slowdown/on_apply()
|
||||
. = ..()
|
||||
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/saw_slashes_slowdown)
|
||||
|
||||
/datum/status_effect/saw_slashes_slowdown/on_remove()
|
||||
. = ..()
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/saw_slashes_slowdown)
|
||||
|
||||
/// Hook for potential additional behaviors after attacking
|
||||
/mob/living/basic/boss/blood_drunk_miner/proc/post_attack_effects(mob/living/victim, list/modifiers)
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/datum/action/cooldown/mob_cooldown/charge/basic_charge/blood_drunk_miner
|
||||
cooldown_time = 1.5 SECONDS
|
||||
charge_delay = 0.1 SECONDS
|
||||
shake_duration = 0.2 SECONDS // A bit longer so he shakes during the dash too
|
||||
charge_distance = 6
|
||||
// Don't stun ourselves or the target
|
||||
recoil_duration = -1
|
||||
knockdown_duration = -1
|
||||
destroy_objects = FALSE
|
||||
charge_damage = 0
|
||||
charge_speed = 0.3
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/charge/basic_charge/blood_drunk_miner/hit_target(atom/movable/source, atom/target, damage_dealt)
|
||||
. = ..()
|
||||
if(!isbasicmob(source) || !isliving(target))
|
||||
return
|
||||
var/mob/living/basic/basic_source = source
|
||||
basic_source.melee_attack(target, ignore_cooldown = TRUE)
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/transform_weapon
|
||||
name = "Transform Weapon"
|
||||
button_icon = 'icons/obj/mining_zones/artefacts.dmi'
|
||||
button_icon_state = "cleaving_saw"
|
||||
desc = "Transform weapon into a different state."
|
||||
cooldown_time = 5 SECONDS
|
||||
shared_cooldown = MOB_SHARED_COOLDOWN_2
|
||||
/// The max possible cooldown, cooldown is random between the default cooldown time and this
|
||||
var/max_cooldown_time = 10 SECONDS
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/transform_weapon/Activate(atom/target_atom)
|
||||
disable_cooldown_actions()
|
||||
do_transform()
|
||||
StartCooldown(rand(cooldown_time, max_cooldown_time), 0)
|
||||
enable_cooldown_actions()
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/transform_weapon/proc/do_transform()
|
||||
if(!istype(owner, /mob/living/basic/boss/blood_drunk_miner))
|
||||
return
|
||||
var/mob/living/basic/boss/blood_drunk_miner/blood_drunk_miner = owner
|
||||
blood_drunk_miner.transform_saw()
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator
|
||||
name = "Fire Kinetic Accelerator"
|
||||
desc = "Fires a kinetic accelerator projectile at the target."
|
||||
button_icon = 'icons/obj/weapons/guns/energy.dmi'
|
||||
button_icon_state = "kineticgun"
|
||||
cooldown_time = 1.5 SECONDS
|
||||
projectile_type = /obj/projectile/kinetic/miner
|
||||
projectile_sound = 'sound/items/weapons/kinetic_accel.ogg'
|
||||
shot_count = 3
|
||||
shot_delay = 0.15 SECONDS
|
||||
default_projectile_spread = 10
|
||||
can_move = FALSE
|
||||
/// Delay for the alert
|
||||
var/alert_delay = 0.5 SECONDS
|
||||
/// Delay before we start shooting during which we cannot move
|
||||
var/prefire_delay = 0.2 SECONDS
|
||||
/// Delay before the user can move or act again after firing
|
||||
var/reload_delay = 0.1 SECONDS
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator/Activate(atom/target_atom)
|
||||
owner.visible_message(span_danger("[owner] fires the proto-kinetic accelerator!"))
|
||||
owner.face_atom(target_atom)
|
||||
owner.do_alert_animation(alert_delay + (shot_count - 1) * shot_delay)
|
||||
disable_cooldown_actions()
|
||||
if (alert_delay > prefire_delay) // As to delay movement blocking
|
||||
SLEEP_CHECK_DEATH(alert_delay - prefire_delay, owner)
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator/attack_sequence(mob/living/firer, atom/target)
|
||||
SLEEP_CHECK_DEATH(prefire_delay, firer)
|
||||
. = ..()
|
||||
sleep(reload_delay)
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator/shoot_projectile(atom/origin, atom/target, set_angle, mob/firer, projectile_spread, speed_multiplier, override_projectile_type, override_homing)
|
||||
. = ..()
|
||||
new /obj/effect/temp_visual/dir_setting/firing_effect(get_turf(firer), firer.dir)
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator/long_burst
|
||||
shot_count = 5
|
||||
shot_delay = 0.1 SECONDS
|
||||
@@ -12,7 +12,7 @@
|
||||
BB_BDM_RANGED_ATTACK_COOLDOWN = 0,
|
||||
)
|
||||
|
||||
movement_delay = 0.3 SECONDS
|
||||
movement_delay = 0.25 SECONDS
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
planning_subtrees = list(
|
||||
@@ -63,4 +63,4 @@
|
||||
return TRUE
|
||||
|
||||
/datum/ai_controller/blood_drunk_miner/doom
|
||||
movement_delay = 0.8 SECONDS
|
||||
movement_delay = 0.5 SECONDS
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
/// A slightly nerfed saw as the normal one is much too murdery.
|
||||
/obj/item/melee/cleaving_saw/miner
|
||||
force = 6
|
||||
open_force = 10
|
||||
|
||||
/obj/item/melee/cleaving_saw/miner/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
target.add_stun_absorption(source = "miner", duration = 1 SECONDS, priority = INFINITY)
|
||||
return ..()
|
||||
force = 8
|
||||
open_force = 12
|
||||
|
||||
/obj/projectile/kinetic/miner
|
||||
damage = 20
|
||||
speed = 1.1
|
||||
damage = 18
|
||||
icon_state = "ka_tracer"
|
||||
range = 4
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define HUNTER_DASH_PROBABILITY 12
|
||||
|
||||
/// heals slightly on melee hits
|
||||
/// Heals slightly on melee hits
|
||||
/mob/living/basic/boss/blood_drunk_miner/guidance
|
||||
|
||||
/mob/living/basic/boss/blood_drunk_miner/guidance/attack_override(mob/living/source, atom/target, proximity, modifiers)
|
||||
@@ -19,10 +19,11 @@
|
||||
if(!isnull(dash_attack))
|
||||
INVOKE_ASYNC(dash_attack, TYPE_PROC_REF(/datum/action, Trigger), src, NONE, victim)
|
||||
|
||||
/// Slow but constantly dashes and has longer barrages
|
||||
/mob/living/basic/boss/blood_drunk_miner/doom
|
||||
name = "hostile-environment miner"
|
||||
desc = "A miner destined to hop across dimensions for all eternity, hunting anomalous creatures."
|
||||
speed = 8
|
||||
speed = 5
|
||||
ranged_attack_cooldown_duration = 0.8 SECONDS
|
||||
ai_controller = /datum/ai_controller/blood_drunk_miner/doom
|
||||
|
||||
@@ -32,4 +33,17 @@
|
||||
if(!isnull(dash_ability))
|
||||
dash_ability.cooldown_time = 0.8 SECONDS
|
||||
|
||||
var/datum/action/cooldown/dash_attack = ai_controller.blackboard[BB_BDM_DASH_ATTACK_ABILITY]
|
||||
if(!isnull(dash_attack))
|
||||
dash_attack.cooldown_time = 4 SECONDS
|
||||
|
||||
/mob/living/basic/boss/blood_drunk_miner/doom/get_innate_actions()
|
||||
var/list/innate_abilities = list(
|
||||
/datum/action/cooldown/mob_cooldown/charge/basic_charge/blood_drunk_miner = BB_BDM_DASH_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/kinetic_accelerator/long_burst = BB_BDM_KINETIC_ACCELERATOR_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/dash_attack = BB_BDM_DASH_ATTACK_ABILITY,
|
||||
/datum/action/cooldown/mob_cooldown/transform_weapon = BB_BDM_TRANSFORM_WEAPON_ABILITY,
|
||||
)
|
||||
return innate_abilities
|
||||
|
||||
#undef HUNTER_DASH_PROBABILITY
|
||||
|
||||
@@ -196,7 +196,7 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
/mob/living/basic/bot/proc/get_emagged_message()
|
||||
return get_policy(ROLE_EMAGGED_BOT) || "You are a malfunctioning bot! Disrupt everyone and cause chaos!"
|
||||
|
||||
/mob/living/basic/bot/proc/turn_on()
|
||||
/mob/living/basic/bot/proc/turn_on(mob/user)
|
||||
if(stat == DEAD)
|
||||
return FALSE
|
||||
set_mode_flags(bot_mode_flags | BOT_MODE_ON)
|
||||
|
||||
@@ -474,6 +474,9 @@
|
||||
|
||||
/mob/living/basic/bot/medbot/nukie/Initialize(mapload, new_skin)
|
||||
. = ..()
|
||||
var/datum/action/minimap/nuclear/tacmap_action = new
|
||||
tacmap_action.Grant(src)
|
||||
add_minimap_blip(src, MINIMAP_NUKEOP_BLIP, "mediborg")
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NUKE_DEVICE_DISARMED, PROC_REF(nuke_disarm))
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NUKE_DEVICE_ARMED, PROC_REF(nuke_arm))
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NUKE_DEVICE_DETONATING, PROC_REF(nuke_detonate))
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
/mob/living/basic/bot/mulebot
|
||||
name = "\improper MULEbot"
|
||||
desc = "A Multiple Utility Load Effector bot."
|
||||
icon = 'icons/mob/silicon/aibots.dmi'
|
||||
icon_state = "mulebot0"
|
||||
base_icon_state = "mulebot"
|
||||
|
||||
light_color = "#ffcc99"
|
||||
light_power = 0.8
|
||||
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
|
||||
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, STAMINA = 0, OXY = 0)
|
||||
density = TRUE
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
move_resist = MOVE_FORCE_STRONG
|
||||
animate_movement = SLIDE_STEPS
|
||||
speed = 3
|
||||
|
||||
combat_mode = TRUE
|
||||
|
||||
buckle_lying = 0
|
||||
buckle_prevents_pull = TRUE // No pulling loaded shit
|
||||
|
||||
bot_mode_flags = ~BOT_MODE_ROUNDSTART_POSSESSION
|
||||
req_one_access = list(ACCESS_ROBOTICS, ACCESS_CARGO)
|
||||
radio_key = /obj/item/encryptionkey/headset_cargo
|
||||
radio_channel = RADIO_CHANNEL_SUPPLY
|
||||
pass_flags = PASSFLAPS
|
||||
bot_type = MULE_BOT
|
||||
|
||||
additional_access = /datum/id_trim/job/cargo_technician
|
||||
path_image_color = "#7F5200"
|
||||
hud_type = /datum/hud/living/mulebot
|
||||
|
||||
hackables = "obstacle detection circuits"
|
||||
possessed_message = "You are a MULEbot! Do your best to make sure that packages get to their destination!"
|
||||
ai_controller = /datum/ai_controller/basic_controller/bot/mulebot
|
||||
|
||||
/// unique identifier in case there are multiple mulebots.
|
||||
var/id
|
||||
|
||||
/// what we're transporting
|
||||
var/atom/movable/load
|
||||
/// who's riding us
|
||||
var/mob/living/passenger
|
||||
|
||||
///flags of mulebot mode
|
||||
var/mulebot_delivery_flags = MULEBOT_RETURN_MODE | MULEBOT_AUTO_PICKUP_MODE | MULEBOT_REPORT_DELIVERY_MODE
|
||||
|
||||
///Internal Powercell
|
||||
var/obj/item/stock_parts/power_store/cell
|
||||
///How much power we use when we move.
|
||||
var/cell_move_power_usage = 0.0005 * STANDARD_CELL_CHARGE
|
||||
///The amount of steps we should take until we rest for a time.
|
||||
var/num_steps = 0
|
||||
|
||||
///The chance to be deleted and replaced by a different mule
|
||||
var/replacement_chance = 0.666
|
||||
///home destination, only used by mappers.
|
||||
var/home_destination = ""
|
||||
|
||||
/mob/living/basic/bot/mulebot/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
if(prob(replacement_chance) && mapload)
|
||||
new /mob/living/basic/bot/mulebot/paranormal(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
set_wires(new /datum/wires/mulebot(src))
|
||||
var/obj/item/stock_parts/power_store/cell/upgraded/new_cell = new(src)
|
||||
assign_cell(new_cell)
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_HOME_BEACON, "")
|
||||
AddElement(/datum/element/ridable, /datum/component/riding/creature/mulebot)
|
||||
ADD_TRAIT(src, TRAIT_NOMOBSWAP, INNATE_TRAIT)
|
||||
add_traits(list(TRAIT_NOMOBSWAP, TRAIT_COMBAT_MODE_LOCK), INNATE_TRAIT)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_pre_move))
|
||||
|
||||
set_id(suffix || assign_random_name())
|
||||
suffix = null
|
||||
if(name == "\improper MULEbot")
|
||||
name = "\improper MULEbot [id]"
|
||||
set_home(get_turf(src))
|
||||
ai_controller.update_able_to_run()
|
||||
update_appearance()
|
||||
|
||||
/mob/living/basic/bot/mulebot/Destroy()
|
||||
UnregisterSignal(src, COMSIG_MOVABLE_PRE_MOVE)
|
||||
unload()
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/assign_cell(atom/new_cell)
|
||||
cell = new_cell
|
||||
var/atom/movable/screen/mob_charge/charge_hud = hud_used?.screen_objects[HUD_MULEBOT_CHARGE]
|
||||
charge_hud?.update_battery_overlay(new_cell)
|
||||
charge_hud?.calculate_charge()
|
||||
|
||||
|
||||
/mob/living/basic/bot/mulebot/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
if(bot_access_flags & BOT_COVER_MAINTS_OPEN && !HAS_AI_ACCESS(user))
|
||||
wires.interact(user)
|
||||
return
|
||||
if(wires.is_cut(WIRE_RX) && HAS_AI_ACCESS(user))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/examine(mob/user)
|
||||
. = ..()
|
||||
if(bot_access_flags & BOT_COVER_MAINTS_OPEN)
|
||||
if(cell)
|
||||
. += span_notice("It has \a [cell] installed.")
|
||||
. += span_info("You can use a <b>crowbar</b> to remove it.")
|
||||
else
|
||||
. += span_notice("It has an empty compartment where a <b>power cell</b> can be installed.")
|
||||
if(load) //observer check is so we don't show the name of the ghost that's sitting on it to prevent metagaming who's ded.
|
||||
. += span_notice("\A [isobserver(load) ? "ghostly figure" : load] is on its load platform.")
|
||||
|
||||
/mob/living/basic/bot/mulebot/get_cell()
|
||||
return cell
|
||||
|
||||
/mob/living/basic/bot/mulebot/melee_attack(atom/target, list/modifiers, ignore_cooldown = FALSE)
|
||||
if(!can_unarmed_attack())
|
||||
return
|
||||
if(isturf(target) && isturf(loc) && loc.Adjacent(target) && load)
|
||||
unload(get_dir(loc, target))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/turn_on(mob/user)
|
||||
if(bot_access_flags & BOT_COVER_MAINTS_OPEN)
|
||||
if(user)
|
||||
to_chat(user, span_warning("[src]'s maintenance panel is open!"))
|
||||
return FALSE
|
||||
if(!has_power())
|
||||
if(user)
|
||||
to_chat(user, span_warning("[src] has no power!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/update_icon_state() //if you change the icon_state names, please make sure to update /datum/wires/mulebot/on_pulse() as well. <3
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][(bot_mode_flags & BOT_MODE_ON) ? wires?.is_cut(WIRE_AVOIDANCE) : "0"]"
|
||||
|
||||
/mob/living/basic/bot/mulebot/update_overlays()
|
||||
. = ..()
|
||||
if(bot_access_flags & BOT_COVER_MAINTS_OPEN)
|
||||
. += "[base_icon_state]-hatch"
|
||||
if(isnull(load) || ismob(load)) //mob offsets and such are handled by the riding component / buckling
|
||||
return
|
||||
var/mutable_appearance/load_overlay = mutable_appearance(load.icon, load.icon_state, layer + 0.01)
|
||||
load_overlay.pixel_y = initial(load.pixel_y) + 11
|
||||
. += load_overlay
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/handle_buzzing(datum/move_loop/has_target/jps/frustrations/source, frustration_counter)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
update_bot_mode(new_mode = BOT_BLOCKED)
|
||||
var/buzz_mode = frustration_counter >= source.maximum_frustrations ? MULEBOT_MOOD_ANNOYED : MULEBOT_MOOD_SIGH
|
||||
buzz(buzz_mode)
|
||||
|
||||
/mob/living/basic/bot/mulebot/handle_loop_movement(atom/movable/source, atom/oldloc, dir, forced) //incase we start moving again after being previously blocked, update our mode
|
||||
. = ..()
|
||||
if(mode != BOT_BLOCKED)
|
||||
return
|
||||
var/obj/machinery/navbeacon/beacon = ai_controller.current_movement_target
|
||||
if(!istype(beacon))
|
||||
return
|
||||
var/intended_mode = beacon.location == ai_controller.blackboard[BB_MULEBOT_HOME_BEACON] ? BOT_GO_HOME : BOT_DELIVER
|
||||
update_bot_mode(new_mode = intended_mode)
|
||||
|
||||
///Noises that mulebots make
|
||||
/mob/living/basic/bot/mulebot/proc/buzz(type)
|
||||
switch(type)
|
||||
if(MULEBOT_MOOD_SIGH)
|
||||
audible_message(span_hear("[src] makes a sighing buzz."))
|
||||
playsound(src, 'sound/machines/buzz/buzz-sigh.ogg', 50, FALSE)
|
||||
if(MULEBOT_MOOD_ANNOYED)
|
||||
audible_message(span_hear("[src] makes an annoyed buzzing sound."))
|
||||
playsound(src, 'sound/machines/buzz/buzz-two.ogg', 50, FALSE)
|
||||
if(MULEBOT_MOOD_DELIGHT)
|
||||
audible_message(span_hear("[src] makes a delighted ping!"))
|
||||
playsound(src, 'sound/machines/ping.ogg', 50, FALSE)
|
||||
if(MULEBOT_MOOD_CHIME)
|
||||
audible_message(span_hear("[src] makes a chiming sound!"))
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, FALSE)
|
||||
flick("[base_icon_state]1", src)
|
||||
|
||||
/// returns true if the bot is fully powered.
|
||||
/mob/living/basic/bot/mulebot/proc/has_power()
|
||||
return cell && cell.charge > 0 && (!wires.is_cut(WIRE_POWER1) && !wires.is_cut(WIRE_POWER2))
|
||||
@@ -0,0 +1,145 @@
|
||||
/datum/ai_controller/basic_controller/bot/mulebot
|
||||
blackboard = list(
|
||||
BB_SALUTE_MESSAGES = list(
|
||||
"blinks its light in appreciation towards",
|
||||
)
|
||||
)
|
||||
ai_movement = /datum/ai_movement/jps/bot/mulebot
|
||||
max_target_distance = AI_MULEBOT_PATH_LENGTH
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/respond_to_summon,
|
||||
/datum/ai_planning_subtree/salute_authority,
|
||||
/datum/ai_planning_subtree/attempt_delivery,
|
||||
/datum/ai_planning_subtree/find_delivery_beacon,
|
||||
)
|
||||
reset_keys = list(
|
||||
BB_BOT_SUMMON_TARGET,
|
||||
BB_MULEBOT_DESTINATION_BEACON,
|
||||
BB_MULEBOT_TRAVEL_TARGET,
|
||||
)
|
||||
|
||||
/datum/ai_controller/basic_controller/bot/mulebot/get_able_to_run()
|
||||
var/mob/living/basic/bot/mulebot/bot_pawn = pawn
|
||||
if(!bot_pawn.has_power())
|
||||
return AI_UNABLE_TO_RUN
|
||||
return ..()
|
||||
|
||||
/datum/ai_controller/basic_controller/bot/mulebot/setup_able_to_run()
|
||||
. = ..()
|
||||
var/mob/living/basic/bot/my_bot = pawn
|
||||
var/static/list/wire_signals = list(
|
||||
COMSIG_MEND_WIRE(WIRE_POWER1), //this framework is insane
|
||||
COMSIG_MEND_WIRE(WIRE_POWER2),
|
||||
COMSIG_CUT_WIRE(WIRE_POWER1),
|
||||
COMSIG_CUT_WIRE(WIRE_POWER2),
|
||||
)
|
||||
RegisterSignals(my_bot.wires, wire_signals, PROC_REF(update_able_to_run))
|
||||
var/static/list/content_signals = list(
|
||||
COMSIG_ATOM_ENTERED,
|
||||
COMSIG_ATOM_EXITED,
|
||||
)
|
||||
RegisterSignals(my_bot, content_signals, PROC_REF(update_able_to_run))
|
||||
|
||||
/datum/ai_planning_subtree/find_delivery_beacon
|
||||
///what behavior do we use to seek beacons
|
||||
var/find_beacon_behaviour = /datum/ai_behavior/find_delivery_beacon
|
||||
|
||||
/datum/ai_planning_subtree/find_delivery_beacon/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
var/mob/living/basic/bot/mulebot/bot_pawn = controller.pawn
|
||||
if(bot_pawn.wires.is_cut(WIRE_BEACON))
|
||||
return
|
||||
|
||||
if(!controller.blackboard_key_exists(BB_MULEBOT_TRAVEL_TARGET))
|
||||
controller.queue_behavior(find_beacon_behaviour, BB_MULEBOT_TRAVEL_TARGET)
|
||||
|
||||
/datum/ai_behavior/find_delivery_beacon
|
||||
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
|
||||
|
||||
/datum/ai_behavior/find_delivery_beacon/perform(seconds_per_tick, datum/ai_controller/controller, target_key)
|
||||
var/mob/living/basic/bot/mulebot/bot_pawn = controller.pawn
|
||||
var/atom/delivery_beacon
|
||||
|
||||
var/beacon_tag = null
|
||||
|
||||
switch(bot_pawn.mode)
|
||||
if(BOT_DELIVER)
|
||||
beacon_tag = controller.blackboard[BB_MULEBOT_DESTINATION_BEACON]
|
||||
if(BOT_GO_HOME)
|
||||
beacon_tag = controller.blackboard[BB_MULEBOT_HOME_BEACON]
|
||||
else
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
|
||||
|
||||
for(var/obj/machinery/navbeacon/beacon as anything in GLOB.deliverybeacons)
|
||||
if(beacon.location == beacon_tag)
|
||||
delivery_beacon = beacon
|
||||
break
|
||||
|
||||
if(isnull(delivery_beacon))
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_FAILED
|
||||
|
||||
controller.set_blackboard_key(BB_MULEBOT_TRAVEL_TARGET, delivery_beacon)
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED
|
||||
|
||||
/datum/ai_behavior/travel_towards/delivery_beacon
|
||||
new_movement_type = /datum/ai_movement/jps/bot/mulebot
|
||||
|
||||
/datum/ai_planning_subtree/attempt_delivery
|
||||
///behavior we use to unload crates
|
||||
var/delivery_behaviour = /datum/ai_behavior/handle_delivery
|
||||
|
||||
/datum/ai_planning_subtree/attempt_delivery/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
if(!controller.blackboard_key_exists(BB_MULEBOT_TRAVEL_TARGET))
|
||||
return
|
||||
|
||||
controller.queue_behavior(delivery_behaviour, BB_MULEBOT_TRAVEL_TARGET)
|
||||
return SUBTREE_RETURN_FINISH_PLANNING
|
||||
|
||||
/datum/ai_behavior/handle_delivery
|
||||
behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH
|
||||
|
||||
/datum/ai_behavior/handle_delivery/setup(datum/ai_controller/controller, target_key)
|
||||
. = ..()
|
||||
var/atom/target = controller.blackboard[target_key]
|
||||
if(QDELETED(target))
|
||||
return FALSE
|
||||
set_movement_target(controller, target)
|
||||
|
||||
/datum/ai_behavior/handle_delivery/perform(seconds_per_tick, datum/ai_controller/controller, target_key)
|
||||
var/obj/machinery/navbeacon/beacon = controller.blackboard[target_key]
|
||||
var/mob/living/basic/bot/mulebot/bot_pawn = controller.pawn
|
||||
|
||||
var/load_direction = beacon.codes[NAVBEACON_DELIVERY_DIRECTION] // this will be the load/unload dir
|
||||
if(!load_direction)
|
||||
load_direction = beacon.dir // fallback
|
||||
|
||||
load_direction = text2num(load_direction)
|
||||
|
||||
if(bot_pawn.load)
|
||||
if(bot_pawn.mulebot_delivery_flags & MULEBOT_REPORT_DELIVERY_MODE)
|
||||
bot_pawn.radio_channel = RADIO_CHANNEL_SUPPLY //Supply channel
|
||||
bot_pawn.buzz(MULEBOT_MOOD_CHIME)
|
||||
bot_pawn.speak("Destination [RUNECHAT_BOLD("[beacon.location]")] reached. Unloading [bot_pawn.load].", bot_pawn.radio_channel)
|
||||
bot_pawn.unload(load_direction)
|
||||
|
||||
else
|
||||
if(bot_pawn.mulebot_delivery_flags & MULEBOT_AUTO_PICKUP_MODE) // find a crate
|
||||
var/atom/movable/atom_to_pick_up
|
||||
if(bot_pawn.wires.is_cut(WIRE_LOADCHECK)) // if hacked, load first unanchored thing we find
|
||||
for(var/atom/movable/target_atom in get_step(bot_pawn.loc, load_direction))
|
||||
if(!target_atom.anchored)
|
||||
atom_to_pick_up = target_atom
|
||||
break
|
||||
else // otherwise, look for crates only
|
||||
atom_to_pick_up = locate(/obj/structure/closet/crate) in get_step(bot_pawn.loc, load_direction)
|
||||
if(atom_to_pick_up?.Adjacent(bot_pawn))
|
||||
bot_pawn.load(atom_to_pick_up)
|
||||
if(bot_pawn.mulebot_delivery_flags & MULEBOT_REPORT_DELIVERY_MODE)
|
||||
bot_pawn.speak("Now loading [bot_pawn.load] at [RUNECHAT_BOLD("[get_area_name(bot_pawn)]")].", bot_pawn.radio_channel)
|
||||
|
||||
if((bot_pawn.mulebot_delivery_flags & MULEBOT_RETURN_MODE) && controller.blackboard[BB_MULEBOT_HOME_BEACON] && controller.blackboard[BB_MULEBOT_HOME_BEACON] != beacon.location)
|
||||
bot_pawn.update_bot_mode(new_mode = BOT_GO_HOME)
|
||||
controller.clear_blackboard_key(BB_MULEBOT_TRAVEL_TARGET)
|
||||
else
|
||||
bot_pawn.bot_reset() // otherwise go idle
|
||||
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED
|
||||
@@ -0,0 +1,116 @@
|
||||
/mob/living/basic/bot/mulebot/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Mule", name)
|
||||
ui.open()
|
||||
|
||||
/mob/living/basic/bot/mulebot/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["powerStatus"] = bot_mode_flags & BOT_MODE_ON
|
||||
data["locked"] = bot_access_flags & BOT_COVER_LOCKED
|
||||
data["siliconUser"] = HAS_SILICON_ACCESS(user)
|
||||
data["mode"] = mode ? "[mode]" : "Ready"
|
||||
data["modeStatus"] = ""
|
||||
switch(mode)
|
||||
if(BOT_IDLE, BOT_DELIVER, BOT_GO_HOME)
|
||||
data["modeStatus"] = "good"
|
||||
if(BOT_BLOCKED, BOT_NAV, BOT_WAIT_FOR_NAV)
|
||||
data["modeStatus"] = "average"
|
||||
if(BOT_NO_ROUTE)
|
||||
data["modeStatus"] = "bad"
|
||||
data["load"] = get_load_name()
|
||||
data["destination"] = ai_controller.blackboard[BB_MULEBOT_DESTINATION_BEACON]
|
||||
data["homeDestination"] = ai_controller.blackboard[BB_MULEBOT_HOME_BEACON]
|
||||
data["destinationsList"] = GLOB.deliverybeacontags
|
||||
data["cellPercent"] = cell?.percent()
|
||||
data["autoReturn"] = mulebot_delivery_flags & MULEBOT_RETURN_MODE
|
||||
data["autoPickup"] = mulebot_delivery_flags & MULEBOT_AUTO_PICKUP_MODE
|
||||
data["reportDelivery"] = mulebot_delivery_flags & MULEBOT_REPORT_DELIVERY_MODE
|
||||
data["botId"] = id
|
||||
data["allowPossession"] = bot_mode_flags & BOT_MODE_CAN_BE_SAPIENT
|
||||
data["possessionEnabled"] = can_be_possessed
|
||||
data["paiInserted"] = !!paicard
|
||||
return data
|
||||
|
||||
/mob/living/basic/bot/mulebot/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
var/mob/user = ui.user
|
||||
if(. || (bot_access_flags & BOT_COVER_LOCKED && !HAS_SILICON_ACCESS(user)))
|
||||
return
|
||||
|
||||
bot_control(action, user, params)
|
||||
return TRUE
|
||||
|
||||
/mob/living/basic/bot/mulebot/bot_control(command, mob/user, list/params = list(), pda = FALSE)
|
||||
if(pda && wires.is_cut(WIRE_RX)) // MULE wireless is controlled by wires.
|
||||
return
|
||||
|
||||
switch(command)
|
||||
if("stop")
|
||||
if(mode != BOT_IDLE)
|
||||
bot_reset()
|
||||
if("go")
|
||||
if(mode == BOT_IDLE)
|
||||
start()
|
||||
if("home")
|
||||
if(mode == BOT_IDLE || mode == BOT_DELIVER)
|
||||
start_home()
|
||||
if("destination")
|
||||
var/new_dest
|
||||
if(pda)
|
||||
new_dest = tgui_input_list(user, "Enter Destination", "Mulebot Settings", GLOB.deliverybeacontags, ai_controller.blackboard[BB_MULEBOT_DESTINATION_BEACON])
|
||||
else
|
||||
new_dest = params["value"]
|
||||
if(new_dest)
|
||||
set_destination(new_dest)
|
||||
if("setid")
|
||||
var/new_id = tgui_input_text(user, "Enter ID", "ID Assignment", id, max_length = MAX_NAME_LEN)
|
||||
if(new_id)
|
||||
set_id(new_id)
|
||||
name = "\improper MULEbot [new_id]"
|
||||
if("sethome")
|
||||
var/new_home = tgui_input_list(user, "Enter Home", "Mulebot Settings", GLOB.deliverybeacontags, ai_controller.blackboard[BB_MULEBOT_HOME_BEACON])
|
||||
if(new_home)
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_HOME_BEACON, new_home)
|
||||
if("unload")
|
||||
if(load && mode != BOT_HUNT)
|
||||
unload()
|
||||
if("autoret")
|
||||
mulebot_delivery_flags ^= MULEBOT_RETURN_MODE
|
||||
if("autopick")
|
||||
mulebot_delivery_flags ^= MULEBOT_AUTO_PICKUP_MODE
|
||||
if("report")
|
||||
mulebot_delivery_flags ^= MULEBOT_REPORT_DELIVERY_MODE
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/start()
|
||||
if(!(bot_mode_flags & BOT_MODE_ON))
|
||||
return
|
||||
if(ai_controller.blackboard[BB_MULEBOT_DESTINATION_BEACON] == ai_controller.blackboard[BB_MULEBOT_HOME_BEACON])
|
||||
update_bot_mode(new_mode = BOT_GO_HOME)
|
||||
else
|
||||
update_bot_mode(new_mode = BOT_DELIVER)
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/start_home()
|
||||
set_destination(ai_controller.blackboard[BB_MULEBOT_HOME_BEACON])
|
||||
update_bot_mode(new_mode = BOT_GO_HOME)
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/set_destination(new_destination)
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_DESTINATION_BEACON, new_destination)
|
||||
|
||||
/mob/living/basic/bot/mulebot/proc/set_home(turf/home_loc)
|
||||
if(home_destination)
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_HOME_BEACON, home_destination)
|
||||
home_destination = null
|
||||
if(!istype(home_loc))
|
||||
CRASH("MULEbot [id] was requested to set a home location to [home_loc ? "an invalid home loc ([home_loc.type])" : "null"]")
|
||||
|
||||
var/obj/machinery/navbeacon/home_beacon = locate() in home_loc
|
||||
if(isnull(home_beacon))
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_HOME_BEACON, "")
|
||||
return
|
||||
ai_controller.set_blackboard_key(BB_MULEBOT_HOME_BEACON, home_beacon.location)
|
||||
log_transport("[id]: MULEbot successfuly set home location to ID [home_beacon.location] at [home_beacon.x], [home_beacon.y], [home_beacon.z]")
|
||||
|
||||
///Sets the new ID of the mulebot
|
||||
/mob/living/basic/bot/mulebot/proc/set_id(new_id)
|
||||
id = new_id
|
||||
@@ -0,0 +1,117 @@
|
||||
/mob/living/basic/bot/mulebot/execute_resist()
|
||||
. = ..()
|
||||
if(load)
|
||||
unload()
|
||||
|
||||
/mob/living/basic/bot/mulebot/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
if(gone == load)
|
||||
unload()
|
||||
if(gone == cell)
|
||||
turn_off()
|
||||
assign_cell()
|
||||
cell = null
|
||||
set_cell_hud()
|
||||
|
||||
/mob/living/basic/bot/mulebot/Entered(obj/item/stock_parts/power_store/cell/arrived, atom/old_loc, list/atom/old_locs)
|
||||
. = ..()
|
||||
if(istype(arrived) && isnull(cell))
|
||||
assign_cell(arrived)
|
||||
|
||||
// mousedrop a crate to load the bot
|
||||
// can load anything if hacked
|
||||
/mob/living/basic/bot/mulebot/mouse_drop_receive(atom/movable/atom_to_load, mob/user, params)
|
||||
if(!isliving(user))
|
||||
return
|
||||
|
||||
if(!istype(atom_to_load) || isdead(atom_to_load) || iseyemob(atom_to_load) || istype(atom_to_load, /obj/effect/dummy/phased_mob))
|
||||
return
|
||||
|
||||
load(atom_to_load)
|
||||
|
||||
/mob/living/basic/bot/mulebot/post_unbuckle_mob(mob/living/M)
|
||||
load = null
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/relaymove(mob/living/user, direction)
|
||||
if(user.incapacitated)
|
||||
return
|
||||
if(load == user)
|
||||
unload()
|
||||
|
||||
/mob/living/basic/bot/mulebot/remove_air(amount) //To prevent riders suffocating
|
||||
return loc ? loc.remove_air(amount) : null
|
||||
|
||||
/// Called to load an atom on the mulebot, which is usually a crate, unless if hacked
|
||||
/mob/living/basic/bot/mulebot/proc/load(atom/movable/atom_to_load)
|
||||
if(load || atom_to_load.anchored)
|
||||
return
|
||||
|
||||
if(!isturf(atom_to_load.loc)) //To prevent the loading from stuff from someone's inventory or screen icons.
|
||||
return
|
||||
|
||||
var/obj/structure/closet/crate/crate = atom_to_load
|
||||
if(!istype(crate))
|
||||
if(!wires.is_cut(WIRE_LOADCHECK))
|
||||
buzz(MULEBOT_MOOD_SIGH)
|
||||
return // if not hacked, only allow crates to be loaded
|
||||
crate = null
|
||||
|
||||
if(crate || isobj(atom_to_load))
|
||||
var/obj/object_to_load = atom_to_load
|
||||
if(object_to_load.has_buckled_mobs() || (locate(/mob) in atom_to_load)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
buzz(MULEBOT_MOOD_SIGH)
|
||||
return
|
||||
|
||||
if(crate)
|
||||
crate.close() //make sure the crate is closed
|
||||
|
||||
object_to_load.forceMove(src)
|
||||
|
||||
else if(isliving(atom_to_load))
|
||||
if(!load_mob(atom_to_load)) //forceMove() is handled in buckling
|
||||
return
|
||||
|
||||
load = atom_to_load
|
||||
update_appearance()
|
||||
|
||||
///resolves the name to display for the loaded mob. primarily needed for the paranormal subtype since we don't want to show the name of ghosts riding it.
|
||||
/mob/living/basic/bot/mulebot/proc/get_load_name()
|
||||
return load ? load.name : null
|
||||
|
||||
///Loads a mob onto the mulebot
|
||||
/mob/living/basic/bot/mulebot/proc/load_mob(mob/living/mob_to_load)
|
||||
can_buckle = TRUE
|
||||
if(buckle_mob(mob_to_load))
|
||||
passenger = mob_to_load
|
||||
load = mob_to_load
|
||||
can_buckle = FALSE
|
||||
return TRUE
|
||||
|
||||
// called to unload the bot
|
||||
// argument is optional direction to unload
|
||||
// if zero or null, unload at bot's location
|
||||
/mob/living/basic/bot/mulebot/proc/unload(dirn)
|
||||
if(QDELETED(load))
|
||||
if(load) //if our thing was qdel'd, there's likely a leftover reference. just clear it and remove the overlay. we'll let the bot keep moving around to prevent it abruptly stopping somewhere.
|
||||
load = null
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
update_bot_mode(new_mode = BOT_IDLE)
|
||||
|
||||
var/atom/movable/cached_load = load //cache the load since unbuckling mobs clears the var.
|
||||
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(load) //don't have to do any of this for mobs.
|
||||
cached_load.forceMove(loc)
|
||||
cached_load.pixel_y = initial(cached_load.pixel_y)
|
||||
cached_load.layer = initial(cached_load.layer)
|
||||
SET_PLANE_EXPLICIT(cached_load, initial(cached_load.plane), src)
|
||||
load = null
|
||||
|
||||
if(dirn) //move the thing to the delivery point.
|
||||
cached_load.Move(get_step(loc,dirn), dirn)
|
||||
|
||||
update_appearance()
|
||||
@@ -0,0 +1,74 @@
|
||||
/mob/living/basic/bot/mulebot/proc/set_cell_hud()
|
||||
if(!has_power())
|
||||
set_hud_image_state(DIAG_BATT_HUD, "hudnobatt")
|
||||
return
|
||||
|
||||
var/atom/movable/screen/mob_charge/charge_hud = hud_used?.screen_objects[HUD_MULEBOT_CHARGE]
|
||||
charge_hud?.calculate_charge()
|
||||
set_hud_image_state(DIAG_BATT_HUD, "hudbatt[RoundDiagBar(cell.charge/cell.maxcharge)]")
|
||||
|
||||
/atom/movable/screen/mob_charge
|
||||
icon = 'icons/obj/machines/cell_charger.dmi'
|
||||
icon_state = "ccharger"
|
||||
screen_loc = ui_stamina
|
||||
///used to find the overlay for charger icon
|
||||
var/current_charge_level = 4
|
||||
///dynamic, based on what cell our nulebot's using
|
||||
var/image/battery_overlay
|
||||
///maptext that displays charge in numbers
|
||||
var/image/charge_overlay
|
||||
///is there a mouse on us
|
||||
var/hovering = FALSE
|
||||
|
||||
/atom/movable/screen/mob_charge/proc/update_battery_overlay(atom/target_battery)
|
||||
var/obj/item/stock_parts/power_store/cell/my_cell = target_battery || (locate() in get_mob())
|
||||
if(isnull(my_cell))
|
||||
battery_overlay = null
|
||||
else
|
||||
battery_overlay = image(icon = my_cell.icon, icon_state = my_cell.icon_state, loc = src, layer = src.layer + 0.1)
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/atom/movable/screen/mob_charge/proc/calculate_charge()
|
||||
var/obj/item/stock_parts/power_store/cell/my_battery = locate() in get_mob()
|
||||
var/charge_value = isnull(my_battery) ? 0 : round(my_battery.charge/my_battery.maxcharge * 100 , 1)
|
||||
current_charge_level = round(charge_value * 4 / 100)
|
||||
charge_overlay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative'>[charge_value]%</div>")
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/atom/movable/screen/mob_charge/New(loc, ...)
|
||||
. = ..()
|
||||
charge_overlay = image(loc = src, layer = src.layer+0.2, pixel_y = -5)
|
||||
update_battery_overlay()
|
||||
|
||||
/atom/movable/screen/mob_charge/Destroy()
|
||||
charge_overlay = null
|
||||
battery_overlay = null
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/mob_charge/update_overlays()
|
||||
. = ..()
|
||||
. += mutable_appearance(icon, "ccharger-o[current_charge_level]")
|
||||
if(battery_overlay)
|
||||
. |= battery_overlay
|
||||
if(hovering)
|
||||
. |= charge_overlay
|
||||
|
||||
/atom/movable/screen/mob_charge/MouseEntered(location,control,params)
|
||||
if(usr != get_mob())
|
||||
return
|
||||
. = ..()
|
||||
hovering = TRUE
|
||||
calculate_charge()
|
||||
|
||||
/atom/movable/screen/mob_charge/MouseExited(location, control, params)
|
||||
if(usr != get_mob())
|
||||
return
|
||||
. = ..()
|
||||
hovering = FALSE
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/datum/hud/living/mulebot
|
||||
|
||||
/datum/hud/living/mulebot/initialize_screen_objects()
|
||||
. = ..()
|
||||
add_screen_object(/atom/movable/screen/mob_charge, HUD_MULEBOT_CHARGE, HUD_GROUP_INFO)
|
||||
@@ -0,0 +1,72 @@
|
||||
/mob/living/basic/bot/mulebot/MobBump(mob/bumped_mob) // called when the bot bumps into a mob
|
||||
if(mind || !isliving(bumped_mob)) //if there's a sentience controlling the bot, they aren't allowed to harm folks.
|
||||
return ..()
|
||||
var/mob/living/bumped_living = bumped_mob
|
||||
if(wires.is_cut(WIRE_AVOIDANCE)) // usually just bumps, but if the avoidance wire is cut, knocks them over.
|
||||
if(iscyborg(bumped_living))
|
||||
visible_message(span_danger("[src] bumps into [bumped_living]!"))
|
||||
else if(bumped_living.Knockdown(8 SECONDS))
|
||||
log_combat(src, bumped_living, "knocked down")
|
||||
visible_message(span_danger("[src] knocks over [bumped_living]!"))
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/mulebot/on_bot_movement(atom/movable/source, atom/oldloc, dir, forced)
|
||||
cell?.use(cell_move_power_usage)
|
||||
set_cell_hud()
|
||||
|
||||
if(has_gravity())
|
||||
for(var/mob/living/carbon/human/future_pancake in loc)
|
||||
if(future_pancake.body_position == LYING_DOWN)
|
||||
run_over(future_pancake)
|
||||
|
||||
return ..()
|
||||
|
||||
///Checks if the bot is on or if it has charge
|
||||
/mob/living/basic/bot/mulebot/proc/on_pre_move()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!(bot_mode_flags & BOT_MODE_ON))
|
||||
return COMPONENT_MOB_BOT_BLOCK_PRE_STEP
|
||||
|
||||
if((cell && (cell.charge < cell_move_power_usage)) || !has_power())
|
||||
turn_off()
|
||||
return COMPONENT_MOB_BOT_BLOCK_PRE_STEP
|
||||
|
||||
// when mulebot is in the same loc
|
||||
/mob/living/basic/bot/mulebot/proc/run_over(mob/living/carbon/human/crushed)
|
||||
if (!(bot_access_flags & BOT_COVER_EMAGGED) && !wires.is_cut(WIRE_AVOIDANCE))
|
||||
if (!has_status_effect(/datum/status_effect/careful_driving))
|
||||
crushed.visible_message(span_notice("[src] slows down to avoid crushing [crushed]."))
|
||||
apply_status_effect(/datum/status_effect/careful_driving)
|
||||
return // Player mules must be emagged before they can trample
|
||||
|
||||
log_combat(src, crushed, "run over", addition = "(DAMTYPE: [uppertext(BRUTE)])")
|
||||
crushed.visible_message(
|
||||
span_danger("[src] drives over [crushed]!"),
|
||||
span_userdanger("[src] drives over you!"),
|
||||
)
|
||||
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
|
||||
var/damage = rand(5, 15)
|
||||
var/static/list/zone_damages = list(
|
||||
BODY_ZONE_HEAD = 2,
|
||||
BODY_ZONE_CHEST = 2,
|
||||
BODY_ZONE_L_LEG = 0.5,
|
||||
BODY_ZONE_R_LEG = 0.5,
|
||||
BODY_ZONE_L_ARM = 0.5,
|
||||
BODY_ZONE_R_ARM = 0.5,
|
||||
)
|
||||
for(var/body_zone in zone_damages)
|
||||
crushed.apply_damage(zone_damages[body_zone] * damage, BRUTE, body_zone, run_armor_check(body_zone, MELEE))
|
||||
|
||||
add_mob_blood(crushed)
|
||||
|
||||
var/turf/below_us = get_turf(src)
|
||||
below_us.add_mob_blood(crushed)
|
||||
|
||||
AddComponent(/datum/component/blood_walk, \
|
||||
blood_type = /obj/effect/decal/cleanable/blood/tracks, \
|
||||
target_dir_change = TRUE, \
|
||||
transfer_blood_dna = TRUE, \
|
||||
max_blood = 4)
|
||||
@@ -0,0 +1,61 @@
|
||||
/mob/living/basic/bot/mulebot/paranormal
|
||||
name = "\improper GHOULbot"
|
||||
desc = "A rather ghastly looking... Multiple Utility Load Effector bot? It only seems to accept paranormal forces, and for this reason is fucking useless."
|
||||
icon_state = "paranormalmulebot0"
|
||||
base_icon_state = "paranormalmulebot"
|
||||
///avoid the utterly miniscule chance of infinite looping
|
||||
replacement_chance = 0
|
||||
|
||||
/mob/living/basic/bot/mulebot/paranormal/update_overlays()
|
||||
. = ..()
|
||||
if(!isobserver(load))
|
||||
return
|
||||
var/mutable_appearance/ghost_overlay = mutable_appearance('icons/mob/simple/mob.dmi', "ghost", layer + 0.01) //use a generic ghost icon, otherwise you can metagame who's dead if they have a custom ghost set
|
||||
ghost_overlay.pixel_y = 12
|
||||
. += ghost_overlay
|
||||
|
||||
/mob/living/basic/bot/mulebot/paranormal/get_load_name() //Don't reveal the name of ghosts so we can't metagame who died and all that.
|
||||
. = ..()
|
||||
if(. && isobserver(load))
|
||||
return "Unknown"
|
||||
|
||||
/mob/living/basic/bot/mulebot/paranormal/load(atom/movable/movable_atom)
|
||||
if(load || movable_atom.anchored)
|
||||
return
|
||||
|
||||
if(!isturf(movable_atom.loc)) //To prevent the loading from stuff from someone's inventory or screen icons.
|
||||
return
|
||||
|
||||
if(isobserver(movable_atom))
|
||||
visible_message(span_warning("A ghostly figure appears on [src]!"))
|
||||
movable_atom.forceMove(src)
|
||||
RegisterSignal(movable_atom, COMSIG_MOVABLE_MOVED, PROC_REF(ghost_moved))
|
||||
|
||||
else if(!wires.is_cut(WIRE_LOADCHECK))
|
||||
buzz(MULEBOT_MOOD_SIGH)
|
||||
return // if not hacked, only allow ghosts to be loaded
|
||||
|
||||
else if(isobj(movable_atom))
|
||||
if(movable_atom.has_buckled_mobs() || (locate(/mob) in movable_atom)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
buzz(MULEBOT_MOOD_SIGH)
|
||||
return
|
||||
|
||||
if(istype(movable_atom, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/crate = movable_atom
|
||||
crate.close() //make sure it's closed
|
||||
|
||||
movable_atom.forceMove(src)
|
||||
|
||||
else if(isliving(movable_atom) && !load_mob(movable_atom))
|
||||
return
|
||||
|
||||
load = movable_atom
|
||||
update_bot_mode(new_mode = BOT_IDLE)
|
||||
update_appearance()
|
||||
|
||||
///Handles the ghosts moving out from the mule
|
||||
/mob/living/basic/bot/mulebot/paranormal/proc/ghost_moved()
|
||||
SIGNAL_HANDLER
|
||||
visible_message(span_notice("The ghostly figure vanishes..."))
|
||||
UnregisterSignal(load, COMSIG_MOVABLE_MOVED)
|
||||
unload()
|
||||
@@ -0,0 +1,46 @@
|
||||
/mob/living/basic/bot/mulebot/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
update_appearance()
|
||||
|
||||
/mob/living/basic/bot/mulebot/crowbar_act(mob/living/user, obj/item/tool)
|
||||
if(!(bot_access_flags & BOT_COVER_MAINTS_OPEN) || user.combat_mode)
|
||||
return
|
||||
if(!cell)
|
||||
to_chat(user, span_warning("[src] doesn't have a power cell!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
cell.add_fingerprint(user)
|
||||
user.visible_message(
|
||||
span_notice("[user] crowbars [cell] out from [src]."),
|
||||
span_notice("You pry [cell] out of [src]."),
|
||||
)
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(cell)
|
||||
else
|
||||
cell.forceMove(drop_location())
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/mob/living/basic/bot/mulebot/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
||||
if(istype(tool, /obj/item/stock_parts/power_store/cell) && (bot_access_flags & BOT_COVER_MAINTS_OPEN))
|
||||
if(cell)
|
||||
to_chat(user, span_warning("[src] already has a power cell!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!user.transferItemToLoc(tool, src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
user.visible_message(
|
||||
span_notice("[user] inserts \a [cell] into [src]."),
|
||||
span_notice("You insert [cell] into [src]."),
|
||||
)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
if(is_wire_tool(tool) && (bot_access_flags & BOT_COVER_MAINTS_OPEN))
|
||||
attack_hand(user)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/basic/bot/mulebot/emag_act(mob/user, obj/item/card/emag/emag_card)
|
||||
. = ..()
|
||||
if(!(bot_access_flags & BOT_COVER_EMAGGED))
|
||||
return
|
||||
flick("[base_icon_state]-emagged", src)
|
||||
playsound(src, SFX_SPARKS, 100, FALSE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
return TRUE
|
||||
@@ -250,7 +250,7 @@
|
||||
var/obj/item/stack/rods/new_rods = new()
|
||||
new_rods.forceMove(src)
|
||||
|
||||
/mob/living/basic/bot/repairbot/turn_on()
|
||||
/mob/living/basic/bot/repairbot/turn_on(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
/// Picks a random toxin and assigns it to the bee
|
||||
/mob/living/basic/bee/proc/assign_random_toxin_reagent()
|
||||
assign_reagent(get_random_reagent_id(whitelist = subtypesof(/datum/reagent/toxin)))
|
||||
assign_reagent(GLOB.chemical_reagents_list[get_random_reagent_id(whitelist = subtypesof(/datum/reagent/toxin))])
|
||||
|
||||
/mob/living/basic/bee/mutate()
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// The taxonomy of polar vs space bear left to imagination of the reader
|
||||
/mob/living/basic/mining/polarbear
|
||||
name = "polar bear"
|
||||
desc = "An aggressive animal that defends its territory with incredible power. These beasts don't run from their enemies."
|
||||
icon = 'icons/mob/simple/icemoon/icemoon_monsters.dmi'
|
||||
icon_state = "polarbear"
|
||||
icon_living = "polarbear"
|
||||
icon_dead = "polarbear_dead"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST|MOB_MINING
|
||||
|
||||
friendly_verb_continuous = "growls at"
|
||||
friendly_verb_simple = "growl at"
|
||||
response_help_continuous = "pets"
|
||||
response_help_simple = "pet"
|
||||
response_disarm_continuous = "gently pushes aside"
|
||||
response_disarm_simple = "gently push aside"
|
||||
attack_verb_continuous = "claws"
|
||||
attack_verb_simple = "claw"
|
||||
attack_sound = 'sound/items/weapons/bladeslice.ogg'
|
||||
attack_vis_effect = ATTACK_EFFECT_CLAW
|
||||
|
||||
habitable_atmos = null
|
||||
speed = 2
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
obj_damage = 40
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
wound_bonus = -5
|
||||
exposed_wound_bonus = 10
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
move_force = MOVE_FORCE_VERY_STRONG
|
||||
move_resist = MOVE_FORCE_VERY_STRONG
|
||||
pull_force = MOVE_FORCE_VERY_STRONG
|
||||
butcher_results = list(/obj/item/food/meat/slab/bear = 3, /obj/item/stack/sheet/bone = 2)
|
||||
guaranteed_butcher_results = list(/obj/item/stack/sheet/animalhide/goliath_hide/polar_bear_hide = 1)
|
||||
crusher_loot = /obj/item/crusher_trophy/bear_paw
|
||||
|
||||
ai_controller = /datum/ai_controller/basic_controller/polar
|
||||
|
||||
/mob/living/basic/mining/polarbear/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
add_traits(list(TRAIT_SPACEWALK, TRAIT_SWIMMER, TRAIT_FENCE_CLIMBER, TRAIT_SNOWSTORM_IMMUNE), INNATE_TRAIT)
|
||||
AddElement(/datum/element/ai_retaliate)
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_BEAR, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
AddElement(/datum/element/change_force_on_death, move_force = MOVE_FORCE_DEFAULT, move_resist = MOVE_RESIST_DEFAULT, pull_force = PULL_FORCE_DEFAULT)
|
||||
AddElement(/datum/element/footstep, footstep_type = FOOTSTEP_MOB_CLAW)
|
||||
|
||||
/mob/living/basic/mining/polarbear/lesser
|
||||
name = "magic polar bear"
|
||||
desc = "It seems sentient somehow."
|
||||
faction = list(FACTION_NEUTRAL)
|
||||
|
||||
/datum/ai_controller/basic_controller/polar
|
||||
blackboard = list(
|
||||
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
|
||||
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
|
||||
BB_AGGRO_RANGE = 2,
|
||||
)
|
||||
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/enrage,
|
||||
/datum/ai_planning_subtree/escape_captivity,
|
||||
/datum/ai_planning_subtree/target_retaliate,
|
||||
/datum/ai_planning_subtree/simple_find_target,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree,
|
||||
/datum/ai_planning_subtree/random_speech/bear,
|
||||
)
|
||||
@@ -52,7 +52,7 @@ GLOBAL_LIST_INIT(tendrils, list())
|
||||
AddComponent(/datum/component/ai_target_timer)
|
||||
AddComponent(/datum/component/gps, "Eerie Signal")
|
||||
AddComponent(/datum/component/basic_mob_attack_telegraph, display_telegraph_overlay = FALSE, telegraph_duration = 0.4 SECONDS)
|
||||
AddComponent(/datum/component/regenerator, regeneration_delay = 30 SECONDS, brute_per_second = 20)
|
||||
AddComponent(/datum/component/regenerator, regeneration_delay = 30 SECONDS, brute_per_second = 20, outline_colour = COLOR_CULT_RED)
|
||||
add_traits(list(TRAIT_BACKSTAB_IMMUNE, TRAIT_IMMOBILIZED), INNATE_TRAIT)
|
||||
|
||||
var/static/list/abilities = list(
|
||||
|
||||
@@ -270,7 +270,8 @@
|
||||
///Handler for COMSIG_MOB_RETRIEVE_ACCESS
|
||||
/mob/living/basic/pet/dog/corgi/proc/retrieve_access(mob/accessor, list/player_access)
|
||||
SIGNAL_HANDLER
|
||||
player_access += access_card.GetAccess()
|
||||
if(access_card)
|
||||
player_access += access_card.GetAccess()
|
||||
|
||||
///Handles updating any existing overlays for the corgi (such as fashion items) when it changes how it appears, as in, dead or alive.
|
||||
/mob/living/basic/pet/dog/corgi/proc/on_appearance_change()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
pass_flags = PASSMOB
|
||||
move_force = 0
|
||||
move_resist = 0
|
||||
pull_force = 0
|
||||
pull_force = MOVE_FORCE_NONE
|
||||
minimum_survivable_temperature = TCMB
|
||||
maximum_survivable_temperature = INFINITY
|
||||
death_message = "fades out of existence!"
|
||||
|
||||
@@ -252,6 +252,8 @@
|
||||
var/datum/callback/got_disk = CALLBACK(src, PROC_REF(got_disk))
|
||||
var/datum/callback/display_disk = CALLBACK(src, PROC_REF(display_disk))
|
||||
AddComponent(/datum/component/nuclear_bomb_operator, got_disk, display_disk)
|
||||
var/obj/item/implant/implanter = SSwardrobe.provide_type(/obj/item/implant/tacmap/nuclear/cayenne, src)
|
||||
implanter.implant(src, null, TRUE)
|
||||
|
||||
/mob/living/basic/carp/pet/cayenne/apply_colour()
|
||||
if (prob(RARE_CAYENNE_CHANCE))
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
minimum_survivable_temperature = 0
|
||||
maximum_survivable_temperature = 1500
|
||||
obj_damage = 0
|
||||
pull_force = 0
|
||||
pull_force = MOVE_FORCE_NONE
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
|
||||
ai_controller = /datum/ai_controller/basic_controller/lightgeist
|
||||
|
||||
@@ -175,12 +175,6 @@
|
||||
|
||||
// A note to future coders: do not replace this with an EMP because it will wreck malf AIs and everyone will hate you.
|
||||
/datum/action/cooldown/spell/aoe/revenant/malfunction/cast_on_thing_in_aoe(turf/victim, mob/living/basic/revenant/caster)
|
||||
for(var/mob/living/simple_animal/bot/bot in victim)
|
||||
if(!(bot.bot_cover_flags & BOT_COVER_EMAGGED))
|
||||
new /obj/effect/temp_visual/revenant(bot.loc)
|
||||
bot.bot_cover_flags &= ~BOT_COVER_LOCKED
|
||||
bot.bot_cover_flags |= BOT_COVER_MAINTS_OPEN
|
||||
bot.emag_act(caster)
|
||||
for(var/mob/living/basic/bot/bot in victim)
|
||||
if(!(bot.bot_access_flags & BOT_COVER_EMAGGED))
|
||||
new /obj/effect/temp_visual/revenant(bot.loc)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
ai_controller = /datum/ai_controller/robot_customer
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, STAMINA = 0, OXY = 1)
|
||||
voice_filter = "alimiter=0.9,acompressor=threshold=0.2:ratio=20:attack=10:release=50:makeup=2,highpass=f=1000"
|
||||
|
||||
/// The clothes that we draw on this tourist.
|
||||
var/clothes_set = "amerifat_clothes"
|
||||
@@ -42,7 +43,8 @@
|
||||
|
||||
add_traits(list(TRAIT_NOMOBSWAP, TRAIT_NO_TELEPORT, TRAIT_STRONG_GRABBER), INNATE_TRAIT) // never suffer a bitch to fuck with you
|
||||
AddElement(/datum/element/footstep, FOOTSTEP_OBJ_ROBOT, 1, -6, sound_vary = TRUE)
|
||||
|
||||
if(SStts.tts_enabled)
|
||||
voice = pick(strings("robot_voices.json", "[customer_data.type]", "config"))
|
||||
ai_controller.set_blackboard_key(BB_CUSTOMER_CUSTOMERINFO, customer_info)
|
||||
ai_controller.set_blackboard_key(BB_CUSTOMER_ATTENDING_VENUE, attending_venue)
|
||||
ai_controller.set_blackboard_key(BB_CUSTOMER_PATIENCE, customer_info.total_patience)
|
||||
|
||||
@@ -65,15 +65,15 @@
|
||||
/mob/living/basic/stoat/kit = 100 // Placeholder until we get proper baby stoats
|
||||
)
|
||||
AddComponent(\
|
||||
/datum/component/breed,\
|
||||
can_breed_with = typecacheof(list(/mob/living/basic/stoat)),\
|
||||
baby_paths = baby_paths,\
|
||||
/datum/component/breed,\
|
||||
can_breed_with = typecacheof(list(/mob/living/basic/stoat)),\
|
||||
baby_paths = baby_paths,\
|
||||
)
|
||||
|
||||
/mob/living/basic/stoat/kit
|
||||
name = "\improper stoat kit"
|
||||
real_name = "stoat"
|
||||
desc = "They're a stoat kit!"
|
||||
desc = "An apex predator, but friend-shaped, and tiny..."
|
||||
icon_state = "kit_stoat"
|
||||
icon_living = "kit_stoat"
|
||||
icon_dead = "kit_stoat_dead"
|
||||
@@ -82,3 +82,15 @@
|
||||
ai_controller = /datum/ai_controller/basic_controller/stoat/kit
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
can_breed = FALSE
|
||||
|
||||
/mob/living/basic/stoat/kit/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(\
|
||||
/datum/component/growth_and_differentiation,\
|
||||
growth_time = 20 MINUTES,\
|
||||
growth_path = /mob/living/basic/stoat,\
|
||||
growth_probability = 100,\
|
||||
lower_growth_value = 0.5,\
|
||||
upper_growth_value = 1,\
|
||||
signals_to_kill_on = list(COMSIG_MOB_CLIENT_LOGIN),\
|
||||
)
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
return destined_path
|
||||
|
||||
/mob/living/basic/turtle/process(seconds_per_tick)
|
||||
if(HAS_TRAIT(src, TRAIT_STASIS))
|
||||
return
|
||||
if(isnull(reagents) || !length(reagents.reagent_list)) //if we have no reagents, default to our highest destined path
|
||||
set_plant_growth(retrieve_destined_path(), 0.5)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user