From 6b1b38d4f1b398d3825de3a92893e1f989e56612 Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Fri, 10 Aug 2018 08:09:37 +0800 Subject: [PATCH 1/2] Port over tg ore stack and stack merging Meta Birbfix Maxi Re-add automatic satchel ore pickup (oops) Mecha formatting re --- .../MetaStation/MetaStation.v41A.II.dmm | 10 +- _maps/map_files/MetaStation/z4.dmm | 8 +- .../RandomRuins/SpaceRuins/onehalf.dmm | 4 +- .../map_files/RandomZLevels/moonoutpost19.dmm | 8 +- _maps/map_files/cyberiad/cyberiad.dmm | 4 +- _maps/map_files/cyberiad/z6.dmm | 14 +- code/__DEFINES/admin.dm | 4 +- code/game/gamemodes/meteor/meteors.dm | 10 +- .../gamemodes/miniantags/bot_swarm/swarmer.dm | 2 +- code/game/machinery/autolathe.dm | 15 +- code/game/machinery/constructable_frame.dm | 10 +- code/game/machinery/quantum_pad.dm | 2 +- code/game/machinery/teleporter.dm | 11 +- .../mecha/equipment/tools/mining_tools.dm | 2 +- code/game/mecha/mech_fabricator.dm | 2 +- code/game/mecha/mecha_construction_paths.dm | 23 +-- code/game/objects/items/stacks/rods.dm | 1 - .../game/objects/items/stacks/sheets/glass.dm | 2 - .../objects/items/stacks/sheets/mineral.dm | 2 +- code/game/objects/items/stacks/stack.dm | 144 ++++++++++------ .../objects/items/weapons/storage/bags.dm | 2 +- .../objects/items/weapons/storage/toolbox.dm | 8 +- .../game/turfs/simulated/floor/fancy_floor.dm | 8 +- .../mission_code/stationCollision.dm | 2 +- .../drinks/bottler/bottler_recipes.dm | 4 +- .../recipes/recipes_microwave.dm | 2 +- code/modules/mining/abandonedcrates.dm | 8 +- code/modules/mining/equipment_locker.dm | 8 +- code/modules/mining/machine_processing.dm | 4 +- code/modules/mining/machine_unloading.dm | 2 +- code/modules/mining/mine_turfs.dm | 32 ++-- code/modules/mining/minebot.dm | 22 +-- code/modules/mining/ore.dm | 162 +++++++++++------- code/modules/mining/satchel_ore_boxdm.dm | 113 +++++------- .../living/silicon/robot/drone/drone_items.dm | 2 +- .../hostile/megafauna/colossus.dm | 2 +- .../simple_animal/hostile/megafauna/dragon.dm | 2 +- .../simple_animal/hostile/mining/goldgrub.dm | 25 +-- .../simple_animal/hostile/mining_mobs.dm | 4 +- code/modules/power/cable.dm | 14 +- code/modules/power/lighting.dm | 2 +- .../projectiles/guns/energy/special.dm | 5 +- .../chemistry/recipes/slime_extracts.dm | 2 +- .../research/designs/bluespace_designs.dm | 2 +- code/modules/research/rdmachines.dm | 4 +- code/modules/spacepods/equipment.dm | 2 +- code/modules/station_goals/bsa.dm | 2 +- code/modules/telesci/bscrystal.dm | 18 +- code/modules/telesci/telepad.dm | 8 +- code/modules/telesci/telesci_computer.dm | 4 +- 50 files changed, 394 insertions(+), 359 deletions(-) diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index ee99c0fe57a..15eac42febb 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -1576,7 +1576,7 @@ "aEp" = (/obj/structure/cable/yellow{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/junction{dir = 4; icon_state = "pipe-j2"; tag = "icon-pipe-j1 (WEST)"},/turf/simulated/floor/plasteel,/area/crew_quarters/sleep) "aEq" = (/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralcorner"},/area/crew_quarters/sleep) "aEr" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/maintenance/starboard) -"aEs" = (/obj/item/ore/iron,/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) +"aEs" = (/obj/item/stack/ore/iron,/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) "aEt" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "bridge blast"; name = "Bridge Blast Doors"; opacity = 0},/turf/simulated/floor/plating,/area/bridge) "aEu" = (/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/maintenance/starboard) "aEv" = (/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/spawner/lootdrop{loot = list(/obj/structure/grille,/obj/structure/grille,/obj/structure/grille,/obj/structure/grille,/obj/structure/grille,/obj/item/cigbutt,/obj/item/trash/cheesie,/obj/item/trash/candy,/obj/item/trash/chips,/obj/item/trash/pistachios,/obj/item/trash/plate,/obj/item/trash/popcorn,/obj/item/trash/raisins,/obj/item/trash/sosjerky,/obj/item/trash/syndi_cakes); name = "maint grille or trash spawner"},/turf/simulated/floor/plating,/area/maintenance/starboard) @@ -1591,7 +1591,7 @@ "aEE" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/effect/decal/warning_stripes/west,/turf/simulated/floor/plasteel,/area/engine/engineering) "aEF" = (/obj/item/multitool,/turf/simulated/floor/plating/airless,/area/engine/engineering) "aEG" = (/obj/item/radio/off,/turf/simulated/floor/plating/airless,/area/engine/engineering) -"aEH" = (/obj/structure/closet/crate,/obj/item/ore/glass,/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/quartermaster/sorting{name = "\improper Warehouse"}) +"aEH" = (/obj/structure/closet/crate,/obj/item/stack/ore/glass,/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/quartermaster/sorting{name = "\improper Warehouse"}) "aEI" = (/obj/machinery/door/airlock/shuttle{name = "Mining Shuttle Airlock"; req_access_txt = "0"},/obj/docking_port/mobile{dir = 8; dwidth = 3; height = 5; id = "mining"; name = "mining shuttle"; width = 7},/obj/docking_port/stationary{dir = 8; dwidth = 3; height = 5; id = "mining_home"; name = "mining shuttle bay"; width = 7},/turf/simulated/shuttle/plating,/area/shuttle/mining) "aEJ" = (/obj/machinery/door/airlock/external{name = "Mining Dock Airlock"; req_access = null; req_access_txt = "0"},/turf/simulated/floor/plating,/area/quartermaster/miningdock{name = "\improper Mining Office"}) "aEK" = (/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) @@ -1712,7 +1712,7 @@ "aGV" = (/obj/item/clothing/glasses/meson,/obj/structure/closet/crate,/obj/item/poster/random_contraband,/obj/effect/spawner/lootdrop/maintenance{lootcount = 2; name = "2maintenance loot spawner"},/turf/simulated/floor/plating,/area/maintenance/starboard) "aGW" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/starboard) "aGX" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/shoes/magboots,/obj/item/clothing/suit/space/hardsuit/engineering,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/hardsuit/engineering,/obj/effect/decal/warning_stripes/yellow/hollow,/turf/simulated/floor/plasteel,/area/engine/engineering) -"aGY" = (/obj/item/ore/silver,/obj/item/ore/silver,/obj/effect/decal/warning_stripes/southwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) +"aGY" = (/obj/item/stack/ore/silver,/obj/item/stack/ore/silver,/obj/effect/decal/warning_stripes/southwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) "aGZ" = (/obj/structure/reagent_dispensers/fueltank,/obj/machinery/camera{c_tag = "Mining Dock"; dir = 8; network = list("SS13")},/obj/effect/decal/warning_stripes/south,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock{name = "\improper Mining Office"}) "aHa" = (/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plasteel,/area/engine/engineering) "aHb" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/obj/structure/cable/yellow,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/construction/Storage{name = "Storage Wing"}) @@ -2171,7 +2171,7 @@ "aPM" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/structure/window/reinforced{dir = 1; pixel_y = 1},/obj/effect/decal/warning_stripes/arrow{icon_state = "4"; dir = 8},/obj/effect/decal/warning_stripes/yellow/partial{icon_state = "3"; dir = 8},/turf/simulated/floor/plasteel,/area/quartermaster/storage) "aPN" = (/obj/machinery/navbeacon{codes_txt = "delivery"; dir = 8; location = "QM #1"},/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/window/northleft,/obj/machinery/light{dir = 4},/obj/effect/decal/warning_stripes/yellow,/mob/living/simple_animal/bot/mulebot{home_destination = "QM #1"; suffix = "#1"},/turf/simulated/floor/plasteel,/area/quartermaster/storage) "aPO" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel,/area/quartermaster/storage) -"aPP" = (/obj/structure/closet/crate,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4},/obj/item/ore/glass,/obj/item/ore/iron,/obj/effect/decal/warning_stripes/yellow/hollow,/turf/simulated/floor/plasteel,/area/quartermaster/storage) +"aPP" = (/obj/structure/closet/crate,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4},/obj/item/stack/ore/glass,/obj/item/stack/ore/iron,/obj/effect/decal/warning_stripes/yellow/hollow,/turf/simulated/floor/plasteel,/area/quartermaster/storage) "aPQ" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/decal/warning_stripes/yellow,/turf/simulated/floor/plasteel,/area/quartermaster/storage) "aPR" = (/obj/machinery/door/window/northleft{dir = 8; name = "MuleBot Supply Access"; req_access_txt = "50"},/obj/structure/plasticflaps{opacity = 1},/turf/simulated/floor/plating,/area/maintenance/fpmaint2{name = "Port Maintenance"}) "aPS" = (/obj/structure/sink{dir = 4; icon_state = "sink"; pixel_x = 11},/obj/structure/mirror{pixel_x = 28},/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/crew_quarters/locker/locker_toilet{name = "\improper Restrooms"}) @@ -8502,7 +8502,7 @@ "dhF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/door/airlock/maintenance{name = "storage room"; req_access = "12"},/turf/simulated/floor/plating,/area/maintenance/aft{name = "Aft Maintenance"}) "dhG" = (/obj/item/seeds/watermelon,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/maintenance/aft{name = "Aft Maintenance"}) "dhI" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/mob/living/simple_animal/bot/cleanbot{name = "Mopfficer Sweepsky"; on = 0},/turf/simulated/floor/plating,/area/maintenance/fore) - + (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/_maps/map_files/MetaStation/z4.dmm b/_maps/map_files/MetaStation/z4.dmm index 51fc57cc738..e7e0eba3e75 100644 --- a/_maps/map_files/MetaStation/z4.dmm +++ b/_maps/map_files/MetaStation/z4.dmm @@ -164,14 +164,14 @@ "dh" = (/obj/structure/cable{d1 = 1;d2 = 2;icon_state = "1-2";pixel_y = 0},/turf/simulated/wall,/area/derelict/bridge/access) "di" = (/turf/simulated/wall/r_wall,/area/derelict/gravity_generator) "dj" = (/obj/machinery/light/small,/turf/simulated/floor/plasteel,/area/derelict/solar_control) -"dk" = (/obj/item/ore/iron,/obj/item/ore/iron,/obj/item/ore/iron,/turf/space,/area/space) +"dk" = (/obj/item/stack/ore/iron,/obj/item/stack/ore/iron,/obj/item/stack/ore/iron,/turf/space,/area/space) "dl" = (/turf/simulated/floor/plating/airless{icon_state = "damaged2"},/area/derelict/gravity_generator) "dm" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor/plating/airless{icon_state = "damaged5"},/area/derelict/gravity_generator) "dn" = (/obj/machinery/door/airlock/maintenance,/obj/structure/cable{d1 = 1;d2 = 2;icon_state = "1-2"},/turf/simulated/floor/plasteel,/area/derelict/bridge/access) "do" = (/turf/simulated/wall,/area/derelict/bridge/access) "dp" = (/obj/structure/cable{d1 = 1;d2 = 2;icon_state = "1-2"},/turf/simulated/floor/plasteel,/area/derelict/bridge/access) "dq" = (/turf/simulated/floor/plating/airless{icon_state = "damaged4"},/area/derelict/gravity_generator) -"dr" = (/obj/item/ore/slag,/turf/simulated/floor/plating/airless{icon_state = "damaged4"},/area/derelict/gravity_generator) +"dr" = (/obj/item/stack/ore/slag,/turf/simulated/floor/plating/airless{icon_state = "damaged4"},/area/derelict/gravity_generator) "ds" = (/turf/simulated/floor/plating/airless{icon_state = "damaged5"},/area/derelict/gravity_generator) "dt" = (/turf/simulated/floor/plasteel,/area/derelict/bridge/access) "du" = (/obj/structure/rack,/obj/item/melee/classic_baton,/turf/simulated/floor/plasteel,/area/derelict/bridge/access) @@ -184,7 +184,7 @@ "dB" = (/obj/structure/cable{d1 = 4;d2 = 8;icon_state = "4-8"},/turf/simulated/floor/plasteel,/area/derelict/bridge/access) "dC" = (/obj/item/screwdriver,/turf/simulated/floor/plating/airless{icon_state = "damaged5"},/area/derelict/gravity_generator) "dD" = (/obj/machinery/gravity_generator/main/station{on = 0},/turf/simulated/floor/plating/airless,/area/derelict/gravity_generator) -"dE" = (/obj/item/ore/slag,/turf/space,/area/space) +"dE" = (/obj/item/stack/ore/slag,/turf/space,/area/space) "dF" = (/obj/structure/cable{d1 = 1;d2 = 4;icon_state = "1-4"},/turf/simulated/wall,/area/derelict/bridge/access) "dG" = (/obj/structure/cable{d1 = 2;d2 = 4;icon_state = "2-4"},/obj/structure/cable{d1 = 2;d2 = 8;icon_state = "2-8"},/turf/simulated/floor/plasteel,/area/derelict/bridge/access) "dH" = (/obj/structure/cable{d1 = 2;d2 = 8;icon_state = "2-8"},/turf/simulated/floor/plasteel,/area/derelict/bridge/access) @@ -355,7 +355,7 @@ "gQ" = (/obj/structure/cable{d1 = 1;d2 = 8;icon_state = "1-8"},/obj/effect/landmark/damageturf,/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary) "gR" = (/obj/structure/cable,/obj/machinery/power/apc{dir = 0;name = "Worn-out APC";pixel_y = -24},/turf/simulated/floor/plating/airless,/area/derelict/bridge/access) "gS" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor/plating/airless,/area/derelict/bridge/access) -"gT" = (/obj/item/ore/slag,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) +"gT" = (/obj/item/stack/ore/slag,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "gU" = (/obj/item/shard,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "gV" = (/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "gW" = (/turf/simulated/wall/r_wall,/area/derelict/hallway/primary) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm index c95082eac76..982be66cace 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm @@ -29,7 +29,7 @@ "aC" = (/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel,/area/ruin/onehalf/dorms_med) "aD" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/light/small{dir = 8},/turf/simulated/floor/plating,/area/ruin/onehalf/drone_bay) "aE" = (/obj/structure/disposalpipe/trunk,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/drone_bay) -"aF" = (/obj/structure/disposalpipe/trunk,/obj/item/ore/diamond,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/drone_bay) +"aF" = (/obj/structure/disposalpipe/trunk,/obj/item/stack/ore/diamond,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/drone_bay) "aG" = (/obj/effect/decal/warning_stripes/north,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/drone_bay) "aH" = (/obj/item/stack/rods,/turf/space,/area/ruin/onehalf/hallway) "aI" = (/obj/effect/landmark/damageturf,/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) @@ -153,7 +153,7 @@ "cY" = (/obj/structure/grille,/obj/structure/window/full/reinforced,/obj/structure/cable{d2 = 4; icon_state = "0-4"},/obj/structure/cable,/obj/machinery/door/poddoor/preopen{id_tag = "onehalf bridge"; name = "bridge blast door"},/turf/simulated/floor/plating,/area/ruin/onehalf/bridge) "cZ" = (/obj/structure/lattice,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/space,/area/space) "db" = (/obj/structure/table,/obj/item/flashlight,/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) -"dc" = (/obj/structure/table,/obj/item/ore/bluespace_crystal,/obj/item/coin/plasma,/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) +"dc" = (/obj/structure/table,/obj/item/stack/ore/bluespace_crystal,/obj/item/coin/plasma,/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) "dd" = (/obj/structure/closet/firecloset/full,/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) "de" = (/obj/machinery/light,/obj/structure/table,/obj/item/storage/firstaid,/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) "df" = (/obj/structure/lattice,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/space,/area/space) diff --git a/_maps/map_files/RandomZLevels/moonoutpost19.dmm b/_maps/map_files/RandomZLevels/moonoutpost19.dmm index 12e7ca4df90..7868dd1addb 100644 --- a/_maps/map_files/RandomZLevels/moonoutpost19.dmm +++ b/_maps/map_files/RandomZLevels/moonoutpost19.dmm @@ -41,7 +41,7 @@ "aO" = (/obj/machinery/gateway{dir = 8},/turf/simulated/floor/plasteel{dir = 8; icon_state = "vault"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "aP" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "aQ" = (/obj/machinery/gateway{dir = 4},/turf/simulated/floor/plasteel{dir = 8; icon_state = "vault"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) -"aR" = (/obj/item/ore/iron{pixel_x = 7; pixel_y = -6},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) +"aR" = (/obj/item/stack/ore/iron{pixel_x = 7; pixel_y = -6},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "aS" = (/obj/structure/alien/weeds,/mob/living/simple_animal/hostile/alien/queen/large{desc = "A gigantic alien who is in charge of the hive and all of its loyal servants."; name = "alien queen"; pixel_x = -16; plants_off = 1},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "aT" = (/turf/simulated/wall,/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "aU" = (/turf/simulated/floor/plasteel{dir = 8; icon_state = "darkredcorners"; tag = "icon-darkredcorners (WEST)"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) @@ -175,11 +175,11 @@ "ds" = (/obj/structure/closet/secure_closet{desc = "It's a secure locker for personnel. The first card swiped gains control."; icon_broken = "cabinetdetective_broken"; icon_closed = "cabinetdetective"; icon_locked = "cabinetdetective_locked"; icon_off = "cabinetdetective_broken"; icon_opened = "cabinetdetective_open"; icon_state = "cabinetdetective"; locked = 0; name = "personal closet"; req_access_txt = "150"},/obj/item/stack/spacecash/c50,/turf/simulated/floor/wood,/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "dt" = (/obj/structure/bed,/obj/item/bedsheet/syndie,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/wood,/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "du" = (/obj/machinery/door/airlock/external,/turf/simulated/floor/plating/airless{name = "plating"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) -"dv" = (/obj/item/ore/iron,/obj/item/ore/iron{pixel_x = -7; pixel_y = -4},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) +"dv" = (/obj/item/stack/ore/iron,/obj/item/stack/ore/iron{pixel_x = -7; pixel_y = -4},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dw" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating/airless{name = "plating"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "dx" = (/obj/effect/decal/warning_stripes/northwestcorner,/turf/simulated/floor/plasteel/airless{name = "floor"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) "dy" = (/obj/structure/dispenser/oxygen{oxygentanks = 9},/obj/machinery/light/small{active_power_usage = 0; dir = 1; icon_state = "bulb-broken"; status = 2},/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plating/airless{name = "plating"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) -"dz" = (/obj/item/ore/iron{pixel_x = -3; pixel_y = 9},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) +"dz" = (/obj/item/stack/ore/iron{pixel_x = -3; pixel_y = 9},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dA" = (/turf/simulated/mineral,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dB" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/effect/landmark/damageturf,/turf/simulated/floor/plating,/area/awaycontent/a7) "dC" = (/obj/structure/rack,/obj/item/clothing/suit/space/syndicate/orange,/obj/item/clothing/mask/gas,/obj/item/pickaxe/drill,/obj/item/clothing/head/helmet/space/syndicate/orange,/obj/effect/decal/warning_stripes/northeast,/turf/simulated/floor/plating/airless{name = "plating"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) @@ -192,7 +192,7 @@ "dJ" = (/obj/item/pickaxe/drill,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dK" = (/turf/simulated/floor/plasteel/airless{icon_plating = "asteroidplating"; icon_state = "asteroidplating"; name = "plating"},/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dL" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor/plasteel/airless{icon_plating = "asteroidplating"; icon_state = "asteroidplating"; name = "plating"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"}) -"dM" = (/obj/item/ore/iron{pixel_x = -7; pixel_y = -4},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) +"dM" = (/obj/item/stack/ore/iron{pixel_x = -7; pixel_y = -4},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dN" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/bed/nest,/obj/item/tank/oxygen,/obj/item/clothing/suit/space/syndicate/orange,/obj/item/clothing/mask/gas,/obj/item/clothing/head/helmet/space/syndicate/orange,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/obj/effect/decal/cleanable/blood/tracks{color = "red"; desc = "Your instincts say you shouldn't be following these."; dir = 4; icon = 'icons/effects/blood.dmi'; icon_state = "tracks"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dO" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/effect/decal/cleanable/blood/tracks{color = "red"; desc = "Your instincts say you shouldn't be following these."; dir = 4; icon = 'icons/effects/blood.dmi'; icon_state = "tracks"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) "dP" = (/obj/structure/alien/weeds/node,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0}) diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index bc152fbcf95..0a1794ff9f5 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -5838,7 +5838,7 @@ "cin" = (/obj/structure/chair{dir = 1},/turf/simulated/shuttle/floor,/area/shuttle/mining) "cio" = (/obj/machinery/door/window/brigdoor/westleft{color = "#d70000"; req_access_txt = "104"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration) "cip" = (/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) -"ciq" = (/obj/machinery/light/small{dir = 4; pixel_y = 8},/obj/item/ore/iron,/obj/effect/decal/warning_stripes/north,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) +"ciq" = (/obj/machinery/light/small{dir = 4; pixel_y = 8},/obj/item/stack/ore/iron,/obj/effect/decal/warning_stripes/north,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) "cir" = (/obj/effect/landmark/start{name = "Shaft Miner"},/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) "cis" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) "cit" = (/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel{dir = 8; icon_state = "brown"},/area/quartermaster/miningdock) @@ -6013,7 +6013,7 @@ "clG" = (/obj/structure/table,/obj/item/storage/lockbox/mindshield,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration) "clH" = (/obj/machinery/camera{c_tag = "Research Toxins Test Chamber North"; network = list("Toxins","Research","SS13")},/obj/machinery/light{dir = 1},/turf/simulated/floor/plasteel/airless,/area/toxins/test_area) "clI" = (/obj/structure/table,/obj/item/storage/box/chemimp{pixel_x = 4; pixel_y = 3},/obj/item/storage/box/trackimp,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration) -"clJ" = (/obj/item/ore/silver,/obj/item/ore/silver,/obj/structure/closet/crate,/obj/effect/decal/warning_stripes/southwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) +"clJ" = (/obj/item/stack/ore/silver,/obj/item/stack/ore/silver,/obj/structure/closet/crate,/obj/effect/decal/warning_stripes/southwest,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) "clK" = (/obj/structure/sign/securearea{desc = "A warning sign which reads 'EXTERNAL AIRLOCK'"; icon_state = "space"; layer = 4; name = "EXTERNAL AIRLOCK"; pixel_x = 0},/turf/simulated/wall,/area/quartermaster/miningdock) "clL" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) "clM" = (/obj/machinery/camera{c_tag = "Mining Dock External"; dir = 8},/obj/structure/closet/emcloset,/obj/effect/decal/warning_stripes/south,/turf/simulated/floor/plasteel,/area/quartermaster/miningdock) diff --git a/_maps/map_files/cyberiad/z6.dmm b/_maps/map_files/cyberiad/z6.dmm index 7eeac05c776..e69905fc814 100644 --- a/_maps/map_files/cyberiad/z6.dmm +++ b/_maps/map_files/cyberiad/z6.dmm @@ -268,7 +268,7 @@ "fh" = (/obj/machinery/light/small{dir = 4},/obj/effect/landmark/damageturf,/turf/simulated/floor/plasteel/airless,/area/derelict/singularity_engine) "fi" = (/obj/item/shard{icon_state = "medium"},/obj/item/stack/cable_coil/cut,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "fj" = (/obj/structure/cable{d1 = 1;d2 = 8;icon_state = "1-8";tag = ""},/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary) -"fk" = (/obj/item/ore/slag,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) +"fk" = (/obj/item/stack/ore/slag,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "fl" = (/obj/machinery/light/small,/obj/effect/landmark/damageturf,/turf/simulated/floor/plasteel/airless,/area/derelict/hallway/primary) "fm" = (/turf/simulated/wall,/area/derelict/hallway/primary) "fn" = (/obj/effect/landmark/damageturf,/turf/simulated/floor/plating/airless,/area/derelict/arrival) @@ -647,7 +647,7 @@ "mw" = (/obj/machinery/light{dir = 1;on = 1},/obj/effect/spawner/random_spawners/syndicate/turret,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mx" = (/turf/simulated/shuttle/wall{tag = "icon-swall12";icon_state = "swall12";dir = 2},/area/space) "my" = (/turf/simulated/floor/plating/airless/asteroid,/turf/simulated/shuttle/wall{tag = "icon-swall_f9";icon_state = "swall_f9";dir = 2},/area/space) -"mz" = (/obj/structure/closet/crate{icon_state = "crateopen";opened = 1},/obj/item/ore/bananium,/obj/item/grenade/bananade,/turf/simulated/floor/plasteel/airless,/area/space) +"mz" = (/obj/structure/closet/crate{icon_state = "crateopen";opened = 1},/obj/item/stack/ore/bananium,/obj/item/grenade/bananade,/turf/simulated/floor/plasteel/airless,/area/space) "mA" = (/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mB" = (/obj/effect/spawner/random_spawners/syndicate/layout/door,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mC" = (/obj/machinery/door/airlock/hatch/syndicate,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) @@ -663,12 +663,12 @@ "mM" = (/obj/effect/spawner/random_spawners/syndicate/loot,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mN" = (/obj/machinery/light,/obj/effect/spawner/random_spawners/syndicate/turret,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mO" = (/obj/structure/sign/poster/contraband/lamarr,/turf/simulated/wall/r_wall,/area/syndicate_depot/core) -"mP" = (/obj/structure/closet/crate,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/turf/simulated/floor/plasteel/airless,/area/space) -"mQ" = (/obj/structure/closet/crate,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/obj/item/ore/tranquillite,/turf/simulated/floor/plasteel/airless,/area/space) +"mP" = (/obj/structure/closet/crate,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/turf/simulated/floor/plasteel/airless,/area/space) +"mQ" = (/obj/structure/closet/crate,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/obj/item/stack/ore/tranquillite,/turf/simulated/floor/plasteel/airless,/area/space) "mR" = (/obj/machinery/light{dir = 1;on = 1},/obj/effect/spawner/random_spawners/syndicate/loot,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mS" = (/obj/machinery/light{dir = 1;on = 1},/obj/effect/spawner/random_spawners/syndicate/loot/level2,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "mT" = (/obj/item/shard,/turf/simulated/floor/plating/airless/asteroid,/area/space) -"mU" = (/obj/structure/closet/crate,/obj/item/ore/bananium,/obj/item/ore/bananium,/obj/item/ore/bananium,/obj/item/ore/bananium,/obj/item/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) +"mU" = (/obj/structure/closet/crate,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) "mV" = (/obj/effect/mob_spawn/human/mime/corpse{name = "Mime Pilot"},/turf/simulated/floor/plasteel/airless,/area/space) "mW" = (/obj/structure/computerframe/HONKputer,/turf/simulated/floor/plasteel/airless,/area/space) "mX" = (/obj/effect/mob_spawn/human/corpse/clownmili,/turf/simulated/floor/plasteel/airless,/area/space) @@ -676,7 +676,7 @@ "mZ" = (/obj/effect/spawner/random_spawners/syndicate/turret/external,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "na" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/airless,/area/space) "nb" = (/obj/item/shard{icon_state = "small"},/turf/simulated/floor/plating/airless/asteroid,/area/space) -"nc" = (/obj/item/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) +"nc" = (/obj/item/stack/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) "nd" = (/obj/item/stack/sheet/metal{layer = 4.1},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "ne" = (/obj/structure/shuttle/engine/propulsion{dir = 4;icon_state = "propulsion_l";tag = "icon-propulsion_l (WEST)"},/turf/space,/area/space) "nf" = (/obj/effect/spawner/random_spawners/syndicate/trap/mine,/obj/item/stack/sheet/metal{layer = 4.1},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) @@ -686,7 +686,7 @@ "nj" = (/obj/effect/mob_spawn/human/clown/corpse,/turf/simulated/floor/plasteel/airless,/area/space) "nk" = (/obj/machinery/computer/syndicate_depot/teleporter,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "nl" = (/obj/item/pickaxe,/turf/simulated/floor/plasteel/airless,/area/space) -"nm" = (/obj/structure/closet/crate,/obj/item/ore/bananium,/obj/item/ore/bananium,/obj/item/ore/bananium,/obj/item/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) +"nm" = (/obj/structure/closet/crate,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/obj/item/stack/ore/bananium,/turf/simulated/floor/plasteel/airless,/area/space) "nn" = (/turf/space,/turf/simulated/shuttle/wall{tag = "icon-swall_f5";icon_state = "swall_f5";dir = 2},/area/space) "no" = (/obj/machinery/bluespace_beacon/syndicate,/obj/effect/decal/warning_stripes/yellow,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/syndicate_depot/core) "np" = (/turf/simulated/floor/plasteel/airless,/turf/simulated/shuttle/wall{tag = "icon-swall_f10";icon_state = "swall_f10";dir = 2},/area/space) diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 0397b5bcdde..d2ec6860b86 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -60,4 +60,6 @@ #define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]" #define ADMIN_JMP(src) "(JMP)" #define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" -#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" \ No newline at end of file +#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]" +#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" +#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 0828d01e4f6..47a3c4ae99a 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -98,7 +98,7 @@ var/meteorsound = 'sound/effects/meteorimpact.ogg' var/z_original = 1 - var/meteordrop = /obj/item/ore/iron + var/meteordrop = /obj/item/stack/ore/iron var/dropamt = 2 /obj/effect/meteor/Move() @@ -196,7 +196,7 @@ hits = 1 hitpwr = 3 meteorsound = 'sound/weapons/tap.ogg' - meteordrop = /obj/item/ore/glass + meteordrop = /obj/item/stack/ore/glass //Medium-sized /obj/effect/meteor/medium @@ -226,7 +226,7 @@ hits = 5 heavy = 1 meteorsound = 'sound/effects/bamf.ogg' - meteordrop = /obj/item/ore/plasma + meteordrop = /obj/item/stack/ore/plasma /obj/effect/meteor/flaming/meteor_effect() ..(heavy) @@ -237,7 +237,7 @@ name = "glowing meteor" icon_state = "glowing" heavy = 1 - meteordrop = /obj/item/ore/uranium + meteordrop = /obj/item/stack/ore/uranium /obj/effect/meteor/irradiated/meteor_effect() @@ -256,7 +256,7 @@ hitpwr = 1 heavy = 1 meteorsound = 'sound/effects/bamf.ogg' - meteordrop = /obj/item/ore/plasma + meteordrop = /obj/item/stack/ore/plasma /obj/effect/meteor/tunguska/meteor_effect() ..(heavy) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index a3a029005d5..b7f1e3a89dc 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -110,7 +110,7 @@ AIStatus = AI_OFF var/resources = 0 //Resource points, generated by consuming metal/glass var/max_resources = 100 - loot = list(/obj/effect/decal/cleanable/blood/gibs/robot, /obj/item/ore/bluespace_crystal/artificial) + loot = list(/obj/effect/decal/cleanable/blood/gibs/robot, /obj/item/stack/ore/bluespace_crystal/artificial) deathmessage = "The swarmer explodes with a sharp pop!" del_on_death = 1 hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index a0e9ee978dd..07c62451efb 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -216,15 +216,12 @@ return ..() /obj/machinery/autolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) - if(ispath(type_inserted, /obj/item/ore/bluespace_crystal)) - use_power(MINERAL_MATERIAL_AMOUNT / 10) - else - switch(id_inserted) - if(MAT_METAL) - flick("autolathe_o",src)//plays metal insertion animation - if(MAT_GLASS) - flick("autolathe_r",src)//plays glass insertion animation - use_power(min(1000, amount_inserted / 100)) + switch(id_inserted) + if(MAT_METAL) + flick("autolathe_o",src)//plays metal insertion animation + if(MAT_GLASS) + flick("autolathe_r",src)//plays glass insertion animation + use_power(min(1000, amount_inserted / 100)) SSnanoui.update_uis(src) /obj/machinery/autolathe/attack_ghost(mob/user) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 953a476d1a8..f9c1330e596 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -705,7 +705,7 @@ obj/item/circuitboard/rdserver origin_tech = "programming=3;engineering=4;bluespace=4;materials=4" frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin." req_components = list( - /obj/item/ore/bluespace_crystal = 3, + /obj/item/stack/ore/bluespace_crystal = 3, /obj/item/stock_parts/matter_bin = 1) /obj/item/circuitboard/teleporter_station @@ -715,7 +715,7 @@ obj/item/circuitboard/rdserver origin_tech = "programming=4;engineering=4;bluespace=4;plasmatech=3" frame_desc = "Requires 2 Bluespace Crystals, 2 Capacitors and 1 Console Screen." req_components = list( - /obj/item/ore/bluespace_crystal = 2, + /obj/item/stack/ore/bluespace_crystal = 2, /obj/item/stock_parts/capacitor = 2, /obj/item/stock_parts/console_screen = 1) @@ -726,7 +726,7 @@ obj/item/circuitboard/rdserver origin_tech = "programming=3;engineering=4;bluespace=4;materials=4" frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin." req_components = list( - /obj/item/ore/bluespace_crystal = 3, + /obj/item/stack/ore/bluespace_crystal = 3, /obj/item/stock_parts/matter_bin = 1) var/target @@ -737,7 +737,7 @@ obj/item/circuitboard/rdserver origin_tech = "programming=4;engineering=3;plasmatech=4;bluespace=4" frame_desc = "Requires 2 Bluespace Crystals, 1 Capacitor, 1 piece of cable and 1 Console Screen." req_components = list( - /obj/item/ore/bluespace_crystal = 2, + /obj/item/stack/ore/bluespace_crystal = 2, /obj/item/stock_parts/capacitor = 1, /obj/item/stack/cable_coil = 1, /obj/item/stock_parts/console_screen = 1) @@ -749,7 +749,7 @@ obj/item/circuitboard/rdserver origin_tech = "programming=3;engineering=3;plasmatech=3;bluespace=4" frame_desc = "Requires 1 Bluespace Crystal, 1 Capacitor, 1 piece of cable and 1 Manipulator." req_components = list( - /obj/item/ore/bluespace_crystal = 1, + /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, /obj/item/stack/cable_coil = 1) diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 672402ac351..b58e9d12c84 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -18,7 +18,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/quantumpad(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/manipulator(null) component_parts += new /obj/item/stack/cable_coil(null, 1) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 53148d9de6d..8ed7867c66a 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -281,9 +281,7 @@ link_power_station() component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) component_parts += new /obj/item/stock_parts/matter_bin(null) RefreshParts() @@ -291,9 +289,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) component_parts += new /obj/item/stock_parts/matter_bin/super(null) RefreshParts() @@ -478,8 +474,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_station(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/console_screen(null) diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 546bb6ae269..63e70626a8d 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -73,7 +73,7 @@ if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment) var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo if(ore_box) - for(var/obj/item/ore/ore in range(1, chassis)) + for(var/obj/item/stack/ore/ore in range(1, chassis)) if(get_dir(chassis, ore) & chassis.dir) ore.Move(ore_box) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 65118f8c491..86640958a72 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -39,7 +39,7 @@ /obj/machinery/mecha_part_fabricator/New() var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), 0, - FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + FALSE, list(/obj/item/stack, /obj/item/stack/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE ..() component_parts = list() diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index d3b88c2b24c..59de4cc45b4 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -1,3 +1,5 @@ +#define STANDARD_STACK_AMOUNT 5 + //////////////////////////////// ///// Construction datums ////// //////////////////////////////// @@ -30,11 +32,11 @@ return 0 else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom - if(S.amount < 5) + if(S.amount < STANDARD_STACK_AMOUNT) to_chat(user, ("There's not enough material in this stack.")) return 0 else - S.use(5) + S.use(STANDARD_STACK_AMOUNT) return 1 /datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user as mob) @@ -65,11 +67,11 @@ return 0 else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom - if(S.amount < 5) + if(S.amount < STANDARD_STACK_AMOUNT) to_chat(user, ("There's not enough material in this stack.")) return 0 else - S.use(5) + S.use(STANDARD_STACK_AMOUNT) return 1 @@ -1289,7 +1291,7 @@ "backkey"=/obj/item/crowbar, "desc"="The bluespace crystal is installed."), //10 - list("key"=/obj/item/ore/bluespace_crystal, + list("key"=/obj/item/stack/ore/bluespace_crystal, "backkey"=/obj/item/screwdriver, "desc"="Super capacitor is secured."), //11 @@ -1467,23 +1469,22 @@ holder.icon_state = "phazon12" if(10) if(diff==FORWARD) - user.visible_message("[user] installs the bluespace crystal.", "You install the bluespace crystal.") - qdel(used_atom) + user.visible_message("[user] installs the bluespace crystal.", "You install the bluespace crystals.") holder.icon_state = "phazon15" else user.visible_message("[user] unsecures the super capacitor from the [holder].", "You unsecure the super capacitor from the [holder].") holder.icon_state = "phazon13" if(9) if(diff==FORWARD) - user.visible_message("[user] connects the bluespace crystal.", "You connect the bluespace crystal.") + user.visible_message("[user] connects the bluespace crystal.", "You connect the bluespace crystals.") holder.icon_state = "phazon16" else user.visible_message("[user] removes the bluespace crystal from the [holder].", "You remove the bluespace crystal from the [holder].") - new /obj/item/ore/bluespace_crystal(get_turf(holder)) + new /obj/item/stack/ore/bluespace_crystal(get_turf(holder), new_amount = 5) holder.icon_state = "phazon14" if(8) if(diff==FORWARD) - user.visible_message("[user] engages the bluespace crystal.", "You engage the bluespace crystal.") + user.visible_message("[user] engages the bluespace crystal.", "You engage the bluespace crystals.") holder.icon_state = "phazon17" else user.visible_message("[user] disconnects the bluespace crystal from the [holder].", "You disconnect the bluespace crystal from the [holder].") @@ -1493,7 +1494,7 @@ user.visible_message("[user] installs the phase armor layer to the [holder].", "You install the phase armor layer to the [holder].") holder.icon_state = "phazon18" else - user.visible_message("[user] disengages the bluespace crystal.", "You disengage the bluespace crystal.") + user.visible_message("[user] disengages the bluespace crystal.", "You disengage the bluespace crystals.") holder.icon_state = "phazon16" if(6) if(diff==FORWARD) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index f5d434a9811..41079dcb204 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -47,7 +47,6 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \ if(WT.remove_fuel(0,user)) var/obj/item/stack/sheet/metal/new_item = new(user.loc) - new_item.add_to_stacks(user) if(new_item.get_amount() <= 0) // stack was moved into another one on the pile new_item = locate() in user.loc diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index ebc89cdca7a..5f9b7781f22 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -58,7 +58,6 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ var/obj/item/stack/rods/V = W var/obj/item/stack/sheet/rglass/RG = new (user.loc) RG.add_fingerprint(user) - RG.add_to_stacks(user) V.use(1) var/obj/item/stack/sheet/glass/G = src src = null @@ -124,7 +123,6 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ var/obj/item/stack/rods/V = W var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc) RG.add_fingerprint(user) - RG.add_to_stacks(user) V.use(1) var/obj/item/stack/sheet/glass/G = src src = null diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index de842402ba9..4064bf63adb 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -19,7 +19,7 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \ null, \ new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \ null, \ - new/datum/stack_recipe("Breakdown into sand", /obj/item/ore/glass, 1, one_per_turf = 0, on_floor = 1), \ + new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, one_per_turf = 0, on_floor = 1), \ ) var/global/list/datum/stack_recipe/silver_recipes = list ( \ diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index b6b3021a08e..27ccab54202 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -14,15 +14,34 @@ var/singular_name var/amount = 1 var/to_transfer = 0 - var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount + var/max_amount = 50 //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount var/merge_type = null // This path and its children should merge with this stack, defaults to src.type -/obj/item/stack/New(var/loc, var/amt = null) +/obj/item/stack/New(loc, new_amount, merge = TRUE) ..() - if(amt != null) //Allow for stacks with the amount=0 - amount = amt + if(new_amount != null) + amount = new_amount + while(amount > max_amount) + amount -= max_amount + new type(loc, max_amount, FALSE) if(!merge_type) merge_type = type + if(merge && !(amount >= max_amount)) + for(var/obj/item/stack/S in loc) + if(S.merge_type == merge_type) + merge(S) + +/obj/item/stack/Crossed(obj/O) + if(amount >= max_amount || ismob(loc)) // Prevents unnecessary call. Also prevents merging stack automatically in a mob's inventory + return + if(istype(O, merge_type) && !O.throwing) + merge(O) + ..() + +/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush) + if(istype(AM, merge_type) && !(amount >= max_amount)) + merge(AM) + ..() /obj/item/stack/Destroy() if(usr && usr.machine == src) @@ -35,6 +54,11 @@ to_chat(user, "There are [amount] [singular_name]\s in the stack.") else to_chat(user, "There are [amount] [name]\s in the stack.") + to_chat(user,"Alt-click to take a custom amount.") + +/obj/item/stack/proc/add(newamount) + amount += newamount + update_icon() /obj/item/stack/attack_self(mob/user) list_recipes(user) @@ -177,7 +201,6 @@ if(R.max_res_amount > 1) var/obj/item/stack/new_item = O new_item.amount = R.res_amount * multiplier - //new_item.add_to_stacks(usr) R.post_build(src, O) @@ -202,37 +225,23 @@ interact(usr) return -/obj/item/stack/proc/use(used) +/obj/item/stack/proc/use(used, check = TRUE) + if(check && zero_amount()) + return FALSE if(amount < used) - return 0 + return FALSE amount -= used - if(amount < 1) // Just in case a stack's amount ends up fractional somehow + if(amount < 1) if(isrobot(loc)) - var/mob/living/silicon/robot/R = loc //Horrifying cyborg snowflake code that allows stacks to GC and cyborgs not to horrendously break + var/mob/living/silicon/robot/R = loc if(locate(src) in R.module.modules) R.module.modules -= src - if(usr) - usr.unEquip(src, TRUE) // this has to be unEquip() over drop_item() or something similar because of cyborgs - qdel(src) + if(R) + R.unEquip(src, TRUE) + zero_amount() update_icon() return 1 -/obj/item/stack/proc/add_to_stacks(mob/usr) - var/obj/item/stack/oldsrc = src - src = null - for(var/obj/item/stack/item in usr.loc) - if(item == oldsrc) - continue - if(!istype(item, oldsrc.type)) - continue - if(item.amount >= item.max_amount) - continue - oldsrc.attackby(item, usr) - to_chat(usr, "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s.") - if(oldsrc.amount <= 0) - break - oldsrc.update_icon() - /obj/item/stack/proc/get_amount() return amount @@ -252,46 +261,71 @@ return F /obj/item/stack/attack_hand(mob/user) - if(user.is_in_inactive_hand(src)) - var/obj/item/stack/F = split(user, 1) - user.put_in_hands(F) + if(user.is_in_inactive_hand(src) && amount > 1) + change_stack(user, 1) if(src && usr.machine == src) spawn(0) interact(usr) else ..() +/obj/item/stack/AltClick(mob/living/user) + if(!istype(user) || user.incapacitated()) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user) || issilicon(usr)) + return + if(amount < 1) + return + //get amount from user + var/min = 0 + var/max = get_amount() + var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum[max])") as num) + if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount()) + return + change_stack(user,stackmaterial) + to_chat(user, "You take [stackmaterial] sheets out of the stack") + +/obj/item/stack/proc/change_stack(mob/user,amount) + var/obj/item/stack/F = new type(user, amount, FALSE) + . = F + F.copy_evidences(src) + user.put_in_hands(F) + add_fingerprint(user) + F.add_fingerprint(user) + use(amount) + zero_amount() + /obj/item/stack/attackby(obj/item/W, mob/user, params) - ..() if(istype(W, merge_type)) var/obj/item/stack/S = W - if(S.amount >= max_amount) - return 1 - - if(user.is_in_inactive_hand(src)) - var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num - if(!desired) - return - desired = round(desired) - to_transfer = max(1,min(desired,S.max_amount-S.amount,src.amount)) - else - to_transfer = min(src.amount, S.max_amount-S.amount) - - S.amount += to_transfer - if(S && usr.machine == S) - spawn(0) - S.interact(usr) - use(to_transfer) - if(src && usr.machine == src) - spawn(0) - interact(usr) - S.update_icon() + merge(S) + to_chat(user, "Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.") else - return ..() + ..() + +/obj/item/stack/proc/zero_amount() + if(amount < 1) + qdel(src) + return TRUE + return FALSE + +/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible + if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that. + return FALSE + var/transfer = get_amount() + transfer = min(transfer, S.max_amount - S.amount) + if(transfer <= 0) + return + if(pulledby) + pulledby.start_pulling(S) + S.copy_evidences(src) + S.add(transfer) + use(transfer) + zero_amount() /obj/item/stack/proc/copy_evidences(obj/item/stack/from) blood_DNA = from.blood_DNA fingerprints = from.fingerprints fingerprintshidden = from.fingerprintshidden fingerprintslast = from.fingerprintslast - //TODO bloody overlay diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 3e7f2f6f8c9..090664e7f32 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -138,7 +138,7 @@ storage_slots = 50 max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class max_w_class = WEIGHT_CLASS_NORMAL - can_hold = list(/obj/item/ore) + can_hold = list(/obj/item/stack/ore) /obj/item/storage/bag/ore/cyborg name = "cyborg mining satchel" diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index cd6fc31f820..e66bad8fbaf 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -60,12 +60,12 @@ new /obj/item/wirecutters(src) new /obj/item/t_scanner(src) new /obj/item/crowbar(src) - new /obj/item/stack/cable_coil(src, 30, pickedcolor) - new /obj/item/stack/cable_coil(src, 30, pickedcolor) + new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor) + new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor) if(prob(5)) new /obj/item/clothing/gloves/color/yellow(src) else - new /obj/item/stack/cable_coil(src, 30, pickedcolor) + new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor) /obj/item/storage/toolbox/syndicate name = "suspicious looking toolbox" @@ -108,7 +108,7 @@ new /obj/item/wrench(src) new /obj/item/weldingtool(src) new /obj/item/crowbar(src) - new /obj/item/stack/cable_coil(src, 30, pickedcolor) + new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor) new /obj/item/wirecutters(src) new /obj/item/multitool(src) diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 0121daf3ee4..eacb56d2a17 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -73,8 +73,8 @@ if(..()) return if(istype(C, /obj/item/shovel)) - new /obj/item/ore/glass(src) - new /obj/item/ore/glass(src) //Make some sand if you shovel grass + new /obj/item/stack/ore/glass(src) + new /obj/item/stack/ore/glass(src) //Make some sand if you shovel grass to_chat(user, "You shovel the grass.") playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) make_plating() @@ -92,8 +92,8 @@ if(..()) return if(istype(W, /obj/item/shovel)) - new /obj/item/ore/glass/basalt(src) - new /obj/item/ore/glass/basalt(src) + new /obj/item/stack/ore/glass/basalt(src) + new /obj/item/stack/ore/glass/basalt(src) user.visible_message("[user] digs up [src].", "You uproot [src].") playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) make_plating() diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index e4b2cd0ddfe..17ece10d71a 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -152,7 +152,7 @@ var/sc_safecode5 = "[rand(0,9)]" new /obj/item/clothing/head/helmet/space/cult(src) new /obj/item/clothing/suit/space/cult(src) //new /obj/item/teleportation_scroll(src) - new /obj/item/ore/diamond(src) + new /obj/item/stack/ore/diamond(src) /* * Modified Nar-Sie diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm b/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm index d960a944044..2717379ec4d 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler_recipes.dm @@ -70,7 +70,7 @@ There is no excuse to do this wrong now that there is an example for you. --Fals /datum/bottler_recipe/Meteor_Malt name = "Meteor Malt" description = "Soft drinks have been detected on collision course with your tastebuds." - ingredients = list(/obj/item/ore, + ingredients = list(/obj/item/stack/ore, /obj/item/reagent_containers/food/snacks/grown/wheat, - /obj/item/ore) + /obj/item/stack/ore) result = "meteor_malt" diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 70169476c9d..81fbe20e3d4 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -471,7 +471,7 @@ datum/recipe/microwave/slimesandwich /datum/recipe/microwave/clownstears reagents = list("water" = 10) items = list( - /obj/item/ore/bananium, + /obj/item/stack/ore/bananium, /obj/item/reagent_containers/food/snacks/grown/banana ) result = /obj/item/reagent_containers/food/snacks/clownstears diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index ae8e69db32c..a413c328870 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -36,8 +36,7 @@ if(11 to 15) new /obj/item/reagent_containers/glass/beaker/bluespace(src) if(16 to 20) - for(var/i in 1 to 10) - new /obj/item/ore/diamond(src) + new /obj/item/stack/ore/diamond(src, 10) if(21 to 25) for(var/i in 1 to 5) new /obj/item/poster/random_contraband(src) @@ -83,8 +82,7 @@ var /newitem = pick(subtypesof(/obj/item/stock_parts) - /obj/item/stock_parts/subspace) new newitem(src) if(69 to 70) - for(var/i in 1 to 5) - new /obj/item/ore/bluespace_crystal(src) + new /obj/item/stack/ore/bluespace_crystal(src, 5) if(71 to 72) new /obj/item/pickaxe/drill(src) if(73 to 74) @@ -184,7 +182,7 @@ if(attempts == 1) to_chat(user, "* Anti-Tamper Bomb will activate on next failed access attempt.") else - to_chat(user, "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.") + to_chat(user, "* Anti-Tamper Bomb will activate after [attempts] failed access attempts.") if(lastattempt != null) var/bulls = 0 var/cows = 0 diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 3d3c67701e8..61e1f2efeed 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -70,12 +70,12 @@ point_upgrade = point_upgrade_temp sheet_per_ore = sheet_per_ore_temp -/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/ore/O) +/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O) ore_buffer -= O if(O && O.refined_type) - points += O.points * point_upgrade + points += O.points * point_upgrade * O.amount GET_COMPONENT(materials, /datum/component/material_container) var/material_amount = materials.get_item_material_amount(O) @@ -83,7 +83,7 @@ if(!material_amount) qdel(O) //no materials, incinerate it - else if(!materials.has_space(material_amount * sheet_per_ore)) //if there is no space, eject it + else if(!materials.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it unload_mineral(O) else @@ -157,7 +157,7 @@ if(OB) input = OB - for(var/obj/item/ore/O in input) + for(var/obj/item/stack/ore/O in input) if(QDELETED(O)) continue ore_buffer |= O diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 800e21b1d42..3fc2980ddc2 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -96,7 +96,7 @@ /obj/machinery/mineral/processing_unit/process() var/turf/T = get_step(src, input_dir) if(T) - for(var/obj/item/ore/O in T) + for(var/obj/item/stack/ore/O in T) process_ore(O) CHECK_TICK if(on) @@ -111,7 +111,7 @@ CONSOLE.updateUsrDialog() -/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/ore/O) +/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) GET_COMPONENT(materials, /datum/component/material_container) var/material_amount = materials.get_item_material_amount(O) if(!materials.has_space(material_amount)) diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index 8f604e522e4..78a63bc6c2d 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -16,7 +16,7 @@ if(T) var/limit for(var/obj/structure/ore_box/B in T) - for(var/obj/item/ore/O in B) + for(var/obj/item/stack/ore/O in B) B.contents -= O unload_mineral(O) limit++ diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 865f02a7eb8..881130098e4 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -187,7 +187,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/iron name = "iron deposit" icon_state = "rock_Iron" - mineralType = /obj/item/ore/iron + mineralType = /obj/item/stack/ore/iron mineralName = "Iron" spreadChance = 20 spread = 1 @@ -195,7 +195,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/uranium name = "uranium deposit" - mineralType = /obj/item/ore/uranium + mineralType = /obj/item/stack/ore/uranium mineralName = "Uranium" spreadChance = 5 spread = 1 @@ -204,7 +204,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/diamond name = "diamond deposit" - mineralType = /obj/item/ore/diamond + mineralType = /obj/item/stack/ore/diamond mineralName = "Diamond" spreadChance = 0 spread = 1 @@ -213,7 +213,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/gold name = "gold deposit" - mineralType = /obj/item/ore/gold + mineralType = /obj/item/stack/ore/gold mineralName = "Gold" spreadChance = 5 spread = 1 @@ -222,7 +222,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/silver name = "silver deposit" - mineralType = /obj/item/ore/silver + mineralType = /obj/item/stack/ore/silver mineralName = "Silver" spreadChance = 5 spread = 1 @@ -231,7 +231,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/titanium name = "titanium deposit" - mineralType = /obj/item/ore/titanium + mineralType = /obj/item/stack/ore/titanium spreadChance = 5 spread = 1 hidden = 1 @@ -240,7 +240,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/plasma name = "plasma deposit" icon_state = "rock_Plasma" - mineralType = /obj/item/ore/plasma + mineralType = /obj/item/stack/ore/plasma mineralName = "Plasma" spreadChance = 8 spread = 1 @@ -250,7 +250,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/clown name = "bananium deposit" icon_state = "rock_Clown" - mineralType = /obj/item/ore/bananium + mineralType = /obj/item/stack/ore/bananium mineralName = "Bananium" mineralAmt = 3 spreadChance = 0 @@ -260,7 +260,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/mime name = "tranquillite deposit" icon_state = "rock_Mime" - mineralType = /obj/item/ore/tranquillite + mineralType = /obj/item/stack/ore/tranquillite mineralAmt = 3 spreadChance = 0 spread = 0 @@ -269,7 +269,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/mineral/bscrystal name = "bluespace crystal deposit" icon_state = "rock_BScrystal" - mineralType = /obj/item/ore/bluespace_crystal + mineralType = /obj/item/stack/ore/bluespace_crystal mineralName = "Bluespace crystal" mineralAmt = 1 spreadChance = 0 @@ -519,7 +519,7 @@ var/global/list/rockTurfEdgeCache = list( if(istype(W,/obj/item/storage/bag/ore)) var/obj/item/storage/bag/ore/S = W if(S.collection_mode == 1) - for(var/obj/item/ore/O in src.contents) + for(var/obj/item/stack/ore/O in src.contents) O.attackby(W,user) return @@ -532,11 +532,11 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/floor/plating/airless/asteroid/proc/gets_dug() if(dug) return - new/obj/item/ore/glass(src) - new/obj/item/ore/glass(src) - new/obj/item/ore/glass(src) - new/obj/item/ore/glass(src) - new/obj/item/ore/glass(src) + new/obj/item/stack/ore/glass(src) + new/obj/item/stack/ore/glass(src) + new/obj/item/stack/ore/glass(src) + new/obj/item/stack/ore/glass(src) + new/obj/item/stack/ore/glass(src) dug = 1 playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE icon_plating = "asteroid_dug" diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 490d8c8fe0d..30e093633f5 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -36,10 +36,10 @@ projectiletype = /obj/item/projectile/kinetic projectilesound = 'sound/weapons/Gunshot4.ogg' speak_emote = list("states") - wanted_objects = list(/obj/item/ore/diamond, /obj/item/ore/gold, /obj/item/ore/silver, - /obj/item/ore/plasma, /obj/item/ore/uranium, /obj/item/ore/iron, - /obj/item/ore/bananium, /obj/item/ore/tranquillite, /obj/item/ore/glass, - /obj/item/ore/titanium) + wanted_objects = list(/obj/item/stack/ore/diamond, /obj/item/stack/ore/gold, /obj/item/stack/ore/silver, + /obj/item/stack/ore/plasma, /obj/item/stack/ore/uranium, /obj/item/stack/ore/iron, + /obj/item/stack/ore/bananium, /obj/item/stack/ore/tranquillite, /obj/item/stack/ore/glass, + /obj/item/stack/ore/titanium) healable = 0 var/mode = MINEDRONE_COLLECT var/light_on = 0 @@ -97,7 +97,7 @@ if(!.) return FALSE visible_message("[src] is destroyed!") - new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc) + new /obj/effect/decal/cleanable/blood/gibs/robot(loc) DropOre(0) qdel(src) @@ -135,20 +135,14 @@ to_chat(src, "You are set to attack mode. You can now attack from range.") /mob/living/simple_animal/hostile/mining_drone/AttackingTarget() - if(istype(target, /obj/item/ore) && mode == MINEDRONE_COLLECT) + if(istype(target, /obj/item/stack/ore) && mode == MINEDRONE_COLLECT) CollectOre() return ..() /mob/living/simple_animal/hostile/mining_drone/proc/CollectOre() - var/obj/item/ore/O - for(O in src.loc) + for(var/obj/item/stack/ore/O in range(1, src)) O.forceMove(src) - for(var/dir in alldirs) - var/turf/T = get_step(src,dir) - for(O in T) - O.forceMove(src) - return /mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1) if(!contents.len) @@ -157,7 +151,7 @@ return if(message) to_chat(src, "You dump your stored ore.") - for(var/obj/item/ore/O in contents) + for(var/obj/item/stack/ore/O in contents) contents -= O O.forceMove(loc) return diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index b1ae6b07e6a..747efd4022e 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -1,22 +1,37 @@ -/obj/item/ore +#define GIBTONITE_QUALITY_LOW 1 +#define GIBTONITE_QUALITY_MEDIUM 2 +#define GIBTONITE_QUALITY_HIGH 3 +#define PROBABILITY_REFINE_BY_FIRE 50 +#define ORESTACK_OVERLAYS_MAX 10 +/**********************Mineral ores**************************/ + +/obj/item/stack/ore name = "rock" icon = 'icons/obj/mining.dmi' icon_state = "ore" + max_amount = 50 + singular_name = "ore chunk" var/points = 0 //How many points this ore gets you from the ore redemption machine var/refined_type = null //What this ore defaults to being refined into - var/datum/geosample/geologic_data -/obj/item/ore/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/stack/ore/New() + ..() + pixel_x = rand(0,16)-8 + pixel_y = rand(0,8)-8 + if(is_mining_level(src.z)) + score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) + +/obj/item/stack/ore/attackby(obj/item/I, mob/user, params) + ..() if(istype(I, /obj/item/weldingtool)) var/obj/item/weldingtool/W = I if(W.remove_fuel(15) && refined_type) - new refined_type(get_turf(src.loc)) + new refined_type(get_turf(src.loc), amount) qdel(src) else if(W.isOn()) to_chat(user, "Not enough fuel to smelt [src].") - ..() -/obj/item/ore/Crossed(AM as mob|obj) +/obj/item/stack/ore/Crossed(atom/movable/AM) var/obj/item/storage/bag/ore/OB var/turf/simulated/floor/F = get_turf(src) if(loc != F) @@ -37,64 +52,88 @@ F.attackby(OB, AM) return ..() +/obj/item/stack/ore/fire_act() + ..() + if(isnull(refined_type)) + return + else + var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE/100) * amount, 1) + if(amountrefined < 1) + qdel(src) + else + new refined_type(get_turf(src.loc), amountrefined) + qdel(src) - -/obj/item/ore/uranium +/obj/item/stack/ore/uranium name = "uranium ore" icon_state = "Uranium ore" origin_tech = "materials=5" + singular_name = "uranium ore chunk" points = 30 refined_type = /obj/item/stack/sheet/mineral/uranium materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/iron +/obj/item/stack/ore/iron name = "iron ore" icon_state = "Iron ore" origin_tech = "materials=1" + singular_name = "iron ore chunk" points = 1 refined_type = /obj/item/stack/sheet/metal materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/glass +/obj/item/stack/ore/glass name = "sand pile" icon_state = "Glass ore" origin_tech = "materials=1" + singular_name = "sand pile" points = 1 refined_type = /obj/item/stack/sheet/glass materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/glass/basalt +GLOBAL_LIST_INIT(sand_recipes, list(\ + new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)\ + )) + +/obj/item/stack/ore/glass/Initialize(mapload, new_amount, merge = TRUE) + recipes = GLOB.sand_recipes + . = ..() + +/obj/item/stack/ore/glass/throw_impact(atom/hit_atom) + if(..() || !ishuman(hit_atom)) + return + var/mob/living/carbon/human/C = hit_atom + if(C.head && C.head.flags_cover & HEADCOVERSEYES) + visible_message("[C]'s headgear blocks the sand!") + return + if(C.wear_mask && C.wear_mask.flags_cover & MASKCOVERSEYES) + visible_message("[C]'s mask blocks the sand!") + return + if(C.glasses && C.glasses.flags_cover & GLASSESCOVERSEYES) + visible_message("[C]'s glasses block the sand!") + return + C.EyeBlurry(6) + C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage + C.AdjustConfused(5) + to_chat(C, "\The [src] gets into your eyes! The pain, it burns!") + qdel(src) + +/obj/item/stack/ore/glass/basalt name = "volcanic ash" icon_state = "volcanic_sand" + icon_state = "volcanic_sand" + singular_name = "volcanic ash pile" -/obj/item/ore/glass/attack_self(mob/living/user as mob) - to_chat(user, "You use the sand to make sandstone.") - var/sandAmt = 1 - for(var/obj/item/ore/glass/G in user.loc) // The sand on the floor - sandAmt += 1 - qdel(G) - while(sandAmt > 0) - var/obj/item/stack/sheet/mineral/sandstone/SS = new /obj/item/stack/sheet/mineral/sandstone(user.loc) - if(sandAmt >= SS.max_amount) - SS.amount = SS.max_amount - else - SS.amount = sandAmt - for(var/obj/item/stack/sheet/mineral/sandstone/SA in user.loc) - if(SA != SS && SA.amount < SA.max_amount) - SA.attackby(SS, user) //we try to transfer all old unfinished stacks to the new stack we created. - sandAmt -= SS.max_amount - qdel(src) - return - -/obj/item/ore/plasma +/obj/item/stack/ore/plasma name = "plasma ore" icon_state = "Plasma ore" origin_tech = "plasmatech=2;materials=2" + singular_name = "plasma ore chunk" points = 15 refined_type = /obj/item/stack/sheet/mineral/plasma materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/plasma/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/item/stack/ore/plasma/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/weldingtool)) var/obj/item/weldingtool/W = I if(W.welding) @@ -102,57 +141,64 @@ else ..() -/obj/item/ore/silver +/obj/item/stack/ore/silver name = "silver ore" icon_state = "Silver ore" origin_tech = "materials=3" + singular_name = "silver ore chunk" points = 16 refined_type = /obj/item/stack/sheet/mineral/silver materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/gold +/obj/item/stack/ore/gold name = "gold ore" icon_state = "Gold ore" origin_tech = "materials=4" + singular_name = "gold ore chunk" points = 18 refined_type = /obj/item/stack/sheet/mineral/gold materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/diamond +/obj/item/stack/ore/diamond name = "diamond ore" icon_state = "Diamond ore" origin_tech = "materials=6" + singular_name = "diamond ore chunk" points = 50 refined_type = /obj/item/stack/sheet/mineral/diamond materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/bananium +/obj/item/stack/ore/bananium name = "bananium ore" icon_state = "Clown ore" origin_tech = "materials=4" + singular_name = "bananium ore chunk" points = 60 refined_type = /obj/item/stack/sheet/mineral/bananium materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/tranquillite +/obj/item/stack/ore/tranquillite name = "tranquillite ore" icon_state = "Mime ore" origin_tech = "materials=4" + singular_name = "transquillite ore chunk" points = 60 refined_type = /obj/item/stack/sheet/mineral/tranquillite materials = list(MAT_TRANQUILLITE=MINERAL_MATERIAL_AMOUNT) -/obj/item/ore/titanium +/obj/item/stack/ore/titanium name = "titanium ore" icon_state = "Titanium ore" + singular_name = "titanium ore chunk" points = 50 materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT) refined_type = /obj/item/stack/sheet/mineral/titanium -/obj/item/ore/slag +/obj/item/stack/ore/slag name = "slag" desc = "Completely useless" icon_state = "slag" + singular_name = "slag chunk" /obj/item/twohanded/required/gibtonite name = "gibtonite ore" @@ -165,7 +211,7 @@ anchored = 1 //Forces people to carry it by hand, no pulling! var/primed = 0 var/det_time = 100 - var/quality = 1 //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better + var/quality = GIBTONITE_QUALITY_LOW //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better var/attacher = "UNKNOWN" var/datum/wires/explosive/gibtonite/wires @@ -195,7 +241,7 @@ primed = 0 user.visible_message("The chain reaction was stopped! ...The ore's quality looks diminished.", "You stopped the chain reaction. ...The ore's quality looks diminished.") icon_state = "Gibtonite ore" - quality = 1 + quality = GIBTONITE_QUALITY_LOW return ..() @@ -222,40 +268,40 @@ primed = 1 icon_state = "Gibtonite active" var/turf/bombturf = get_turf(src) - var/area/A = get_area(bombturf) var/notify_admins = 0 if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel notify_admins = 1 if(notify_admins) if(triggered_by == 1) - message_admins("An explosion has triggered a [name] to detonate at [A.name] (JMP).") + message_admins("An explosion has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)].") else if(triggered_by == 2) - message_admins("A signal has triggered a [name] to detonate at [A.name] (JMP). Igniter attacher: [key_name_admin(attacher)]") + message_admins("A signal has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)]. Igniter attacher: [key_name_admin(attacher)]") else - message_admins("[key_name_admin(user)] has triggered a [name] to detonate at [A.name] (JMP).") + message_admins("[key_name_admin(user)] has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)].") if(triggered_by == 1) - log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") + log_game("An explosion has primed a [name] for detonation at [AREACOORD(bombturf)]") else if(triggered_by == 2) - log_game("A signal has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z]). Igniter attacher: [key_name(attacher)].") + log_game("A signal has primed a [name] for detonation at [AREACOORD(bombturf)]). Igniter attacher: [key_name(attacher)].") else user.visible_message("[user] strikes \the [src], causing a chain reaction!", "You strike \the [src], causing a chain reaction.") - log_game("[key_name(user)] has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") + log_game("[key_name(user)] has primed a [name] for detonation at [AREACOORD(bombturf)])") spawn(det_time) if(primed) - if(quality == 3) + if(quality == GIBTONITE_QUALITY_HIGH) explosion(src.loc,2,4,9,adminlog = notify_admins) - if(quality == 2) + if(quality == GIBTONITE_QUALITY_MEDIUM) explosion(src.loc,1,2,5,adminlog = notify_admins) - if(quality == 1) + if(quality == GIBTONITE_QUALITY_LOW) explosion(src.loc,-1,1,3,adminlog = notify_admins) qdel(src) -/obj/item/ore/New() - pixel_x = rand(0,16)-8 - pixel_y = rand(0,8)-8 - if(is_mining_level(src.z)) - score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) -/obj/item/ore/ex_act() - return \ No newline at end of file +/obj/item/stack/ore/ex_act() + return + +#undef GIBTONITE_QUALITY_LOW +#undef GIBTONITE_QUALITY_MEDIUM +#undef GIBTONITE_QUALITY_HIGH +#undef PROBABILITY_REFINE_BY_FIRE +#undef ORESTACK_OVERLAYS_MAX diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 33334d49382..5810bcf3584 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -13,78 +13,40 @@ if(istype(W, /obj/item/t_scanner/adv_mining_scanner)) attack_hand(user) return - if(istype(W, /obj/item/ore)) + else if(istype(W, /obj/item/stack/ore)) if(!user.drop_item()) return W.forceMove(src) - if(istype(W, /obj/item/storage)) + else if(istype(W, /obj/item/storage)) var/obj/item/storage/S = W S.hide_from(usr) - for(var/obj/item/ore/O in S.contents) + for(var/obj/item/stack/ore/O in S.contents) S.remove_from_storage(O, src) //This will move the item to this item's contents CHECK_TICK to_chat(user, "You empty the satchel into the box.") + else if(istype(W, /obj/item/crowbar)) + playsound(src, W.usesound, 50, 1) + var/obj/item/crowbar/C = W + if(do_after(user, 50*C.toolspeed, target = src)) + user.visible_message("[user] pries \the [src] apart.", "You pry apart \the [src].", "You hear splitting wood.") + deconstruct(TRUE, user) /obj/structure/ore_box/attack_hand(mob/user) - var/amt_gold = 0 - var/amt_silver = 0 - var/amt_diamond = 0 - var/amt_glass = 0 - var/amt_iron = 0 - var/amt_plasma = 0 - var/amt_uranium = 0 - var/amt_titanium = 0 - var/amt_clown = 0 - var/amt_mime = 0 - var/amt_bluespace = 0 + if(Adjacent(user)) + show_contents(user) - for(var/obj/item/ore/C in contents) - if(istype(C,/obj/item/ore/diamond)) - amt_diamond++ - if(istype(C,/obj/item/ore/glass)) - amt_glass++ - if(istype(C,/obj/item/ore/plasma)) - amt_plasma++ - if(istype(C,/obj/item/ore/iron)) - amt_iron++ - if(istype(C,/obj/item/ore/silver)) - amt_silver++ - if(istype(C,/obj/item/ore/gold)) - amt_gold++ - if(istype(C,/obj/item/ore/uranium)) - amt_uranium++ - if(istype(C,/obj/item/ore/bananium)) - amt_clown++ - if(istype(C,/obj/item/ore/tranquillite)) - amt_mime++ - if(istype(C, /obj/item/ore/titanium)) - amt_titanium++ - if(istype(C,/obj/item/ore/bluespace_crystal)) - amt_bluespace++ +/obj/structure/ore_box/attack_robot(mob/user) + if(Adjacent(user)) + show_contents(user) +/obj/structure/ore_box/proc/show_contents(mob/user) var/dat = text("The contents of the ore box reveal...
") - if(amt_gold) - dat += text("Gold ore: [amt_gold]
") - if(amt_silver) - dat += text("Silver ore: [amt_silver]
") - if(amt_iron) - dat += text("Metal ore: [amt_iron]
") - if(amt_glass) - dat += text("Sand: [amt_glass]
") - if(amt_diamond) - dat += text("Diamond ore: [amt_diamond]
") - if(amt_plasma) - dat += text("Plasma ore: [amt_plasma]
") - if(amt_uranium) - dat += text("Uranium ore: [amt_uranium]
") - if(amt_titanium) - dat += text("Titanium ore: [amt_titanium]
") - if(amt_clown) - dat += text("Bananium ore: [amt_clown]
") - if(amt_mime) - dat += text("Tranquillite ore: [amt_mime]
") - if(amt_bluespace) - dat += text("Bluespace crystals: [amt_bluespace]
") + var/list/assembled = list() + for(var/obj/item/stack/ore/O in src) + assembled[O.type] += O.amount + for(var/type in assembled) + var/obj/item/stack/ore/O = type + dat += "[initial(O.name)] - [assembled[type]]
" dat += text("

Empty box") var/datum/browser/popup = new(user, "orebox", name, 400, 400) @@ -97,10 +59,7 @@ usr.set_machine(src) add_fingerprint(usr) if(href_list["removeall"]) - for(var/obj/item/ore/O in contents) - contents -= O - O.forceMove(loc) - CHECK_TICK + dump_box_contents() to_chat(usr, "You empty the box.") updateUsrDialog() @@ -108,20 +67,31 @@ obj/structure/ore_box/ex_act(severity, target) if(prob(100 / severity) && severity < 3) qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them +/obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user) + var/obj/item/stack/sheet/wood/W = new (loc, 4) + if(user) + W.add_fingerprint(user) + dump_box_contents() + qdel(src) + +/obj/structure/ore_box/proc/dump_box_contents() + for(var/obj/item/stack/ore/O in src) + if(QDELETED(O)) + continue + if(QDELETED(src)) + break + O.forceMove(loc) + CHECK_TICK /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" set category = "Object" set src in view(1) - if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes. - to_chat(usr, "You are physically incapable of emptying the ore box.") - return - if(usr.incapacitated()) return - if(!Adjacent(usr)) //You can only empty the box if you can physically reach it + if(!Adjacent(usr)) to_chat(usr, "You cannot reach the ore box.") return @@ -131,8 +101,5 @@ obj/structure/ore_box/ex_act(severity, target) to_chat(usr, "The ore box is empty.") return - for(var/obj/item/ore/O in contents) - contents -= O - O.forceMove(loc) - CHECK_TICK - to_chat(usr, "You empty the ore box.") \ No newline at end of file + dump_box_contents() + to_chat(usr, "You empty the ore box.") diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 88d566ad692..124a8d90fae 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -29,7 +29,7 @@ /obj/item/tank, /obj/item/circuitboard, /obj/item/stack/tile/light, - /obj/item/ore/bluespace_crystal + /obj/item/stack/ore/bluespace_crystal ) //Item currently being held. diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 01217f0f3b9..e5bb62ecd9b 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -47,7 +47,7 @@ Difficulty: Very Hard medal_type = MEDAL_PREFIX score_type = COLOSSUS_SCORE loot = list(/obj/machinery/anomalous_crystal/random, /obj/item/organ/internal/vocal_cords/colossus) - butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30) + butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30) deathmessage = "disintegrates, leaving a glowing core in its wake." death_sound = 'sound/misc/demon_dies.ogg' diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 6027070dfc9..82e4af1862f 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -45,7 +45,7 @@ Difficulty: Medium ranged = 1 pixel_x = -16 loot = list(/obj/structure/closet/crate/necropolis/dragon) - butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30) + butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30) var/swooping = 0 var/swoop_cooldown = 0 medal_type = MEDAL_PREFIX diff --git a/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm b/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm index 0c54b414e72..cd73868a9e7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/goldgrub.dm @@ -24,8 +24,8 @@ throw_message = "sinks in slowly, before being pushed out of " status_flags = CANPUSH search_objects = 1 - wanted_objects = list(/obj/item/ore/diamond, /obj/item/ore/gold, /obj/item/ore/silver, - /obj/item/ore/uranium) + wanted_objects = list(/obj/item/stack/ore/diamond, /obj/item/stack/ore/gold, /obj/item/stack/ore/silver, + /obj/item/stack/ore/uranium) var/chase_time = 100 var/will_burrow = TRUE @@ -34,17 +34,17 @@ ..() var/i = rand(1,3) while(i) - loot += pick(/obj/item/ore/silver, /obj/item/ore/gold, /obj/item/ore/uranium, /obj/item/ore/diamond) + loot += pick(/obj/item/stack/ore/silver, /obj/item/stack/ore/gold, /obj/item/stack/ore/uranium, /obj/item/stack/ore/diamond) i-- /mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(new_target) target = new_target if(target != null) - if(istype(target, /obj/item/ore) && loot.len < 10) - visible_message("The [src.name] looks at [target.name] with hungry eyes.") + if(istype(target, /obj/item/stack/ore) && loot.len < 10) + visible_message("The [name] looks at [target.name] with hungry eyes.") else if(isliving(target)) Aggro() - visible_message("The [src.name] tries to flee from [target.name]!") + visible_message("The [name] tries to flee from [target.name]!") retreat_distance = 10 minimum_distance = 10 if(will_burrow) @@ -52,18 +52,21 @@ Burrow() /mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget() - if(istype(target, /obj/item/ore)) + if(istype(target, /obj/item/stack/ore)) EatOre(target) return ..() /mob/living/simple_animal/hostile/asteroid/goldgrub/proc/EatOre(var/atom/targeted_ore) - for(var/obj/item/ore/O in targeted_ore.loc) + for(var/obj/item/stack/ore/O in get_turf(targeted_ore)) if(loot.len < 10) - loot += O.type - qdel(O) + var/using = min(10 - loot.len, O.amount) + for(var/i in 1 to using) + loot += O.type + O.use(using) visible_message("The ore was swallowed whole!") + /mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time if(!stat) visible_message("The [src.name] buries into the ground, vanishing from sight!") @@ -75,4 +78,4 @@ /mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(damage) idle_vision_range = 9 - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 2edfb7cea5d..39799d6e493 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -77,8 +77,8 @@ aggro_vision_range = 9 idle_vision_range = 2 turns_per_move = 5 - loot = list(/obj/item/ore/diamond{layer = 4.1}, - /obj/item/ore/diamond{layer = 4.1}) + loot = list(/obj/item/stack/ore/diamond{layer = 4.1}, + /obj/item/stack/ore/diamond{layer = 4.1}) /obj/item/projectile/temp/basilisk name = "freezing blast" diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ed1458c1cae..211d0f05097 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -134,9 +134,9 @@ By design, d1 is the smallest direction and d2 is the highest return if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long - new/obj/item/stack/cable_coil(T, 2, color) + new/obj/item/stack/cable_coil(T, 2, paramcolor = color) else - new/obj/item/stack/cable_coil(T, 1, color) + new/obj/item/stack/cable_coil(T, 1, paramcolor = color) for(var/mob/O in viewers(src, null)) O.show_message("[user] cuts the cable.", 1) @@ -209,12 +209,12 @@ By design, d1 is the smallest direction and d2 is the highest qdel(src) // qdel if(2.0) if(prob(50)) - new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color) + new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color) qdel(src) // qdel if(3.0) if(prob(25)) - new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color) + new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color) qdel(src) // qdel return @@ -508,7 +508,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( user.visible_message("[user] is strangling [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") return(OXYLOSS) -/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/paramcolor = null) +/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, paramcolor = null) ..() amount = length if(paramcolor) @@ -694,7 +694,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(C.shock(user, 50)) if(prob(50)) //fail - new /obj/item/stack/cable_coil(get_turf(C), 1, C.color) + new /obj/item/stack/cable_coil(get_turf(C), 1, paramcolor = C.color) qdel(C) // qdel return C @@ -777,7 +777,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(C.shock(user, 50)) if(prob(50)) //fail - new/obj/item/stack/cable_coil(get_turf(C), 2, C.color) + new/obj/item/stack/cable_coil(get_turf(C), 2, paramcolor = C.color) qdel(C) // qdel return diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 38b9d9220d5..d978e39a7f0 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -66,7 +66,7 @@ src.icon_state = "tube-construct-stage1" if("bulb") src.icon_state = "bulb-construct-stage1" - new /obj/item/stack/cable_coil(get_turf(src.loc), 1, COLOR_RED) + new /obj/item/stack/cable_coil(get_turf(src.loc), 1, paramcolor = COLOR_RED) user.visible_message("[user.name] removes the wiring from [src].", \ "You remove the wiring from [src].", "You hear a noise.") playsound(loc, W.usesound, 100, 1) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index ccb28890786..f0816022b64 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -160,8 +160,9 @@ S.use(1) power_supply.give(1000) to_chat(user, "You insert [A] in [src], recharging it.") - else if(istype(A, /obj/item/ore/plasma)) - qdel(A) + else if(istype(A, /obj/item/stack/ore/plasma)) + var/obj/item/stack/ore/S = A + S.use(1) power_supply.give(500) to_chat(user, "You insert [A] in [src], recharging it.") else diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 4df7a525b88..d565ef624d2 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -564,7 +564,7 @@ /datum/chemical_reaction/slimecrystal/on_reaction(datum/reagents/holder, created_volume) feedback_add_details("slime_cores_used","[type]") if(holder.my_atom) - var/obj/item/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom)) + var/obj/item/stack/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom)) BC.visible_message("The [BC.name] appears out of thin air!") //Cerulean diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index cf6e4b53882..029936e1f3a 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -8,7 +8,7 @@ req_tech = list("bluespace" = 3, "materials" = 6, "plasmatech" = 4) build_type = PROTOLATHE materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500) - build_path = /obj/item/ore/bluespace_crystal/artificial + build_path = /obj/item/stack/ore/bluespace_crystal/artificial category = list("Bluespace") /datum/design/bag_holding diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 1e884e35c3a..328faf6d645 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -22,7 +22,7 @@ /obj/machinery/r_n_d/New() materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, - FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + FALSE, list(/obj/item/stack, /obj/item/stack/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE ..() wires["Red"] = 0 @@ -121,7 +121,7 @@ /obj/machinery/r_n_d/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) var/stack_name - if(ispath(type_inserted, /obj/item/ore/bluespace_crystal)) + if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal)) stack_name = "bluespace polycrystal" use_power(MINERAL_MATERIAL_AMOUNT / 10) else diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 52273af71fe..a4195175338 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -203,7 +203,7 @@ icon_state = "cargo_ore" /obj/item/spacepod_equipment/cargo/ore/passover(var/obj/item/I) - if(storage && istype(I,/obj/item/ore)) + if(storage && istype(I,/obj/item/stack/ore)) I.forceMove(storage) // Crate System diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 0783aed0a5c..9f8b866981c 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -235,7 +235,7 @@ build_path = /obj/machinery/bsa/middle origin_tech = "engineering=2;combat=2;bluespace=2" req_components = list( - /obj/item/ore/bluespace_crystal = 20, + /obj/item/stack/ore/bluespace_crystal = 20, /obj/item/stack/cable_coil = 2) /obj/item/circuitboard/machine/bsa/front diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index 2c955920122..250ddea1f0f 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -1,5 +1,5 @@ // Bluespace crystals, used in telescience and when crushed it will blink you to a random turf. -/obj/item/ore/bluespace_crystal +/obj/item/stack/ore/bluespace_crystal name = "bluespace crystal" desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate." icon = 'icons/obj/telescience.dmi' @@ -13,38 +13,38 @@ toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' -/obj/item/ore/bluespace_crystal/New() +/obj/item/stack/ore/bluespace_crystal/New() ..() pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) -/obj/item/ore/bluespace_crystal/attack_self(var/mob/user) +/obj/item/stack/ore/bluespace_crystal/attack_self(var/mob/user) blink_mob(user) user.drop_item() user.visible_message("[user] crushes the [src]!") qdel(src) -/obj/item/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L) +/obj/item/stack/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L) if(!is_teleport_allowed(L.z)) src.visible_message("[src]'s fragments begin rapidly vibrating and blink out of existence.") qdel(src) return do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg') -/obj/item/ore/bluespace_crystal/throw_impact(atom/hit_atom) +/obj/item/stack/ore/bluespace_crystal/throw_impact(atom/hit_atom) ..() if(isliving(hit_atom)) blink_mob(hit_atom) qdel(src) -// Blueapce crystal fragments (stops point farming) -/obj/item/ore/bluespace_crystal/refined +// Bluespace crystal fragments (stops point farming) +/obj/item/stack/ore/bluespace_crystal/refined name = "refined bluespace crystal" points = 0 refined_type = null // Artifical bluespace crystal, doesn't give you much research. -/obj/item/ore/bluespace_crystal/artificial +/obj/item/stack/ore/bluespace_crystal/artificial name = "artificial bluespace crystal" desc = "An artificially made bluespace crystal, it looks delicate." origin_tech = "bluespace=3;plasmatech=4" @@ -55,7 +55,7 @@ // Polycrystals, aka stacks -var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/refined, 1)) +var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/stack/ore/bluespace_crystal/refined, 1)) /obj/item/stack/sheet/bluespace_crystal name = "bluespace polycrystal" diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 09f4ffa7920..a6e24f43fdc 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -14,8 +14,8 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/telesci_pad(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) @@ -25,8 +25,8 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/telesci_pad(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) component_parts += new /obj/item/stock_parts/capacitor/super(null) component_parts += new /obj/item/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index f0f1654ac30..f8c1d6cc936 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -49,10 +49,10 @@ /obj/machinery/computer/telescience/Initialize() ..() for(var/i = 1; i <= starting_crystals; i++) - crystals += new /obj/item/ore/bluespace_crystal/artificial(null) // starting crystals + crystals += new /obj/item/stack/ore/bluespace_crystal/artificial(null) // starting crystals /obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/ore/bluespace_crystal)) + if(istype(W, /obj/item/stack/ore/bluespace_crystal)) if(crystals.len >= max_crystals) to_chat(user, "There are not enough crystal slots.") return From 108ebfed3a8ffb646f0861cecd84b8dc5dc12316 Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Wed, 10 Oct 2018 17:00:02 +0800 Subject: [PATCH 2/2] Formatting improvement --- code/__DEFINES/admin.dm | 2 +- code/game/machinery/autolathe.dm | 4 +-- code/game/machinery/teleporter.dm | 4 +-- code/game/objects/items/stacks/stack.dm | 26 +++++++-------- .../game/turfs/simulated/floor/fancy_floor.dm | 6 ++-- code/modules/mining/mine_turfs.dm | 6 +--- code/modules/mining/ore.dm | 12 +++---- code/modules/mining/satchel_ore_boxdm.dm | 4 +-- code/modules/telesci/telepad.dm | 6 ++-- code/modules/telesci/telesci_computer.dm | 33 +++++++++---------- 10 files changed, 45 insertions(+), 58 deletions(-) diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index d2ec6860b86..da61e4829c2 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -60,6 +60,6 @@ #define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]" #define ADMIN_JMP(src) "(JMP)" #define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" -#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]" +#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] [COORD(src)]" : "nonexistent location" ]" #define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" #define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 07c62451efb..426ca39edb6 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -218,9 +218,9 @@ /obj/machinery/autolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) switch(id_inserted) if(MAT_METAL) - flick("autolathe_o",src)//plays metal insertion animation + flick("autolathe_o", src)//plays metal insertion animation if(MAT_GLASS) - flick("autolathe_r",src)//plays glass insertion animation + flick("autolathe_r", src)//plays glass insertion animation use_power(min(1000, amount_inserted / 100)) SSnanoui.update_uis(src) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 8ed7867c66a..c6e9d19b1ff 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -281,7 +281,7 @@ link_power_station() component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 3) component_parts += new /obj/item/stock_parts/matter_bin(null) RefreshParts() @@ -289,7 +289,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/teleporter_hub(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 3) component_parts += new /obj/item/stock_parts/matter_bin/super(null) RefreshParts() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 27ccab54202..bd06be3282b 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -165,7 +165,6 @@ var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) - var/atom/creation_loc = (loc == usr) ? usr.loc : loc if(!multiplier) multiplier = 1 @@ -180,11 +179,11 @@ to_chat(usr, "The [R.title] won't fit here!") return FALSE - if(R.one_per_turf && (locate(R.result_type) in creation_loc)) + if(R.one_per_turf && (locate(R.result_type) in usr.drop_location())) to_chat(usr, "There is another [R.title] here!") return 0 - if(R.on_floor && !istype(creation_loc, /turf/simulated)) + if(R.on_floor && !istype(usr.drop_location(), /turf/simulated)) to_chat(usr, "\The [R.title] must be constructed on the floor!") return 0 @@ -196,15 +195,16 @@ if(amount < R.req_amount * multiplier) return - var/atom/O = new R.result_type(creation_loc) + var/atom/O + if(R.max_res_amount > 1) //Is it a stack? + O = new R.result_type(usr.drop_location(), R.res_amount * multiplier) + else + O = new R.result_type(usr.drop_location()) O.setDir(usr.dir) - if(R.max_res_amount > 1) - var/obj/item/stack/new_item = O - new_item.amount = R.res_amount * multiplier + use(R.req_amount * multiplier) R.post_build(src, O) - amount -= R.req_amount * multiplier if(amount < 1) // Just in case a stack's amount ends up fractional somehow var/oldsrc = src src = null //dont kill proc after del() @@ -280,11 +280,11 @@ //get amount from user var/min = 0 var/max = get_amount() - var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum[max])") as num) - if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount()) + var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as num) + if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount()) return change_stack(user,stackmaterial) - to_chat(user, "You take [stackmaterial] sheets out of the stack") + to_chat(user, "You take [stackmaterial] sheets out of the stack.") /obj/item/stack/proc/change_stack(mob/user,amount) var/obj/item/stack/F = new type(user, amount, FALSE) @@ -294,7 +294,6 @@ add_fingerprint(user) F.add_fingerprint(user) use(amount) - zero_amount() /obj/item/stack/attackby(obj/item/W, mob/user, params) if(istype(W, merge_type)) @@ -302,7 +301,7 @@ merge(S) to_chat(user, "Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.") else - ..() + return ..() /obj/item/stack/proc/zero_amount() if(amount < 1) @@ -322,7 +321,6 @@ S.copy_evidences(src) S.add(transfer) use(transfer) - zero_amount() /obj/item/stack/proc/copy_evidences(obj/item/stack/from) blood_DNA = from.blood_DNA diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index eacb56d2a17..8feb2960da0 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -73,8 +73,7 @@ if(..()) return if(istype(C, /obj/item/shovel)) - new /obj/item/stack/ore/glass(src) - new /obj/item/stack/ore/glass(src) //Make some sand if you shovel grass + new /obj/item/stack/ore/glass(src, 2) //Make some sand if you shovel grass to_chat(user, "You shovel the grass.") playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) make_plating() @@ -92,8 +91,7 @@ if(..()) return if(istype(W, /obj/item/shovel)) - new /obj/item/stack/ore/glass/basalt(src) - new /obj/item/stack/ore/glass/basalt(src) + new /obj/item/stack/ore/glass/basalt(src, 2) user.visible_message("[user] digs up [src].", "You uproot [src].") playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) make_plating() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 881130098e4..9aff1b14a44 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -532,11 +532,7 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/floor/plating/airless/asteroid/proc/gets_dug() if(dug) return - new/obj/item/stack/ore/glass(src) - new/obj/item/stack/ore/glass(src) - new/obj/item/stack/ore/glass(src) - new/obj/item/stack/ore/glass(src) - new/obj/item/stack/ore/glass(src) + new/obj/item/stack/ore/glass(src, 5) dug = 1 playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE icon_plating = "asteroid_dug" diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 747efd4022e..08b81e1fd78 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -16,9 +16,9 @@ /obj/item/stack/ore/New() ..() - pixel_x = rand(0,16)-8 - pixel_y = rand(0,8)-8 - if(is_mining_level(src.z)) + pixel_x = rand(0, 16) - 8 + pixel_y = rand(0, 8) - 8 + if(is_mining_level(z)) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) /obj/item/stack/ore/attackby(obj/item/I, mob/user, params) @@ -57,11 +57,11 @@ if(isnull(refined_type)) return else - var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE/100) * amount, 1) + var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE / 100) * amount, 1) if(amountrefined < 1) qdel(src) else - new refined_type(get_turf(src.loc), amountrefined) + new refined_type(get_turf(loc), amountrefined) qdel(src) /obj/item/stack/ore/uranium @@ -115,7 +115,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ C.EyeBlurry(6) C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage C.AdjustConfused(5) - to_chat(C, "\The [src] gets into your eyes! The pain, it burns!") + to_chat(C, "[src] gets into your eyes! The pain, it burns!") qdel(src) /obj/item/stack/ore/glass/basalt diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 5810bcf3584..0edb81c8321 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -27,8 +27,8 @@ else if(istype(W, /obj/item/crowbar)) playsound(src, W.usesound, 50, 1) var/obj/item/crowbar/C = W - if(do_after(user, 50*C.toolspeed, target = src)) - user.visible_message("[user] pries \the [src] apart.", "You pry apart \the [src].", "You hear splitting wood.") + if(do_after(user, 50 * C.toolspeed, target = src)) + user.visible_message("[user] pries [src] apart.", "You pry apart [src].", "You hear splitting wood.") deconstruct(TRUE, user) /obj/structure/ore_box/attack_hand(mob/user) diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index a6e24f43fdc..73da331e342 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -14,8 +14,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/telesci_pad(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) @@ -25,8 +24,7 @@ ..() component_parts = list() component_parts += new /obj/item/circuitboard/telesci_pad(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) - component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null) + component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2) component_parts += new /obj/item/stock_parts/capacitor/super(null) component_parts += new /obj/item/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index f8c1d6cc936..2e3cd109062 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -26,9 +26,8 @@ var/teleport_cooldown = 0 // every index requires a bluespace crystal var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80) var/teleporting = 0 - var/starting_crystals = 0 + var/crystals = 0 var/max_crystals = 4 - var/list/crystals = list() var/obj/item/gps/inserted_gps /obj/machinery/computer/telescience/New() @@ -44,29 +43,27 @@ /obj/machinery/computer/telescience/examine(mob/user) ..(user) - to_chat(user, "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.") + to_chat(user, "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots.") /obj/machinery/computer/telescience/Initialize() ..() - for(var/i = 1; i <= starting_crystals; i++) - crystals += new /obj/item/stack/ore/bluespace_crystal/artificial(null) // starting crystals /obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/ore/bluespace_crystal)) - if(crystals.len >= max_crystals) + var/obj/item/stack/ore/bluespace_crystal/B = W + if(crystals >= max_crystals) to_chat(user, "There are not enough crystal slots.") return - user.drop_item() - crystals += W - W.loc = null - user.visible_message("[user] inserts [W] into \the [src]'s crystal slot.") + crystals += 1 + user.visible_message("[user] inserts a [B.singular_name] into [src]'s crystal slot.") + B.use(1) updateUsrDialog() else if(istype(W, /obj/item/gps)) if(!inserted_gps) inserted_gps = W user.unEquip(W) W.loc = src - user.visible_message("[user] inserts [W] into \the [src]'s GPS device slot.") + user.visible_message("[user] inserts [W] into [src]'s GPS device slot.") updateUsrDialog() else if(istype(W, /obj/item/multitool)) var/obj/item/multitool/M = W @@ -115,7 +112,7 @@ t += "
" for(var/i = 1; i <= power_options.len; i++) - if(crystals.len + telepad.efficiency < i) + if(crystals + telepad.efficiency < i) t += "[power_options[i]]" continue if(power == power_options[i]) @@ -322,11 +319,11 @@ return /obj/machinery/computer/telescience/proc/eject() - - for(var/obj/item/I in crystals) - I.loc = loc - I.pixel_y = -9 - crystals -= I + var/to_eject + for(var/i in 1 to crystals) + to_eject += 1 + crystals -= 1 + new /obj/item/stack/ore/bluespace_crystal/artificial(drop_location(), to_eject) power = 0 /obj/machinery/computer/telescience/Topic(href, href_list) @@ -355,7 +352,7 @@ var/index = href_list["setpower"] index = text2num(index) if(index != null && power_options[index]) - if(crystals.len + telepad.efficiency >= index) + if(crystals + telepad.efficiency >= index) power = power_options[index] if(href_list["setz"])