Moved up Bump() in silicon.dm, and tested it.

According to my tests, unachored AI and Borgs behave as normal when
bumped by a mob.

A human can swap places with a borg if both have help intent on when
moving...
But a borg can't swap places with a human if both have help intent on,
if it's the borg that's moving. Apparently it's a normal behavior,
tested it on Sibyl.

AI don't have intents so they just get pushed.

pAIs aren't affected by bump, as they seem to act like as objects when
walked over or thrown.
Decoys seems to be some old MALF module that isn't in use anymore, so I
didn't touch it.

Conflicts:
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/living/silicon/silicon.dm
This commit is contained in:
Laharl Montogmmery
2014-01-11 10:45:19 -05:00
committed by ZomgPonies
parent c9baf8b226
commit 76495953db
4 changed files with 29 additions and 304 deletions
-24
View File
@@ -274,30 +274,6 @@ var/list/ai_list = list()
/mob/living/silicon/ai/update_canmove()
return 0
/mob/living/silicon/ai/Bump(atom/movable/AM as mob|obj, yes)
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/ai/proc/ai_cancel_call()
set category = "AI Commands"
@@ -500,43 +500,6 @@
return 2
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(20))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
now_pushing = 0
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
F.move_inside()
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
return
return
/mob/living/silicon/robot/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if (stat == 2)
return 1
+29 -1
View File
@@ -173,6 +173,7 @@
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
/mob/living/silicon/Stat()
..()
@@ -191,4 +192,31 @@
dat += data_core.get_manifest(1) // make it monochrome
dat += "<br>"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
onclose(src, "airoster")
/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