Tweak: Removes position randomization for some things (#22820)

* Tweak: Removes position randomization for some things

* Randomize when create in machines

* Review changes
This commit is contained in:
Aylong
2023-10-13 16:26:27 +03:00
committed by GitHub
parent d440cfbdeb
commit 58e88eeec3
16 changed files with 13 additions and 45 deletions
+2
View File
@@ -408,6 +408,8 @@
var/obj/item/new_item = new D.build_path(BuildTurf)
new_item.materials[MAT_METAL] /= coeff
new_item.materials[MAT_GLASS] /= coeff
new_item.pixel_y = rand(-5, 5)
new_item.pixel_x = rand(-5, 5)
SStgui.update_uis(src)
desc = initial(desc)
+2
View File
@@ -846,6 +846,8 @@
if(put_on_turf)
var/turf/T = get_turf(src)
vended.forceMove(T)
vended.pixel_x = rand(-5, 5)
vended.pixel_y = rand(-5, 5)
return TRUE
return FALSE
-5
View File
@@ -5,11 +5,6 @@
var/icon_full = ""
var/material = /obj/item/stack/sheet/metal
/obj/item/ashtray/Initialize(mapload)
. = ..()
pixel_y = rand(-5, 5)
pixel_x = rand(-6, 6)
/obj/item/ashtray/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/cigbutt) || istype(I, /obj/item/clothing/mask/cigarette) || istype(I, /obj/item/match))
if(contents.len >= max_butts)
@@ -79,11 +79,6 @@
toolspeed = 1
usesound = 'sound/items/deconstruct.ogg'
/obj/item/stock_parts/New()
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
//Rank 1
/obj/item/stock_parts/capacitor
@@ -17,8 +17,6 @@
/obj/item/reagent_containers/food/drinks/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
bitesize = amount_per_transfer_from_this
if(bitesize < 5)
bitesize = 5
@@ -27,8 +27,6 @@
/obj/item/reagent_containers/food/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5) //Randomizes postion
pixel_y = rand(-5, 5)
if(antable)
START_PROCESSING(SSobj, src)
ant_location = get_turf(src)
@@ -288,6 +288,8 @@
/obj/machinery/kitchen_machine/proc/dispose(mob/user)
for(var/obj/O in contents)
O.forceMove(loc)
O.pixel_y = rand(-5, 5)
O.pixel_x = rand(-5, 5)
if(reagents.total_volume)
dirty++
reagents.clear_reagents()
@@ -341,6 +343,8 @@
var/reagents_per_serving = temp_reagents.total_volume / portions
for(var/i in 1 to portions) // Extra servings when upgraded, ingredient reagents split equally
var/obj/cooked = new recipe.result(loc)
cooked.pixel_y = rand(-5, 5)
cooked.pixel_x = rand(-5, 5)
temp_reagents.trans_to(cooked, reagents_per_serving, no_react = TRUE) // Don't react with the abstract holder please
temp_reagents.clear_reagents()
@@ -5,9 +5,3 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "honey_frame"
var/honeycomb_capacity = 10 //10 Honeycomb per frame by default, researchable frames perhaps?
/obj/item/honey_frame/New()
. = ..()
pixel_x = rand(8,-8)
pixel_y = rand(8,-8)
-2
View File
@@ -385,8 +385,6 @@
/obj/item/disk/plantgene/New()
..()
update_icon(UPDATE_OVERLAYS)
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/disk/plantgene/Destroy()
QDEL_NULL(gene)
@@ -242,8 +242,6 @@
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize(mapload)
. = ..()
add_lid()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/reagent_containers/glass/bottle/nutrient/on_reagent_change()
. = ..()
-3
View File
@@ -349,9 +349,6 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/coin/New()
..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
icon_state = "coin_[cmineral]_[sideslist[1]]"
if(cmineral && name_by_cmineral)
name = "[cmineral] coin"
-3
View File
@@ -50,9 +50,6 @@
/obj/item/paper/New()
..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
spawn(2)
update_icon()
updateinfolinks()
+2
View File
@@ -85,6 +85,8 @@
P.loc = user.loc
user.put_in_hands(P)
P.add_fingerprint(user)
P.pixel_x = rand(-9, 9) // Random position
P.pixel_y = rand(-8, 8)
to_chat(user, "<span class='notice'>You take [P] out of [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is empty!</span>")
-4
View File
@@ -36,8 +36,6 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
/obj/item/stack/cable_coil/Initialize(mapload)
. = ..()
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_icon()
recipes = GLOB.cable_coil_recipes
update_wclass()
@@ -381,8 +379,6 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
/obj/item/stack/cable_coil/cut/Initialize(mapload)
. = ..()
src.amount = rand(1,2)
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
update_wclass()
+2
View File
@@ -462,6 +462,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
SSblackbox.record_feedback("nested tally", "RND Production List", amount, list("[being_built.category]", "[being_built.name]"))
for(var/i in 1 to amount)
var/obj/item/new_item = new being_built.build_path(src)
new_item.pixel_x = rand(-5, 5)
new_item.pixel_y = rand(-5, 5)
if(istype(new_item, /obj/item/storage/backpack/holding))
new_item.investigate_log("built by [key]","singulo")
if(!istype(new_item, /obj/item/stack/sheet)) // To avoid materials dupe glitches
+1 -11
View File
@@ -54,7 +54,7 @@ research holder datum.
var/list/possible_designs = list() //List of all designs
var/list/known_designs = list() //List of available designs
/// List of designs that have been blacklisted by the server controller
var/list/blacklisted_designs = list()
var/list/blacklisted_designs = list()
/// Used during the rnd sync system, to ensure that blacklists are reverted, then cleared.
var/list/unblacklisted_designs = list()
@@ -390,11 +390,6 @@ datum/tech/robotics
var/default_name = "\improper Technology Disk"
var/default_desc = "A disk for storing technology data for further research."
/obj/item/disk/tech_disk/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/disk/tech_disk/proc/load_tech(datum/tech/T)
name = "[default_name] \[[T]\]"
desc = T.desc + "\n <span class='notice'>Level: [T.level]</span>"
@@ -418,11 +413,6 @@ datum/tech/robotics
var/default_name = "\improper Component Design Disk"
var/default_desc = "A disk for storing device design data for construction in lathes."
/obj/item/disk/design_disk/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/disk/design_disk/proc/load_blueprint(datum/design/D)
name = "[default_name] \[[D]\]"
desc = D.desc