Commit Graph

290 Commits

Author SHA1 Message Date
Jack Edge 9740ebb7ad Jobs code is in seperate files
🆑 coiax
code: Jobe code has been moved into seperate files. There should be no
change in behaviour.
/🆑

Every time I've ever gone into job code, this has annoyed me so much.
Some jobs have seperate files, some do not. So I put them in seperate
files, which I thought was a simple job. I removed some comments in the
process.

But it turns out the display order on the job preference screen was
literally determined by the ordering of the datums in the source files.
So I needed to add a way to order it. Now you can reorder the jobs by
changing the values of the defines.
2019-01-26 20:54:13 +00:00
kevinz000 620db42963 Refactors the Preferences window to use appearances (#41978)
Instead of using expensive getFlatIcon() calls, character previews are now shown using appearance clones in a second map window.

Its creating a secondary map and adding mut_appearances as screen objs on that map.

There are 1 set of dummy objects per client, it also only creates them while the preview window is open and garbage collects them when it's closed.

Because it creates the MA from the main preview dummy mob, the dummy mob's appearance remains a seperate object and they don't affect each other
2018-12-30 00:11:26 +13:00
Carbonhell 449bd89c9e Adds the system discussed in the felinid poll, to allow for people with a felinid character to not be reset to human 2018-12-18 01:20:12 +01:00
moo b0073fddb8 Merge pull request #41754 from coiax/always-in-the-way
Adds Physically Obstructive quirk
2018-12-06 12:06:03 -05:00
Jordie 8a66665e95 Ban system and interface update (#41176)
Spiritual successor and extension to #17798, an almost entire rebuild of the SQL ban system backend and interface.
Bantypes are removed per #8584 and #6174. All bans are now 'role bans', server bans are when a ban's role is server. Admin bans are a column, meaning it's possible to ban admins from jobs.
Bans now have only an expiry datetime, duration is calculated from this when queried.
unbanned column is removed as it's superfluous, checking unban status is now done through checking unban_datetime. unban_round_id column added. Each ip and computerid columns rearranged so ip is always first, like in other tables. Bans now permit a null ckey, ip and computerid.

Ban checking is split into two procs now is_banned_from() does a check if a ckey is banned from one or more roles and returns true or false. This effectively replaces jobban_isbanned() used in simple if() statements. If connected a client's ban cache is checked rather than querying the DB. This makes it possible for a client connected to two or more servers to ignore any bans made on one server until their ban cache is rebuilt on the others. Could be avoided with cross-server calls to update ban caches or just the removal of the ban cache but as is I've done neither since I think it's enough of an edge case to not be worth it.
The second proc is is_banned_from_with_details(), this queries the DB for a role ban on a player's ckey, ip or CID and returns the details. This replaces direct queries in IsBanned.dm and the preferences menu.

The legacy ban system is removed.

The interfaces for banning, unbanning and editing bans have been remade to require less clicking and easier simultaneous operations. The banning and jobban panel are combined. They also store player connection details when opened so a client disconnecting no longer stops a ban being placed.

New banning panel:
Key, IP and CID can all be toggled to allow excluding them from a ban.
Checking Use IP and CID from last connection lets you enter only a ckey and have the DB fill these fields in for you, if possible.
Temporary bans have a drop-menu which lets you select between seconds, minutes, hours, days, weeks, months and years so you don't need to calculate how many minutes a long ban would be. The ban is still converted into minutes on the DB however.
Checking any of the head roles will check both of the boxes for you.
The red role box indicates there is already a ban on that role for this ckey. You can apply additional role bans to stack them.

New unbanning panel:
Unbanning panel is now separate from the banning panel but otherwise functionally the same.

Ban editing panel:
Actually just a modified banning panel, all the features from it work the same here.
You can now edit almost all parameters of a ban instead of just the reason.
You can't edit severity as it's not really part of the ban.
The panels have been tested but I've not been able to get my local server to be accessible so ban functionality isn't properly confirmed. Plenty of testing will be required as I'd rather not break bans.



cl
admin: Ban interface rework. The banning and unbanning panels have received a new design which is easier to use and allows multiple role bans to be made at once.
prefix: Ban search and unbanning moved to unbanning panel, which is now a separate panel to the old banning panel.
/cl
2018-12-05 08:48:37 +13:00
Jack Edge 64e0cfd4e9 Traits are now sorted by positive,negative,neutral and then by name 2018-12-02 23:51:41 +00:00
Mickyan 6b30b578bb Makes the quirk menu look less cluttered (#41684)
* quirk menu format

* brain damage
2018-11-28 22:43:03 -05:00
Qustinnus b9f5dbac6b Adds a new race: Ethereal (also adds wrappers for nutrition adjustment) (#40995)
cl Qustinnus / Floyd / Ethereal sprites by Space, is that it? / Alerts and food sprites by MrDroppodBringer
add: Adds Ethereal; a race which lives off of electricity and shines bright. If they are healthy they shine a bright green light, and the more damaged they are, the less they shine and the greyer they become. Their punches do burn damage and they are weak to blunt attacks!
They dont need to eat normal food and dont have nutrition, Instead they gain charge by going into borg rechargers, eating ethereal food or doign specific interactions.
refactor: all nutrition changes now go through a proc so we can override behavior
/cl

Adds Ethereal. A race which is essentialy inspired by Zoltan but then with different mechanics to make it fit with SS13 more. I'm trying to stay away from making them actually provide power but the change from nutrition to electricity seemed kind of fun.

They have the following specifications:

    They are walking lights; and shine bright and green if healthy, and get greyer and darker the more damaged they are. When dead they are just a grey unlit corpse.
    They do burn punch damage instead of blunt.
    They are weaker to blunt; especially when low on charge
    They have charge instead of nutrition. Charge is gained by some interactions or by going into a borg charger. or eating new ethereal food.
    They are slightly stronger to shock damage, and gain charge from it a bit; however, it is still deadly to them and thus they aren't free insulated gloves.
2018-11-29 10:09:56 +13:00
Militaires 970964ccab [READY] THE LONG AWAITED BLINDNESS QUIRK PR (#41130)
* THE LONG AWAITED BLINDNESS QUIRK PR

* quirk blacklist system

* done

* im dumb

* im rarted

rarted
2018-10-27 15:13:49 -04:00
ShizCalev c12012c3ad Admin prefs stuff (#41041)
fixes #41106 since it'll have it's own fucking location.

cl ShizCalev
add: Admins can now personalize their asay message color on servers with the feature enabled.
tweak: Moved some admin only preference verbs out of the Preferences tab and to a new admin preferences tab to help unclutter it / prevent accidental toggling of fun things.
/cl

Note that the start of the admin message will still use the default formatting just so it can be quickly recognized as an admin message and not an OOC one.
2018-10-25 11:43:30 +13:00
MrDoomBringer 703a365aec Various code improvements (#40932)
* adsf

* asdf

* take these

* Further cleanup to windoor code
2018-10-21 03:01:02 -04:00
ShizCalev 1f5e451a7e Jobbans now use DisplayTimeText (#41025)
Forgot these were separate.
2018-10-20 11:36:27 -07:00
ShizCalev 964f3865f9 Traits -> Quirks correction (#41010) 2018-10-19 22:16:34 -07:00
ShizCalev 3787eda76a Adds AI core screen selection to character preferences. (#40761)
* Adds AI core screen selection to preferences.

* fallback
2018-10-16 11:24:20 +02:00
ShizCalev e852aad5de Adds radio silencing admin preference to admin preferences (#40827) 2018-10-12 04:25:02 -04:00
ShizCalev 6dd8b8e5ca Fixes default religion preference runtime 2018-10-03 16:11:24 -04:00
Fluffy Sensation 9605695596 mannequin fix for lizard people (#40308)
* mannequin fix for lizard people

Just a small sequence problem with the race default features being loaded after setting them and tail not being set to update.

* Mannequin Fix for Lizard People

Just a small sequence problem with the race default features being loaded after setting them and tail not being set to update.

This would lead to the mannequin just having a smooth tail and no spines the default setting for a lizard tail.
2018-09-17 20:25:26 -04:00
Jordie0608 3f881722e8 adds query safety for getting ckeys not in player table 2018-08-26 01:45:25 +10:00
Aranclanos 24d3207421 Fixes invalid name error showing up when cancelling the input (#39781)
The 'invalid name' message won't appear now if the user cancels it when
changing his name on the character setup window
2018-08-19 15:01:08 -07:00
Jordie 0d7ef3ed65 Key instead of ckey for user facing logs and ui (#39009)
* converts to using key instead of ckey for user facing logs and ui

* more key_name for airlock wires

* futureproofing check for if key changes

* --onlyckeymatch script argument and fail/success counter

* fix
2018-08-11 02:15:50 +10:00
AnturK fbb5377ea8 Simple zombie for WJ (#39563) 2018-08-10 00:11:03 -07:00
kevinz000 48ece11504 Felinid/catpeople are now their own human subspecies (#39513)
* Catpeople are nyow a species

* Fixes a runtime

* Fixes the issues with being forced ears when you chose none

* Neko --> Felinid

* P2

* Update

* Working this time I promise
2018-08-08 20:56:46 +03:00
AnturK 766ea4dcc8 Custom names refactor (#39111)
* Custom names refactor

* Forgot this.
2018-07-15 17:03:19 -04:00
Jordan Brown c26c36b184 Merge branch 'pr-38747'
Signed-off-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2018-06-28 14:22:00 -04:00
Kyle Spier-Swenson 93ac333cbf Fixes lobby music playing when you enable it via game preferences while not in the lobby (#38766) 2018-06-28 21:18:37 +03:00
AnturK abfe09659c Fixes borg names. (#38733)
* Fixes borg names.

* Makes it call the db only once.

* Default cyborg naming scheme.

* Makes cyborgs default to default name instead of random ai one.
2018-06-28 20:32:14 +03:00
Dax Dupont a89abd5ae8 Remove OOC metadata 2018-06-27 00:30:30 +02:00
Jordan Brown cf7e8aa9ec Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 22:48:35 +03:00
Tad Hardesty 75aa8ec4b2 Add "Fit Viewport" verb to automatically size the map window (#38351)
* Add a verb to automatically size the map window

* Add a preference to auto-fit the viewport
2018-06-14 10:03:16 +02:00
Ling 513a5f1bc9 Fixes pda style loading (#38238)
* Fixes pda style saving

* Make the input call use the global pda styles list
2018-06-03 00:33:10 -07:00
Tad Hardesty d0466f42bc Allow dynamically updating UI style, do so on mob login (#38089) 2018-05-30 12:52:50 +02:00
Citrus 99f7816608 Fixes "humans_need_surnames" applying to all races 2018-05-28 01:19:27 -04:00
Tad Hardesty b5d0e1e256 Fix mindswap forcibly enabling ambient occlusion 2018-05-19 21:56:28 -07:00
ShizCalev b7ff953443 Capitalized Current Quirks (#37877) 2018-05-17 18:53:20 -07:00
Jordan Brown e74f33d9a5 Quirk limit now only applies to positive quirks 2018-05-13 08:54:14 -05:00
deathride58 cdf36c2c6f adds ambient occlusion as a client preference (#37406)
ambient occlusion is a shading technique that simulates how light behaves in the real world, where areas that aren't directly exposed to light tend to receive less lighting. In 3d rendered scenes with ambient occlusion present, this can easily be seen in corners and other crevices in geometry, and can also be visible when two objects are close to one another.

cl deathride58
add: Added ambient occlusion. You can toggle this on or off in the game preferences menu.
/cl
2018-05-08 10:06:44 +12:00
Xhuis 6c6ca28ed2 not allowed to use quirks unless you code them 2018-05-03 12:29:10 -04:00
Xhuis a90726bfbf Renames traits to quirks, for clarity 2018-05-03 12:12:30 -04:00
Dax Dupont d923358390 Fixes cat parts not showing up in perfs. (#37202)
* Fixes cat parts not showing up in perfs.

* electric boogaloo

* this works
2018-04-19 18:40:52 -04:00
Ashe Higgs a2a6c2db96 Disables mood traits when mood is disabled (#37082)
* disables mood traits if mood is off

* my copypasta is showing

* Update negative.dm
2018-04-11 15:04:49 +03:00
vuonojenmustaturska ece7616f3b Merge pull request #36558 from ShizCalev/player-pref-panel-revamp
Cleans up player/game preferences panel, adds admin combohud lighting preference
2018-03-28 15:52:42 +03:00
KorPhaeron c72743e4cf April Fools Day replaces the overflow role with Clowns (#36533)
* Refactors overflow job assignment

* Fixes job selection
2018-03-20 18:02:23 -04:00
ShizCalev 37bb9b127a Cleans up player preferences panel 2018-03-20 03:51:24 -04:00
Ian Turk fbe5f4a062 Replaced body zone magic strings with defines 2018-03-19 15:44:51 -05:00
Ashe Higgs 5c8d845f56 [s] Improves and secures trait assignment code, allows their pref to be changed midround, tweaks RDS and Night Vision (#36160)
* Traits but less buggy

* no tick while dead

* fix security vuln
2018-03-06 15:57:42 +02:00
Ashe Higgs ab9e2e8902 Adds minor roundstart traits! (ala CDDA, etc.) (#35440)
* Roundstart traits

* Unspaghettifies night vision

* Fuck everything

* Issues patch
2018-03-02 13:39:44 +13:00
MrStonedOne 7fa0f51abf Fixes job exp hounding the database more than it needed to.
There is no need to select the current values if we make sure to use the right operations.
Next on my list is a more generic batched sql system that can do things like select rows based on a list of primary keys, using one query (by abusing the in keyword) as well has abtract away the need to directly do overriding add_timers.
2018-02-07 03:57:15 -08:00
ShizCalev ee18d6f8e2 Fixes clockwork sigil candidate runtime, cleans up some jobban checks with defines (#34907)
* Cleanup

* .

* Synced special_role & factions with role defines

* Revert

* more cleanup

* fix
2018-02-04 03:03:34 -06:00
ChuckTheJittai 02033f1756 All color inputs use current color as default choice
Went through all the color inputs and made the "default" argument the current color of what is being selected.
2018-01-21 13:07:35 -05:00
Joan Lung b30e2934e7 Moths, except I have stolen them and they no longer conflict (#34498)
* Moths, except with less conflicts

* if I remove your wings, will you die?

* it would be extremely painful
2018-01-19 10:32:22 -05:00