Commit Graph

15 Commits

Author SHA1 Message Date
volas
5fee41d4ba sanitize() refactor: third pass (misc) 2015-03-25 01:05:21 +03:00
elly1989@rocketmail.com
50fe648a91 Admin ranks now use bitfields for permissions. Rather than checking the name of the rank, adminverbs will now check holder.rights to see if it has certain bits turned on.
SERVER HOSTS:
This commit replaces the existing admin-rank system. It is now more customizable.
Admin.txt essentially works the same as it always has. Each line should look like:
ckey - admin rank

There is now however, an admin_ranks.txt. This textfile allows you to define ranks like so:
admin rank +ADMIN +FUN +BUILD
the +KEYWORD are flags adding permissions to that rank. There are brief descriptions in the text-file explaining what they do.

You can now name the ranks anything you like, and give them the permissions you want them to have. This allows, for instance, ranks like:
Game Admin on disciplinary +ADMIN +BAN
This would give that game admin only the tools they need to admin. They would not have access to 'fun' verbs which control events and antags.
There's lots of things you can do. For instance, a coder rank whom can debug stuff but cannot do admin tasks:
Codermin +DEBUG +VAREDIT +SERVER

There's lots you can do. As it evolves it will hopefully become more flexible.

admin_ranks.txt defaults to use the old admin rank names.

Apologies in advance as there will be a lot of anomalies, such as ranks losing verbs they once had. Please let me know about any problems. I can fix them quite easily simply by moving verbs between the lists or splitting the lists up into new flags.

CODERS:
There is now a check_rights(flags) proc. 
It check is usr is and admin and has -at least one of- the rights specified.
It checks > usr < not src, so keep that in mind!
If you need to check if something other than usr has specific tights, you can do if(holder.rights & R_ADMIN) etc.

KNOWN ISSUES:
+FUN probably needs to be split up into +MOBS and +EVENTS
In-game promotion/demotion is currently disabled. It will be readded after everything else works ok.
Erro's sql rights changes stuff is currently commented out. It will be re-added.
There are still many many verbs which need updating.

Apologies in advance for any inconvenience.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4991 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-02 10:23:04 +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
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
sieve32@gmail.com
7bf6788082 -OPTIMIZATION TIME
-Almost every instance of 'for(mob in world)' has been killed. Because GODDAMN was it being run a bunch. Instead, a series of global lists have been made, and they are all handled auto-magically through New()'s, Del()'s, Login()'s, death()'s, etc...

