mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 11:31:51 +00:00
mice can crawl through vents and hide under objects
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -188,7 +188,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
//the mouse ai will deactivate itself
|
||||
client.mob = target_mouse
|
||||
target_mouse.original_name = src.original_name
|
||||
target_mouse.voice_name = src.real_name
|
||||
|
||||
//reset admin verbs
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
|
||||
@@ -56,3 +56,91 @@
|
||||
|
||||
/proc/ismouse(var/obj/O)
|
||||
return istype(O,/mob/living/simple_animal/mouse)
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one also
|
||||
/mob/living/simple_animal/mouse/verb/ventcrawl()
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Mouse"
|
||||
|
||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
||||
// return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/welded = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
break
|
||||
else
|
||||
welded = 1
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "\blue You need to remain still while entering a vent."
|
||||
else
|
||||
src << "\blue This vent is not connected to anything."
|
||||
else if(welded)
|
||||
src << "\red That vent is welded."
|
||||
else
|
||||
src << "\blue You must be standing on or beside an air vent to enter it."
|
||||
return
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one alsoghost
|
||||
/mob/living/simple_animal/mouse/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Mouse"
|
||||
|
||||
if (layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
src << text("\blue You are now hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("<B>[] scurries to the ground!</B>", src)
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
src << text("\blue You have stopped hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("[] slowly peaks up from the ground...", src)
|
||||
|
||||
//make mice fit under tables etc? this was hacky, and not working
|
||||
/*
|
||||
/mob/living/simple_animal/mouse/Move(var/dir)
|
||||
|
||||
var/turf/target_turf = get_step(src,dir)
|
||||
//CanReachThrough(src.loc, target_turf, src)
|
||||
var/can_fit_under = 0
|
||||
if(target_turf.ZCanPass(get_turf(src),1))
|
||||
can_fit_under = 1
|
||||
|
||||
..(dir)
|
||||
if(can_fit_under)
|
||||
src.loc = target_turf
|
||||
for(var/d in cardinal)
|
||||
var/turf/O = get_step(T,d)
|
||||
//Simple pass check.
|
||||
if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles)
|
||||
open += O
|
||||
*/
|
||||
Reference in New Issue
Block a user