Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions _maps/map_files/dun_world/dun_world.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -17653,8 +17653,8 @@
/turf/open/floor/rogue/tile/masonic/inverted,
/area/provincial/underground/dungeon/vulnafir)
"fUg" = (
/obj/item/roguegem,
/obj/item/roguegem,
/obj/item/roguegem/ruby,
/obj/item/roguegem/ruby,
/obj/item/roguegem/violet,
/obj/item/roguegem/yellow,
/obj/item/roguegem/green,
Expand Down Expand Up @@ -34692,6 +34692,10 @@
icon_state = "greenstone"
},
/area/provincial/indoors/town/province_keep/wine_cellar)
"lnB" = (
/obj/effect/landmark/map_load_mark/south_mine_road,
/turf/closed/mineral/random/rogue/high,
/area/provincial/underground/field)
"lnC" = (
/obj/structure/chair/wood/rogue/chair3,
/obj/effect/decal/cleanable/dirt/cobweb/cobweb2,
Expand Down Expand Up @@ -72667,7 +72671,7 @@
/area/provincial/underground/dungeon/old_ruin)
"xUK" = (
/obj/structure/table/vtable,
/obj/item/roguegem{
/obj/item/roguegem/ruby{
pixel_y = 10
},
/obj/item/roguegem/blue,
Expand Down Expand Up @@ -240180,7 +240184,7 @@ ojJ
nXg
nXg
nXg
nXg
lnB
nXg
nXg
nXg
Expand Down
6 changes: 6 additions & 0 deletions _maps/map_files/otherz/dungeon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"map_name": "Dungeon Map",
"map_path": "map_files/otherz",
"map_file": "dungeon.dmm",
"traits": [{ "Up": true }, { "Down": true }]
}
18 changes: 18 additions & 0 deletions _maps/map_files/templates/mining/south_mine_01.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"a" = (/turf/closed/mineral/random/rogue/high,/area/provincial)
"g" = (/obj/item/rogueweapon/pick,/obj/effect/decal/remains/human,/turf/open/floor/rogue/cobblerock,/area/provincial)
"n" = (/turf/open/floor/rogue/cobblerock,/area/provincial)
"p" = (/turf/closed/mineral/random/rogue/med,/area/provincial)
"A" = (/turf/closed/mineral/random/rogue,/area/provincial)

(1,1,1) = {"
ppppppAAAA
appppppAAA
aapppppAAA
aappppppAA
naganpppAA
ngaganppAA
aaaaappppA
aaaaaapppp
aaaaaapppp
aaaaaaappp
"}
19 changes: 19 additions & 0 deletions _maps/map_files/templates/mining/south_mine_02.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"a" = (/turf/closed/mineral/random/rogue/high,/area/provincial)
"g" = (/obj/item/rogueweapon/pick,/mob/living/simple_animal/hostile/rogue/skeleton/axe,/turf/open/floor/rogue/cobblerock,/area/provincial)
"n" = (/turf/open/floor/rogue/cobblerock,/area/provincial)
"p" = (/turf/closed/mineral/random/rogue/med,/area/provincial)
"A" = (/turf/closed/mineral/random/rogue,/area/provincial)
"X" = (/mob/living/simple_animal/hostile/rogue/skeleton/axe,/turf/open/floor/rogue/cobblerock,/area/provincial)

(1,1,1) = {"
ppppppAAAA
appppppAAA
aapppppAAA
aappppppAA
naganpppAA
ngaXanppAA
aaaaappppA
aaaaaapppp
aaaaaapppp
aaaaaaappp
"}
19 changes: 19 additions & 0 deletions _maps/map_files/templates/mining/south_mine_03.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"a" = (/turf/closed/mineral/random/rogue/high,/area/provincial)
"g" = (/obj/item/rogueweapon/pick,/obj/effect/decal/remains/human,/turf/open/floor/rogue/cobblerock,/area/provincial)
"n" = (/turf/open/floor/rogue/cobblerock,/area/provincial)
"p" = (/turf/closed/mineral/random/rogue/med,/area/provincial)
"A" = (/turf/closed/mineral/random/rogue,/area/provincial)
"O" = (/obj/item/rogueweapon/pick,/obj/effect/decal/remains/human,/mob/living/simple_animal/hostile/retaliate/rogue/bigrat,/turf/open/floor/rogue/cobblerock,/area/provincial)

(1,1,1) = {"
ppppppAAAA
appppppAAA
aapppppAAA
aappppppAA
naOanpppAA
nOaganppAA
aaaaappppA
aaaaaapppp
aaaaaapppp
aaaaaaappp
"}
17 changes: 17 additions & 0 deletions _maps/map_files/templates/mining/south_mine_default.dmm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"a" = (/turf/closed/mineral/random/rogue/high,/area/provincial)
"n" = (/turf/open/floor/rogue/cobblerock,/area/provincial)
"p" = (/turf/closed/mineral/random/rogue/med,/area/provincial)
"A" = (/turf/closed/mineral/random/rogue,/area/provincial)

(1,1,1) = {"
ppppppAAAA
appppppAAA
aapppppAAA
aappppppAA
nananpppAA
nnananppAA
aaaaappppA
aaaaaapppp
aaaaaapppp
aaaaaaappp
"}
31 changes: 31 additions & 0 deletions _maps/templates/mining.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/obj/effect/spawner/lootdrop/roguetown/miningtunnels
name = "sewer spawner"
loot = list()
lootcount = 0

///////////////////////
/// Southern Road ///
/// Size: X:10 Y:10 ///
///////////////////////

/obj/effect/landmark/map_load_mark/south_mine_road
name = "South Mines Road"
templates = list("south_mine_road_1", "south_mine_road_2", "south_mine_road_3")

/// just corpses
/datum/map_template/south_mine_road_1
name = "South Mines Road Variant 1"
id = "south_mine_road_1"
mappath = "_maps/map_files/templates/mining/south_mine_01.dmm"

/// skeletons
/datum/map_template/south_mine_road_2
name = "South Mines Road Variant 2"
id = "south_mine_road_2"
mappath = "_maps/map_files/templates/mining/south_mine_02.dmm"

/// big rats
/datum/map_template/south_mine_road_3
name = "South Mines Road Variant 3"
id = "south_mine_road_3"
mappath = "_maps/map_files/templates/mining/south_mine_03.dmm"
5 changes: 5 additions & 0 deletions code/__DEFINES/_tick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
#define RUNNING_BEFORE_MASTER ( Master.last_run != null && Master.last_run != world.time )
/// Returns true if a verb ought to yield to the MC (IE: queue up to be processed by a subsystem)
#define VERB_SHOULD_YIELD ( TICK_CHECK || RUNNING_BEFORE_MASTER )

/// runs stoplag if tick_usage is above the limit
#define CHECK_TICK_LOW ( TICK_CHECK_LOW ? stoplag() : 0 )
///like TICK_CHECK but for half the budget
#define TICK_CHECK_LOW ( TICK_USAGE > (Master.current_ticklimit * 0.5))
39 changes: 37 additions & 2 deletions code/__DEFINES/components.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,32 @@
/// Return value to cancel attaching
#define ELEMENT_INCOMPATIBLE 1

/// /datum/element flags
#define ELEMENT_DETACH (1 << 0)
/// fires on the target datum when an element is attached to it (/datum/element)
#define COMSIG_ELEMENT_ATTACH "element_attach"
/// fires on the target datum when an element is detached from it (/datum/element)
#define COMSIG_ELEMENT_DETACH "element_detach"

/// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
/// you should only be using this if you want to block deletion
/// that's the only functional difference between it and COMSIG_QDELETING, outside setting QDELETING to detect
#define COMSIG_PREQDELETED "parent_preqdeleted"
/// just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
#define COMSIG_QDELETING "parent_qdeleting"

// /datum/element flags
/// Causes the detach proc to be called when the host object is being deleted.
/// Should only be used if you need to perform cleanup not related to the host object.
/// You do not need this if you are only unregistering signals, for instance.
/// You would need it if you are doing something like removing the target from a processing list.
#define ELEMENT_DETACH_ON_HOST_DESTROY (1 << 0)
/**
* Only elements created with the same arguments given after `id_arg_index` share an element instance
* The arguments are the same when the text and number values are the same and all other values have the same ref
*/
#define ELEMENT_BESPOKE (1 << 1)
/// Causes all detach arguments to be passed to detach instead of only being used to identify the element
/// When this is used your Detach proc should have the same signature as your Attach proc
#define ELEMENT_COMPLEX_DETACH (1 << 2)

// How multiple components of the exact same type are handled in the same datum
/// old component is deleted (default)
Expand All @@ -26,8 +50,17 @@
#define COMPONENT_DUPE_ALLOWED 1
/// new component is deleted
#define COMPONENT_DUPE_UNIQUE 2
/**
* Component uses source tracking to manage adding and removal logic.
* Add a source/spawn to/the component by using AddComponentFrom(source, component_type, args...)
* Removing the last source will automatically remove the component from the parent.
* Arguments will be passed to on_source_add(source, args...); ensure that Initialize and on_source_add have the same signature.
*/
#define COMPONENT_DUPE_SOURCES 3
/// old component is given the initialization args of the new
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4
/// each component of the same type is consulted as to whether the duplicate should be allowed
#define COMPONENT_DUPE_SELECTIVE 5

// All signals. Format:
// When the signal is called: (signal arguments)
Expand All @@ -38,6 +71,8 @@
// start global signals with "!", this used to be necessary but now it's just a formatting choice
/// from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_NEW_Z "!new_z"
/// sent after world.maxx and/or world.maxy are expanded: (has_exapnded_world_maxx, has_expanded_world_maxy)
#define COMSIG_GLOB_EXPANDED_WORLD_BOUNDS "!expanded_world_bounds"
/// called after a successful var edit somewhere in the world: (list/args)
#define COMSIG_GLOB_VAR_EDIT "!var_edit"
/// mob was created somewhere : (mob)
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/dcs/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Only elements created with the same arguments given after `id_arg_index` share an element instance
* The arguments are the same when the text and number values are the same and all other values have the same ref
*/
#define ELEMENT_BESPOKE (1 << 1)
//#define ELEMENT_BESPOKE (1 << 1)
// Causes all detach arguments to be passed to detach instead of only being used to identify the element
/// When this is used your Detach proc should have the same signature as your Attach proc
#define ELEMENT_COMPLEX_DETACH (1 << 2)
//#define ELEMENT_COMPLEX_DETACH (1 << 2)

/* Dup commend out
// How multiple components of the exact same type are handled in the same datum
Expand Down
14 changes: 14 additions & 0 deletions code/__DEFINES/dcs/helpers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments
#define AddElement(arguments...) _AddElement(list(##arguments))
/// A wrapper for _RemoveElement that allows us to pretend we're using normal named arguments
#define RemoveElement(arguments...) _RemoveElement(list(##arguments))

/// A wrapper for _AddComponent that allows us to pretend we're using normal named arguments
#define AddComponent(arguments...) _AddComponent(list(##arguments))

/// A wrapper for _AddComonent that passes in a source.
/// Necessary if dupe_mode is set to COMPONENT_DUPE_SOURCES.
#define AddComponentFrom(source, arguments...) _AddComponent(list(##arguments), source)

/// A wrapper for _LoadComponent that allows us to pretend we're using normal named arguments
#define LoadComponent(arguments...) _LoadComponent(list(##arguments))
6 changes: 0 additions & 6 deletions code/__DEFINES/dcs/signals/signals_datum.dm

This file was deleted.

1 change: 1 addition & 0 deletions code/__DEFINES/dcs/signals/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

///before attackingtarget has happened, source is the attacker and target is the attacked
#define COMSIG_HOSTILE_PRE_ATTACKINGTARGET "hostile_pre_attackingtarget"
#define COMPONENT_HOSTILE_NO_PREATTACK (1<<0) //cancel the attack, only works before attack happens
//#define COMPONENT_HOSTILE_NO_ATTACK COMPONENT_CANCEL_ATTACK_CHAIN //cancel the attack, only works before attack happens
///after attackingtarget has happened, source is the attacker and target is the attacked, extra argument for if the attackingtarget was successful
#define COMSIG_HOSTILE_POST_ATTACKINGTARGET "hostile_post_attackingtarget"
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/signals_spatial_grid.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//spatial grid signals

///Called from base of /datum/controller/subsystem/spatial_grid/proc/enter_cell: (/atom/movable)
#define SPATIAL_GRID_CELL_ENTERED(contents_type) "spatial_grid_cell_entered_[contents_type]"
///Called from base of /datum/controller/subsystem/spatial_grid/proc/exit_cell: (/atom/movable)
#define SPATIAL_GRID_CELL_EXITED(contents_type) "spatial_grid_cell_exited_[contents_type]"
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals_atoms/signals_atom.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
#define COMSIG_ATOM_HITBY "atom_hitby"
///from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_ATOM_ATTACKBY "atom_attackby"
///from base of atom/examine(): (/mob, list/examine_text)
#define COMSIG_ATOM_EXAMINE "atom_examine"
///from base of atom/examine_tags(): (/mob, list/examine_tags)
#define COMSIG_ATOM_EXAMINE_TAGS "atom_examine_tags"
///from base of atom/examine_more(): (/mob, examine_list)
#define COMSIG_ATOM_EXAMINE_MORE "atom_examine_more"
9 changes: 9 additions & 0 deletions code/__DEFINES/important_recursive_contents.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
///the area channel of the important_recursive_contents list, everything in here will be sent a signal when their last holding object changes areas
#define RECURSIVE_CONTENTS_AREA_SENSITIVE "recursive_contents_area_sensitive"
///the hearing channel of the important_recursive_contents list, everything in here will count as a hearing atom
#define RECURSIVE_CONTENTS_HEARING_SENSITIVE "recursive_contents_hearing_sensitive"
///the client mobs channel of the important_recursive_contents list, everything in here will be a mob with an attached client
///this is given to both a clients mob, and a clients eye, both point to the clients mob
#define RECURSIVE_CONTENTS_CLIENT_MOBS "recursive_contents_client_mobs"
///the parent of storage components currently shown to some client mob get this. gets removed when nothing is viewing the parent
#define RECURSIVE_CONTENTS_ACTIVE_STORAGE "recursive_contents_active_storage"
3 changes: 3 additions & 0 deletions code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Multi-Z stations are supported and multi-Z mining and away missions would
require only minor tweaks.
*/

/// A map key that corresponds to being one exclusively for Space.
#define SPACE_KEY "space"

// helpers for modifying jobs, used in various job_changes.dm files
#define MAP_JOB_CHECK if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return; }
#define MAP_JOB_CHECK_BASE if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return ..(); }
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define GC_DEL_QUEUE (10 SECONDS)

#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || QDELING(X))
#define QDELETED(X) (isnull(X) || QDELING(X))
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)

//Theses were taken from Vanderlin, some are commented out if they are dupped elsewhere
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/sight.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define INVISIBILITY_NONE 0

#define SEE_INVISIBLE_MINIMUM 5

#define INVISIBILITY_LIGHTING 20
Expand Down
55 changes: 55 additions & 0 deletions code/__DEFINES/spatial_gridmap.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/// each cell in a spatial_grid is this many turfs in length and width (with world.max(x or y) being 255, 15 of these fit on each side of a z level)
#define SPATIAL_GRID_CELLSIZE 17
/// Takes a coordinate, and spits out the spatial grid index (x or y) it's inside
#define GET_SPATIAL_INDEX(coord) ROUND_UP((coord) / SPATIAL_GRID_CELLSIZE)
/// changes the cell_(x or y) vars on /datum/spatial_grid_cell to the x or y coordinate on the map for the LOWER LEFT CORNER of the grid cell.
/// index is from 1 to SPATIAL_GRID_CELLS_PER_SIDE
#define GRID_INDEX_TO_COORDS(index) ((((index) - 1) * SPATIAL_GRID_CELLSIZE) + 1)
/// number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy
#define SPATIAL_GRID_CELLS_PER_SIDE(world_bounds) GET_SPATIAL_INDEX(world_bounds)

//grid contents channels

///everything that is hearing sensitive is stored in this channel
#define SPATIAL_GRID_CONTENTS_TYPE_HEARING RECURSIVE_CONTENTS_HEARING_SENSITIVE
///every movable that has a client in it is stored in this channel
#define SPATIAL_GRID_CONTENTS_TYPE_CLIENTS RECURSIVE_CONTENTS_CLIENT_MOBS
///all atmos machines are stored in this channel (I'm sorry kyler)
#define SPATIAL_GRID_CONTENTS_TYPE_ATMOS "spatial_grid_contents_type_atmos"

#define ALL_CONTENTS_OF_CELL(cell) (cell.hearing_contents | cell.client_contents | cell.atmos_contents)

///whether movable is itself or containing something which should be in one of the spatial grid channels.
#define HAS_SPATIAL_GRID_CONTENTS(movable) (movable.spatial_grid_key)

// macros meant specifically to add/remove movables from the internal lists of /datum/spatial_grid_cell,
// when empty they become references to a single list in SSspatial_grid and when filled they become their own list
// this is to save memory without making them lazylists as that slows down iteration through them
#define GRID_CELL_ADD(cell_contents_list, movable_or_list) \
if(!length(cell_contents_list)) { \
cell_contents_list = list(); \
cell_contents_list += movable_or_list; \
} else { \
cell_contents_list += movable_or_list; \
};

#define GRID_CELL_SET(cell_contents_list, movable_or_list) \
if(!length(cell_contents_list)) { \
cell_contents_list = list(); \
cell_contents_list += movable_or_list; \
} else { \
cell_contents_list |= movable_or_list; \
};

//dont use these outside of SSspatial_grid's scope use the procs it has for this purpose
#define GRID_CELL_REMOVE(cell_contents_list, movable_or_list) \
cell_contents_list -= movable_or_list; \
if(!length(cell_contents_list)) {\
cell_contents_list = dummy_list; \
};

///remove from every list
#define GRID_CELL_REMOVE_ALL(cell, movable) \
GRID_CELL_REMOVE(cell.hearing_contents, movable) \
GRID_CELL_REMOVE(cell.client_contents, movable) \
GRID_CELL_REMOVE(cell.atmos_contents, movable)
2 changes: 2 additions & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
#define INIT_ORDER_AI_CONTROLLERS 55 //So the controller can get the ref
#define INIT_ORDER_TICKER 55
#define INIT_ORDER_MAPPING 50
#define INIT_ORDER_DUNGEON 49
#define INIT_ORDER_NETWORKS 45
#define INIT_ORDER_SPATIAL_GRID 43
#define INIT_ORDER_ECONOMY 40
#define INIT_ORDER_OUTPUTS 35
#define INIT_ORDER_ATOMS 30
Expand Down
Loading