mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
@@ -251,14 +251,14 @@ var/list/ai_list = list()
|
||||
src.view_core()
|
||||
|
||||
/mob/living/silicon/ai/verb/toggle_anchor()
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Floor Bolts"
|
||||
if(!isturf(loc)) // if their location isn't a turf
|
||||
return // stop
|
||||
anchored = !anchored // Toggles the anchor
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Floor Bolts"
|
||||
if(!isturf(loc)) // if their location isn't a turf
|
||||
return // stop
|
||||
anchored = !anchored // Toggles the anchor
|
||||
|
||||
src << "[anchored ? "<b>You are now anchored.</b>" : "<b>You are now unanchored.</b>"]"
|
||||
// the message in the [] will change depending whether or not the AI is anchored
|
||||
src << "[anchored ? "<b>You are now anchored.</b>" : "<b>You are now unanchored.</b>"]"
|
||||
// the message in the [] will change depending whether or not the AI is anchored
|
||||
|
||||
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
|
||||
return 0
|
||||
|
||||
@@ -276,29 +276,29 @@
|
||||
usr << browse(list, "window=laws")
|
||||
|
||||
/mob/living/silicon/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(!(tmob.status_flags & CANPUSH))
|
||||
now_pushing = 0
|
||||
return
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!istype(AM, /atom/movable))
|
||||
return
|
||||
if (!now_pushing)
|
||||
now_pushing = 1
|
||||
if (!AM.anchored)
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(!(tmob.status_flags & CANPUSH))
|
||||
now_pushing = 0
|
||||
return
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!istype(AM, /atom/movable))
|
||||
return
|
||||
if (!now_pushing)
|
||||
now_pushing = 1
|
||||
if (!AM.anchored)
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
|
||||
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
|
||||
return 0
|
||||
|
||||
+22
-22
@@ -645,28 +645,28 @@ var/list/slot_equipment_priority = list( \
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
//Robots and brains have their own version so don't worry about them
|
||||
/mob/proc/update_canmove()
|
||||
var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH)
|
||||
var/bed = !(buckled && istype(buckled, /obj/structure/stool/bed/chair))
|
||||
if(ko || resting || stunned)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
if(buckled)
|
||||
lying = 90 * bed
|
||||
anchored = buckled
|
||||
else
|
||||
if((ko || resting) && !lying)
|
||||
fall(ko)
|
||||
canmove = !(ko || resting || stunned || buckled)
|
||||
density = !lying
|
||||
update_transform()
|
||||
lying_prev = lying
|
||||
if(update_icon) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
return canmove
|
||||
var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH)
|
||||
var/bed = !(buckled && istype(buckled, /obj/structure/stool/bed/chair))
|
||||
if(ko || resting || stunned)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
if(buckled)
|
||||
lying = 90 * bed
|
||||
anchored = buckled
|
||||
else
|
||||
if((ko || resting) && !lying)
|
||||
fall(ko)
|
||||
canmove = !(ko || resting || stunned || buckled)
|
||||
density = !lying
|
||||
update_transform()
|
||||
lying_prev = lying
|
||||
if(update_icon) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
return canmove
|
||||
|
||||
/mob/proc/fall(var/forced)
|
||||
drop_l_hand()
|
||||
|
||||
Reference in New Issue
Block a user