Commit Graph

24 Commits

Author SHA1 Message Date
elly1989@rocketmail.com
b1fdee2e32 Changed some global_list stuff:
>tried to make the comments less confusing.
>Removed the procs for rebuilding the lists (they weren't meant to be used and half were broken anyway).
>added a directory. It maps ckey to client like so directory[ckey] = client. It could be used for PMs, banning, and various other admin tools rather than using \ref[]
>var/list/admins is now a list of clients whom are admins.
>var/list/admin_datums is what var/list/admins used to be. A map from ckey -> admin datum
Most of this is so I can add modular admin ranks in a non-horrendous way and fix some existing issues.
>var/list/client_list is now var/list/clients (laziness sorry)
>removed some needless loops and stuff.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4951 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-24 20:11:39 +00:00
elly1989@rocketmail.com
7b720a20b6 >Moved most of the helper procs into code/__HELPERS. If you see ANYTHING generic enough to be a helper proc just throw it in there and help purge the copypasta 5ever
>Replaced dd_text2list, dd_text2listcase, tg_text2listcase and tg_text2list with text2list and text2listEx. text2list will return a list of each and every character in the string if you set separator=""
>added return_file_text(filepath) which returns text from a file after doing some checks: does the file exist? is the file empty? It prints helpful error messages to the world.log if it runs into problems
>Replaced dd_file2list(filepath, seperator) with file2list(filepath, seperator). It just calls text2list(return_file_text(filepath), seperator). rather than copypasta
>Replaced time_stamp() so it's not as retarded
>Lots of the world setup stuff uses file2list now, rather than file2text -> sanity -> text2list
>Added error() warning() testing() procs. These print messages to world.log with a prefix. e.g. ## ERROR: msg.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4948 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-24 14:39:36 +00:00
aranclanos@hotmail.com
ac5259836f My first commit, yay!
Removing:
 -Erro code of r4861. Xsi gave me permission p-please don't kill me.
Proc added:
 -Added a proc that checks the rank of the admin and compares it to a var given. If the check fails, returns a 0 and a "You need more acces" message. If not, returns an 1. admin_rank_check(var/rank, var/requested)
Admin option changes:
 -You need to be at least a trialmin to change a var in VV.
 -You need to be at least a trialmin to change the vars on the tator panel
 -You need to be at least a trialmin to allow votes or start a custom one. (All admins can cancel votes)
 -All mob transformations (of playerpanel and VV) and special options (like godmode), now requires trialmin status or higher.
 -All admins can use aghost now.
 -All admins can right click - VV if they are a ghosting.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4889 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-16 03:07:08 +00:00
baloh.matevz
a5b37f81c3 - Added a config option that allows the admin system to run off of data from the database. There is a config options in config.txt that dictates whether to use the new SQL based system or the legacy admins.txt system. If a server is set to use the new system, but a connection cannot be established to the database, it reverts to the legacy system, same applies if a query to the database returns empty. The config option defaults to use the legacy system.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4863 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-13 22:32:51 +00:00
giacomand@gmail.com
3dd4f8cbc5 -Optimized freelooking a bit.
-Larva can now die, instead of staying in critical.
-Improved the prison break event.
-Added the cameranet to the list of debuggable controllers (I know it's not technically a controller but it seems like the best place to be).

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4858 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-13 19:52:41 +00:00
quartz235@gmail.com
a6e7c085ef Revert's cib's BS12 merge by XSI's orders
- Tested with various damtypes/locations/mobs but if i'm a dumbass and overlooked a problem feel free to punch me and revert this

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4762 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-27 02:14:21 +00:00
elly1989@rocketmail.com
4edc10c0a1 Fixed an issue where ticker.mode could be set to null, triggering a restart, where it'd be set to null again...and so on.
Added a activate held item hotkey
Added intent hotkeys to 1 2 3 and 4 keys.
hotkeys-help for details.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4759 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-26 16:27:47 +00:00
elly1989@rocketmail.com
cc2c4de49b Merged var/muted_ic; var/muted_ooc; var/muted_deadchat; var/muted_pray; var/muted_adminhelp into var/muted as bitflags
Added a config option config.automute_on It toggles automuting.
Admins cannot be muted.
Made the proc/cmd_admin_mute code shorter.
Automuting defaults to off

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4758 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-25 21:23:02 +00:00
elly1989@rocketmail.com
f8da06db13 Re-added the default-vote config option for voting. For every client connected more than the total votes, it will add 1 to the default vote option (No restart or the current game-mode).
/obj/admins is now /datum/admins because that's what datums are for you silly people
Moved var/datum/marked_datum from /obj/ to /datum/admins
admin datums are persistent throughout the round. They are stored in the var/list/admins rather than the ranks. This is so admin preferences may be moved into the datum to have them persist even after Login/Logout/Disconnects.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4749 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-24 11:40:41 +00:00
elly1989@rocketmail.com
734135389c Proper fix for the area-luminosity bug. It seems the issue was a > instead of a >=. Meaning that most pitch-black areas were not having luminosity set to 0.
This fixes space being dark.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4747 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-24 06:40:10 +00:00
CIB123
b555f5a0f0 Fixes a few issues with the organ system.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4722 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-18 21:34:05 +00:00
CIB123
35a3b0c152 Added config options for toggling limbs breaking and bones breaking.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4721 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-18 21:33:54 +00:00
CIB123
d6dfd49a75 Ported parts of the BS12 organ system.
This includes:
- Individual wounds
- Dismemberment
- Bone breaking

It also adds configuration values to config/game_options.txt to control the point at which bones break and limbs are cut off.

Does not include surgery or bleeding yet.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4720 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-18 21:32:39 +00:00
elly1989@rocketmail.com
9265255ab5 Fixes an issue where areas were set with luminosity = 1. Not sure why the hell I done that and why the hell I never noticed it. Thanks Kor.
Once again, Only crates may be sold on the supply shuttle.
Changed adminverb updates to be called by Login if holder.state changes. This is so we don't have to mess around with it elsewhere and we don't have to call it as often.
Added some missing verbs to the clearadminverbs proc
Fixed a icon reference not using the fullpath (Goddamn stop doing that)
Going catatonic makes you fall down
All mobs with the resting variable can now unrest (god damn what were you doing).
"Lay down / Get up" was renamed to "Rest".
Rest now uses src rather than usr (again, wtf)
Added some ugly fatty fat hacky code to make admin-ghosted mobs appear braindead rather than catatonic
Admin-ghosting (set-observe and set-play) merged into one verb named "Aghost" (short for admin ghost, same convention as asay)



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4708 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-17 02:27:12 +00:00
elly1989@rocketmail.com
63f85b8c56 whoops. one too many tabs there.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4678 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-12 00:55:39 +00:00
elly1989@rocketmail.com
0f98fd84dd Replaces the voting system. It should fix a pretty serious server-crashing exploit and simplify the code a fair bit.
Removed all the voting-related adminverbs. It's all built into ooc vote verb.
Admins can now make custom votes for literally anything.
If a vote draws it will pick one of the winners at random.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4677 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-12 00:44:13 +00:00
elly1989@rocketmail.com
9f1362c68d Failsafe added to the debug/restart controller verbs.dm
Failsafe now checks the lighting_controller too. It will restart it if it doesn't progress for 5 cycles (same as MC)
datum/failsafe is now datum/controller/failsafe

The probability of lights breaking after spawn was reduced from tube:10 and bulb:25 to tube:2 bulb:5

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4674 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-10 12:53:55 +00:00
petethegoat@gmail.com
3f7985844e More work on away missions. They're almost playable now.
Things left to do mainly involves stuff interacting with Z8 - counting people as dead, making sure teleports don't work, etc.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4661 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-08 23:50:54 +00:00
elly1989@rocketmail.com
c81c70bd86 Replaced var/netnum for cables and powered machines with a direct reference to their powernet. The bug which was causing cutting and merging powernets to fail was due to my attempts to fix the powernets slowly becoming filled with null entries. Removing those null entries messed up the indexes and essentially jumbled up the powernets. :( sorry
Fixed the failsafe misreporting how long the MC has been dead.

Lighting initialization no longer 'interrupts' the master_controller setup().

Added updated powernet debugging tools. They're in my WIP folder. They are sexy c: It draws the powernet onto the map so you can see what's going on during debugging.

Added tachyon-doppler arrays. They're gonna be something for scientists to measure their bombs with rather than praying for the figures. Nothing spectacular.

Commented out switches, they aren't used and I've been fixing/testing powernets all day. Sorry. If you need them back  just PM me and I'll fix them.

Known issues: the merging procs behave silly at intersections. I really tried to fix it but I think I'll make more progress just working on some powernet improvements.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4623 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-05 16:14:24 +00:00
elly1989@rocketmail.com
73e5c38a56 Preparations for reducing the number of processing machines at round-start. There are currently 8000 or so at round start, this was already pruned to 2800ish by doohl's stuff.
machine.process() now uses a return value to remove itself from the processing machines list. This is more efficient and will help reduce costs especially at round start where some 5000+ machines were removed from the list using first-find. Now there is no searching involved. Instead of machines.Remove(src) just do .=PROCESS_KILL that will return the flag to the proc which called it (the MC) and trigger its removal from the list. If you're deleting something don't even bother removing it from the machines list, there is no need to.

Simplified the last_processed stuff for the MC. It's now a single variable rather than 3. It is simply a typepath rather than a reference to an object (this is so it works even if said object is deleted)

MC stats in admin status_panels now show the length of the processing lists (indicated by #). I've just realised I forgot to mention what the abbreviations are:
The less obvious ones are: Dis=diseases; Net=pipes; Pnet=powernets; Mch=Machines; Tick=the game-mode ticker.

Beach-water now uses an overlay image rather than a separate object.

Fixed a typo in the shuttle console.

Hydroponics trays no longer use first-find within their process() for checking the plant is in the tray (why is that even there anyway? talk about lazy)

Removed some junk/placeholder procs like organ/proc/process() return

Removed newscasters from the processing machines lists.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4603 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-02 20:32:01 +00:00
elly1989@rocketmail.com
e97813d2b6 Replaced the master_controller with the WIP sequential version.
Fixed a problem where TG was using this sequential master_controller but I had removed a spawn where master_controller.process() was called because I was working with the default master_controller. This problem was causing the master_controller to prevent the lighting_controller.process() ever running properly because it was hogging the current thread (thread isn't the right word there, not sure what you call it....stack?)

Added debugging to both the lighting_controller and master_controller. http://filesmelt.com/dl/debugging.png

Both lighting_controller and master_controller may be deleted to terminate their processes (this is done via the restart controller verb. This allows for clean restarts without 'doubling up' (where, for instance, the master_controller would be running more than one instance).

lighting_controller has a prototype recovery proc which is called by the "restart controller - lighting" verb. It's basically an overly paranoid version of process() which will only transfer light_sources to the replacement controller if they don't runtime. It's not needed at the moment as the process() has yet to runtime.

master_controller has the beginnings of self pruning lists. This method using list.Cut(index,index+1) is faster than doing list.Remove(thing) all over the place (the latter iterates through the list to find the thing).

Added more detailed time-measurements for the master_controller. It now displays the processing costs (in real-world seconds) of each part of the master_controller's cycle.

The stat panel only updates for mobs actually -looking- at the stat panel.

Explosion debugging is now hidden behind a if(Debug2). To have it print that data to world.log just click the DebugGame verb

debug controller and restart controller verbs are now both GameAdmin rank. Not sure how they got split up.

Fixed another cause of dark splotchy space turfs. (turf/wall/ex_act was replacing the turf with space and then deleting that new space turf)


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4593 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-31 04:14:26 +00:00
johnsonmt88@gmail.com
024c16df00 Added movement speed config options.
Basically these numbers get added directly to movement values.

run_delay and walk_delay affect all mob's walk/run speeds before their mob-specific modifiers take effect. Make this number higher to slow things down, make it lower to speed things up.

human_delay, robot_delay, monkey_delay, alien_delay, metroid_delay and animal_delay will affect those mobs specifically. So if you'd like humans to slow down but you don't want robots to suffer, just raise the value of human_delay! Same as before, raise the number to slow things down, lower it to speed it up.

Note: most mobs already run as fast as byond will let them.

Although these are config options. It is possible to adjust these values in-game. The values will reset at the end of the round however.
To adjust the values in-game you must be a high enough level admin to have access to the 'Debug' tab. Open the Debug tab and select 'Debug Controller". In the popup list, select "Configuration". The variables will have the same name as those in the config options.

Note: The values will act a little differently between servers with ticklag compensation turned on and those which have it turned off.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4576 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-28 16:20:35 +00:00
elly1989@rocketmail.com
474294466a Fixes a really stupid mistake where a sleep() was causing the explosion() proc to end after the sleep due to src being null. This meant that the lighting process was turned off but never turned back on. It also meant powernets were deferred permanently :( sorry.
Reduced the Login delay for new_players. It stays because it protects against rapid connect/disconnects sending resources repeatedly, it's just a lot less annoying now.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4554 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-26 17:50:29 +00:00
elly1989@rocketmail.com
6e274cd395 New lighting, it's essentially just the old DAL system with a queue.
Comments for lighting:
	Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
	by using the var/tag variable and moving turfs into the contents list of the correct sub-area.

	Unlike sd_DAL however it uses a queueing system. Everytime we  call a change to opacity or luminosity
	(through SetOpacity() or SetLuminosity()) we are  simply updating variables and scheduling certain lights/turfs for an
	update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
	means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
	over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
	setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
	turning it back on with lighting_controller.processing = 1.

	Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
	for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
	at runtime)

	Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
	have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
	gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
	costs.

	Known Issues/TODO:
		admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
		mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
		Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
		No directional lighting support. Fairly easy to add this and the code is ready.
		When opening airlocks etc, lighting does not always update to account for the change in opacity.

Explosions now cause lighting to cease processing temporarily.

Moved controller datums to the code/controllers directory. I plan on standardising them.
"Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI" controller datums can be accessed via the debug controller verb (used to be the debug master controller verb)
Supply shuttle now uses a controller datum. Shuttles tend to arrive up to 30 seconds late, this is not a bug.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4537 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-25 16:06:57 +00:00