Skip to content

Commit

Permalink
the drill
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 12, 2024
1 parent 7ed1661 commit 5d9cc9c
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 33 deletions.
7 changes: 6 additions & 1 deletion _maps/RandomRuins/SpaceRuins/corporate_mining.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -3719,7 +3724,7 @@ Al
Al
VM
VM
VM
Vj
VM
kp
bl
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ruins/jungle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
1 change: 1 addition & 0 deletions code/datums/ruins/space.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 0 additions & 24 deletions code/modules/bounties/missions/drill_mission.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
. += "<span class='notice'>The drill contains [num_current] of the [num_wanted] samples needed.</span>"

/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++
62 changes: 62 additions & 0 deletions code/modules/dynamic_missions/missions/drill.dm
Original file line number Diff line number Diff line change
@@ -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()
. = ..()
. += "<span class='notice'>The drill contains [num_current] of the [num_wanted] samples needed.</span>"

/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
1 change: 0 additions & 1 deletion code/modules/dynamic_missions/missions/scan.dm

This file was deleted.

4 changes: 2 additions & 2 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5d9cc9c

Please sign in to comment.