mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Ports table item autoalign from Bay (#6946)
Made it so items get their pixel x/y reset on pickup.
Thrown items now also get their pixel placement slightly randomized.
Tweaked the center of mass on a boatload of items to be more accurate to their sprite art.
Replaced a bunch of randomized pixel placement code into a unifying proc; randpixel_xy() that uses an item's randpixel var.
This commit is contained in:
@@ -5,6 +5,8 @@ var/list/holder_mob_icon_cache = list()
|
||||
name = "holder"
|
||||
desc = "You shouldn't ever see this."
|
||||
icon = 'icons/mob/npc/held_mobs.dmi'
|
||||
randpixel = 0
|
||||
center_of_mass = null
|
||||
slot_flags = 0
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
|
||||
origin_tech = null
|
||||
|
||||
@@ -164,7 +164,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)
|
||||
if(!target)
|
||||
target = loc
|
||||
@@ -252,10 +252,10 @@ var/list/slot_equipment_priority = list( \
|
||||
return slot
|
||||
|
||||
//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
|
||||
|
||||
|
||||
@@ -375,6 +375,9 @@ var/list/slot_equipment_priority = list( \
|
||||
step(src, inertia_dir)
|
||||
*/
|
||||
|
||||
if(istype(item,/obj/item))
|
||||
var/obj/item/W = item
|
||||
W.randpixel_xy()
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed, src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user