mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +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:
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/coins.dmi'
|
||||
name = "Coin"
|
||||
icon_state = "coin"
|
||||
randpixel = 8
|
||||
desc = "A flat disc or piece of metal with an official stamp. An archaic type of currency."
|
||||
flags = CONDUCT
|
||||
force = 0.0
|
||||
@@ -16,8 +17,7 @@
|
||||
drop_sound = 'sound/items/drop/ring.ogg'
|
||||
|
||||
/obj/item/weapon/coin/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
randpixel_xy()
|
||||
|
||||
/obj/item/weapon/coin/gold
|
||||
name = "gold coin"
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
return unwield()
|
||||
|
||||
/obj/item/weapon/pickaxe/pickup(mob/user)
|
||||
..()
|
||||
unwield()
|
||||
|
||||
/obj/item/weapon/pickaxe/attack_self(mob/user as mob)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore1"
|
||||
randpixel = 8
|
||||
w_class = 2
|
||||
throwforce = 10
|
||||
var/datum/geosample/geologic_data
|
||||
@@ -85,9 +86,7 @@
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
if(icon_state == "ore1")
|
||||
if((randpixel_xy()) && icon_state == "ore1")
|
||||
icon_state = "ore[pick(1,2,3)]"
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user