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 += "