Skip to content

Commit

Permalink
Updating slaver base away site (#481)
Browse files Browse the repository at this point in the history
* Updating several away sites

* Slavers base fixes

* Fix aggregate death icon

* Tweaks

* Fix random room

* AN UPDATE!!!

* Blood runtime fix

* Fixes

* Some simple mob fixes
  • Loading branch information
EgorDinamit authored Jan 28, 2024
1 parent e61df66 commit 645f10f
Show file tree
Hide file tree
Showing 19 changed files with 88,077 additions and 44,254 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,7 @@
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
#include "code\modules\mob\living\simple_animal\hostile\riot.dm"
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
#include "code\modules\mob\living\simple_animal\hostile\scg.dm"
#include "code\modules\mob\living\simple_animal\hostile\syndicate.dm"
#include "code\modules\mob\living\simple_animal\hostile\tree.dm"
#include "code\modules\mob\living\simple_animal\hostile\vagrant.dm"
Expand Down
9 changes: 9 additions & 0 deletions code/modules/ai/aI_holder_subtypes/simple_mob_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,14 @@
holder.IMove(get_step_away(holder, A))
holder.face_atom(A)

/datum/ai_holder/simple_animal/humanoid/hostile/threaten
threaten = TRUE
threaten_timeout = 3 MINUTES
threaten_delay = 8 SECONDS

/datum/ai_holder/simple_animal/humanoid/hostile/violent
mauling = TRUE

/datum/ai_holder/simple_animal/humanoid/hostile/violent/threaten
threaten = TRUE
threaten_timeout = 6 MINUTES
6 changes: 6 additions & 0 deletions code/modules/ai/ai_holder_communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
threatening = TRUE
last_threaten_time = world.time

// All our friends nearby will also count as if they threatened the target
for(var/mob/living/L in GetFriendsInCallRange())
L.ai_holder.last_threaten_time = world.time

if (holder.say_list)
holder.ISay(pick(holder.say_list.say_threaten))
playsound(holder, holder.say_list.threaten_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
Expand All @@ -46,6 +50,8 @@
if (should_escalate)
threatening = FALSE
set_stance(STANCE_APPROACH)
for(var/mob/living/L in GetFriendsInCallRange())
L.ai_holder.set_stance(STANCE_APPROACH)
if (holder.say_list)
holder.ISay(pick(holder.say_list.say_escalate))
PlayMobSound(holder.say_list.speak_sounds)
Expand Down
42 changes: 32 additions & 10 deletions code/modules/ai/ai_holder_cooperation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
/// time when this mob is allowed to call for help
var/next_sent_help_request = 0

/// Cooldown to the next request
var/next_sent_help_request_delay = 10 SECONDS

/// time when the mob can receive a help request from another mob
var/next_received_help_request = 0

Expand Down Expand Up @@ -46,28 +49,47 @@
else // We're the 'founder' (first and/or only member) of this faction.
faction_friends |= holder

/datum/ai_holder/proc/ShouldRequestHelp()
if(holder.health >= holder.maxHealth * 0.6)
return FALSE
if(!length(faction_friends))
return FALSE
return TRUE

// Requests help in combat from other mobs possessing ai_holders.
/datum/ai_holder/proc/request_help()
ai_log("request_help() : Entering.", AI_LOG_DEBUG)
if (!cooperative || world.time < next_sent_help_request || world.time < next_received_help_request)
return

if(ShouldRequestHelp())
return

ai_log("request_help() : Asking for help.", AI_LOG_INFO)
next_sent_help_request = world.time + 10 SECONDS
next_sent_help_request = world.time + next_sent_help_request_delay

if(holder.say_list)
holder.ISay(pick(holder.say_list.say_help))
PlayMobSound(holder.say_list.speak_sounds)

for(var/mob/living/L in GetFriendsInCallRange())
ai_log("request_help() : Asking [L] (AI) for help.", AI_LOG_INFO)
L.ai_holder.help_requested(holder)

ai_log("request_help() : Exiting.", AI_LOG_DEBUG)

/datum/ai_holder/proc/GetFriendsInCallRange()
. = list()
for (var/mob/living/L in faction_friends)
if (L == holder) // Lets not call ourselves.
if(L == holder) // Lets not call ourselves.
continue
if (holder.z != L.z) // On seperate z-level.
if(holder.z != L.z) // On seperate z-level.
continue
if (get_dist(L, holder) > call_distance) // Too far to 'hear' the call for help.
if(get_dist(L, holder) > call_distance) // Too far to 'hear' the call for help.
continue

if (holder.IIsAlly(L) && L.ai_holder)
ai_log("request_help() : Asking [L] (AI) for help.", AI_LOG_INFO)
L.ai_holder.help_requested(holder)

ai_log("request_help() : Exiting.", AI_LOG_DEBUG)
if(!holder.IIsAlly(L) || !L.ai_holder)
continue
. += L

// What allies receive when someone else is calling for help.
/datum/ai_holder/proc/help_requested(mob/living/friend)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/ai/say_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
var/list/say_stand_down = list() // When the threatened thing goes away.
var/list/say_escalate = list() // When the threatened thing doesn't go away.

var/list/say_help = list() // When we are requesting help

// Lists belows are ASSOCIATIVE lists! Sound = Chance. If null is in there - it will not play sound when prompted
var/list/speak_sounds = list() // Sounds that can be played when anything from speak list is said
var/list/emote_hear_sounds = list() // Sounds that can be played when anything from emote_hear is performed
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/simple_animal/defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
if(I_DISARM)
M.visible_message(SPAN_NOTICE("[M] [response_disarm] \the [src]."))
M.do_attack_animation(src)
DisarmEffect(M)

if(I_HURT)
var/dealt_damage = harm_intent_damage
Expand Down Expand Up @@ -132,7 +133,7 @@
if (ai_holder)
ai_holder.react_to_attack(user)

/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone)
/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, effective_force, hit_zone)