Lists are as follows:
-mob_list : Contains all atom/mobs by ref
-player_list : Like mob_list, but only contains mobs with clients attached
-admin_list : Like player_list, but holds all mobs with clients attached and admin status
-living_mob_list : Contains all mobs that ARE alive, regardless of client status
-dead_mob_list : Contains all mobs that are dead, which comes down to corpses and ghosts
-cable_list : A list containing every obj/structure/cable in existence
Note: There is an object (/obj/item/debuglist) that you can use to check the contents of each of the lists except for cables (Since getting a message saying "a cable," x9001 isn't very helpful)

These lists have been tested as much as I could on my own, and have been mostly implemented. There are still places where they could be used, but for now it's important that the core is working. If this all checks out I would really like to implement it into the MC as well, simply so it doesn't check call Life() on every mob by checking for all the ones in world every damn tick.

Just testing locally I was able to notice improvements with certain aspects, like admin verbs being MUCH more responsive (They checked for every mob in the world every time they were clicked), many sources of needless lag were cut out (Like Adminwho and Who checking every single mob when clicked), and due to the cable_list powernet rebuilding is MUCH more efficient, because instead of checking for every cable in the world every time a powernet was broken (read: A cable was deleted), it runs though the pre-made list, and even with a singulo tearing all the way across the station, the powernet load was VERY small compared to pretty much everything else.

If you want to know how any of this works, check global_lists.dm, there I have it rigorously commented, and it should provide an understanding of what's going on.

Mob related in worlds before this commit: 1262
After: 4
I'm helping


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4179 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-26 03:04:05 +00:00
baloh.matevz@gmail.com
d1d0fd5e4f - hand tools now fit on your belt slot
- added feedback logging for newscasters
- added feedback logging for admin verbs
- added shuttle timers to escape pods
- added feedback logging to chemical reactions
- clipboard can now fit on your belt

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3465 316c924e-a436-60f5-8080-3fe189b3f50e
2012-04-16 04:00:36 +00:00
elly1989@rocketmail.com
04f0a79866 Rewrote blackholes (gravitational anomalies) and wormholes to try and optimise them a little. If you have any concerns about how I've done so just give me a shout and I'll either rework them or revert my changes back. Wormholes especially seem a bit faster on my laptop. Smoke has temporarily been removed from the blackhole event until I get time to investigate why the hell effect_systems are using so much memory ( spark effects were using 40% of my processor a second ago D: ). To compensate this I made them a new sprite.
Commented out the authentication system. It was the remnants of the old goon authentication stuff (or maybe even older) and wasn't actually used in our code at all (at least not in any useful way, it was merely called and short-circuited to 1, so all those if(authenticated) were totally pointless. This has removed 3 unused variables from every client, a bunch of unused variables from the config and two empty text files!

Committed (as a config option) a feature requested by Apoc station. It causes a 'reply to' window to popup when an admin PMs a non-admin player. It's meant to grab their attention so they can't say "I didn't see your PM". It defaults to off. To turn it on just uncomment the #POPUP_ADMIN_PM line in config/config.txt

Fixed a derp in isday where it was fetching the month instead of the day.

Removed medal references from Gib()

Removed the medal_hub global variables because they aren't used in any way shape or form.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3444 316c924e-a436-60f5-8080-3fe189b3f50e
2012-04-12 21:54:51 +00:00
baloh.matevz
1ce3d7440f - Admins can no longer MASS - varedit objects of type /obj/admin and /datum/feedback_variable and /obj/machinery/blackbox_recorder.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3143 316c924e-a436-60f5-8080-3fe189b3f50e
2012-02-18 15:55:52 +00:00
baloh.matevz
c0c7f7482c - All edit var and mass edit var inputs now have cancel buttons
- And when I say all I mean all except for when you want to add to lists, those don't have cancel buttons because those procs are confusing.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2246 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-21 22:17:55 +00:00
baloh.matevz
c586e285f7 - edit variables and mass edit variables removed as verbs, merged with view variables
- explosion and emp verbs removed from objects. They are now in the options in view variables for all objects, mobs and turfs.
Screenshots:
http://www.kamletos.si/object%20admin%20verbs.PNG
http://www.kamletos.si/object_variables.PNG
- Marking objects now gives you feedback on the view variables screen. It also refreshes the screen.
- Warn, prison and unprison verbs removed. Prisoning can be done via player panel. (show player panel verb of the X in the 'player panel' verb. Damn these names, confusing.)
- Banning now has a cancel button on all input screens.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2236 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-20 19:13:24 +00:00
uporotiy
ccf2162e73 Fix for my fix.
I derped. Note to self: next time, don't write even the littlest bits of code at 1 in the night after a long period of not coding at all.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2042 316c924e-a436-60f5-8080-3fe189b3f50e
2011-08-22 19:28:43 +00:00
uporotiy
ebf4e0ad25 Fix for an ages-old exploit.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2031 316c924e-a436-60f5-8080-3fe189b3f50e
2011-08-20 19:38:33 +00:00
uporotiy
26e33a0a3c A couple of small changes before I tackle the buffing-up project.
Luminosity
Admins editing the luminosity var now properly uses sd_SetLuminosity().
 Britcup
A cup spawns for Kingston in hydroponics.
 Taser guns
New sprites, courtesy of Arcalane. Now with an actual 4-shot gauge!
 Interface
16x16 mode re-enabled for shits and giggles.
 Mining
Reverted the uranium ore sprite.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1507 316c924e-a436-60f5-8080-3fe189b3f50e
2011-04-29 14:27:49 +00:00
baloh.matevz
c34592100b SCAREDOFSHADOWS READ THIS ONE!!!
HOSTS OF OTHER SERVERS, READ THIS ONE TOO!!!!

Administrator ranks renamed:
- Host => Game Master
- Coder => Game Agmin
- Shit Guy => Admin who Sinned
- PA => Trial Agmin
- Administrator => Agmin Candidate
- SA => Temporary Agmin
- Moderator => Agmin Observer
- Filthy Xeno => Punnished Agmin

Promotion and Demotion ingame can now only be done by Game Admins and Game Masters.

THIS COMMIT INCLUDES THE NEW admins.txt FILE FOR TGSTATION. IT USES THE NEW RANK NAMES. ALL OTHER SERVER HOSTS ARE TO UPDATE THEIR ADMIN FILES TO THE NEW RANK NAMES WHEN THEY UPDATE PAST THIS REVISION. Don't yell at me, as if I didn't tell you in caps...

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1318 316c924e-a436-60f5-8080-3fe189b3f50e
2011-03-31 03:21:58 +00:00
mport2004@gmail.com
cd79ae951d Updated:
Singularity Engine
-Recoded some parts, still works mostly the same
Welders
-Recoded, it works mostly the same but is easier to use in code
-Cyborgs have a larger fuel tank
-Brought most if not all of the areas that use welders upto spec
Moved the changeling chem recharge code into the human life proc
New players who log out before spawning in are now deleted
New minor Common event
Machines around the station use more power, system might need some changes later
Likely few other minor changes that I just cant think of atm

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@945 316c924e-a436-60f5-8080-3fe189b3f50e
2011-02-03 08:15:17 +00:00