Skip to content

Commit

Permalink
improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 12, 2024
1 parent 5447f9c commit 7ed1661
Show file tree
Hide file tree
Showing 29 changed files with 154 additions and 146 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/BeachRuins/beach_pirate_crash.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
/obj/effect/turf_decal/weather/sand{
dir = 6
},
/obj/effect/landmark/mission_poi/kill,
/obj/effect/landmark/mission_poi/main/kill,
/turf/open/floor/plating/asteroid/sand,
/area/overmap_encounter/planetoid/cave/explored)
"jZ" = (
Expand Down
3 changes: 3 additions & 0 deletions _maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,9 @@
dir = 8
},
/mob/living/simple_animal/hostile/human/frontier/ranged/officer/neutured,
/obj/effect/landmark/mission_poi/main/kill{
already_spawned = 1
},
/turf/open/floor/carpet/red,
/area/ruin/beach/treasure_cove)
"SX" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
pixel_x = -32
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/landmark/mission_poi/recovery,
/obj/effect/landmark/mission_poi/main,
/turf/open/floor/plasteel/dark,
/area/ruin/unpowered/crashed_holemaker)
"cS" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@
/area/ruin/powered/hydroponicslab)
"Xb" = (
/obj/structure/table/wood,
/obj/effect/landmark/mission_poi/recovery,
/obj/effect/landmark/mission_poi/main,
/turf/open/floor/wood/walnut,
/area/ruin/powered/hydroponicslab)
"Xt" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
},
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/obj/effect/landmark/mission_poi/recovery,
/obj/effect/landmark/mission_poi/main,
/turf/open/floor/wood,
/area/ruin/powered)
"mI" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@
pixel_y = 10
},
/obj/structure/table/wood/fancy/blue,
/obj/effect/landmark/mission_poi/blackbox,
/obj/effect/landmark/mission_poi,
/turf/open/floor/carpet/orange{
initial_gas_mix = "ICEMOON_ATMOS"
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
/obj/effect/landmark/mission_poi/kill,
/obj/effect/landmark/mission_poi/main/kill,
/turf/open/floor/plasteel/tech,
/area/ruin/jungle/cavecrew/bridge)
"iN" = (
Expand Down
5 changes: 4 additions & 1 deletion _maps/RandomRuins/JungleRuins/jungle_syndicate.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/obj/effect/decal/cleanable/dirt/dust,
/obj/structure/table,
/obj/item/storage/cans/sixbeer,
/obj/effect/landmark/mission_poi/nt_files,
/obj/effect/landmark/mission_poi/main,
/turf/open/floor/plating,
/area/ruin/jungle/syndifort)
"bS" = (
Expand Down Expand Up @@ -129,6 +129,9 @@
name = "Jerry";
unsuitable_atmos_damage = 0
},
/obj/effect/landmark/mission_poi/main/kill{
already_spawned = 1
},
/turf/open/floor/plating,
/area/ruin/jungle/syndifort/jerry)
"es" = (
Expand Down
3 changes: 3 additions & 0 deletions _maps/RandomRuins/RockRuins/rockplanet_distillery.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4406,6 +4406,9 @@
id = "frontier_armory"
},
/mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals,
/obj/effect/landmark/mission_poi{
already_spawned = 1
},
/turf/open/floor/wood,
/area/ruin/rockplanet/distillery/office)
"XD" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@
/obj/effect/turf_decal/siding/thinplating/dark{
dir = 4
},
/obj/effect/landmark/mission_poi/guard,
/turf/open/floor/plasteel/dark,
/area/ruin/wasteplanet/abandoned_mechbay/commandcontrol)
"uD" = (
Expand Down Expand Up @@ -1931,6 +1932,7 @@
/obj/effect/turf_decal/siding/thinplating/dark{
dir = 10
},
/obj/effect/landmark/mission_poi/main,
/turf/open/floor/plasteel/mono/dark,
/area/ruin/wasteplanet/abandoned_mechbay/commandcontrol)
"wc" = (
Expand Down Expand Up @@ -2779,6 +2781,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer4{
dir = 8
},
/obj/effect/landmark/mission_poi/guard,
/turf/open/floor/plasteel/dark,
/area/ruin/wasteplanet/abandoned_mechbay/commandcontrol)
"Hm" = (
Expand Down Expand Up @@ -3081,6 +3084,7 @@
pixel_y = 29;
pixel_x = 28
},
/obj/effect/landmark/mission_poi/guard,
/turf/open/floor/plasteel/dark,
/area/ruin/wasteplanet/abandoned_mechbay/commandcontrol)
"Kj" = (
Expand Down
17 changes: 11 additions & 6 deletions code/controllers/subsystem/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ SUBSYSTEM_DEF(overmap)

///List of all events
var/list/events
///List of dynamic encounters, just planets rn.
var/list/dynamic_encounters

///Map of tiles at each radius (represented by index) around the sun
var/list/list/radius_positions
Expand Down Expand Up @@ -49,6 +51,7 @@ SUBSYSTEM_DEF(overmap)
controlled_ships = list()
outposts = list()
events = list()
dynamic_encounters = list()

generator_type = CONFIG_GET(string/overmap_generator_type)
size = CONFIG_GET(number/overmap_size)
Expand Down Expand Up @@ -79,6 +82,8 @@ SUBSYSTEM_DEF(overmap)
return ..()

/datum/controller/subsystem/overmap/fire()
if(length(dynamic_encounters) < CONFIG_GET(number/max_overmap_dynamic_events))
spawn_ruin_level()
if(events_enabled)
for(var/datum/overmap/event/E as anything in events)
if(E.get_nearby_overmap_objects())
Expand Down Expand Up @@ -127,10 +132,10 @@ SUBSYSTEM_DEF(overmap)
/datum/controller/subsystem/overmap/proc/create_map()
if (generator_type == OVERMAP_GENERATOR_SOLAR)
spawn_events_in_orbits()
spawn_ruin_levels_in_orbits()
else
spawn_events()
spawn_ruin_levels()

spawn_ruin_levels()

spawn_outpost()
//spawn_initial_ships()
Expand Down Expand Up @@ -250,11 +255,10 @@ SUBSYSTEM_DEF(overmap)
*/
/datum/controller/subsystem/overmap/proc/spawn_ruin_levels()
for(var/i in 1 to CONFIG_GET(number/max_overmap_dynamic_events))
new /datum/overmap/dynamic()
spawn_ruin_level()

/datum/controller/subsystem/overmap/proc/spawn_ruin_levels_in_orbits()
for(var/i in 1 to CONFIG_GET(number/max_overmap_dynamic_events))
new /datum/overmap/dynamic()
/datum/controller/subsystem/overmap/proc/spawn_ruin_level()
new /datum/overmap/dynamic()

/**
* Reserves a square dynamic encounter area, generates it, and spawns a ruin in it if one is supplied.
Expand Down Expand Up @@ -503,6 +507,7 @@ SUBSYSTEM_DEF(overmap)
overmap_objects = SSovermap.overmap_objects
controlled_ships = SSovermap.controlled_ships
events = SSovermap.events
dynamic_encounters = SSovermap.dynamic_encounters
outposts = SSovermap.outposts
radius_positions = SSovermap.radius_positions
overmap_vlevel = SSovermap.overmap_vlevel
Expand Down
1 change: 1 addition & 0 deletions code/datums/ruins/beachplanet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
description = "A abandoned colony. It seems that this colony was abandoned, for a reason or another"
suffix = "beach_treasure_cove.dmm"
ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE)
dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen)

/datum/map_template/ruin/beachplanet/crashedengie
name = "Crashed Engineer Ship"
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ruins/icemoon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
description = "An abandoned hydroponics research facility containing hostile plant fauna."
suffix = "icemoon_hydroponics_lab.dmm"
ruin_tags = list(RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_SHELTER)
dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox)
dynamic_mission_types = list(/datum/mission/dynamic/data_reterival)

/datum/map_template/ruin/icemoon/abandonedvillage
name = "Abandoned Village"
id = "abandonedvillage"
description = "Who knows what lies within?"
suffix = "icemoon_underground_abandoned_village.dmm"
ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MINOR_LOOT, RUIN_TAG_INHOSPITABLE)
dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox)
dynamic_mission_types = list(/datum/mission/dynamic/data_reterival)

/datum/map_template/ruin/icemoon/brazillian_lab
name = "Barricaded Compound"
id = "brazillian-lab"
description = "A conspicuous compound in the middle of the cold wasteland. What goodies are inside?"
suffix = "icemoon_underground_brazillianlab.dmm"
ruin_tags = list(RUIN_TAG_BOSS_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_INHOSPITABLE)
dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox)
dynamic_mission_types = list(/datum/mission/dynamic/data_reterival)

/datum/map_template/ruin/icemoon/crashed_holemaker
name = "Crashed Holemaker"
id = "crashed_holemaker"
description = "Safety records for early Nanotrasen Spaceworks vessels were, and always have been, top of their class. Absolutely no multi-billion credit projects have been painstakingly erased from history. (Citation Needed)"
suffix = "icemoon_crashed_holemaker.dmm"
ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MINOR_LOOT, RUIN_TAG_SHELTER)
dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox)
dynamic_mission_types = list(/datum/mission/dynamic/data_reterival)
19 changes: 18 additions & 1 deletion code/datums/ruins/jungle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@
description = "A small bunker owned by the Syndicate."
suffix = "jungle_syndicate.dmm"
ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE)
dynamic_mission_types = list(/datum/mission/dynamic/simple/guarded/nt_files)
dynamic_mission_types = list(
/datum/mission/dynamic/guarded/nt_files,
/datum/mission/dynamic/kill/jerry
)

/datum/mission/dynamic/kill/jerry
name = "FUCKING KIL JERRY THAT SUNOFA BITCH STOLE BY GODDAMN RELINA PLUSHIE"
desc = "I WANT MY FUCKIN PUSHIE BACK KILL HIM AND ILL PAY"
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/kari
)


/datum/map_template/ruin/jungle/interceptor
name = "Old Crashed Interceptor"
Expand Down
1 change: 1 addition & 0 deletions code/datums/ruins/rockplanet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@
description = "A former pre-ICW era Nanotrasen outpost converted into a moonshine distillery by Frontiersman bootleggers."
id = "rockplanet_distillery"
suffix = "rockplanet_distillery.dmm"
dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen)
31 changes: 13 additions & 18 deletions code/modules/dynamic_missions/mission.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@
return

/datum/mission/proc/reward_flavortext()
return list(
MISSION_REWARD_CASH = "[value * 1.2] cr upon completion",
MISSION_REWARD_ITEMS = "A nice slice of ham AND [value] cr",
MISSION_REWARD_REP = "[value] cr and rep with [SSfactions.faction_name(src.faction)]",
)
return "[value * 1.2] cr upon completion"

/datum/mission/proc/start_mission()
SSmissions.inactive_missions -= src
Expand All @@ -89,6 +85,8 @@
/datum/mission/proc/on_planet_load(datum/overmap/dynamic/planet)
SIGNAL_HANDLER

// Status of mission is handled by items spawned in mission after this
UnregisterSignal(mission_location, COMSIG_PARENT_QDELETING)
if(!active)
qdel(src)
return
Expand All @@ -105,23 +103,15 @@
/datum/mission/proc/can_turn_in(atom/movable/item_to_check)
return

/datum/mission/proc/turn_in(atom/movable/item_to_turn_in, choice)
/datum/mission/proc/turn_in(atom/movable/item_to_turn_in)
if(can_turn_in(item_to_turn_in))
spawn_reward(item_to_turn_in.loc, choice)
spawn_reward(item_to_turn_in.loc)
do_sparks(3, FALSE, get_turf(item_to_turn_in))
qdel(item_to_turn_in)
qdel(src)

/datum/mission/proc/spawn_reward(loc, choice)
switch(choice)
if(MISSION_REWARD_CASH)
new /obj/item/spacecash/bundle(loc, value * 1.2)
if(MISSION_REWARD_ITEMS)
new /obj/item/spacecash/bundle(loc, value)
new /obj/item/reagent_containers/food/snacks/spidereggsham(loc)
//Rep probally not coming in this pr i think
if(MISSION_REWARD_REP)
new /obj/item/spacecash/bundle(loc, value * 1.2)
/datum/mission/proc/spawn_reward(loc)
new /obj/item/spacecash/bundle(loc, value * 1.2)

/datum/mission/proc/can_complete()
return !failed
Expand Down Expand Up @@ -235,8 +225,9 @@
LAZYREMOVE(bound_atoms, bound)

/obj/effect/landmark/mission_poi
name = "mission poi"
icon = 'icons/effects/mission_poi.dmi'
icon_state = "main_thing"
icon_state = "side_thing"
///Assume the item we want is included in the map and we simple have to return it
var/already_spawned = FALSE
///Only needed if you have multipe missiosn that use the same poi's on the map
Expand Down Expand Up @@ -270,6 +261,10 @@
qdel(src)
return item_of_intrest

/obj/effect/landmark/mission_poi/main
name = "mission focus"
icon_state = "main_thing"

/// Instead of spawning something its used to find a matching item already in the map and returns that. For if you want to use an already exisiting part of the ruin.
/obj/effect/landmark/mission_poi/pre_loaded
already_spawned = TRUE
Expand Down
7 changes: 3 additions & 4 deletions code/modules/dynamic_missions/mission_board.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,19 @@
var/datum/mission/dynamic/mission = locate(params["mission"])
if(!istype(mission, /datum/mission/dynamic))
return
var/option = params["choice"]
turn_in(mission, option)
turn_in(mission)
if("eject")
id_eject(usr, inserted_scan_id)
inserted_scan_id = null
. = TRUE

/obj/machinery/computer/mission/proc/turn_in(datum/mission/dynamic/mission, choice)
/obj/machinery/computer/mission/proc/turn_in(datum/mission/dynamic/mission)
var/obj/machinery/mission_pad/pad = pad_ref?.resolve()
for(var/atom/movable/item_on_pad as anything in get_turf(pad))
if(item_on_pad == pad)
continue
if(mission.can_turn_in(item_on_pad))
mission.turn_in(item_on_pad, choice)
mission.turn_in(item_on_pad)
return TRUE

/// Return all items on pad
Expand Down
20 changes: 19 additions & 1 deletion code/modules/dynamic_missions/missions/dynamic.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/datum/mission/dynamic
var/setpiece_poi
var/setpiece_poi = /obj/effect/landmark/mission_poi/main
var/setpiece_item
///Specific item uses an exact item, if false it will allow type or any subtype
var/specific_item = TRUE
var/atom/movable/required_item

/datum/mission/dynamic/generate_mission_details()
. = ..()
setpiece_item = pick(setpiece_item)

/datum/mission/dynamic/spawn_mission_setpiece(datum/overmap/dynamic/planet)
for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois)
if(mission_poi.type == setpiece_poi)
Expand All @@ -24,3 +28,17 @@
else
if(istype(item_to_check, required_item.type))
return TRUE

/datum/mission/dynamic/data_reterival
name = "data recovery"
///Assumes its a list
setpiece_item = list(
/obj/item/blackbox,
/obj/item/research_notes/loot
)

/datum/mission/dynamic/data_reterival/generate_mission_details()
. = ..()
if(ispath(setpiece_item, /obj/item))
var/obj/item/mission_item = setpiece_item
desc = "We are looking for a [mission_item::name]"
Loading

0 comments on commit 7ed1661

Please sign in to comment.