Merge pull request #7735 from Citinited/miscellaneous-fixes

In which I fix a bunch of issues and tweak some other things
This commit is contained in:
tigercat2000
2017-10-15 19:40:46 -07:00
committed by GitHub
8 changed files with 45 additions and 23 deletions
@@ -149,7 +149,10 @@ var/const/MAX_ACTIVE_TIME = 400
M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
else if(iscorgi(M))
var/mob/living/simple_animal/pet/corgi/C = M
loc = C
if(C.facehugger)
var/obj/item/F = C.facehugger
F.forceMove(C.loc)
forceMove(C)
C.facehugger = src
C.regenerate_icons()
@@ -161,7 +164,7 @@ var/const/MAX_ACTIVE_TIME = 400
return 1
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
if(!target || target.stat == DEAD) //was taken off or something
if(!target || target.stat == DEAD || loc != target) //was taken off or something
return
if(iscarbon(target))
@@ -60,7 +60,8 @@
if(can_collar)
dat += "<tr><td>&nbsp;</td></tr>"
dat += "<tr><td><B>Collar:</B></td><td><A href='?src=[UID()];item=[slot_collar]'>[(collar && !(collar.flags&ABSTRACT)) ? collar : "<font color=grey>Empty</font>"]</A></td></tr>"
if(facehugger)
dat += "<tr><td><B>Facehugger:</B></td><td><A href='?src=[UID()];remove_hugger=1'>[facehugger]</A></td></tr>"
dat += {"</table>
<A href='?src=[user.UID()];mach_close=mob\ref[src]'>Close</A>
"}
@@ -103,11 +104,10 @@
/mob/living/simple_animal/pet/corgi/Topic(href, href_list)
if(usr.stat) return
if((!ishuman(usr) && !isrobot(usr)) || !Adjacent(usr))
return
//Removing from inventory
if(href_list["remove_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("head")
@@ -143,14 +143,9 @@
else
to_chat(usr, "<span class='danger'>There is nothing to remove from its [remove_from].</span>")
return
show_inv(usr)
//Adding things to inventory
else if(href_list["add_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
switch(add_to)
@@ -201,7 +196,16 @@
item_to_add.loc = src
src.inventory_back = item_to_add
regenerate_icons()
show_inv(usr)
//Removing facehuggers
else if(href_list["remove_hugger"])
if(!facehugger)
return
var/obj/item/F = facehugger
F.forceMove(loc)
facehugger = null
to_chat(usr, "<span class='notice'>You remove [F] from [src]'s face. [src] pants for air and barks.</span>")
regenerate_icons()
show_inv(usr)
else
..()
+2 -2
View File
@@ -16,13 +16,13 @@
// Stationary ports shouldn't move, mobile ones move themselves
return 0
/obj/machinery/door/onShuttleMove()
/obj/machinery/door/airlock/onShuttleMove()
. = ..()
if(!.)
return
addtimer(src, "close", 0, TRUE, 0, 1)
// Close any nearby airlocks as well
for(var/obj/machinery/door/D in orange(1, src))
for(var/obj/machinery/door/airlock/D in orange(1, src))
addtimer(D, "close", 0, TRUE, 0, 1)
/obj/machinery/door/airlock/onShuttleMove()