mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
* SNOWPLANES? * snow map #2 * it sort of works (not really) * we'll call this a prototype * committing so I can remove other changes later * snowmap prototype 2/11/2016 - practically ready for an open beta edition * more stuff, more sprites, more items, we're getting there * before I uncheck the error handler * AAAAAAAAAAAAAAAAA * it works now * Edits the map to be more terrestrial: Added paramedic stations/security stations/EVA stations to each map. Removed grilles from taxi. Still a bunch of shite to do eg belt hell but we're getting there Also tweaked spawn chance because reasons * snowboot * Coats (#2) * Take these, good luck * oops * According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don’t care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let’s shake it up a little. Barry! Breakfast is ready! Coming! Hang on a second. Hello? - Barry? - Adam? - Oan you believe this is happening? - I can’t. I’ll pick you up. Looking sharp. Use the stairs. Your father paid good money for those. Sorry. I’m excited. Here’s the graduate. We’re very proud of you, son. A perfect report card, all B’s. Very proud. Ma! I got a thing going here. - You got lint on your fuzz. - Ow! That’s me! - Wave to us! We’ll be in row 118,000. - Bye! Barry, I told you, stop flying in the house! - Hey, Adam. - Hey, Barry. - Is that fuzz gel? - A little. Special day, graduation. Never thought I’d make it. Three days grade school, three days high school. Those were awkward. * define * bugfixes * fixes conflicts * fixed bugs and made hoods work better * do ah look lahk ah know what "ay-tomic" is? * bugfixes shadowfixes added like seven different coats, ian now can wear scarves * mapchanges - snaxi is now united * wolves, and point handling (#3) * wolves, and point handling * wolf pointing, removes hitler * Removes nonsense * ice ice baby procedural generation is the best buzzword new snow map doors map now has proper z level names not working right now ice smoothing is being a !!bitch!! * glaciers now smooth glaciers no longer eat up the pipes between stations (this will cause some fuck ups with smoothing but uh yeah) you now slip on rivers todo - skis - snowshoes - spiked boots * Moves ores to overlays, adds snow roid sprites (#5) * Moves ores to overlays, adds snow roid sprites * Fixes gibtonite, re-approaches some mine surprises * Wendigos added, skifree yeti added, wendigo meat and transformation added (#4) * DEER, and leather stuff * Adds xeno spears, xenohide, fixes bugs * alright dragonbro over to you for tonight I'm going to sleep * Fixes wendigos, and wolves * if it works it works who cares why * snowmap bugfixes and optimisations * zzz * Revamp in working state no work in progress saving wip Most issues fixed. Fishing half way through overhaul to include minigame Turned spaces into tabs. fucking atom REEEEEEEEEE Clownfish and clownburger added. All fishing code done. Carp and normal fish recipes updated and ready. Carpmeat changed to subtype of fish_fillet. WIP. Rods mostly done. Basic fish and bait added. * removes bluespace ponds to be atomic * fixes issues - bluespace pond back in the code but not able to be got anywhere * does the easy things * renames it taxi outpost adds map cleaning things * OK THIS WILL FIX IT FOR REAL * fixes EVERYTHING but it's not ready to merge because I reckon we can squeeze some last minute features in * whoops forgot to fix this * underground mining stuff * adds lobby music courtesy of aceedex * bugfixes mining underground optimisations (now it actually runs instead of grinding to a halt) there are runtimes aaaa oh well will fix tomorrow * fixes so that JSG can host it some missing features
113 lines
3.9 KiB
Plaintext
113 lines
3.9 KiB
Plaintext
/var/list/error_last_seen = list()
|
|
// error_cooldown items will either be positive (cooldown time) or negative (silenced error)
|
|
// If negative, starts at -1, and goes down by 1 each time that error gets skipped
|
|
/var/list/error_cooldown = list()
|
|
/var/total_runtimes = 0
|
|
/var/total_runtimes_skipped = 0
|
|
// The ifdef needs to be down here, since the error viewer references total_runtimes
|
|
#ifdef DEBUG
|
|
/world/Error(var/exception/e)
|
|
if (!istype(e)) // Something threw an unusual exception
|
|
world.log << "\[[time_stamp()]] Uncaught exception: [e]"
|
|
return ..()
|
|
|
|
if (!islist(global.error_last_seen)) // A runtime is occurring too early in start-up initialization
|
|
return ..()
|
|
|
|
global.total_runtimes++
|
|
|
|
var/erroruid = "[e.file][e.line]"
|
|
var/last_seen = global.error_last_seen[erroruid]
|
|
var/cooldown = global.error_cooldown[erroruid] || 0
|
|
if (last_seen == null) // A new error!
|
|
global.error_last_seen[erroruid] = world.time
|
|
last_seen = world.time
|
|
|
|
if (cooldown < 0)
|
|
global.error_cooldown[erroruid]-- // Used to keep track of skip count for this error
|
|
global.total_runtimes_skipped++
|
|
return // Error is currently silenced, skip handling it
|
|
|
|
// Handle cooldowns and silencing spammy errors
|
|
var/silencing = 0
|
|
|
|
// We can runtime before config is initialized because BYOND initialize objs/map before a bunch of other stuff happens.
|
|
// This is a bunch of workaround code for that. Hooray!
|
|
var/configured_error_cooldown
|
|
var/configured_error_limit
|
|
var/configured_error_silence_time
|
|
if(config)
|
|
configured_error_cooldown = config.error_cooldown
|
|
configured_error_limit = config.error_limit
|
|
configured_error_silence_time = config.error_silence_time
|
|
else
|
|
configured_error_cooldown = initial(config.error_cooldown)
|
|
configured_error_limit = initial(config.error_limit)
|
|
configured_error_silence_time = initial(config.error_silence_time)
|
|
|
|
// Each occurrence of a unique error adds to its "cooldown" time...
|
|
cooldown = max(0, cooldown - (world.time - last_seen)) + configured_error_cooldown
|
|
|
|
|
|
// ... which is used to silence an error if it occurs too often, too fast
|
|
if (cooldown > configured_error_cooldown * configured_error_limit)
|
|
cooldown = -1
|
|
silencing = 1
|
|
spawn (0)
|
|
usr = null
|
|
sleep(configured_error_silence_time)
|
|
var/skipcount = abs(global.error_cooldown[erroruid]) - 1
|
|
global.error_cooldown[erroruid] = 0
|
|
if (skipcount > 0)
|
|
world.log << "\[[time_stamp()]] Skipped [skipcount] runtimes in [e.file],[e.line]."
|
|
error_cache.log_error(e, skip_count = skipcount)
|
|
|
|
global.error_last_seen[erroruid] = world.time
|
|
global.error_cooldown[erroruid] = cooldown
|
|
|
|
// The detailed error info needs some tweaking to make it look nice
|
|
var/list/usrinfo = null
|
|
var/locinfo
|
|
if (istype(usr))
|
|
usrinfo = list(" usr: [datum_info_line(usr)]")
|
|
locinfo = atom_loc_line(usr)
|
|
if (locinfo)
|
|
usrinfo += " usr.loc: [locinfo]"
|
|
// The proceeding mess will almost definitely break if error messages are ever changed
|
|
// I apologize in advance
|
|
var/list/splitlines = splittext(e.desc, "\n")
|
|
var/list/desclines = list()
|
|
if (splitlines.len > ERROR_USEFUL_LEN) // If there aren't at least three lines, there's no info
|
|
for (var/line in splitlines)
|
|
if (length(line) < 3 || findtext(line, "source file:") || findtext(line, "usr.loc:"))
|
|
continue
|
|
|
|
if (findtext(line, "usr:"))
|
|
if (usrinfo)
|
|
desclines.Add(usrinfo)
|
|
usrinfo = null
|
|
|
|
continue // Our usr info is better, replace it
|
|
|
|
if (copytext(line, 1, 3) != " ")
|
|
desclines += (" " + line) // Pad any unpadded lines, so they look pretty
|
|
else
|
|
desclines += line
|
|
|
|
if (usrinfo) // If this isn't null, it hasn't been added yet
|
|
desclines.Add(usrinfo)
|
|
|
|
if (silencing)
|
|
desclines += " (This error will now be silenced for [configured_error_silence_time / 600] minutes)"
|
|
|
|
// Now to actually output the error info...
|
|
world.log << "\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]"
|
|
|
|
for (var/line in desclines)
|
|
world.log << line
|
|
|
|
if (global.error_cache)
|
|
global.error_cache.log_error(e, desclines)
|
|
|
|
#endif
|