Skip to content

Commit

Permalink
Merge pull request #144 from Very-Soft/roguestarmobs
Browse files Browse the repository at this point in the history
Map swap and stuff
  • Loading branch information
Very-Soft authored Feb 19, 2024
2 parents 001b222 + 858f18d commit 0a9eb44
Show file tree
Hide file tree
Showing 45 changed files with 645 additions and 45 deletions.
10 changes: 10 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), audible = FALSE)
else if(blind_message)
M.show_message(blind_message, AUDIBLE_MESSAGE)
if(isliving(M))
var/mob/living/L = M
if(L.ai_holder)
var/datum/ai_holder/AI = L.ai_holder
AI.on_hear_emote(src, message)

// Show a message to all mobs and objects in earshot of this atom
// Use for objects performing audible actions
Expand All @@ -570,6 +575,11 @@
M.show_message(msg, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
if(runemessage != -1)
M.create_chat_message(src, "[runemessage || message]", FALSE, list("emote"))
if(isliving(M))
var/mob/living/L = M
if(L.ai_holder)
var/datum/ai_holder/AI = L.ai_holder
AI.on_hear_emote(src, message)

/atom/movable/proc/dropInto(var/atom/destination)
while(istype(destination))
Expand Down
7 changes: 4 additions & 3 deletions code/game/objects/effects/wire_deleter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
unacidable = TRUE
simulated = FALSE
invisibility = 100
var/wire_deletion_rate = 33

/obj/effect/wire_deleter/Initialize(mapload)
. = ..()

for(var/c in loc.contents)
if(istype(c, /obj/structure/cable))
if(prob(33))
if(prob(wire_deletion_rate))
qdel(c)
qdel(src)
qdel(src)
11 changes: 9 additions & 2 deletions code/modules/ai/ai_holder_communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,16 @@
/datum/ai_holder/proc/on_hear_say(mob/living/speaker, message)
return

/datum/ai_holder/proc/on_hear_emote(mob/living/speaker, message)
return

// This is to make responses feel a bit more natural and not instant.
/datum/ai_holder/proc/delayed_say(var/message, var/mob/speak_to)
spawn(rand(1 SECOND, 2 SECONDS))
/datum/ai_holder/proc/delayed_say(var/message, var/mob/speak_to, min, max)
if(!min)
min = 1
if(!max)
max = 2
spawn(rand(min SECOND, max SECONDS))
if(!src || !holder || !can_act()) // We might've died/got deleted/etc in the meantime.
return

Expand Down
4 changes: 4 additions & 0 deletions code/modules/ai/ai_holder_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
var/destructive = FALSE // Will target 'neutral' structures/objects and not just 'hostile' ones.

var/forgive_resting = TRUE //VOREStation add - If TRUE on a RETALIATE mob, then mob will drop target if it becomes hostile to you but hasn't taken damage
var/grab_hostile = TRUE

// A lot of this is based off of /TG/'s AI code.

Expand Down Expand Up @@ -272,6 +273,9 @@
if(!belly_attack)
if(isbelly(holder.loc))
return FALSE
if(!grab_hostile && holder.health == holder.maxHealth)
ai_log("react_to_attack() : Was attacked by [attacker], but they did no damage and the AI has grab_hostile set to false.", AI_LOG_TRACE)
return FALSE
if(holder.IIsAlly(attacker)) // I'll overlook it THIS time...
ai_log("react_to_attack() : Was attacked by [attacker], but they were an ally.", AI_LOG_TRACE)
return FALSE
Expand Down
29 changes: 29 additions & 0 deletions code/modules/emotes/definitions/audible_emotes_RS.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/decl/emote/audible/yip
key = "yip"
emote_message_1p = "You yip! Yip!"
emote_message_3p = "yips!"

emote_message_impaired = "makes a sound but you can't hear it."

emote_message_1p_target = "You yip at TARGET! Yip!!!"
emote_message_3p_target = "yips at TARGET!"

emote_sound = null
var/list/soundlist = list('sound/rogue-star/yip/yip1.ogg', 'sound/rogue-star/yip/yip2.ogg', 'sound/rogue-star/yip/yip3.ogg', 'sound/rogue-star/yip/yip4.ogg', 'sound/rogue-star/yip/yip5.ogg', 'sound/rogue-star/yip/yip6.ogg', 'sound/rogue-star/yip/yip7.ogg', 'sound/rogue-star/yip/yip8.ogg', 'sound/rogue-star/yip/yip9.ogg', 'sound/rogue-star/yip/yip10.ogg', 'sound/rogue-star/yip/yip11.ogg', 'sound/rogue-star/yip/yip12.ogg', 'sound/rogue-star/yip/yip13.ogg', 'sound/rogue-star/yip/yip14.ogg', 'sound/rogue-star/yip/yip15.ogg')
sound_vary = TRUE

/decl/emote/audible/yip/get_emote_sound(var/mob/living/user)
emote_sound = pick(soundlist)

. = ..()

/decl/emote/audible/yip/yap
key = "yap"
emote_message_1p = "You yap! Yap yap!"
emote_message_3p = "yaps!"

emote_message_impaired = "makes a sound but you can't hear it."

emote_message_1p_target = "You yap at TARGET! Yap yap!!!"
emote_message_3p_target = "yaps at TARGET!"
soundlist = list('sound/rogue-star/yap/yap1.ogg', 'sound/rogue-star/yap/yap2.ogg', 'sound/rogue-star/yap/yap4.ogg', 'sound/rogue-star/yap/yap5.ogg', 'sound/rogue-star/yap/yap6.ogg', 'sound/rogue-star/yap/yap7.ogg', 'sound/rogue-star/yap/yap8.ogg', 'sound/rogue-star/yap/yap9.ogg', 'sound/rogue-star/yap/yap10.ogg', 'sound/rogue-star/yap/yap11.ogg', 'sound/rogue-star/yap/yap12.ogg', 'sound/rogue-star/yap/yap13.ogg', 'sound/rogue-star/yap/yap14.ogg')
5 changes: 5 additions & 0 deletions code/modules/emotes/emote_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@
message = "<span class='emote'><B>[src]</B> ([ghost_follow_link(src, M)]) [input]</span>"
M.show_message(message, m_type)
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
if(isliving(M))
var/mob/living/L = M
if(L.ai_holder)
var/datum/ai_holder/AI = L.ai_holder
AI.on_hear_emote(src, message)

for(var/obj/O as anything in o_viewers)
spawn(0)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/ghost_simplemob_spawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GLOBAL_LIST_INIT(ghost_spawnable_mobs,list(
"Deathclaw" = /mob/living/simple_mob/vore/aggressive/deathclaw,
"Deer" = /mob/living/simple_mob/vore/deer,
"Defanged Xenomorph" = /mob/living/simple_mob/vore/xeno_defanged,
"Doglin" = /mob/living/simple_mob/vore/doglin/basic,
"Dragon" = /mob/living/simple_mob/vore/aggressive/dragon,
"Dragon - V3b" = /mob/living/simple_mob/vore/aggressive/dragon/virgo3b,
"Dragon - Giant" = /mob/living/simple_mob/vore/bigdragon/friendly/maintpred,
Expand Down
10 changes: 7 additions & 3 deletions code/modules/mob/living/carbon/human/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ var/list/_human_default_emotes = list(
/decl/emote/audible/lwarble,
/decl/emote/audible/croak_skrell,
/decl/emote/audible/roarbark,
/decl/emote/audible/dook

/decl/emote/audible/dook,
//VOREStation Add End
//RS ADD START
/decl/emote/audible/yip,
/decl/emote/audible/yip/yap
)

//VOREStation Add Start
Expand Down Expand Up @@ -315,7 +317,9 @@ var/list/_simple_mob_default_emotes = list(
/decl/emote/audible/vox_shriek,
/decl/emote/audible/purr,
/decl/emote/audible/purrlong,
/decl/emote/audible/dook
/decl/emote/audible/dook,
/decl/emote/audible/yip,
/decl/emote/audible/yip/yap

)
//VOREStation Add End
Expand Down
Loading

0 comments on commit 0a9eb44

Please sign in to comment.