Skip to content

Commit

Permalink
Some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Aug 1, 2023
1 parent b43fa8d commit bfb88b7
Show file tree
Hide file tree
Showing 8 changed files with 586 additions and 184 deletions.
1 change: 0 additions & 1 deletion code/modules/ai/aI_holder_subtypes/simple_mob_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,4 @@
holder.face_atom(A)

/datum/ai_holder/simple_animal/humanoid/hostile/violent
conserve_ammo = FALSE
mauling = TRUE
4 changes: 3 additions & 1 deletion code/modules/ai/ai_holder_communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
set_stance(STANCE_APPROACH)
if (holder.say_list)
holder.ISay(pick(holder.say_list.say_escalate))
PlayMobSound(holder.say_list.speak_sounds)
else
return // Wait a bit.

Expand Down Expand Up @@ -125,7 +126,7 @@
// Simply plays a sound chosen out of a list
/datum/ai_holder/proc/PlayMobSound(list/potential_sounds)
if(LAZYLEN(potential_sounds))
var/result = pickweight(holder.say_list.emote_see_sounds)
var/result = pickweight(potential_sounds)
if(result != null)
playsound(holder, result, 50, 1)

Expand All @@ -145,3 +146,4 @@
if (speak_to)
holder.face_atom(speak_to)
holder.ISay(message)
PlayMobSound(holder.say_list.speak_sounds)
2 changes: 2 additions & 0 deletions code/modules/ai/interfaces.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
return can_special_attack(A) && should_special_attack(A) // Just because we can doesn't mean we should.

/mob/living/proc/ISay(message)
// To handle some dynamic values
message = replacetext(message, "%AREA", get_area(src))
return say(message)

/mob/living/proc/IIsAlly(mob/living/L)
Expand Down
23 changes: 23 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/riot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,33 @@
faction = "riot_officer"
status_flags = CANPUSH

say_list_type = /datum/say_list/riot_officer
ai_holder_type = /datum/ai_holder/simple_animal/humanoid/hostile/violent

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

/datum/say_list/riot_officer
speak = list(
"This place stinks!",
"This place stin- oh it's just my helmet...",
"Radio? Good. Anyone hears me?",
"Wonder how's it going back home...",
"Wish we had better gear.",
"10-101?")
emote_see = list("sniffs", "coughs", "taps his foot", "looks around")

say_understood = list("10-4.", "Affirmative!", "Got it.")
say_cannot = list("10-74.", "Negative.")
say_maybe_target = list("10-33, infiltration in progress.", "Search the area! Someone's here...")
say_got_target = list("Engaging!", "Attacking hostiles.", "Enaging in combat.")
say_threaten = list("Get the hell out of here.", "None of your business, move it.", "Not asking twice. Leave.")
say_stand_down = list("Great.")
say_escalate = list("You had your chance!", "That's it!")

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/riot_officer/death()
. = ..()
check_delete()
Expand Down
Loading

0 comments on commit bfb88b7

Please sign in to comment.