diff --git a/code/game/turfs/flooring/_flooring.dm b/code/game/turfs/flooring/_flooring.dm index 3fc9cf8adc2..9d3ce2f33cf 100644 --- a/code/game/turfs/flooring/_flooring.dm +++ b/code/game/turfs/flooring/_flooring.dm @@ -347,3 +347,6 @@ var/global/list/flooring_cache = list() /decl/flooring/proc/handle_environment_proc(turf/floor/target) return PROCESS_KILL + +/decl/flooring/proc/handle_turf_digging(turf/floor/target) + return TRUE diff --git a/code/game/turfs/flooring/flooring_grass.dm b/code/game/turfs/flooring/flooring_grass.dm index 802c509f573..a9e70bbf736 100644 --- a/code/game/turfs/flooring/flooring_grass.dm +++ b/code/game/turfs/flooring/flooring_grass.dm @@ -21,6 +21,10 @@ return TRUE return ..() +/decl/flooring/grass/handle_turf_digging(turf/floor/target) + target.set_flooring(null) + return FALSE + /decl/flooring/grass/wild name = "wild grass" icon = 'icons/turf/flooring/wildgrass.dmi' diff --git a/code/game/turfs/floors/floor_digging.dm b/code/game/turfs/floors/floor_digging.dm index 4262e953ad8..3351970e8af 100644 --- a/code/game/turfs/floors/floor_digging.dm +++ b/code/game/turfs/floors/floor_digging.dm @@ -1,3 +1,6 @@ +/turf/floor + var/gemstone_dropped = FALSE + /turf/floor/proc/is_fundament() var/decl/flooring/flooring = get_topmost_flooring() return flooring ? !flooring.constructed : TRUE @@ -23,21 +26,31 @@ /turf/floor/can_dig_trench(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return can_be_dug(tool_hardness, using_tool) && get_physical_height() > -(FLUID_DEEP) -/turf/floor/dig_trench(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) - if(!is_fundament()) +/turf/floor/dig_trench(mob/user, tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) + if(is_fundament()) + handle_trench_digging(user) + +/turf/floor/proc/handle_trench_digging(mob/user) + var/decl/flooring/flooring = get_topmost_flooring() + if(!flooring.handle_turf_digging(src)) return - var/new_height = max(get_physical_height()-TRENCH_DEPTH_PER_ACTION, -(FLUID_DEEP)) - var/height_diff = abs(get_physical_height()-new_height) // Only drop mats if we actually changed the turf height sufficiently. + var/old_height = get_physical_height() + var/new_height = max(old_height-TRENCH_DEPTH_PER_ACTION, -(FLUID_DEEP)) + var/height_diff = abs(old_height-new_height) if(height_diff >= TRENCH_DEPTH_PER_ACTION) - drop_diggable_resources() + drop_diggable_resources(user) set_physical_height(new_height) -/turf/floor/dig_pit(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) +/turf/floor/dig_pit(mob/user, tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return has_flooring() ? null : ..() /turf/floor/get_diggable_resources() var/decl/material/my_material = get_material() if(is_fundament() && istype(my_material) && my_material.dug_drop_type && (get_physical_height() > -(FLUID_DEEP))) - return list(my_material.dug_drop_type = list(3, 2)) - return null + . = list() + .[my_material.dug_drop_type] = list("amount" = 3, "variance" = 2, "material" = my_material.type) + if(!gemstone_dropped && prob(my_material.gemstone_chance) && LAZYLEN(my_material.gemstone_types)) + gemstone_dropped = TRUE + var/gem_mat = pick(my_material.gemstone_types) + .[/obj/item/gemstone] = list("amount" = 1, "material" = gem_mat) diff --git a/code/game/turfs/turf_digging.dm b/code/game/turfs/turf_digging.dm index 6eea34afe2e..5f832ae8045 100644 --- a/code/game/turfs/turf_digging.dm +++ b/code/game/turfs/turf_digging.dm @@ -1,5 +1,5 @@ -/// Return an assoc list of resource item type to a base and a random component -/// ex. return list(/obj/item/stack/material/ore/handful/sand = list(3, 2)) +/// Return an assoc list of resource item type to a metadata list containing base amount, random component, and material override +/// ex. return list(/obj/item/stack/material/ore/handful/sand = list("amount" = 3, "variance" = 2, "material" = /decl/material/foo)) /turf/proc/get_diggable_resources() return null @@ -10,17 +10,31 @@ /turf/proc/can_be_dug(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return FALSE -/turf/proc/drop_diggable_resources() +/turf/proc/drop_diggable_resources(mob/user) SHOULD_CALL_PARENT(TRUE) var/list/diggable_resources = get_diggable_resources() if(!length(diggable_resources)) return for(var/resource_type in diggable_resources) - var/list/resource_amounts = diggable_resources[resource_type] + + var/list/resource_data = diggable_resources[resource_type] + var/list/loot = list() + var/amount = max(1, resource_data["amount"] + resource_data["variance"]) + var/spawn_material = resource_data["material"] + if(ispath(resource_type, /obj/item/stack)) - LAZYADD(., new resource_type(src, resource_amounts[1] + rand(resource_amounts[2]), get_material_type())) + loot += new resource_type(src, amount, spawn_material) else - LAZYADD(., new resource_type(src, get_material_type())) + for(var/i = 1 to amount) + loot += new resource_type(src, spawn_material) + + if(length(loot)) + if(user) + for(var/obj/item/thing in loot) + if(thing.material && thing.material != get_material()) + to_chat(user, SPAN_NOTICE("You unearth \a [thing]!")) + LAZYADD(., loot) + clear_diggable_resources() // Procs for digging pits. @@ -29,10 +43,10 @@ /turf/proc/try_dig_pit(var/mob/user, var/obj/item/tool, using_tool = TOOL_SHOVEL) if((!user && !tool) || tool.do_tool_interaction(using_tool, user, src, 5 SECONDS, check_skill = SKILL_HAULING, set_cooldown = TRUE)) - return dig_pit(tool?.material?.hardness, using_tool) + return dig_pit(user, tool?.material?.hardness, using_tool) return null -/turf/proc/dig_pit(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) +/turf/proc/dig_pit(mob/user, tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return can_dig_pit(tool_hardness, using_tool) && new /obj/structure/pit(src) // Procs for digging farms. @@ -44,10 +58,10 @@ if(!material?.tillable) return if((!user && !tool) || tool.do_tool_interaction(using_tool, user, src, 5 SECONDS, set_cooldown = TRUE, check_skill = SKILL_BOTANY)) - return dig_farm(tool?.material?.hardness, using_tool) + return dig_farm(user, tool?.material?.hardness, using_tool) return null -/turf/proc/dig_farm(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) +/turf/proc/dig_farm(mob/user, tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return can_dig_farm(tool_hardness, using_tool) && new /obj/machinery/portable_atmospherics/hydroponics/soil(src) // Proc for digging trenches. @@ -56,8 +70,8 @@ /turf/proc/try_dig_trench(mob/user, obj/item/tool, using_tool = TOOL_SHOVEL) if((!user && !tool) || tool.do_tool_interaction(using_tool, user, src, 2.5 SECONDS, check_skill = SKILL_HAULING, set_cooldown = TRUE)) - return dig_trench(tool?.material?.hardness, using_tool) + return dig_trench(user, tool?.material?.hardness, using_tool) return null -/turf/proc/dig_trench(tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) +/turf/proc/dig_trench(mob/user, tool_hardness = MAT_VALUE_MALLEABLE, using_tool = TOOL_SHOVEL) return FALSE diff --git a/code/game/turfs/walls/wall_natural.dm b/code/game/turfs/walls/wall_natural.dm index e878e59747e..96967f55e2e 100644 --- a/code/game/turfs/walls/wall_natural.dm +++ b/code/game/turfs/walls/wall_natural.dm @@ -10,6 +10,7 @@ var/image/ore_overlay var/static/list/exterior_wall_shine_cache = list() var/being_mined = FALSE + var/gem_dropped = FALSE /turf/wall/natural/flooded flooded = /decl/material/liquid/water @@ -150,6 +151,10 @@ if(prob(30) && !ramp_slope_direction && material) var/drop_type = material.ore_type || /obj/item/stack/material/ore pass_geodata_to(new drop_type(src, material.ore_result_amount, material.type)) + if(!gem_dropped && material && prob(material.gemstone_chance) && LAZYLEN(material.gemstone_types)) + gem_dropped = TRUE + new /obj/item/gemstone(get_turf(src), pickweight(material.gemstone_types)) + visible_message(SPAN_NOTICE("A glimmer of colour shines amongst the rubble...")) /turf/wall/natural/proc/pass_geodata_to(obj/O) var/datum/extension/geological_data/ours = get_extension(src, /datum/extension/geological_data) diff --git a/code/modules/gemstones/_gemstone.dm b/code/modules/gemstones/_gemstone.dm new file mode 100644 index 00000000000..087266d34f8 --- /dev/null +++ b/code/modules/gemstones/_gemstone.dm @@ -0,0 +1,89 @@ +var/global/list/_available_gemstone_cuts + +/proc/get_available_gemstone_cuts() + if(!global._available_gemstone_cuts) + global._available_gemstone_cuts = list() + for(var/decl/gemstone_cut/cut as anything in decls_repository.get_decls_of_type_unassociated(/decl/gemstone_cut)) + if(cut.can_be_cut) + global._available_gemstone_cuts += cut + return global._available_gemstone_cuts + +/obj/item/gemstone + name = "uncut gemstone" + desc = "A hunk of uncut gemstone." + icon = 'icons/obj/items/gemstones/uncut.dmi' + w_class = ITEM_SIZE_TINY + material = /decl/material/solid/gemstone/diamond + material_alteration = MAT_FLAG_ALTERATION_COLOR // Name and desc are handled manually. + var/decl/gemstone_cut/cut = /decl/gemstone_cut/uncut + var/work_skill = SKILL_CONSTRUCTION + +/obj/item/gemstone/Initialize(ml, material_key) + cut = GET_DECL(cut) + . = ..() + update_from_cut() + +/obj/item/gemstone/proc/update_from_cut() + icon = cut.icon + desc = cut.desc + update_name() + update_icon() + +/obj/item/gemstone/update_name() + SetName("[cut.adjective] [material.solid_name]") + +/obj/item/gemstone/get_single_monetary_worth() + . = ..() * cut.worth_multiplier + +/obj/item/gemstone/attackby(obj/item/used_item, mob/user) + if(IS_HAMMER(used_item) && !user.check_intent(I_FLAG_HARM)) // TOOL_CHISEL when? + if(!cut.can_attempt_cut) + to_chat(user, SPAN_WARNING("\The [src] has already been cut.")) + return TRUE + var/decl/gemstone_cut/desired_cut = input(user, "What cut would you like to attempt?", "Cut Gemstone") as null|anything in get_available_gemstone_cuts() + if(!desired_cut || QDELETED(src) || QDELETED(user) || !CanPhysicallyInteract(user) || !cut.can_attempt_cut) + return TRUE + user.visible_message(SPAN_NOTICE("\The [user] begins carefully cutting \the [src].")) + if(!user.do_skilled(10 SECONDS, work_skill, src, check_holding = TRUE) || !CanPhysicallyInteract(user)) + if(QDELETED(src) || !cut.can_attempt_cut || QDELETED(user)) + return TRUE + to_chat(user, SPAN_DANGER("You were interrupted, botching the cut!")) + cut = GET_DECL(/decl/gemstone_cut/poor) + else + if(QDELETED(src) || !cut.can_attempt_cut || QDELETED(user)) + return TRUE + user.visible_message(SPAN_NOTICE("\The [user] finishes cutting \the [src].")) + if(user.skill_fail_prob(work_skill, 100, SKILL_EXPERT)) + to_chat(user, SPAN_DANGER("You've done a really poor job...")) + cut = GET_DECL(/decl/gemstone_cut/poor) + else + cut = desired_cut + update_from_cut() + return TRUE + . = ..() + +// Subtypes for mapping/spawning etc. +/obj/item/gemstone/poor + name = "poorly-cut diamond" + cut = /decl/gemstone_cut/poor + icon = 'icons/obj/items/gemstones/poor.dmi' + +/obj/item/gemstone/baguette + name = "baguette-cut diamond" + cut = /decl/gemstone_cut/baguette + icon = 'icons/obj/items/gemstones/baguette.dmi' + +/obj/item/gemstone/hexagon + name = "hexagon-cut diamond" + cut = /decl/gemstone_cut/hexagon + icon = 'icons/obj/items/gemstones/hexagon.dmi' + +/obj/item/gemstone/octagon + name = "octagon-cut diamond" + cut = /decl/gemstone_cut/octagon + icon = 'icons/obj/items/gemstones/octagon.dmi' + +/obj/item/gemstone/round + name = "round-cut diamond" + cut = /decl/gemstone_cut/round + icon = 'icons/obj/items/gemstones/round.dmi' diff --git a/code/modules/gemstones/gemstone_cuts.dm b/code/modules/gemstones/gemstone_cuts.dm new file mode 100644 index 00000000000..86509cc2c17 --- /dev/null +++ b/code/modules/gemstones/gemstone_cuts.dm @@ -0,0 +1,75 @@ +/decl/gemstone_cut + abstract_type = /decl/gemstone_cut + var/worth_multiplier = 1.5 + var/name + var/desc + var/adjective + var/icon + // Can we cut this cut into a new cut? + var/can_attempt_cut = FALSE + // Can we attempt to cut to this cut? + var/can_be_cut = TRUE + +/decl/gemstone_cut/validate() + . = ..() + if(!istext(name)) + . += "invalid or null name" + if(!istext(desc)) + . += "invalid or null desc" + if(!istext(adjective)) + . += "invalid or null adjective" + if(icon) + if(!check_state_in_icon(ICON_STATE_WORLD, icon)) + . += "missing world state from '[icon]'" + if(!check_state_in_icon(ICON_STATE_INV, icon)) + . += "missing inventory state from '[icon]'" + var/check_state = "[ICON_STATE_WORLD]-set" + if(!check_state_in_icon(check_state, icon)) + . += "missing state '[check_state]' from '[icon]'" + check_state = "[ICON_STATE_INV]-set" + if(!check_state_in_icon(check_state, icon)) + . += "missing state '[check_state]' from '[icon]'" + else + . += "null or unset icon" + +// Subtypes below. +/decl/gemstone_cut/uncut + name = "uncut" + adjective = "uncut" + desc = "A rough, uncut gemstone." + icon = 'icons/obj/items/gemstones/uncut.dmi' + can_attempt_cut = TRUE + can_be_cut = FALSE + worth_multiplier = 1 + +/decl/gemstone_cut/poor + name = "poorly-cut" + adjective = "poorly-cut" + desc = "A poorly-cut and uneven gemstone." + icon = 'icons/obj/items/gemstones/poor.dmi' + worth_multiplier = 0.5 + can_be_cut = FALSE + +/decl/gemstone_cut/baguette + name = "baguette" + adjective = "baguette-cut" + desc = "A square-cut gemstone." + icon = 'icons/obj/items/gemstones/baguette.dmi' + +/decl/gemstone_cut/hexagon + name = "hexagon" + adjective = "hexagon-cut" + desc = "A hexagon-cut gemstone." + icon = 'icons/obj/items/gemstones/hexagon.dmi' + +/decl/gemstone_cut/octagon + name = "octagon" + adjective = "octagon-cut" + desc = "A octagon-cut gemstone." + icon = 'icons/obj/items/gemstones/octagon.dmi' + +/decl/gemstone_cut/round + name = "round" + adjective = "round-cut" + desc = "A round-cut gemstone." + icon = 'icons/obj/items/gemstones/round.dmi' diff --git a/code/modules/materials/_materials.dm b/code/modules/materials/_materials.dm index 01aa188e0cc..4b12ce62dee 100644 --- a/code/modules/materials/_materials.dm +++ b/code/modules/materials/_materials.dm @@ -363,6 +363,11 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay) /// If an item has a null paint_verb, it automatically sets it based on material. var/paint_verb = "painted" + /// Chance of a natural wall made of this material dropping a gemstone, if the gemstone_types list is populated. + var/gemstone_chance = 5 + /// Assoc weighted list of gemstone material types to weighting. + var/list/gemstone_types + // Placeholders for light tiles and rglass. /decl/material/proc/reinforce(var/mob/user, var/obj/item/stack/material/used_stack, var/obj/item/stack/material/target_stack, var/use_sheets = 1) if(!used_stack.can_use(use_sheets)) diff --git a/code/modules/materials/definitions/solids/materials_solid_gemstones.dm b/code/modules/materials/definitions/solids/materials_solid_gemstones.dm index f0718ad4ccf..dcb3b5d38a6 100644 --- a/code/modules/materials/definitions/solids/materials_solid_gemstones.dm +++ b/code/modules/materials/definitions/solids/materials_solid_gemstones.dm @@ -1,54 +1,69 @@ /decl/material/solid/gemstone - name = null - flags = MAT_FLAG_UNMELTABLE - cut_delay = 60 - color = COLOR_DIAMOND - opacity = 0.4 - shard_type = SHARD_SHARD - tableslam_noise = 'sound/effects/Glasshit.ogg' - reflectiveness = MAT_VALUE_MIRRORED - conductive = 0 - ore_icon_overlay = "gems" - default_solid_form = /obj/item/stack/material/gemstone - abstract_type = /decl/material/solid/gemstone - sound_manipulate = 'sound/foley/pebblespickup1.ogg' - sound_dropped = 'sound/foley/pebblesdrop1.ogg' + flags = MAT_FLAG_UNMELTABLE + cut_delay = 60 + color = COLOR_DIAMOND + opacity = 0.4 + shard_type = SHARD_SHARD + tableslam_noise = 'sound/effects/Glasshit.ogg' + conductive = 0 + ore_icon_overlay = "gems" + default_solid_form = /obj/item/stack/material/gemstone + abstract_type = /decl/material/solid/gemstone + sound_manipulate = 'sound/foley/pebblespickup1.ogg' + sound_dropped = 'sound/foley/pebblesdrop1.ogg' + exoplanet_rarity_plant = MAT_RARITY_UNCOMMON + exoplanet_rarity_gas = MAT_RARITY_NOWHERE + dissolves_in = MAT_SOLVENT_IMMUNE + dissolves_into = null + hardness = MAT_VALUE_VERY_HARD + reflectiveness = MAT_VALUE_VERY_SHINY + construction_difficulty = MAT_VALUE_VERY_HARD_DIY /decl/material/solid/gemstone/diamond - name = "diamond" - uid = "solid_diamond" - lore_text = "An extremely hard allotrope of carbon. Valued for its use in industrial tools." - melting_point = 4300 - boiling_point = null - ignition_point = null - brute_armor = 10 - burn_armor = 50 // Diamond walls are immune to fire, therefore it makes sense for them to be almost undamageable by burn damage type. - stack_origin_tech = @'{"materials":6}' - hardness = MAT_VALUE_VERY_HARD + 20 - construction_difficulty = MAT_VALUE_VERY_HARD_DIY - ore_name = "rough diamonds" - ore_result_amount = 1 - ore_spread_chance = 10 - ore_scan_icon = "mineral_rare" - xarch_source_mineral = /decl/material/gas/ammonia - value = 1.8 - sparse_material_weight = 5 - rich_material_weight = 5 - ore_type_value = ORE_PRECIOUS - ore_data_value = 2 - exoplanet_rarity_plant = MAT_RARITY_UNCOMMON - exoplanet_rarity_gas = MAT_RARITY_NOWHERE - dissolves_in = MAT_SOLVENT_IMMUNE - dissolves_into = null + name = "diamond" + uid = "solid_diamond" + lore_text = "An extremely hard allotrope of carbon. Valued for its use in industrial tools." + melting_point = 4300 + boiling_point = null + ignition_point = null + brute_armor = 10 + burn_armor = 50 // Diamond walls are immune to fire, therefore it makes sense for them to be almost undamageable by burn damage type. + stack_origin_tech = @'{"materials":6}' + hardness = MAT_VALUE_VERY_HARD + 20 + ore_name = "rough diamonds" + ore_result_amount = 1 + ore_spread_chance = 10 + ore_scan_icon = "mineral_rare" + xarch_source_mineral = /decl/material/gas/ammonia + value = 1.8 + sparse_material_weight = 5 + rich_material_weight = 5 + ore_type_value = ORE_PRECIOUS + ore_data_value = 2 /decl/material/solid/gemstone/crystal - name = "crystal" - uid = "solid_crystal" - hardness = MAT_VALUE_VERY_HARD - reflectiveness = MAT_VALUE_VERY_SHINY + name = "crystal" + uid = "solid_crystal" + value = 2 hidden_from_codex = TRUE - value = 2 - exoplanet_rarity_plant = MAT_RARITY_UNCOMMON - exoplanet_rarity_gas = MAT_RARITY_NOWHERE - dissolves_in = MAT_SOLVENT_IMMUNE - dissolves_into = null + +/decl/material/solid/gemstone/ruby + name = "ruby" + lore_text = "A rich red stone sometimes found in marble." + uid = "solid_ruby" + value = 1.6 + color = "#d00000" + +/decl/material/solid/gemstone/sapphire + name = "sapphire" + lore_text = "A deep blue gemstone sometimes found in clay or other sediment." + uid = "solid_sapphite" + value = 1.6 + color = "#2983de" + +/decl/material/solid/gemstone/topaz + name = "topaz" + lore_text = "A golden gemstone sometimes found in granite." + uid = "solid_topaz" + value = 1.6 + color = "#f7b92d" diff --git a/code/modules/materials/definitions/solids/materials_solid_mineral.dm b/code/modules/materials/definitions/solids/materials_solid_mineral.dm index 2be84c6c5df..3dea5d14d81 100644 --- a/code/modules/materials/definitions/solids/materials_solid_mineral.dm +++ b/code/modules/materials/definitions/solids/materials_solid_mineral.dm @@ -258,6 +258,8 @@ // lower than the temperature expected from a kiln so that clay can be used to make bricks to make a high-temperature kiln. bakes_into_at_temperature = 950 CELSIUS can_backfill_turf_type = /turf/floor/clay + gemstone_chance = 0.01 + gemstone_types = list(/decl/material/solid/gemstone/sapphire = 1) /decl/material/solid/soil name = "soil" diff --git a/code/modules/materials/definitions/solids/materials_solid_stone.dm b/code/modules/materials/definitions/solids/materials_solid_stone.dm index 6334b03f1b8..acf1e65ed86 100644 --- a/code/modules/materials/definitions/solids/materials_solid_stone.dm +++ b/code/modules/materials/definitions/solids/materials_solid_stone.dm @@ -51,6 +51,7 @@ brute_armor = 15 explosion_resistance = 15 integrity = 500 //granite is very strong + gemstone_types = list(/decl/material/solid/gemstone/topaz = 1) dissolves_into = list( /decl/material/solid/silicon = 0.75, /decl/material/solid/bauxite = 0.15, @@ -88,6 +89,7 @@ brute_armor = 3 integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system construction_difficulty = MAT_VALUE_HARD_DIY + gemstone_types = list(/decl/material/solid/gemstone/ruby = 1) /decl/material/solid/stone/basalt name = "basalt" diff --git a/code/modules/mechs/equipment/utility.dm b/code/modules/mechs/equipment/utility.dm index f645599c8ac..f76503b97bb 100644 --- a/code/modules/mechs/equipment/utility.dm +++ b/code/modules/mechs/equipment/utility.dm @@ -517,7 +517,7 @@ for(var/turf/asteroid as anything in RANGE_TURFS(target, 1)) if (!(get_dir(owner, asteroid) & owner.dir)) continue - if(asteroid.can_be_dug(drill_head.material?.hardness) && asteroid.drop_diggable_resources()) + if(asteroid.can_be_dug(drill_head.material?.hardness) && asteroid.drop_diggable_resources(user)) drill_head.durability -= 1 scoop_ore(asteroid) return diff --git a/code/modules/mining/drilling/drill_act.dm b/code/modules/mining/drilling/drill_act.dm index 6a17a4c5b53..39759df1a4c 100644 --- a/code/modules/mining/drilling/drill_act.dm +++ b/code/modules/mining/drilling/drill_act.dm @@ -1,7 +1,7 @@ /turf/proc/drill_act() SHOULD_CALL_PARENT(TRUE) drop_diggable_resources() - dig_pit(MAT_VALUE_VERY_HARD) + dig_pit(tool_hardness = MAT_VALUE_VERY_HARD) var/base_turf = get_base_turf_by_area(src) if(!istype(src, base_turf)) return ChangeTurf(base_turf) diff --git a/icons/obj/items/gemstones/baguette.dmi b/icons/obj/items/gemstones/baguette.dmi new file mode 100644 index 00000000000..1fecb840ccb Binary files /dev/null and b/icons/obj/items/gemstones/baguette.dmi differ diff --git a/icons/obj/items/gemstones/hexagon.dmi b/icons/obj/items/gemstones/hexagon.dmi new file mode 100644 index 00000000000..8b9b72ab453 Binary files /dev/null and b/icons/obj/items/gemstones/hexagon.dmi differ diff --git a/icons/obj/items/gemstones/octagon.dmi b/icons/obj/items/gemstones/octagon.dmi new file mode 100644 index 00000000000..06b5d861757 Binary files /dev/null and b/icons/obj/items/gemstones/octagon.dmi differ diff --git a/icons/obj/items/gemstones/poor.dmi b/icons/obj/items/gemstones/poor.dmi new file mode 100644 index 00000000000..95fb0bb44f4 Binary files /dev/null and b/icons/obj/items/gemstones/poor.dmi differ diff --git a/icons/obj/items/gemstones/round.dmi b/icons/obj/items/gemstones/round.dmi new file mode 100644 index 00000000000..12517ea0b4f Binary files /dev/null and b/icons/obj/items/gemstones/round.dmi differ diff --git a/icons/obj/items/gemstones/uncut.dmi b/icons/obj/items/gemstones/uncut.dmi new file mode 100644 index 00000000000..4f75bfda2a2 Binary files /dev/null and b/icons/obj/items/gemstones/uncut.dmi differ diff --git a/mods/content/fantasy/datum/skills.dm b/mods/content/fantasy/datum/skills.dm index 164ade162b6..f800e76d7be 100644 --- a/mods/content/fantasy/datum/skills.dm +++ b/mods/content/fantasy/datum/skills.dm @@ -73,7 +73,7 @@ /decl/skill/crafting/artifice name = "Artifice" uid = "skill_crafting_artifice" - desc = "Your ability to create, install, and comprehend complex devices and mechanisms, as well as your ability to create finely-detailed objects." + desc = "Your ability to create, install, and comprehend complex devices and mechanisms, as well as your ability to create finely-detailed objects like cut gems or jewellery." levels = list( "Unskilled" = "You know that gears turn together when intermeshed and that axles are used to connect spinning things, but you've never done more work on a machine than hitting it if it's broken. You struggle with the precision needed to work on finely-detailed objects.", "Basic" = "You know some basic mechanical principles, like the construction of a basic pulley, or how to put a wheel on an axle. You could fix a broken or stuck well winch, but you'd struggle to deal with a malfunctioning windmill or granary. You have a steadier hand than most, able to place small gems on jewelry and connect small mechanisms.", @@ -306,3 +306,6 @@ "Experienced" = "You work as an pharmacist, or else you are a doctor with training in chemistry. If you are a pharmacist, you can make most medications. At this stage, you're working mostly by-the-book.
- You can examine held containers for some reagents.", "Master" = "You specialized in chemistry or pharmaceuticals; you are either a medical researcher or professional chemist. You can create custom mixes and make even the trickiest of medications easily. You understand how your pharmaceuticals interact with the bodies of your patients. You are probably the originator of at least one new chemical innovation.
- You can examine held containers for all reagents." ) + +/obj/item/gemstone + work_skill = SKILL_ARTIFICE diff --git a/nebula.dme b/nebula.dme index 1f7e5b38b4b..d286bdf0899 100644 --- a/nebula.dme +++ b/nebula.dme @@ -2459,6 +2459,8 @@ #include "code\modules\games\cards_cag.dm" #include "code\modules\games\spaceball_cards.dm" #include "code\modules\games\tarot.dm" +#include "code\modules\gemstones\_gemstone.dm" +#include "code\modules\gemstones\gemstone_cuts.dm" #include "code\modules\genetics\_gene.dm" #include "code\modules\genetics\plants\_gene_plant.dm" #include "code\modules\genetics\plants\_plant_trait.dm"