Skip to content

Commit

Permalink
[MIRROR] moved item/New behavior into Initialize (#2862)
Browse files Browse the repository at this point in the history
Co-authored-by: Spookerton <[email protected]>
Co-authored-by: Lexanx <[email protected]>
  • Loading branch information
3 people authored Nov 24, 2024
1 parent a7a760a commit 274dd7b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,11 @@
var/attack_ignore_harm_check = FALSE


/obj/item/New()
..()
if(randpixel && (!pixel_x && !pixel_y) && isturf(loc)) //hopefully this will prevent us from messing with mapper-set pixel_x/y
pixel_x = rand(-randpixel, randpixel)
pixel_y = rand(-randpixel, randpixel)

/obj/item/Initialize()
. = ..()
if(randpixel && (!pixel_x && !pixel_y) && isturf(loc))
pixel_x = rand(-randpixel, randpixel)
pixel_y = rand(-randpixel, randpixel)
if(islist(armor))
for(var/type in armor)
if(armor[type]) // Don't set it if it gives no armor anyway, which is many items.
Expand Down

0 comments on commit 274dd7b

Please sign in to comment.