From 5d9cc9c9f1a1e1136c8182d01a5f0a826daa2983 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 06:52:52 -0500 Subject: [PATCH] the drill --- .../SpaceRuins/corporate_mining.dmm | 7 ++- code/__DEFINES/dcs/signals/signals.dm | 4 ++ code/datums/ruins/jungle.dm | 8 +-- code/datums/ruins/space.dm | 1 + .../bounties/missions/drill_mission.dm | 24 ------- .../dynamic_missions/missions/drill.dm | 62 +++++++++++++++++++ .../modules/dynamic_missions/missions/scan.dm | 1 - config/game_options.txt | 4 +- shiptest.dme | 2 +- 9 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 code/modules/dynamic_missions/missions/drill.dm delete mode 100644 code/modules/dynamic_missions/missions/scan.dm diff --git a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm index a2cb21cd1c1c..82f88860ef1d 100644 --- a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm +++ b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm @@ -2100,6 +2100,11 @@ "UA" = ( /turf/closed/wall/rust, /area/ruin/space/has_grav/corporatemine/crewquarters) +"Vj" = ( +/obj/structure/vein/asteroid, +/obj/effect/landmark/mission_poi/drill, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space) "Vr" = ( /obj/structure/grille/broken, /obj/item/shard, @@ -3719,7 +3724,7 @@ Al Al VM VM -VM +Vj VM kp bl diff --git a/code/__DEFINES/dcs/signals/signals.dm b/code/__DEFINES/dcs/signals/signals.dm index 38f7d8692853..4d9927bfea23 100644 --- a/code/__DEFINES/dcs/signals/signals.dm +++ b/code/__DEFINES/dcs/signals/signals.dm @@ -695,6 +695,10 @@ // Called by parent when pausing spawning, returns bool: (datum/source, spawning_started) #define COMSIG_SPAWNER_TOGGLE_SPAWNING "spawner_toggle" +// Drill signals +// Called when a mission drill finishes sampling +#define COMSIG_DRILL_SAMPLES_DONE "spawner_toggle" + ///Beam Signals /// Called before beam is redrawn #define COMSIG_BEAM_BEFORE_DRAW "beam_before_draw" diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index 16ce88c27cd9..e6be9dd1de45 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -21,10 +21,10 @@ target_type = /mob/living/simple_animal/hostile/human/syndicate setpiece_item = list( /obj/item/toy/plush/rilena, - /obj/item/toy/plush/tali - /obj/item/toy/plush/sharai - /obj/item/toy/plush/xader - /obj/item/toy/plush/mora + /obj/item/toy/plush/tali, + /obj/item/toy/plush/sharai, + /obj/item/toy/plush/xader, + /obj/item/toy/plush/mora, /obj/item/toy/plush/kari ) diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index f8cda3a84426..dcf258a702f4 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -12,6 +12,7 @@ name = "Corporate Mining Module" description = "An old and rusty mining facility, with big ore potential." ruin_tags = list(RUIN_TAG_NO_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_SHELTER) + dynamic_mission_types = list(/datum/mission/dynamic/drill) /datum/map_template/ruin/space/bigderelict1 id = "bigderelict1" diff --git a/code/modules/bounties/missions/drill_mission.dm b/code/modules/bounties/missions/drill_mission.dm index 307d73d59592..2d351e47a7f2 100644 --- a/code/modules/bounties/missions/drill_mission.dm +++ b/code/modules/bounties/missions/drill_mission.dm @@ -67,27 +67,3 @@ class_wanted = 3 num_wanted = 8 -/* - Core sampling drill -*/ - -/obj/machinery/drill/mission - name = "core sampling research drill" - desc = "A specialized laser drill designed to extract geological samples." - - var/num_current = 0 - var/mission_class - var/num_wanted - -/obj/machinery/drill/mission/examine() - . = ..() - . += "The drill contains [num_current] of the [num_wanted] samples needed." - -/obj/machinery/drill/mission/start_mining() - if(mining.vein_class < mission_class && mining) - say("Error: A vein class of [mission_class] or greater is required for operation.") - return - . = ..() - -/obj/machinery/drill/mission/mine_success() - num_current++ diff --git a/code/modules/dynamic_missions/missions/drill.dm b/code/modules/dynamic_missions/missions/drill.dm new file mode 100644 index 000000000000..debf539fa09a --- /dev/null +++ b/code/modules/dynamic_missions/missions/drill.dm @@ -0,0 +1,62 @@ +/obj/effect/landmark/mission_poi/drill + +/datum/mission/dynamic/drill + name = "drill mission" + desc = "get this drill back up and running and send us proof" + setpiece_item = /obj/item/drill_readout + var/drill_type = /obj/machinery/drill/mission/ruin + /// What signal will spawn the required item + var/mission_main_signal = COMSIG_DRILL_SAMPLES_DONE + +/datum/mission/dynamic/drill/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) + var/drill_obj = set_bound(mission_poi.use_poi(drill_type), null, FALSE, TRUE) + RegisterSignal(drill_obj, mission_main_signal, PROC_REF(on_drill_done)) + +/datum/mission/dynamic/drill/proc/on_drill_done(obj/machinery/drill/drill_obj) + SIGNAL_HANDLER + + required_item = new setpiece_item(drill_obj.loc) + set_bound(required_item, null, FALSE, TRUE) + UnregisterSignal(drill_obj, mission_main_signal) + remove_bound(drill_obj) + +/* + Core sampling drill +*/ + +/obj/machinery/drill/mission + name = "core sampling research drill" + desc = "A specialized laser drill designed to extract geological samples." + + var/num_current = 0 + var/mission_class + var/num_wanted + +/obj/machinery/drill/mission/examine() + . = ..() + . += "The drill contains [num_current] of the [num_wanted] samples needed." + +/obj/machinery/drill/mission/start_mining() + if(mining.vein_class < mission_class && mining) + say("Error: A vein class of [mission_class] or greater is required for operation.") + return + . = ..() + +/obj/machinery/drill/mission/mine_success() + num_current++ + if(num_current == num_wanted) + SEND_SIGNAL(src, COMSIG_DRILL_SAMPLES_DONE) + +/obj/machinery/drill/mission/ruin + name = "industrial grade mining drill" + desc = "A large scale laser drill. It's able to mine vast amounts of minerals from near-surface ore pockets, this one is designed for mining outposts." + mission_class = 4 + num_wanted = 15 + +/obj/item/drill_readout + name = "drill debug information" + desc = "Created by a mining outpost drill." + icon = 'icons/obj/bureaucracy.dmi' + icon_state = "paper" + item_state = "paper" + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/dynamic_missions/missions/scan.dm b/code/modules/dynamic_missions/missions/scan.dm deleted file mode 100644 index 99c75c082514..000000000000 --- a/code/modules/dynamic_missions/missions/scan.dm +++ /dev/null @@ -1 +0,0 @@ -/datum/mission/dynamic/scan diff --git a/config/game_options.txt b/config/game_options.txt index 135123b845ad..f73fbdd2a56b 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -572,10 +572,10 @@ MAX_OVERMAP_EVENT_CLUSTERS 6 MAX_OVERMAP_EVENTS 50 ## Put the maximum amount of dynamic overmap locations here -MAX_OVERMAP_DYNAMIC_EVENTS 10 +MAX_OVERMAP_DYNAMIC_EVENTS 30 ## Size of the overmap squared -OVERMAP_SIZE 12 +OVERMAP_SIZE 30 ## Which overmap generator to use ## Valid values are: "random", "solar_system" diff --git a/shiptest.dme b/shiptest.dme index 0b66e01228bd..9be6c33b59b0 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2081,10 +2081,10 @@ #include "code\modules\dynamic_missions\mission.dm" #include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\spawner.dm" +#include "code\modules\dynamic_missions\missions\drill.dm" #include "code\modules\dynamic_missions\missions\dynamic.dm" #include "code\modules\dynamic_missions\missions\guarded.dm" #include "code\modules\dynamic_missions\missions\kill.dm" -#include "code\modules\dynamic_missions\missions\scan.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm"