mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge pull request #1570 from caelaislinn/master
various simple_animal tweaks, fixes and improvements
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
atkcarbon = 1
|
||||
atksilicon = 0
|
||||
attacktext = "bites"
|
||||
layer = 2.1 //so they can hide under objects
|
||||
layer = 2.5 //so they can hide under objects
|
||||
|
||||
Bump(var/mob/M)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
see_invisible = 15
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
verbs += /mob/dead/observer/proc/become_mouse
|
||||
taj_talk_understand = 1
|
||||
|
||||
if(body)
|
||||
@@ -76,6 +77,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
verbs -= /mob/proc/ghost
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
if(issimpleanimal(src))
|
||||
ghost.name = ghost.name + " ([src.real_name])"
|
||||
ghost.real_name = ghost.real_name + " ([src.real_name])"
|
||||
return
|
||||
|
||||
/mob/proc/adminghostize()
|
||||
@@ -156,16 +160,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
/mob/dead/observer/proc/become_mouse()
|
||||
set category = "Ghost"
|
||||
set name = "Become mouse"
|
||||
//locate an empty mouse
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
var/rank = client.holder.rank
|
||||
client.clear_admin_verbs()
|
||||
client.holder.state = 1
|
||||
client.update_admins(rank)
|
||||
|
||||
//locate an empty mouse
|
||||
var/list/eligible_targets = new()
|
||||
for(var/mob/living/simple_animal/mouse/M in world)
|
||||
if(!M.ckey)
|
||||
if(!M.ckey && !M.stat)
|
||||
eligible_targets.Add(M)
|
||||
|
||||
var/mob/living/simple_animal/mouse/target_mouse
|
||||
@@ -178,12 +177,27 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
target_mouse = new(pick(ticker.vermin_spawn_turfs))
|
||||
|
||||
if(target_mouse)
|
||||
//move player into mouse
|
||||
//the mouse ai will deactivate itself
|
||||
client.mob = target_mouse
|
||||
verbs += /mob/proc/ghost
|
||||
target_mouse.real_name = src.name + " (as mouse)"
|
||||
target_mouse.real_name = src.name
|
||||
|
||||
//reset admin verbs
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
var/rank = client.holder.rank
|
||||
client.clear_admin_verbs()
|
||||
client.holder.state = 1
|
||||
client.update_admins(rank)
|
||||
|
||||
//update allowed verbs
|
||||
target_mouse.verbs += /mob/proc/ghost
|
||||
target_mouse.verbs -= /client/verb/toggle_ghost_ears
|
||||
target_mouse.verbs -= /client/verb/toggle_ghost_sight
|
||||
|
||||
del(src)
|
||||
|
||||
else
|
||||
client << "\red Unable to become a mouse!"
|
||||
del(src)
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -220,9 +220,10 @@
|
||||
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
if(tmob.swap_on_mobbump)
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
now_pushing = 0
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
|
||||
if(Metroid.Victim == tmob)
|
||||
|
||||
@@ -294,3 +294,5 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
var/list/radar_blips = list() // list of screen objects, radar blips
|
||||
var/radar_open = 0 // nonzero is radar is open
|
||||
|
||||
var/swap_on_mobbump = 1 //by default, mob collisions will swap the two mobs (if allowed)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
icon_living = "mouse_gray"
|
||||
icon_dead = "mouse_gray_dead"
|
||||
speak = list("Squeek!","SQUEEK!","Squeek?")
|
||||
speak_emote = list("squeeks")
|
||||
emote_hear = list("squeeks")
|
||||
speak_emote = list("squeeks","squeeks","squiks")
|
||||
emote_hear = list("squeeks","squeaks","squiks")
|
||||
emote_see = list("runs in a circle", "shakes", "scritches at something")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
@@ -18,15 +18,19 @@
|
||||
response_harm = "splats the"
|
||||
density = 0
|
||||
var/color //brown, gray and white
|
||||
layer = 2.1 //so they can hide under objects
|
||||
layer = 2.5 //so they can hide under objects
|
||||
swap_on_mobbump = 0
|
||||
|
||||
/mob/living/simple_animal/mouse/Life()
|
||||
..()
|
||||
if(!stat && prob(speak_chance))
|
||||
for(var/mob/M in view())
|
||||
M << "\blue \icon[src] Squeek!"
|
||||
M << 'sound/effects/mousesqueek.ogg'
|
||||
|
||||
/mob/living/simple_animal/mouse/gray
|
||||
color = "gray"
|
||||
icon_state = "mouse_gray"
|
||||
|
||||
/mob/living/simple_animal/mouse/white
|
||||
color = "white"
|
||||
icon_state = "mouse_white"
|
||||
@@ -41,7 +45,7 @@
|
||||
icon_state = "mouse_[color]"
|
||||
icon_living = "mouse_[color]"
|
||||
icon_dead = "mouse_[color]_dead"
|
||||
desc = "It's a small, [color], disease-ridden rodent."
|
||||
desc = "It's a small [color] rodent, often seen hiding in maintenance areas."
|
||||
|
||||
/mob/living/simple_animal/mouse/proc/splat()
|
||||
src.health = 0
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
var/friendly = "nuzzles" //If the mob does no damage with it's attack
|
||||
var/wall_smash = 0 //if they can smash walls
|
||||
|
||||
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
|
||||
var/speed = 5
|
||||
|
||||
var/can_open_doors = 0 //door opening kind of guy
|
||||
|
||||
var/obj/item/device/radio/headset/l_ear = null
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
turns_since_move = 0
|
||||
|
||||
//Speaking
|
||||
if(prob(speak_chance))
|
||||
if(!ckey && prob(speak_chance))
|
||||
var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0)
|
||||
if(speak && speak.len && prob((speak.len / length) * 100))
|
||||
say(pick(speak))
|
||||
|
||||
@@ -29,9 +29,20 @@
|
||||
if(speak_emote && speak_emote.len)
|
||||
var/emote = pick(speak_emote)
|
||||
if(emote)
|
||||
return "[emote], \"[text]\""
|
||||
return "<b>[src]</b> [emote], \"[text]\""
|
||||
return "says, \"[text]\"";
|
||||
|
||||
//swhen talking, simple_animals can only understand each other
|
||||
/mob/living/simple_animal/say(var/message)
|
||||
for(var/mob/M in view(src,7))
|
||||
if(istype(M, src.type) || M.universal_speak)
|
||||
M << say_quote(message)
|
||||
else if(speak.len)
|
||||
M << "<b>[src]</b> [pick(speak)]"
|
||||
else
|
||||
M << "<b>[src]</b> [pick("makes some strange noises.","makes some strange noises.","makes some strange noises.","makes a small commotion.","kicks up a fuss about something.")]"
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/emote(var/act,var/m_type=1,var/message = null)
|
||||
switch(act)
|
||||
if ("scream")
|
||||
@@ -73,9 +84,9 @@
|
||||
message = "<B>[src]</B> [message]"
|
||||
if("auto")
|
||||
message = "<B>[src]</B> [message]"
|
||||
else
|
||||
/*else
|
||||
if(!message)
|
||||
src << text("Invalid Emote: []", act)
|
||||
src << "Invalid Emote: [act]"*/
|
||||
if ((message && src.stat == 0))
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
@@ -175,11 +186,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
var/tally = 0 //Incase I need to add stuff other than "speed" later
|
||||
|
||||
tally = speed
|
||||
|
||||
return tally
|
||||
return speed
|
||||
|
||||
/mob/living/simple_animal/Stat()
|
||||
..()
|
||||
@@ -191,6 +198,7 @@
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
src << "\red You have died!"
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
@@ -207,3 +215,6 @@
|
||||
|
||||
if(3.0)
|
||||
health -= 30
|
||||
|
||||
/proc/issimpleanimal(var/mob/AM)
|
||||
return istype(AM,/mob/living/simple_animal)
|
||||
|
||||
Reference in New Issue
Block a user