Skip to content
Merged
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
1 change: 1 addition & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost"
#define GAMEMODE_HIVE_WARS "Hive Wars"
#define GAMEMODE_FACTION_CLASH_UPP_CM "Faction Clash UPP CM"

/// Number of players before we switch to lowpop maps only (LV, BR, Prison).
#define PLAYERCOUNT_LOWPOP_MAP_LIMIT 130
Expand Down
5 changes: 4 additions & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loading [ship_map.map_name]...")
Loadship(FailedZs, ship_map.map_name, ship_map.map_path, ship_map.map_file, ship_map.traits, ZTRAITS_MAIN_SHIP, override_map_path = ship_base_path)

Loadship(FailedZs, "ssv_rostock", "templates/", list("ssv_rostock.dmm") , list(),ZTRAITS_MAIN_SHIP , override_map_path = "maps/")
// loads the UPP ship if the game mode is faction clash (Generally run by the Prepare event under prep event verb)
if(trim(file2text("data/mode.txt")) == GAMEMODE_FACTION_CLASH_UPP_CM)
Loadship(FailedZs, "ssv_rostock", "templates/", list("ssv_rostock.dmm") , list(),ZTRAITS_MAIN_SHIP , override_map_path = "maps/")

if(LAZYLEN(FailedZs)) //but seriously, unless the server's filesystem is messed up this will never happen
var/msg = "RED ALERT! The following map files failed to load: [FailedZs[1]]"
if(length(FailedZs) > 1)
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/datum/admins/proc/toggleaban,
/datum/admins/proc/end_round,
/datum/admins/proc/change_ground_map,
/datum/admins/proc/prep_events,
/datum/admins/proc/change_ship_map,
/datum/admins/proc/vote_ground_map,
/datum/admins/proc/override_ground_map,
Expand Down
75 changes: 75 additions & 0 deletions code/modules/admin/server_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,78 @@

log_admin("[key_name(usr)] changed the ship map to [VM.map_name].")
message_admins("[key_name_admin(usr)] changed the ship map to [VM.map_name].")

/datum/admins/proc/prep_events()
set category = "Server"
set name = "M: Prepare Events"

var/list/maprotatechoices = list()
var/datum/map_config/VM
var/chosenmap
var/list/mode_list

if(!check_rights(R_SERVER))
return

message_admins("[key_name_admin(usr)] has run the prep_events verb.")
//
var/accept = tgui_alert(usr, "Are you sure you want to prepare events? This will restart the server!!!! additionally it will change the current master mode!!!!", "Prepare Events", list("Yes", "No"))
if(accept != "Yes")
return
//
mode_list = config.modes
mode_list += "Cancel"
var/modeset = tgui_input_list(usr, "current mode: [GLOB.master_mode]", "Mode Selection", mode_list)

// Override ground map
var/accept_mapchange = tgui_alert(usr, "Do you wish to change the next ground map?", "Prepare Events", list("Yes", "No"))
if(accept_mapchange == "Yes")
for(var/map in config.maplist[GROUND_MAP])
VM = config.maplist[GROUND_MAP][map]
var/mapname = VM.map_name
if(VM == config.defaultmaps[GROUND_MAP])
mapname += " (Default)"

if(VM.config_min_users > 0 || VM.config_max_users > 0)
mapname += " \["
if(VM.config_min_users > 0)
mapname += "[VM.config_min_users]"
else
mapname += "0"
mapname += "-"
if(VM.config_max_users > 0)
mapname += "[VM.config_max_users]"
else
mapname += "inf"
mapname += "\]"

maprotatechoices[mapname] = VM

chosenmap = tgui_input_list(usr, "Choose a ground map to change to", "Change Ground Map", maprotatechoices)

if(!chosenmap)
to_chat(usr, SPAN_WARNING("Failed to select a ground map, aborting changes and restart."))
return

// All changes should happen here incase of failure
//Change gamemode
if(modeset != "Cancel" && !!modeset)
GLOB.master_mode = modeset
message_admins("[key_name_admin(usr)] set the mode as [GLOB.master_mode] via event prep.")
to_world(SPAN_NOTICE("<b><i>The mode for next round is: [GLOB.master_mode]!</i></b>"))
SSticker.save_mode(GLOB.master_mode)

//Change map
if(chosenmap)
VM = maprotatechoices[chosenmap]
log_admin("[key_name(usr)] changed the map to [VM.map_name].")
message_admins("[key_name_admin(usr)] changed the map to [VM.map_name].")

if(!SSmapping.changemap(VM, GROUND_MAP))
to_chat(usr, SPAN_WARNING("Failed to change the ground map, aborting changes and restart."))
return

// Restarts the world provided no issues occur above.
log_admin("[key_name(usr)] initiated a reboot.")
sleep(100)
world.Reboot()
101 changes: 80 additions & 21 deletions code/modules/gear_presets/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@
name = "UPP Soldier"
flags = EQUIPMENT_PRESET_EXTRA
skills = /datum/skills/upp
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/soldier/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/soldier/dressed/load_gear(mob/living/carbon/human/new_human)
//face
Expand Down Expand Up @@ -341,7 +344,10 @@