visible_message(SPAN_DANGER("\The [src] has been attacked with \the [O] by [user]!"))

Expand Down Expand Up @@ -167,3 +168,6 @@
attacker.apply_damage(rand(return_damage_min, return_damage_max), damage_type, hand_hurtie, used_weapon = description)
if(rand(25))
to_chat(attacker, SPAN_WARNING("Your attack has no obvious effect on \the [src]'s [description]!"))

/mob/living/simple_animal/proc/DisarmEffect(mob/living/carbon/human/attacker)
return
120 changes: 120 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/scg.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/mob/living/simple_animal/hostile/scg_explorer
name = "\improper SCG explorer"
desc = "An SCG explorer."
icon = 'icons/mob/simple_animal/human_enemies.dmi'
icon_state = "scg_explorer"
icon_living = "scg_explorer"
icon_dead = "scg_explorer"
turns_per_move = 5
response_help = "pokes"
response_disarm = "shoves"
response_harm = "hits"
movement_cooldown = 2.6
maxHealth = 140
health = 140
harm_intent_damage = 5
can_escape = TRUE
a_intent = I_HURT
natural_weapon = /obj/item/natural_weapon/punch
min_gas = list()
max_gas = list()
unsuitable_atmos_damage = 0
faction = "scg"
status_flags = CANPUSH

say_list_type = /datum/say_list/scg_explorer
ai_holder_type = /datum/ai_holder/simple_animal/humanoid/hostile/threaten

//loot_list = list(/obj/effect/landmark/corpse/scg_explorer = 1)

/datum/say_list/scg_explorer
speak = list(
"Hope we're not going to run into Terrans here...",
"Wonder if there's more stuff around here...",
"Guys? Did you find anything cool yet?",
"Uhhh, ETD? When are we going back?",
"Anyone seen some rechargers around here?",
"Found anything?",
)
emote_see = list("whistles", "coughs", "looks around")

say_understood = list("Alright.", "Yes.", "Got it.")
say_cannot = list("No can do.", "No.", "Nope.")
say_maybe_target = list("Hey, someone is here!", "Watch out, there's some movement.")
say_got_target = list("Contact!", "In trouble!", "Attacking hostiles!")
say_threaten = list("Hey-hey, you better leave.", "SCG operations. Better leave this place.", "That's no place for civilians, leave now.")
say_stand_down = list("That's right, go.", "Uh-huh, no need to fight.")
say_escalate = list("I take it you're here for a fight then!", "Well, don't say I didn't warn you!")

say_help = list("Need help!", "I require assistance!")

speak_sounds = list('sound/effects/radio_chatter.ogg' = 100)
threaten_sound = 'sound/weapons/TargetOn.ogg'
stand_down_sound = 'sound/weapons/TargetOff.ogg'

