diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 60b03559f7f..e15dbcd1711 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -10,6 +10,7 @@ /mob/proc/InitializeHud() if(istype(hud_used)) QDEL_NULL(hud_used) + hud_used = initial(hud_used) if(ispath(hud_used)) hud_used = new hud_used(src) refresh_lighting_master() diff --git a/code/datums/outfits/equipment/survival_box.dm b/code/datums/outfits/equipment/survival_box.dm index c7a04b0d823..0e1fca9dd5c 100644 --- a/code/datums/outfits/equipment/survival_box.dm +++ b/code/datums/outfits/equipment/survival_box.dm @@ -4,6 +4,10 @@ var/name = "survival box option" var/box_type +/decl/survival_box_option/none + name = "nothing" + uid = "survival_box_nothing" + /decl/survival_box_option/survival name = "survival kit" box_type = /obj/item/storage/box/survival diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 596c774cf77..e4a9859cb59 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -186,10 +186,11 @@ var/global/list/outfits_decls_by_type_ if(H.species && !(OUTFIT_ADJUSTMENT_SKIP_SURVIVAL_GEAR & equip_adjustments)) var/decl/survival_box_option/chosen_survival_box = H?.client?.prefs.survival_box_choice - if(outfit_flags & OUTFIT_EXTENDED_SURVIVAL) - H.species.equip_survival_gear(H, /obj/item/storage/box/engineer) - else if(chosen_survival_box?.box_type) - H.species.equip_survival_gear(H, chosen_survival_box.box_type) + if(chosen_survival_box?.box_type) + if(outfit_flags & OUTFIT_EXTENDED_SURVIVAL) + H.species.equip_survival_gear(H, /obj/item/storage/box/engineer) + else + H.species.equip_survival_gear(H, chosen_survival_box.box_type) if(H.client?.prefs?.give_passport) global.using_map.create_passport(H) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 3a48893e150..d8bf2f7ee06 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -267,6 +267,11 @@ else if (isturf(loc) && (!old_loc || !TURF_IS_MIMICKING(old_loc)) && MOVABLE_SHALL_MIMIC(src)) SSzcopy.discover_movable(src) + if(isturf(loc)) + var/turf/T = loc + if(T.reagents) + fluid_act(T.reagents) + //called when src is thrown into hit_atom /atom/movable/proc/throw_impact(atom/hit_atom, var/datum/thrownthing/TT) SHOULD_CALL_PARENT(TRUE) diff --git a/code/game/objects/items/__item.dm b/code/game/objects/items/__item.dm index 9f96108456c..5d86ac77d62 100644 --- a/code/game/objects/items/__item.dm +++ b/code/game/objects/items/__item.dm @@ -520,6 +520,9 @@ /obj/item/proc/equipped(var/mob/user, var/slot) SHOULD_CALL_PARENT(TRUE) + // Clear our alpha mask. + update_turf_alpha_mask() + add_fingerprint(user) hud_layerise() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 3fbb7d5216a..42f8255eb98 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -412,7 +412,7 @@ if(!user.is_holding_offhand(src) || !can_split()) return ..() - var/N = input("How many stacks of [src] would you like to split off?", "Split stacks", 1) as num|null + var/N = input(user, "How many stacks of [src] would you like to split off?", "Split stacks", 1) as num|null if(!N) return TRUE diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index cc2e918bff1..199e10775d5 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -63,6 +63,7 @@ material = /decl/material/solid/organic/plantmatter/grass/dry color = COLOR_BEIGE material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME + replacement_turf_type = /turf/floor/woven /* * Wood @@ -390,6 +391,7 @@ icon_state = "woven" material = /decl/material/solid/organic/plantmatter/grass/dry replacement_turf_type = /turf/floor/woven + material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC /obj/item/stack/tile/roof/try_build_turf(var/mob/user, var/turf/target) diff --git a/code/game/objects/structures/fires.dm b/code/game/objects/structures/fires.dm index 7bb3bb98671..661ac978bae 100644 --- a/code/game/objects/structures/fires.dm +++ b/code/game/objects/structures/fires.dm @@ -146,6 +146,7 @@ return FALSE if(!process_fuel(ignition_temperature)) return FALSE + last_fuel_burn_temperature = max(last_fuel_burn_temperature, ignition_temperature) // needed for initial burn procs to function lit = FIRE_LIT refresh_affected_exterior_turfs() visible_message(SPAN_DANGER("\The [src] catches alight!")) @@ -249,14 +250,12 @@ . = list(type = amount) /obj/structure/fire_source/proc/burn_material(var/decl/material/mat, var/amount) - var/list/burn_products = mat.get_burn_products(amount, last_fuel_burn_temperature) - . = !isnull(burn_products) + . = mat.get_burn_products(amount, last_fuel_burn_temperature) if(.) if(mat.ignition_point && last_fuel_burn_temperature >= mat.ignition_point) if(mat.accelerant_value > FUEL_VALUE_NONE) fuel += amount * (1 + material.accelerant_value) - if(mat.burn_temperature) - last_fuel_burn_temperature = max(last_fuel_burn_temperature, mat.burn_temperature) + last_fuel_burn_temperature = max(last_fuel_burn_temperature, mat.burn_temperature) else if(mat.accelerant_value <= FUEL_VALUE_SUPPRESSANT) fuel -= amount * mat.accelerant_value fuel = max(fuel, 0) diff --git a/code/game/objects/structures/flora/stump.dm b/code/game/objects/structures/flora/stump.dm index 46ad8854a4c..297be6ac8cf 100644 --- a/code/game/objects/structures/flora/stump.dm +++ b/code/game/objects/structures/flora/stump.dm @@ -17,9 +17,9 @@ . = ..() /obj/structure/flora/stump/create_dismantled_products(turf/T) - . = ..() if(log_type) LAZYADD(., new log_type(T, rand(2,3), material?.type, reinf_material?.type)) + . = ..() //Base tree stump /obj/structure/flora/stump/tree diff --git a/code/game/objects/structures/flora/tree.dm b/code/game/objects/structures/flora/tree.dm index 43ab8f54ee3..f42364ecd7c 100644 --- a/code/game/objects/structures/flora/tree.dm +++ b/code/game/objects/structures/flora/tree.dm @@ -68,7 +68,6 @@ animate(transform=M, pixel_x=init_px, time=6, easing=ELASTIC_EASING) /obj/structure/flora/tree/create_dismantled_products(turf/T) - . = ..() if(log_type) LAZYADD(., new log_type(T, rand(max(1,round(log_amount*0.5)), log_amount), material?.type, reinf_material?.type)) if(stump_type) @@ -76,6 +75,7 @@ stump.icon_state = icon_state //A bit dirty maybe, but its probably not worth writing a whole system for this when we have 3 kinds of trees.. if(paint_color) stump.set_color() + . = ..() /obj/structure/flora/tree/pine name = "pine tree" diff --git a/code/game/turfs/exterior/exterior_dirt.dm b/code/game/turfs/exterior/exterior_dirt.dm index e5c591f276c..5ab14bcce25 100644 --- a/code/game/turfs/exterior/exterior_dirt.dm +++ b/code/game/turfs/exterior/exterior_dirt.dm @@ -13,5 +13,5 @@ /turf/exterior/dirt/fluid_act(var/datum/reagents/fluids) SHOULD_CALL_PARENT(FALSE) - var/turf/new_turf = ChangeTurf(/turf/exterior/mud, keep_air = TRUE, keep_air_below = TRUE) + var/turf/new_turf = ChangeTurf(/turf/exterior/mud, keep_air = TRUE, keep_air_below = TRUE, keep_height = TRUE) return new_turf.fluid_act(fluids) diff --git a/code/game/turfs/exterior/exterior_ice.dm b/code/game/turfs/exterior/exterior_ice.dm index acb8d184f22..1fd79e6fb30 100644 --- a/code/game/turfs/exterior/exterior_ice.dm +++ b/code/game/turfs/exterior/exterior_ice.dm @@ -35,4 +35,4 @@ /turf/exterior/snow/handle_melting(list/meltable_materials) . = ..() - ChangeTurf(/turf/exterior/ice) + ChangeTurf(/turf/exterior/ice, keep_height = TRUE) diff --git a/code/game/turfs/exterior/exterior_mud.dm b/code/game/turfs/exterior/exterior_mud.dm index ed86e75a37b..88691073da9 100644 --- a/code/game/turfs/exterior/exterior_mud.dm +++ b/code/game/turfs/exterior/exterior_mud.dm @@ -25,9 +25,14 @@ footstep_type = /decl/footsteps/mud is_fundament_turf = TRUE +/turf/exterior/mud/drop_diggable_resources() + if(get_physical_height() > -(FLUID_DEEP)) + return list(/obj/item/stack/material/lump/large/soil = list(3, 2)) + return ..() + /turf/exterior/mud/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(!reagents?.total_volume) - ChangeTurf(/turf/exterior/dry, keep_air = TRUE, keep_air_below = TRUE) + ChangeTurf(/turf/exterior/dry, keep_air = TRUE, keep_air_below = TRUE, keep_height = TRUE) return return ..() @@ -52,6 +57,6 @@ /turf/exterior/dry/fluid_act(datum/reagents/fluids) SHOULD_CALL_PARENT(FALSE) - var/turf/new_turf = ChangeTurf(/turf/exterior/mud, keep_air = TRUE, keep_air_below = TRUE) + var/turf/new_turf = ChangeTurf(/turf/exterior/mud, keep_air = TRUE, keep_air_below = TRUE, keep_height = TRUE) return new_turf.fluid_act(fluids) diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index e23173d13c3..475e1a49288 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -161,6 +161,9 @@ if(update_open_turfs_above) update_open_above(old_open_turf_type) + for(var/atom/movable/AM in W.contents) + AM.update_turf_alpha_mask() + /turf/proc/transport_properties_from(turf/other) if(other.zone) if(!air) diff --git a/code/game/turfs/walls/wall_natural.dm b/code/game/turfs/walls/wall_natural.dm index e683fc75531..736d4c9a239 100644 --- a/code/game/turfs/walls/wall_natural.dm +++ b/code/game/turfs/walls/wall_natural.dm @@ -9,6 +9,7 @@ var/ramp_slope_direction var/image/ore_overlay var/static/list/exterior_wall_shine_cache = list() + var/being_mined = FALSE /turf/wall/natural/get_paint_examine_message() return SPAN_NOTICE("It has been noticeably discoloured by the elements.") @@ -65,11 +66,16 @@ // Drill out natural walls. /turf/wall/natural/handle_wall_tool_interactions(obj/item/W, mob/user) - if(IS_PICK(W)) + if(IS_PICK(W) && !being_mined) if(W.material?.hardness < max(material?.hardness, reinf_material?.hardness)) to_chat(user, SPAN_WARNING("\The [W] is not hard enough to dig through \the [src].")) - else if(W.do_tool_interaction(TOOL_PICK, user, src, 2 SECONDS, suffix_message = destroy_artifacts(W, INFINITY))) - dismantle_wall() + else + if(being_mined) + return TRUE + being_mined = TRUE + if(W.do_tool_interaction(TOOL_PICK, user, src, 2 SECONDS, suffix_message = destroy_artifacts(W, INFINITY))) + dismantle_wall() + being_mined = FALSE return TRUE return FALSE diff --git a/code/game/turfs/walls/wall_natural_xenoarch.dm b/code/game/turfs/walls/wall_natural_xenoarch.dm index 09da24dccf0..e6b948399c6 100644 --- a/code/game/turfs/walls/wall_natural_xenoarch.dm +++ b/code/game/turfs/walls/wall_natural_xenoarch.dm @@ -61,14 +61,14 @@ if(newDepth >= 200) // This means the rock is mined out fully if(artifact_find) if( excavation_level > 0 || prob(15) ) - var/obj/structure/boulder/B = new(src, material?.type, paint_color) + var/obj/structure/boulder/excavated/B = new(src, material?.type, paint_color) B.artifact_find = artifact_find else place_artifact_debris(1) artifact_find = null SSxenoarch.artifact_spawning_turfs -= src else if(prob(5)) - new /obj/structure/boulder(src, material?.type) + new /obj/structure/boulder/excavated(src, material?.type) dismantle_wall() return diff --git a/code/modules/butchery/butchery.dm b/code/modules/butchery/butchery.dm index 48d0217e559..8af3207230d 100644 --- a/code/modules/butchery/butchery.dm +++ b/code/modules/butchery/butchery.dm @@ -150,14 +150,26 @@ /obj/structure/meat_hook/on_update_icon() ..() - if(occupant) - occupant.set_dir(SOUTH) - var/image/I = image(null) - I.appearance = occupant - var/matrix/M = matrix() - M.Turn(occupant.butchery_rotation) - I.transform = M - add_overlay(I) + if(!occupant) + return + + occupant.set_dir(SOUTH) + + var/image/I = image(null) + I.appearance = occupant + I.appearance_flags |= RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM + I.pixel_x = null + I.pixel_y = null + I.pixel_z = null + I.pixel_w = null + I.layer = FLOAT_LAYER + I.plane = FLOAT_PLANE + + var/matrix/M = matrix() + M.Turn(occupant.butchery_rotation) + I.transform = M + + add_overlay(I) /obj/structure/meat_hook/mob_breakout(mob/living/escapee) . = ..() diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm index 2091879bb86..ed6c34d9ae9 100644 --- a/code/modules/client/preference_setup/general/04_equipment.dm +++ b/code/modules/client/preference_setup/general/04_equipment.dm @@ -106,8 +106,12 @@ if(!ispath(pref.starting_cash_choice, /decl/starting_cash_choice)) pref.starting_cash_choice = global.using_map.default_starting_cash_choice - if(!pref.survival_box_choice && length(global.using_map.survival_box_choices)) // if you have at least one box available, 'none' must be its own bespoke option - pref.survival_box_choice = global.using_map.survival_box_choices[global.using_map.survival_box_choices[1]] + // if you have at least one box available, 'none' must be its own bespoke option + if(length(global.using_map.survival_box_choices)) + if(!pref.survival_box_choice || !(pref.survival_box_choice.type in global.using_map.survival_box_choices)) + pref.survival_box_choice = global.using_map.survival_box_choices[global.using_map.survival_box_choices[1]] + else + pref.survival_box_choice = null /datum/category_item/player_setup_item/physical/equipment/content() . = list() diff --git a/code/modules/crafting/pottery/pottery_structures.dm b/code/modules/crafting/pottery/pottery_structures.dm index 603e9c4d24c..4223582f653 100644 --- a/code/modules/crafting/pottery/pottery_structures.dm +++ b/code/modules/crafting/pottery/pottery_structures.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/structures/kiln.dmi' icon_state = ICON_STATE_WORLD density = TRUE - cap_last_fuel_burn = FALSE + cap_last_fuel_burn = null var/list/pottery = list() var/maximum_items = 3 diff --git a/code/modules/crafting/stack_recipes/recipes_planks.dm b/code/modules/crafting/stack_recipes/recipes_planks.dm index 1b456115690..fe48e635382 100644 --- a/code/modules/crafting/stack_recipes/recipes_planks.dm +++ b/code/modules/crafting/stack_recipes/recipes_planks.dm @@ -29,6 +29,10 @@ result_type = /obj/item/stick difficulty = MAT_VALUE_EASY_DIY +/decl/stack_recipe/planks/bucket + result_type = /obj/item/chems/glass/bucket/wood + difficulty = MAT_VALUE_EASY_DIY + /decl/stack_recipe/planks/noticeboard result_type = /obj/structure/noticeboard on_floor = TRUE @@ -116,3 +120,6 @@ /decl/stack_recipe/planks/furniture/chest result_type = /obj/structure/closet/crate/chest + +/decl/stack_recipe/planks/furniture/meathook + result_type = /obj/structure/meat_hook/improvised \ No newline at end of file diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index fd1f7a1a621..951f6248993 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -17,6 +17,7 @@ plural_name = "sheets" abstract_type = /obj/item/stack/material is_spawnable_type = FALSE // Mapped subtypes set this so they can be spawned from the verb. + material_alteration = MAT_FLAG_ALTERATION_COLOR var/can_be_pulverized = FALSE var/can_be_reinforced = FALSE var/decl/material/reinf_material @@ -188,7 +189,10 @@ /obj/item/stack/material/on_update_icon() . = ..() - alpha = 100 + max(1, amount/25)*(material.opacity * 255) + if(material) + alpha = 100 + max(1, amount/25)*(material.opacity * 255) + else + alpha = initial(alpha) update_state_from_amount() if(drying_wetness > 0) var/image/I = new(icon, icon_state) diff --git a/code/modules/random_map/automata/caves.dm b/code/modules/random_map/automata/caves.dm index 7401624ef1f..128c173143f 100644 --- a/code/modules/random_map/automata/caves.dm +++ b/code/modules/random_map/automata/caves.dm @@ -5,22 +5,16 @@ floor_type = /turf/exterior/barren target_turf_type = /turf/unsimulated/mask - var/mineral_turf = /turf/wall/natural/random - var/list/ore_turfs = list() - var/list/minerals_sparse - var/list/minerals_rich - -/datum/random_map/automata/cave_system/New(var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce, var/used_area) - if(!minerals_sparse) - minerals_sparse = SSmaterials.weighted_minerals_sparse - if(!minerals_rich) - minerals_rich = SSmaterials.weighted_minerals_rich - ..() + var/sparse_mineral_turf = /turf/wall/natural/random + var/rich_mineral_turf = /turf/wall/natural/random/high_chance + var/list/ore_turfs = list() /datum/random_map/automata/cave_system/get_appropriate_path(var/value) switch(value) - if(DOOR_CHAR, EMPTY_CHAR) - return mineral_turf + if(DOOR_CHAR) + return sparse_mineral_turf + if(EMPTY_CHAR) + return rich_mineral_turf if(FLOOR_CHAR) return floor_type if(WALL_CHAR) @@ -69,37 +63,19 @@ if(!origin_x) origin_x = 1 if(!origin_y) origin_y = 1 if(!origin_z) origin_z = 1 - var/tmp_cell var/new_path var/num_applied = 0 for (var/thing in block(locate(origin_x, origin_y, origin_z), locate(limit_x, limit_y, origin_z))) var/turf/T = thing - new_path = null if (!T || (target_turf_type && !istype(T, target_turf_type))) continue - tmp_cell = TRANSLATE_COORD(T.x, T.y) - - var/minerals - switch (map[tmp_cell]) - if(DOOR_CHAR) - new_path = mineral_turf - minerals = pickweight(minerals_sparse) - if(EMPTY_CHAR) - new_path = mineral_turf - minerals = pickweight(minerals_rich) - if(FLOOR_CHAR) - new_path = floor_type - if(WALL_CHAR) - new_path = wall_type - + new_path = get_appropriate_path(map[tmp_cell]) if (!new_path) continue - num_applied += 1 - T.ChangeTurf(new_path, minerals) + T.ChangeTurf(new_path) get_additional_spawns(map[tmp_cell], T) CHECK_TICK - game_log("ASGEN", "Applied [num_applied] turfs.") \ No newline at end of file diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm index 8f641d3f8e3..33377fb6037 100644 --- a/code/modules/xenoarcheaology/boulder.dm +++ b/code/modules/xenoarcheaology/boulder.dm @@ -1,19 +1,28 @@ /obj/structure/boulder name = "boulder" - desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go." + desc = "A large boulder, somewhat bigger than a small boulder." icon = 'icons/obj/mining.dmi' icon_state = "boulder1" density = TRUE opacity = TRUE anchored = TRUE material = /decl/material/solid/stone/sandstone - material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME + material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC var/excavation_level = 0 var/datum/artifact_find/artifact_find +/obj/structure/boulder/excavated + desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go." + /obj/structure/boulder/basalt material = /decl/material/solid/stone/basalt +/obj/structure/boulder/create_dismantled_products(turf/T) + new /obj/item/stack/material/ore(T, rand(3,5), material?.type) + matter = null + material = null + return ..() + /obj/structure/boulder/Initialize(var/ml, var/_mat, var/coloration) . = ..() icon_state = "boulder[rand(1,6)]"