diff --git a/_maps/map_files/Mining/Lavaland.dmm b/_maps/map_files/Mining/Lavaland.dmm index 538b38ba037..8789106bd6a 100644 --- a/_maps/map_files/Mining/Lavaland.dmm +++ b/_maps/map_files/Mining/Lavaland.dmm @@ -1187,6 +1187,7 @@ dir = 8 }, /obj/effect/decal/cleanable/dirt, +/obj/structure/cable, /turf/open/floor/iron/smooth, /area/mine/laborcamp/production) "gM" = ( @@ -3827,6 +3828,10 @@ /obj/item/crowbar/large/emergency, /turf/open/misc/asteroid/basalt/lava_land_surface, /area/lavaland/surface/outdoors) +"uo" = ( +/obj/structure/fluff/minepost, +/turf/open/misc/asteroid/basalt/lava_land_surface, +/area/lavaland/surface/outdoors) "up" = ( /obj/structure/railing{ dir = 1 @@ -4292,6 +4297,16 @@ /obj/item/seeds/banana, /turf/open/misc/asteroid/basalt/lava_land_surface, /area/lavaland/surface/outdoors) +"wT" = ( +/obj/structure/cable, +/obj/effect/turf_decal/loading_area{ + dir = 8 + }, +/obj/effect/turf_decal/weather/dirt{ + dir = 4 + }, +/turf/open/misc/asteroid/basalt/lava_land_surface, +/area/lavaland/surface/outdoors) "wU" = ( /obj/structure/lattice/catwalk, /obj/structure/cable, @@ -4598,6 +4613,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 8 }, +/obj/structure/cable, /turf/open/floor/iron/smooth, /area/mine/laborcamp/production) "yV" = ( @@ -5636,8 +5652,15 @@ /obj/effect/mapping_helpers/airlock/cyclelink_helper{ dir = 4 }, +/obj/structure/cable, /turf/open/floor/iron/smooth, /area/mine/laborcamp/production) +"Gi" = ( +/obj/item/stack/cable_coil/cut, +/turf/open/misc/asteroid/basalt/lava_land_surface{ + icon_state = "basalt_dug" + }, +/area/lavaland/surface/outdoors) "Gl" = ( /obj/item/reagent_containers/cup/glass/colocup, /turf/open/misc/asteroid/basalt/lava_land_surface, @@ -7020,6 +7043,10 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/iron/smooth_large, /area/mine/laborcamp/production) +"NC" = ( +/obj/structure/gulag_vent, +/turf/open/misc/asteroid/basalt/lava_land_surface, +/area/lavaland/surface/outdoors) "NE" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, @@ -7920,6 +7947,16 @@ }, /turf/open/floor/iron/dark/textured_large, /area/mine/laborcamp/security) +"SI" = ( +/obj/effect/turf_decal/weather/dirt{ + dir = 1 + }, +/obj/effect/turf_decal/weather/dirt, +/obj/effect/turf_decal/weather/dirt{ + dir = 8 + }, +/turf/open/misc/asteroid/basalt/lava_land_surface, +/area/lavaland/surface/outdoors) "SL" = ( /obj/effect/mapping_helpers/airlock/cyclelink_helper{ dir = 1 @@ -9154,6 +9191,7 @@ /turf/open/lava/smooth/lava_land_surface, /area/lavaland/surface/outdoors) "ZN" = ( +/obj/structure/cable, /turf/open/floor/iron/smooth, /area/mine/laborcamp/production) "ZP" = ( @@ -19956,7 +19994,7 @@ uU uU uU uU -uU +pU uU uU uU @@ -20212,9 +20250,9 @@ uU uU uU uU -uU -uU -uU +pU +NC +pU uU uU uU @@ -20470,7 +20508,7 @@ uU uU uU uU -uU +pU uU uU uU @@ -21240,8 +21278,8 @@ uU uU uU uU -uU -uU +uo +pU uU uU uU @@ -21755,7 +21793,7 @@ uU uU uU uU -uU +pU uU uU uU @@ -22269,7 +22307,7 @@ uU uU uU uU -pU +SI uU uU uU @@ -22525,7 +22563,7 @@ uU uU uU uU -pU +uo pU pU uU @@ -22783,7 +22821,7 @@ uU uU pU pU -pU +Gi pU pU uU @@ -23040,7 +23078,7 @@ pU pU pU tL -pU +wT pV pU pU diff --git a/code/__DEFINES/mining.dm b/code/__DEFINES/mining.dm index 7a122679dc1..8e7e7d25591 100644 --- a/code/__DEFINES/mining.dm +++ b/code/__DEFINES/mining.dm @@ -67,6 +67,14 @@ /// The amount of ore that is mined from a wall that is VENT_PROX_FAR tiles to a vent. #define ORE_WALL_FAR 1 +/// Lifetime of a boulder platform in seconds when spawned in lava/plasma. +#define PLATFORM_LIFE_DEFAULT 10 SECONDS + +#define PLATFORM_LIFE_GULAG 1 SECONDS +#define PLATFORM_LIFE_SMALL 20 SECONDS +#define PLATFORM_LIFE_MEDIUM 45 SECONDS +#define PLATFORM_LIFE_LARGE 90 SECONDS + /// The number of points a miner gets for discovering a vent, multiplied by BOULDER_SIZE when completing a wave defense minus the discovery bonus. #define MINER_POINT_MULTIPLIER 100 /// The multiplier that gets applied for automatically generated mining points. diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index a98b9ac8f9f..6b84fd10826 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -73,7 +73,8 @@ return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc) /obj/structure/lattice/atom_deconstruct(disassembled = TRUE) - new build_material(get_turf(src), number_of_mats) + if(!isnull(build_material) && number_of_mats >= 1) + new build_material(get_turf(src), number_of_mats) /obj/structure/lattice/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) if(the_rcd.mode == RCD_TURF) @@ -189,3 +190,50 @@ turf_we_place_on.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) qdel(src) + +/obj/structure/lattice/catwalk/boulder + name = "boulder platform" + desc = "A boulder, floating on the molten hot deadly lava. More like a BOATlder." + icon = 'icons/obj/ore.dmi' + icon_state = "boulder_platform" + base_icon_state = "boulder_platform" + smoothing_flags = NONE + smoothing_groups = null + canSmoothWith = null + build_material = null + /// The type of particle to make before the platform collapses. + var/warning_particle = /particles/smoke/ash + +/obj/structure/lattice/catwalk/boulder/Initialize(mapload) + . = ..() + fast_emissive_blocker(src) + AddElement(/datum/element/elevation, pixel_shift = 8) + +/obj/structure/lattice/catwalk/boulder/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers) + if(ismetaltile(attacking_item)) + balloon_alert(user, "too unstable!") + return FALSE + return ..() + +/obj/structure/lattice/catwalk/boulder/CanAllowThrough(atom/movable/mover, border_dir) + if(istype(mover, /obj/structure/ore_box)) + self_destruct() + return TRUE + . = ..() + +/obj/structure/lattice/catwalk/boulder/proc/pre_self_destruct() + if(istype(loc, /turf/open/lava/plasma)) + add_overlay("plasma_cracks") + else + add_overlay("lava_cracks") + animate(src, alpha = 0, time = 2 SECONDS, pixel_y = -16, easing = QUAD_EASING|EASE_IN) + addtimer(CALLBACK(src, PROC_REF(self_destruct)), 2 SECONDS) + +/** + * Handles platforms deleting themselves with a visual effect and message. + */ +/obj/structure/lattice/catwalk/boulder/proc/self_destruct() + visible_message(span_notice("\The [src] sinks and dissapears!")) + playsound(src, 'sound/effects/gas_hissing.ogg', 20) + remove_shared_particles(warning_particle) + deconstruct() diff --git a/code/game/objects/structures/lavaland/gulag_vent.dm b/code/game/objects/structures/lavaland/gulag_vent.dm index d6e30cf1fe3..e0298fd3cc5 100644 --- a/code/game/objects/structures/lavaland/gulag_vent.dm +++ b/code/game/objects/structures/lavaland/gulag_vent.dm @@ -44,7 +44,10 @@ var/stamina_damage_to_inflict = HAS_TRAIT(user, TRAIT_STRENGTH) ? 60 : 120 //Decreases the amount of stamina damage inflicted by half if you're STRONG living_user.mind?.adjust_experience(/datum/skill/athletics, 10) living_user.apply_status_effect(/datum/status_effect/exercised) - new spawned_boulder(get_turf(living_user)) + + var/obj/item/boulder/gulag_boulder = new spawned_boulder(get_turf(living_user)) + gulag_boulder.platform_lifespan = PLATFORM_LIFE_GULAG + living_user.visible_message(span_notice("[living_user] hauls a boulder out of [src].")) living_user.apply_damage(stamina_damage_to_inflict, STAMINA) playsound(src, 'sound/items/weapons/genhit.ogg', vol = 50, vary = TRUE) diff --git a/code/game/objects/structures/lavaland/ore_vent.dm b/code/game/objects/structures/lavaland/ore_vent.dm index ac8ffc2861d..c6afbc362a1 100644 --- a/code/game/objects/structures/lavaland/ore_vent.dm +++ b/code/game/objects/structures/lavaland/ore_vent.dm @@ -423,6 +423,15 @@ new_rock.boulder_size = boulder_size new_rock.durability = rand(2, boulder_size) //randomize durability a bit for some flavor. new_rock.boulder_string = boulder_icon_state + + switch(boulder_size) + if(BOULDER_SIZE_SMALL) + new_rock.platform_lifespan = PLATFORM_LIFE_SMALL + if(BOULDER_SIZE_MEDIUM) + new_rock.platform_lifespan = PLATFORM_LIFE_MEDIUM + if(BOULDER_SIZE_LARGE) + new_rock.platform_lifespan = PLATFORM_LIFE_LARGE + new_rock.update_appearance(UPDATE_ICON_STATE) //start the cooldown & return the boulder diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index 505371164bf..14cfeaf4219 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -215,7 +215,8 @@ new mineralType(src, mineralAmt) SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType) if(spawned_boulder) - new spawned_boulder(src) + var/obj/item/boulder/wall_boulder = new spawned_boulder(src) + wall_boulder.platform_lifespan = PLATFORM_LIFE_GULAG if(ishuman(user)) var/mob/living/carbon/human/H = user if(exp_multiplier) diff --git a/code/game/turfs/open/lava.dm b/code/game/turfs/open/lava.dm index 2f09fbe2e9f..8de10a7ea06 100644 --- a/code/game/turfs/open/lava.dm +++ b/code/game/turfs/open/lava.dm @@ -58,6 +58,7 @@ if(!smoothing_flags) update_appearance() RegisterSignal(src, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, PROC_REF(on_atom_inited)) + RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_LAVA_STOPPED), PROC_REF(drop_contents_into_lava)) /turf/open/lava/Destroy() checked_atoms = null @@ -348,6 +349,17 @@ return FALSE +/** + * Called when a lava stopper (Catwalks/boulder platforms) is removed and it's contents need to be subjected to the lava underneath. + */ +/turf/open/lava/proc/drop_contents_into_lava() + SIGNAL_HANDLER + balloon_alert_to_viewers("[pick("splash","pshhhh","hiss","blorble")]!") + playsound(src, 'sound/items/match_strike.ogg', 15, TRUE) + for(var/atom/movable/each_content as anything in contents) + on_atom_inited(src, each_content) + return TRUE + /turf/open/lava/can_cross_safely(atom/movable/crossing) return HAS_TRAIT(src, TRAIT_LAVA_STOPPED) || HAS_TRAIT(crossing, immunity_trait ) || HAS_TRAIT(crossing, TRAIT_MOVE_FLYING) diff --git a/code/modules/mining/boulder_processing/boulder.dm b/code/modules/mining/boulder_processing/boulder.dm index 274b5d3816d..6ffddb8e5cd 100644 --- a/code/modules/mining/boulder_processing/boulder.dm +++ b/code/modules/mining/boulder_processing/boulder.dm @@ -1,4 +1,5 @@ +#define PLATFORM_WARNING_MODIFIER 5 SECONDS /** * The objects that ore vents produce, which is refined into minerals. @@ -25,6 +26,8 @@ var/boulder_size = BOULDER_SIZE_SMALL /// Used in inheriting the icon_state from our parent vent in update_icon. var/boulder_string = "boulder" + /// If the boulder is converted into a platform, how long will it last? Default is 10 seconds unless overwritten by a vent. + var/platform_lifespan = PLATFORM_LIFE_DEFAULT /obj/item/boulder/Initialize(mapload) . = ..() @@ -108,6 +111,30 @@ if(HAS_TRAIT(user, TRAIT_BOULDER_BREAKER)) manual_process(null, user, INATE_BOULDER_SPEED_MULTIPLIER) //A little hacky but it works around the speed of the blackboard task selection process for now. +/obj/item/boulder/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + . = ..() + if(istype(interacting_with, /turf/open/lava)) + if(!create_platform(interacting_with, user, interacting_with)) + return ITEM_INTERACT_BLOCKING + return ITEM_INTERACT_SUCCESS + +/obj/item/boulder/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback, force, gentle, quickstart, throw_type_path) + . = ..() + if(istype(target, /turf/open/lava)) + if(!create_platform(target, thrower)) + return FALSE + +/obj/item/boulder/proc/create_platform(atom/interacting_with, mob/living/user) + if(locate(/obj/structure/lattice/catwalk/boulder, interacting_with)) + to_chat(user, span_warning("There is already a boulder platform here!")) + return FALSE + + var/obj/structure/lattice/catwalk/boulder/platform = new(interacting_with) + addtimer(CALLBACK(platform, TYPE_PROC_REF(/obj/structure/lattice/catwalk/boulder, pre_self_destruct)), platform_lifespan) + // See Lattice.dm for more info + visible_message(span_notice("\The [src] floats on \the [interacting_with], forming a temporary platform!")) + qdel(src) + return TRUE /** * This is called when a boulder is processed by a mob or tool, and reduces the durability of the boulder. * @param obj/item/weapon The weapon that is being used to process the boulder, that we pull toolspeed from. If null, we use the override_speed_multiplier instead. @@ -189,3 +216,5 @@ for(var/obj/item/content as anything in contents) content.forceMove(get_turf(src)) qdel(src) + +#undef PLATFORM_WARNING_MODIFIER diff --git a/code/modules/mining/boulder_processing/boulder_types.dm b/code/modules/mining/boulder_processing/boulder_types.dm index 6298bb98139..ec67648fe2a 100644 --- a/code/modules/mining/boulder_processing/boulder_types.dm +++ b/code/modules/mining/boulder_processing/boulder_types.dm @@ -69,10 +69,9 @@ /datum/material/titanium = 8, /datum/material/uranium = 3, ) - set_custom_materials(list(pick_weight(expanded_gulag_minerals) = SHEET_MATERIAL_AMOUNT)) -///lowgrade boulder, most commonly spawned +///lowgrade boulder, Exists as an admin spawn for testing /obj/item/boulder/shabby name = "shabby boulder" desc = "A bizarre, twisted boulder. Wait, wait no, it's just a rock." diff --git a/icons/obj/ore.dmi b/icons/obj/ore.dmi index 7cc3b882057..5346161a9e7 100644 Binary files a/icons/obj/ore.dmi and b/icons/obj/ore.dmi differ