Overhauls and 2/28 sync (#244)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures

* lazy fix for bleeding edgy (#252)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures
This commit is contained in:
Poojawa
2017-02-28 09:30:49 -06:00
committed by GitHub
parent 93782cf716
commit 0bca862419
544 changed files with 309981 additions and 81206 deletions

View File

@@ -4,6 +4,7 @@ var/global/datum/getrev/revdata = new()
var/parentcommit
var/commit
var/list/testmerge = list()
var/has_pr_details = FALSE //example data in a testmerge entry when this is true: https://api.github.com/repositories/3234987/pulls/22586
var/date
/datum/getrev/New()
@@ -31,6 +32,44 @@ var/global/datum/getrev/revdata = new()
log_world(parentcommit)
log_world("Current map - [MAP_NAME]") //can't think of anywhere better to put it
/datum/getrev/proc/DownloadPRDetails()
if(!config.githubrepoid)
if(testmerge.len)
log_world("PR details download failed: No github repo config set")
return
if(!isnum(text2num(config.githubrepoid)))
log_world("PR details download failed: Invalid github repo id: [config.githubrepoid]")
return
for(var/line in testmerge)
if(!isnum(text2num(line)))
log_world("PR details download failed: Invalid PR number: [line]")
return
var/url = "https://api.github.com/repositories/[config.githubrepoid]/pulls/[line].json"
valid_HTTPSGet = TRUE
var/json = HTTPSGet(url)
if(!json)
return
testmerge[line] = json_decode(json)
if(!testmerge[line])
log_world("PR details download failed: null details returned")
return
CHECK_TICK
log_world("PR details successfully downloaded")
has_pr_details = TRUE
/datum/getrev/proc/GetTestMergeInfo(header = TRUE)
if(!testmerge.len)
return ""
. = header ? "The following pull requests are currently test merged:<br>" : ""
for(var/line in testmerge)
var/details = ""
if(has_pr_details)
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["user"]["login"])
. += "<a href='[config.githuburl]/pull/[line]'>#[line][details]</a><br>"
/client/verb/showrevinfo()
set category = "OOC"
set name = "Show Server Revision"
@@ -39,12 +78,9 @@ var/global/datum/getrev/revdata = new()
if(revdata.parentcommit)
src << "<b>Server revision compiled on:</b> [revdata.date]"
if(revdata.testmerge.len)
for(var/line in revdata.testmerge)
if(line)
src << "Test merge active of PR <a href='[config.githuburl]/pull/[line]'>#[line]</a>"
src << "Based off master commit <a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
else
src << "<a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
src << revdata.GetTestMergeInfo()
src << "Based off master commit:"
src << "<a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
else
src << "Revision unknown"
src << "<b>Current Infomational Settings:</b>"
@@ -56,8 +92,8 @@ var/global/datum/getrev/revdata = new()
src << "Allow Midround Antagonists: [config.midround_antag.len] of [config.modes.len] roundtypes"
if(config.show_game_type_odds)
if(ticker.current_state == GAME_STATE_PLAYING)
src <<"<b>Game Mode Odds for current round:</b>"
var/prob_sum = 0
var/current_odds_differ = FALSE
var/list/probs = list()
var/list/modes = config.gamemode_cache
for(var/mode in modes)
@@ -65,17 +101,18 @@ var/global/datum/getrev/revdata = new()
var/ctag = initial(M.config_tag)
if(!(ctag in config.probabilities))
continue
if((config.min_pop[ctag] && (config.min_pop[ctag] > ticker.totalPlayersReady)) || (initial(M.required_players) > ticker.totalPlayersReady))
continue
if(config.max_pop[ctag] && (config.max_pop[ctag] < ticker.totalPlayersReady))
if((config.min_pop[ctag] && (config.min_pop[ctag] > ticker.totalPlayersReady)) || (config.max_pop[ctag] && (config.max_pop[ctag] < ticker.totalPlayersReady)) || (initial(M.required_players) > ticker.totalPlayersReady))
current_odds_differ = TRUE
continue
probs[ctag] = 1
prob_sum += config.probabilities[ctag]
for(var/ctag in probs)
if(config.probabilities[ctag] > 0)
var/percentage = round(config.probabilities[ctag] / prob_sum * 100, 0.1)
src << "[ctag] [percentage]%"
if(current_odds_differ)
src <<"<b>Game Mode Odds for current round:</b>"
for(var/ctag in probs)
if(config.probabilities[ctag] > 0)
var/percentage = round(config.probabilities[ctag] / prob_sum * 100, 0.1)
src << "[ctag] [percentage]%"
src <<"<b>All Game Mode Odds:</b>"
var/sum = 0
for(var/ctag in config.probabilities)
@@ -84,4 +121,3 @@ var/global/datum/getrev/revdata = new()
if(config.probabilities[ctag] > 0)
var/percentage = round(config.probabilities[ctag] / sum * 100, 0.1)
src << "[ctag] [percentage]%"
return

View File

@@ -1,146 +0,0 @@
/datum/map_template
var/name = "Default Template Name"
var/width = 0
var/height = 0
var/mappath = null
var/mapfile = null
var/loaded = 0 // Times loaded this round
/datum/map_template/New(path = null, map = null, rename = null)
if(path)
mappath = path
if(mappath)
preload_size(mappath)
if(map)
mapfile = map
if(rename)
name = rename
/datum/map_template/proc/preload_size(path)
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE)
if(bounds)
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
height = bounds[MAP_MAXY]
return bounds
/proc/initTemplateBounds(var/list/bounds)
var/list/obj/machinery/atmospherics/atmos_machines = list()
var/list/obj/structure/cable/cables = list()
var/list/atom/atoms = list()
for(var/L in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
var/turf/B = L
atoms += B
for(var/A in B)
atoms += A
if(istype(A,/obj/structure/cable))
cables += A
continue
if(istype(A,/obj/machinery/atmospherics))
atmos_machines += A
continue
SSobj.InitializeAtoms(atoms)
SSmachine.setup_template_powernets(cables)
SSair.setup_template_machinery(atmos_machines)
SSair.end_map_load()
/datum/map_template/proc/load(turf/T, centered = FALSE)
if(centered)
T = locate(T.x - round(width/2) , T.y - round(height/2) , T.z)
if(!T)
return
if(T.x+width > world.maxx)
return
if(T.y+height > world.maxy)
return
SSair.begin_map_load()
var/list/bounds = maploader.load_map(get_file(), T.x, T.y, T.z, cropMap=TRUE)
if(!bounds)
SSair.end_map_load()
return 0
//initialize things that are normally initialized after map load
initTemplateBounds(bounds)
log_game("[name] loaded at at [T.x],[T.y],[T.z]")
return 1
/datum/map_template/proc/get_file()
if(mapfile)
. = mapfile
else if(mappath)
. = file(mappath)
if(!.)
log_world("The file of [src] appears to be empty/non-existent.")
/datum/map_template/proc/get_affected_turfs(turf/T, centered = FALSE)
var/turf/placement = T
if(centered)
var/turf/corner = locate(placement.x - round(width/2), placement.y - round(height/2), placement.z)
if(corner)
placement = corner
return block(placement, locate(placement.x+width-1, placement.y+height-1, placement.z))
/proc/preloadTemplates(path = "_maps/templates/") //see master controller setup
var/list/filelist = flist(path)
for(var/map in filelist)
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
map_templates[T.name] = T
preloadRuinTemplates()
preloadShuttleTemplates()
preloadShelterTemplates()
/proc/preloadRuinTemplates()
// Still supporting bans by filename
var/list/banned = generateMapList("config/lavaruinblacklist.txt")
banned += generateMapList("config/spaceruinblacklist.txt")
for(var/item in subtypesof(/datum/map_template/ruin))
var/datum/map_template/ruin/ruin_type = item
// screen out the abstract subtypes
if(!initial(ruin_type.id))
continue
var/datum/map_template/ruin/R = new ruin_type()
if(banned.Find(R.mappath))
continue
map_templates[R.name] = R
ruins_templates[R.name] = R
if(istype(R, /datum/map_template/ruin/lavaland))
lava_ruins_templates[R.name] = R
else if(istype(R, /datum/map_template/ruin/space))
space_ruins_templates[R.name] = R
/proc/preloadShuttleTemplates()
var/list/unbuyable = generateMapList("config/unbuyableshuttles.txt")
for(var/item in subtypesof(/datum/map_template/shuttle))
var/datum/map_template/shuttle/shuttle_type = item
if(!(initial(shuttle_type.suffix)))
continue
var/datum/map_template/shuttle/S = new shuttle_type()
if(unbuyable.Find(S.mappath))
S.can_be_bought = FALSE
shuttle_templates[S.shuttle_id] = S
map_templates[S.shuttle_id] = S
/proc/preloadShelterTemplates()
for(var/item in subtypesof(/datum/map_template/shelter))
var/datum/map_template/shelter/shelter_type = item
if(!(initial(shelter_type.mappath)))
continue
var/datum/map_template/shelter/S = new shelter_type()
shelter_templates[S.shelter_id] = S
map_templates[S.shelter_id] = S