skills = /datum/skills/upp/combat_medic
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/medic/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/medic/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -547,7 +553,10 @@

skills = /datum/skills/upp/combat_engineer
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/sapper/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/sapper/dressed/load_gear(mob/living/carbon/human/new_human)
//Sappers should have lots of gear and whatnot that helps them attack or siege marines
Expand Down Expand Up @@ -713,8 +722,10 @@
/datum/equipment_preset/upp/specialist/dressed
name = "UPP Specialist"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/specialist/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/specialist/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -855,8 +866,10 @@
/datum/equipment_preset/upp/machinegunner/dressed
name = "UPP Machinegunner"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/machinegunner/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/machinegunner/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -1014,7 +1027,10 @@

skills = /datum/skills/upp/SL
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/leader/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/leader/dressed/load_gear(mob/living/carbon/human/new_human)
var/UPPleadsidearm = rand(1,4)
Expand Down Expand Up @@ -1234,7 +1250,10 @@
/datum/equipment_preset/upp/military_police/dressed
name = "UPP Military Police"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/military_police/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/military_police/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -1423,7 +1442,10 @@
/datum/equipment_preset/upp/doctor/dressed
name = "UPP Doctor"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/doctor/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/doctor/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -1598,7 +1620,10 @@
/datum/equipment_preset/upp/supply/dressed
name = "UPP Logistics Technician"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/supply/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/supply/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -1714,8 +1739,10 @@
/datum/equipment_preset/upp/officer/dressed
name = "UPP Lieutenant"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/officer/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -1900,7 +1927,10 @@

/datum/equipment_preset/upp/officer/senior/dressed
name = "UPP Senior Lieutenant"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/senior/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/officer/senior/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -2062,7 +2092,10 @@

/datum/equipment_preset/upp/officer/kapitan/dressed
name = "UPP Kapitan"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/kapitan/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/officer/kapitan/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -2257,7 +2290,10 @@

/datum/equipment_preset/upp/officer/major/dressed
name = "UPP Major"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/major/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/officer/major/dressed/load_gear(mob/living/carbon/human/new_human)
//back
Expand Down Expand Up @@ -2446,7 +2482,10 @@
role_comm_title = "Lt. Kol."
minimap_icon = "upp_co"
paygrades = list(PAY_SHORT_UO5 = JOB_PLAYTIME_TIER_0)
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/flag/dressed/podpolkovnik/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

//*****************************************************************************************************/
/datum/equipment_preset/upp/officer/flag
Expand Down Expand Up @@ -2675,7 +2714,10 @@
role_comm_title = "Ley. Gen."
minimap_icon = "upp_co"
paygrades = list(PAY_SHORT_UO8 = JOB_PLAYTIME_TIER_0)
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/flag/may_gen/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

//*****************************************************************************************************/
/datum/job/antag/upp/officer/ley_gen
Expand All @@ -2698,7 +2740,10 @@
rank = JOB_UPP_LT_GENERAL
role_comm_title = "Lt. Gen."
minimap_icon = "upp_co"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/flag/ley_gen/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

//*****************************************************************************************************/
/datum/job/antag/upp/officer/gen
Expand All @@ -2713,8 +2758,10 @@
minimap_icon = "upp_co"
paygrades = list(PAY_SHORT_UO10 = JOB_PLAYTIME_TIER_0)
skills = /datum/skills/upp/commander
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/officer/flag/gen/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

//*****************************************************************************************************/
/datum/equipment_preset/upp/sapper/survivor
Expand Down Expand Up @@ -2793,7 +2840,10 @@

/datum/equipment_preset/upp/synth/dressed
name = "UPP Synthetic"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/synth/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/synth/load_gear(mob/living/carbon/human/new_human)
. = ..()
Expand Down Expand Up @@ -3024,7 +3074,10 @@
/datum/equipment_preset/upp/synth/combat/dressed
name = "UPP Combat Synthetic"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/synth/combat/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)


/datum/equipment_preset/upp/synth/combat/load_skills(mob/living/carbon/human/new_human)
Expand Down Expand Up @@ -3673,7 +3726,10 @@

/datum/equipment_preset/upp/tank/dressed
name = "UPP Vehicle Crewman (TANK)"
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/tank/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)


/datum/equipment_preset/upp/tank/dressed/load_gear(mob/living/carbon/human/new_human)
Expand Down Expand Up @@ -3882,7 +3938,10 @@
/datum/equipment_preset/upp/commissar/dressed
name = "UPP Political Commissar"
flags = EQUIPMENT_PRESET_EXTRA
access = ACCESS_LIST_UPP_ALL

/datum/equipment_preset/upp/commissar/dressed/New()
.=..()
access = get_access(ACCESS_LIST_UPP_ALL)

/datum/equipment_preset/upp/commissar/load_gear(mob/living/carbon/human/new_human)
. = ..()
Expand Down
Loading