Tg 2 11 sync (#215)

* first series of updates

* datums

* games folder

* admin and atmosia stuffs

* moar

* mob updates borg riding

* sprites and stuff

* fixes for various things

* oops. some missed fixes
This commit is contained in:
Poojawa
2017-02-12 03:56:14 -06:00
committed by GitHub
parent 30b3dff395
commit 6674f9fc15
153 changed files with 1651 additions and 1368 deletions
+13 -13
View File
@@ -20,8 +20,8 @@
var/name = "Configuration" // datum name
var/server_name = null // server name (the name of the game window)
var/server_sql_name = null // short form server name used for the DB
var/station_name = null // station name (the name of the station in-game)
var/server_suffix = 0 // generate numeric suffix based on server port
var/lobby_countdown = 120 // In between round countdown.
var/round_end_countdown = 25 // Post round murder death kill countdown
var/hub = 0
@@ -78,8 +78,7 @@
var/forbid_singulo_possession = 0
var/useircbot = 0
var/announce_watchlist = 0
var/announce_adminhelps = 0
var/check_randomizer = 0
var/allow_panic_bunker_bounce = 0 //Send new players somewhere else
@@ -95,6 +94,11 @@
var/mentors_mobname_only = 0 // Only display mob name to mentors in mentorhelps
var/mentor_legacy_system = 0 // Whether to use the legacy mentor system (flat file) instead of SQL
// Discord crap.
var/discord_url = "hfdksjhfa.com"
var/discord_password
var/announce_watchlist = 0
var/announce_adminhelps = 0
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
@@ -242,10 +246,6 @@
var/list/gamemode_cache = null
// Discord crap.
var/discord_url = "hfdksjhfa.com"
var/discord_password
var/minutetopiclimit
var/secondtopiclimit
@@ -359,10 +359,10 @@
config.respawn = 0
if("servername")
config.server_name = value
if("serversqlname")
config.server_sql_name = 1
if("stationname")
config.station_name = value
if("serversuffix")
config.server_suffix = 1
if("hostedby")
config.hostedby = value
if("server")
@@ -499,16 +499,16 @@
config.client_error_version = text2num(value)
if("client_error_message")
config.client_error_message = value
if("minute_topic_limit")
config.minutetopiclimit = text2num(value)
if("second_topic_limit")
config.secondtopiclimit = text2num(value)
if("announce_adminhelps")
config.announce_adminhelps = 1
if("discord_url")
config.discord_url = value
if("discord_password")
config.discord_password = value
if("minute_topic_limit")
config.minutetopiclimit = text2num(value)
if("second_topic_limit")
config.secondtopiclimit = text2num(value)
else
diary << "Unknown setting in configuration: '[name]'"
+1
View File
@@ -322,6 +322,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
SS_flags = SS.flags
if (SS_flags & SS_NO_FIRE)
subsystemstocheck -= SS
continue
if (!(SS_flags & SS_TICKER) && (SS_flags & SS_KEEP_TIMING) && SS.last_fire + (SS.wait * 0.75) > world.time)
continue
SS.enqueue()
+33 -13
View File
@@ -39,28 +39,34 @@ var/datum/subsystem/air/SSair
var/list/currentrun = list()
var/currentpart = SSAIR_PIPENETS
var/map_loading = TRUE
var/list/queued_for_activation
/datum/subsystem/air/New()
NEW_SS_GLOBAL(SSair)
/datum/subsystem/air/stat_entry(msg)
msg += "C:{"
msg += "AT:[round(cost_turfs)]|"
msg += "EG:[round(cost_groups)]|"
msg += "HP:[round(cost_highpressure)]|"
msg += "HS:[round(cost_hotspots)]|"
msg += "SC:[round(cost_superconductivity)]|"
msg += "PN:[round(cost_pipenets)]|"
msg += "AM:[round(cost_atmos_machinery)]"
msg += "AT:[round(cost_turfs,1)]|"
msg += "EG:[round(cost_groups,1)]|"
msg += "HP:[round(cost_highpressure,1)]|"
msg += "HS:[round(cost_hotspots,1)]|"
msg += "SC:[round(cost_superconductivity,1)]|"
msg += "PN:[round(cost_pipenets,1)]|"
msg += "AM:[round(cost_atmos_machinery,1)]"
msg += "} "
msg += "AT:[active_turfs.len]|"
msg += "EG:[excited_groups.len]|"
msg += "HS:[hotspots.len]|"
msg += "AS:[active_super_conductivity.len]"
msg += "AT:[active_turfs.len]|"
msg += "EG:[excited_groups.len]|"
msg += "HS:[hotspots.len]|"
msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|"
msg += "AT/MS:[round((cost ? active_turfs.len/cost : 0),0.1)]"
..(msg)
/datum/subsystem/air/Initialize(timeofday)
map_loading = FALSE
setup_allturfs()
setup_atmos_machinery()
setup_pipenets()
@@ -244,7 +250,6 @@ var/datum/subsystem/air/SSair
if(T.excited_group)
T.excited_group.garbage_collect()
/datum/subsystem/air/proc/add_to_active(turf/open/T, blockchanges = 1)
if(istype(T) && T.air)
T.excited = 1
@@ -253,10 +258,25 @@ var/datum/subsystem/air/SSair
currentrun |= T
if(blockchanges && T.excited_group)
T.excited_group.garbage_collect()
else
else if(T.initialized)
for(var/turf/S in T.atmos_adjacent_turfs)
add_to_active(S)
else if(map_loading)
if(queued_for_activation)
queued_for_activation[T] = T
return
else
T.requires_activation = TRUE
/datum/subsystem/air/proc/begin_map_load()
LAZYINITLIST(queued_for_activation)
map_loading = TRUE
/datum/subsystem/air/proc/end_map_load()
map_loading = FALSE
for(var/T in queued_for_activation)
add_to_active(T)
queued_for_activation.Cut()
/datum/subsystem/air/proc/setup_allturfs()
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
@@ -27,26 +27,52 @@ var/datum/subsystem/objects/SSobj
/datum/subsystem/objects/proc/InitializeAtoms(list/objects = null)
if(initialized == INITIALIZATION_INSSOBJ)
return
var/list/late_loaders
initialized = INITIALIZATION_INNEW_MAPLOAD
if(objects)
for(var/I in objects)
var/atom/A = I
if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call
var/start_tick = world.time
A.Initialize(TRUE)
if(A.Initialize(TRUE))
LAZYADD(late_loaders, A)
if(start_tick != world.time)
WARNING("[A]: [A.type] slept during it's Initialize!")
CHECK_TICK
testing("Initialized [objects.len] atoms")
else
#ifdef TESTING
var/count = 0
#endif
for(var/atom/A in world)
if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call
var/start_tick = world.time
A.Initialize(TRUE)
if(A.Initialize(TRUE))
LAZYADD(late_loaders, A)
#ifdef TESTING
else
++count
#endif TESTING
if(start_tick != world.time)
WARNING("[A]: [A.type] slept during it's Initialize!")
CHECK_TICK
testing("Roundstart initialized [count] atoms")
initialized = INITIALIZATION_INNEW_REGULAR
if(late_loaders)
for(var/I in late_loaders)
var/atom/A = I
var/start_tick = world.time
A.Initialize(FALSE)
if(start_tick != world.time)
WARNING("[A]: [A.type] slept during it's Initialize!")
CHECK_TICK
testing("Late-initialized [late_loaders.len] atoms")
/datum/subsystem/objects/proc/map_loader_begin()
old_initialized = initialized
initialized = INITIALIZATION_INSSOBJ
+18 -13
View File
@@ -66,11 +66,11 @@ var/datum/subsystem/throwing/SSthrowing
/datum/thrownthing/proc/tick()
var/atom/movable/AM = thrownthing
if (!isturf(AM.loc) || !AM.throwing)
finialize()
finalize()
return
if (dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept
finialize()
finalize()
return
var/atom/step
@@ -79,7 +79,7 @@ var/datum/subsystem/throwing/SSthrowing
var/tilestomove = round(min(((((world.time+world.tick_lag) - start_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed*MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait))
while (tilestomove-- > 0)
if ((dist_travelled >= maxrange || AM.loc == target_turf) && AM.has_gravity(AM.loc))
finialize()
finalize()
return
if (dist_travelled <= max(dist_x, dist_y)) //if we haven't reached the target yet we home in on it, otherwise we use the initial direction
@@ -93,47 +93,52 @@ var/datum/subsystem/throwing/SSthrowing
diagonal_error += (diagonal_error < 0) ? dist_x/2 : -dist_y
if (!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
finialize()
finalize()
return
AM.Move(step, get_dir(AM, step))
if (!AM.throwing) // we hit something during our move
finialize(hit = TRUE)
finalize(hit = TRUE)
return
dist_travelled++
if (dist_travelled > MAX_THROWING_DIST)
finialize()
finalize()
return
/datum/thrownthing/proc/finialize(hit = FALSE)
/datum/thrownthing/proc/finalize(hit = FALSE)
set waitfor = 0
SSthrowing.processing -= thrownthing
//done throwing, either because it hit something or it finished moving
thrownthing.throwing = 0
thrownthing.throwing = null
if (!hit)
for (var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on.
var/atom/A = thing
if (A == target)
hit = 1
thrownthing.throw_impact(A)
thrownthing.throw_impact(A, src)
break
if (!hit)
thrownthing.throw_impact(get_turf(thrownthing)) // we haven't hit something yet and we still must, let's hit the ground.
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
thrownthing.newtonian_move(init_dir)
else
thrownthing.newtonian_move(init_dir)
if (callback)
callback.Invoke()
/datum/thrownthing/proc/hit_atom(atom/A)
thrownthing.throw_impact(A, src)
thrownthing.newtonian_move(init_dir)
finalize(TRUE)
/datum/thrownthing/proc/hitcheck()
for (var/thing in get_turf(thrownthing))
var/atom/movable/AM = thing
if (AM == thrownthing)
continue
if (AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER))
thrownthing.throwing = 0
thrownthing.throw_impact(AM)
return 1
thrownthing.throwing = null
thrownthing.throw_impact(AM, src)
return TRUE