Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
maps to defines
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrior committed Apr 7, 2024
1 parent f1af82d commit 3b0ac98
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include "code\__defines\lists.dm"
#include "code\__defines\machinery.dm"
#include "code\__defines\mapping.dm"
#include "code\__defines\maps.dm"
#include "code\__defines\materials.dm"
#include "code\__defines\math_physics.dm"
#include "code\__defines\MC.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/maps.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MAP_HAS_BRANCH 1 //Branch system for occupations, togglable
#define MAP_HAS_RANK 2 //Rank system, also togglable
6 changes: 3 additions & 3 deletions code/controllers/subsystems/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ SUBSYSTEM_DEF(jobs)
for(var/mob/new_player/player in unassigned_roundstart)
if(player.client.prefs.alternate_option == BE_ASSISTANT)
var/datum/job/ass = DEFAULT_JOB_TYPE
if((GLOB.using_map.flags & GLOB.MAP_HAS_BRANCH) && player.client.prefs.branches[initial(ass.title)])
if((GLOB.using_map.flags & MAP_HAS_BRANCH) && player.client.prefs.branches[initial(ass.title)])
var/datum/mil_branch/branch = GLOB.mil_branches.get_branch(player.client.prefs.branches[initial(ass.title)])
ass = branch.assistant_job
assign_role(player, initial(ass.title), mode = mode)
Expand Down Expand Up @@ -412,9 +412,9 @@ SUBSYSTEM_DEF(jobs)

if(job)
if(H.client)
if(GLOB.using_map.flags & GLOB.MAP_HAS_BRANCH)
if(GLOB.using_map.flags & MAP_HAS_BRANCH)
H.char_branch = GLOB.mil_branches.get_branch(H.client.prefs.branches[rank])
if(GLOB.using_map.flags & GLOB.MAP_HAS_RANK)
if(GLOB.using_map.flags & MAP_HAS_RANK)
H.char_rank = GLOB.mil_branches.get_rank(H.client.prefs.branches[rank], H.client.prefs.ranks[rank])

// Transfers the skill settings for the job to the mob
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/weapons/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ GLOBAL_VAR_CONST(NO_EMAG_ACT, -50)
/mob/living/carbon/human/set_id_info(obj/item/card/id/id_card)
..()
id_card.age = age
if(GLOB.using_map.flags & GLOB.MAP_HAS_BRANCH)
if(GLOB.using_map.flags & MAP_HAS_BRANCH)
id_card.military_branch = char_branch
if(GLOB.using_map.flags & GLOB.MAP_HAS_RANK)
if(GLOB.using_map.flags & MAP_HAS_RANK)
id_card.military_rank = char_rank
if (char_rank)
var/singleton/rank_category/category = char_rank.rank_category()
Expand All @@ -355,9 +355,9 @@ GLOBAL_VAR_CONST(NO_EMAG_ACT, -50)
dat += text("Gender: []</A><BR>\n", sex)
dat += text("Age: []</A><BR>\n", age)

if(GLOB.using_map.flags & GLOB.MAP_HAS_BRANCH)
if(GLOB.using_map.flags & MAP_HAS_BRANCH)
dat += text("Branch: []</A><BR>\n", military_branch ? military_branch.name : "\[UNSET\]")
if(GLOB.using_map.flags & GLOB.MAP_HAS_RANK)
if(GLOB.using_map.flags & MAP_HAS_RANK)
dat += text("Rank: []</A><BR>\n", military_rank ? military_rank.name : "\[UNSET\]")

dat += text("Assignment: []</A><BR>\n", assignment)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/cards_ids_syndicate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
entries[LIST_PRE_INC(entries)] = list("name" = "Suffix", "value" = formal_name_suffix)
entries[LIST_PRE_INC(entries)] = list("name" = "Appearance", "value" = "Set")
entries[LIST_PRE_INC(entries)] = list("name" = "Assignment", "value" = assignment)
if(GLOB.using_map.flags & GLOB.MAP_HAS_BRANCH)
if(GLOB.using_map.flags & MAP_HAS_BRANCH)
entries[LIST_PRE_INC(entries)] = list("name" = "Branch", "value" = military_branch ? military_branch.name : "N/A")
if(military_branch && (GLOB.using_map.flags & GLOB.MAP_HAS_RANK))
if(military_branch && (GLOB.using_map.flags & MAP_HAS_RANK))
entries[LIST_PRE_INC(entries)] = list("name" = "Rank", "value" = military_rank ? military_rank.name : "N/A")
entries[LIST_PRE_INC(entries)] = list("name" = "Blood Type", "value" = blood_type)
entries[LIST_PRE_INC(entries)] = list("name" = "DNA Hash", "value" = dna_hash)
Expand Down
3 changes: 0 additions & 3 deletions maps/mapsystem/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

GLOBAL_LIST_EMPTY(all_maps)

GLOBAL_VAR_CONST(MAP_HAS_BRANCH, 1) //Branch system for occupations, togglable
GLOBAL_VAR_CONST(MAP_HAS_RANK, 2) //Rank system, also togglable

/hook/startup/proc/initialise_map_list()
for(var/type in subtypesof(/datum/map))
var/datum/map/M
Expand Down

0 comments on commit 3b0ac98

Please sign in to comment.