mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 02:54:44 +01:00
Check Adjacence + expanding the restraint/Stat check
This commit is contained in:
@@ -39,38 +39,38 @@
|
||||
show_to(M)
|
||||
return
|
||||
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
if(Adjacent(M))
|
||||
if( istype(over_object, /obj/item/weapon/storage) ) //Check if storage item
|
||||
var/obj/item/weapon/storage/S = over_object
|
||||
orient2hud(M)
|
||||
if(M.s_active)
|
||||
M.s_active.close(M)
|
||||
if(!( M.restrained() ) && !( M.stat )) // I'M PRETTY SURE THIS IS ALREADY HANDLED SOMEWHERE ELSE
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
if(Adjacent(M) && over_object.Adjacent(M))
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
if( istype(over_object, /obj/item/weapon/storage) ) //Check if storage item
|
||||
var/obj/item/weapon/storage/S = over_object
|
||||
orient2hud(M)
|
||||
if(M.s_active) //refresh the HUD
|
||||
M.s_active.close(M)
|
||||
show_to(M)
|
||||
for(var/obj/item/I in src)
|
||||
if(S.can_be_inserted(I,0,M))
|
||||
remove_from_storage(I, S)
|
||||
return
|
||||
|
||||
if( istype(over_object, /obj/machinery/disposal) ) //Check if it's a bin
|
||||
for(var/obj/item/I in src)
|
||||
remove_from_storage(I, over_object) //No check needed, put everything inside
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(over_object) //Get_turf, and check if the turf isn't a wall
|
||||
if( istype(T, /turf/simulated/wall) )
|
||||
return
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
if(S.can_be_inserted(I,0,M))
|
||||
remove_from_storage(I, S)
|
||||
remove_from_storage(I, T)
|
||||
return
|
||||
|
||||
if( istype(over_object, /obj/machinery/disposal) ) //Check if it's a bin
|
||||
for(var/obj/item/I in src)
|
||||
remove_from_storage(I, over_object) //No check needed, put everything inside
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(over_object) //Get_turf, and check if the turf isn't a wall
|
||||
if( istype(T, /turf/simulated/wall) )
|
||||
return
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
remove_from_storage(I, T)
|
||||
if(!(loc == usr) || (loc && loc.loc == usr))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
if(!(loc == usr) || (loc && loc.loc == usr))
|
||||
return
|
||||
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
if(!( M.restrained() ) && !( M.stat ))
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(!M.unEquip(src))
|
||||
@@ -82,8 +82,6 @@
|
||||
M.put_in_l_hand(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/proc/return_inv()
|
||||
var/list/L = list()
|
||||
L += contents
|
||||
|
||||
Reference in New Issue
Block a user