Merge pull request #6710 from Cerebulon/precisionplacement

Ports precision placement of items
This commit is contained in:
Atermonera
2020-02-21 23:34:56 -08:00
committed by GitHub
43 changed files with 187 additions and 57 deletions
+2
View File
@@ -5,6 +5,8 @@ var/list/holder_mob_icon_cache = list()
name = "holder"
desc = "You shouldn't ever see this."
icon = 'icons/obj/objects.dmi'
randpixel = 0
center_of_mass = null
slot_flags = SLOT_HEAD | SLOT_HOLSTER
show_messages = 1
+3 -3
View File
@@ -133,7 +133,7 @@ var/list/slot_equipment_priority = list( \
// Removes an item from inventory and places it in the target atom.
// If canremove or other conditions need to be checked then use unEquip instead.
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target = null)
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target)
if(W)
remove_from_mob(W, target)
if(!(W && W.loc))
@@ -187,10 +187,10 @@ var/list/slot_equipment_priority = list( \
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
/mob/proc/unEquip(obj/item/I, force = 0, var/atom/target) //Force overrides NODROP for things like wizarditis and admin undress.
if(!(force || canUnEquip(I)))
return
drop_from_inventory(I)
drop_from_inventory(I, target)
return 1
+4 -1
View File
@@ -733,7 +733,7 @@ default behaviour is:
to_chat(usr, "[src] does not have any stored infomation!")
else
to_chat(usr, "OOC Metadata is not supported by this server!")
return
/mob/living/Move(a, b, flag)
@@ -1246,6 +1246,9 @@ default behaviour is:
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)
if(istype(item,/obj/item))
var/obj/item/W = item
W.randpixel_xy()
/*
if(istype(src.loc, /turf/space) || (src.flags & NOGRAV)) //they're in space, move em one space in the opposite direction