/mob/living/simple_animal/hostile/scg_explorer/death()
. = ..()
check_delete()

// This one starts with laser rifle. When out of "ammo" - discards it and uses machette
/mob/living/simple_animal/hostile/scg_explorer/armed
desc = "An SCG explorer armed with basic laser rifle."
icon_state = "scg_explorer_laser_wielded"
icon_living = "scg_explorer_laser_wielded"

ranged = TRUE
ranged_attack_cooldown = DEFAULT_ATTACK_COOLDOWN
projectiletype = /obj/item/projectile/beam/midlaser
projectile_dispersion = 0.5

needs_reload = TRUE
reload_max = 10
reload_time = 2 SECONDS
reload_sound = 'sound/weapons/guns/selector.ogg'

loot_list = list(
/obj/item/gun/energy/laser = 1,
/obj/item/material/hatchet/machete = 1,
)

/// Icon state when discarding the rifle
var/icon_discard = "scg_explorer_laser"
/// Icon state for "melee stance"
var/icon_melee = "scg_explorer_sword"

/mob/living/simple_animal/hostile/scg_explorer/armed/try_reload()
visible_message(SPAN_WARNING("[src] reaches for their backpack!"))
icon_state = icon_discard
. = ..()
if(!.)
return
ranged = FALSE
projectiletype = null
natural_weapon = /obj/item/material/hatchet/machete/unbreakable

visible_message(SPAN_WARNING("\The [src] discards their rifle and pulls out a machette!"))
icon_state = icon_melee
icon_living = icon_melee

// Epic combat
/mob/living/simple_animal/hostile/scg_explorer/armed/hit_with_weapon(obj/item/O, mob/living/user, effective_force, hit_zone)
if(O.force && !prob(user.get_skill_value(SKILL_COMBAT) * 15))
visible_message(SPAN_DANGER("\The [src] parries [user]'s attack!"))
attack_target(user)
return
return ..()

/mob/living/simple_animal/hostile/scg_explorer/armed/attack_hand(mob/living/carbon/human/user)
if(prob(80) && icon_state == icon_melee)
visible_message(SPAN_DANGER("\The [src] parries [user]'s attack!"))
attack_target(user)
return
return ..()

/mob/living/simple_animal/hostile/scg_explorer/armed/DisarmEffect(mob/living/carbon/human/user)
if(icon_state != initial(icon_state))
return
if(user.get_skill_value(SKILL_COMBAT) < SKILL_EXPERIENCED || prob(50))
return
reload_count = reload_max
visible_message(SPAN_WARNING("\The [src] fumbles with their rifle!"))
5 changes: 4 additions & 1 deletion code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
var/attack_sound = null // Sound to play when I attack
var/attack_armor_pen = 0 // How much armor pen this attack has.

var/melee_attack_delay = 2 // If set, the mob will do a windup animation and can miss if the target moves out of the way.
// If set, the mob will do a windup animation and can miss if the target moves out of the way.
var/melee_attack_delay = null
var/ranged_attack_delay = null
var/special_attack_delay = null

Expand Down Expand Up @@ -366,6 +367,8 @@
if(. & MOVEMENT_HANDLED)
if(movement_shake_radius)
for(var/mob/living/L in range(movement_shake_radius, src))
if(L == src)
continue
shake_camera(L, 1, 1)
if(turn_sound && dir != old_dir)
playsound(src, turn_sound, 50, 1)
Expand Down
8 changes: 5 additions & 3 deletions code/modules/organs/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@
return bled
#undef BLOOD_SPRAY_DISTANCE

/mob/living/carbon/human/proc/remove_blood(var/amt)
/mob/living/carbon/human/proc/remove_blood(amt)
if(!vessel)
return FALSE
if(!should_have_organ(BP_HEART)) //TODO: Make drips come from the reagents instead.
return 0
return FALSE
if(!amt)
return 0
return FALSE

amt *= ((src.mob_size/MOB_MEDIUM) ** 0.5)

Expand Down
Binary file modified icons/mob/simple_animal/abominable_infestation/48x48.dmi
Binary file not shown.
Binary file modified icons/mob/simple_animal/human_enemies.dmi
Binary file not shown.
Loading

0 comments on commit 645f10f

Please sign in to comment.