Commit Graph

845 Commits

Author SHA1 Message Date
LemonInTheDark
e766444468 Changes our map_format to SIDE_MAP (#70162)
## About The Pull Request

This does nothing currently, but will allow me to test for layering
issues on LIVE, rather then in just wallening.
Oh also I'm packaging in a fix to one of my macros that I wrote wrong,
as a joke

[removes SEE_BLACKNESS usage, because we actually cannot use it
effectively](c9a19dd7cc)

[c9a19dd](c9a19dd7cc)

Sidemap removes the ability to control it on a plane, so it basically
just means there's an uncontrollable black slate even if you have other
toggles set.

This just like, removes that, since it's silly

[fixes weird layering on solars and ai portraits. Pixel y was casuing
things to render below who
shouldn't](3885b9d9ed)

[3885b9d](3885b9d9ed)

[Fixes flicker
issues](2defc0ad20)

[2defc0a](2defc0ad20)

Offsetting the vis_contents'd objects down physically, and then up
visually resolves the confliciting that was going on between the text
and its display.

This resolves the existing reported flickering issues

[fixes plated food not appearing in
world](28a34c64f8)

[28a34c6](28a34c64f8)

pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just
use pixel_z for this

[Adds wall and upper wall plane
masters](89fe2b4eb4)

[89fe2b4](89fe2b4eb4)

We use these + the floor and space planes to build a mask of all the
visible turfs.
Then we take that, stick it in a plane master, and mask the emissive
plane with it.

This solves the lighting fulldark screen object getting cut by emissives
Shifts some planes around to match this new layering. Also ensures we
only shift fullscreen objects if they don't object to it.

[compresses plane master
controllers](bd64cc196a)

[bd64cc1](bd64cc196a)

we don't use them for much rn, but we might in future so I'm keeping it
as a convienince thing

🆑
refactor: The logic of how we well, render things has changed. Make an
issue report if anything looks funky, particularly layers. PLEASE USE
YOUR EYES
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-10 17:30:54 -08:00
tattle
9b1be9ef13 Investigate logs include ckey of source (if applicable) (#71833)
## About The Pull Request
All investigate logs start with [src], which can be any atom. So
sometimes names and items get printed twice. Adds ckeys to the
investigate_logs of living mobs.


![image](https://user-images.githubusercontent.com/66640614/206372340-3c50bc9d-b662-4a4d-b1ec-91c0b4db8a39.png)


## Why It's Good For The Game
Better logging, includes the ckey for living mobs in investigate logs,
and fixes some investigate_death logs that weren't properly attributed
to mobs.

## Changelog

🆑 Tattle
admin: investigate logs include ckey of source (if applicable)
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-12-11 12:52:50 +13:00
tattle
e928449067 3/4ths-ify some wall mount sprites (by Kryson and Viro) (#71788)
posters are now 24px tall, new sprites for nanomeds, emergency safes, and ticket machines
(by Kryson)
2022-12-09 18:02:16 -03:00
Zephyr
d55dae757a Refactors calculating shuttle bounds into a dedicated proc (#71687)
Adds the ability to calculate the information during runtime by
iterating through the shuttle areas; which essentially means that you
now have the ability to shrink/expand shuttles. A front end for doing
this has not been implemented in this PR, however this means that in the
future doing so would be as simple as adding the new area into the
shuttle_areas list on the docking port and then calling
`calculate_docking_port_information` on the docking port.
2022-12-09 02:58:22 +00:00
MrMelbert
329921639a Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. (#71339)
## About The Pull Request

- Rewrites how action button icons are generated.
- Prior, generated an action button icon was fairly simplistic and
didn't allow for many changes. Someone recently added the option for
overlays to be generated over action buttons, but the framework was very
weak.
- Now, action button icon generation is split across multiple procs,
like atom icon updates.
      - The background of action buttons are underlays
- The actual icon of the action button is the icon and icon state of the
action button movable
- The rim / border of the button is an overlay, layered overtop the
button.

- Allows observers to see what action buttons a mob has. They even
update in real time! And no, the observers cannot click on them.

## Why It's Good For The Game

- Runechat text of action buttons are no longer hidden behind the actual
icon. This was very ugly with cooldown actions, as the cooldown text was
hidden behind a lot of spell icons.
- Cuts down on a lot of icon duplication. 
- Gives much finer control over action button icons
- Saves a bit of processing from generating full action button icons
when not necessary. Not implemented in many places, but is in some.


![image](https://user-images.githubusercontent.com/51863163/202816617-342e87e6-2cc6-488e-9af2-4b2053dc3dc6.png)


![image](https://user-images.githubusercontent.com/51863163/202816604-da8d4821-0e2b-45af-b289-7442367f98ce.png)

## Changelog

🆑 Melbert
add: Observers can now see what action buttons an observed mob has. No,
you can't click them. And no it doesn't show EVERY action.
refactor: Refactored how action button icons are generated. Some actions
will now use a colored border when active instead of just turning green.
Cooldown text will also appear on the top layer of actions too. If you
see any funky lookin' icons (namely their borders), let me know.
refactor: Bluespace Golem's teleport action is now a cooldown action.
fix: Construct actions go to the middle of the screen like expected. 
/🆑
2022-12-03 19:01:08 -08:00
John Willard
cdc2ab94f2 Mining orders can no longer error and don't say they charge you (#71676)
- Mining orders now show the amount of mining points spent as the 'Cost'
instead of a flat 240 credits

- Mining orders now no longer have errors (including nothing being in
the crate at all) because they can't be sent back for a full refund.

- Mining orders no longer say they charged you if they haven't.
2022-12-02 22:02:05 -06:00
John Willard
fd19f6d5a0 The Mining vendor now works like the Chef produce console (has to go through Cargo) (#71023)
## About The Pull Request

Now comes with a Hackmd: https://hackmd.io/ImTe5FLeTgmI7spTWKBaFQ?view

In-game screenshots:


![image](https://user-images.githubusercontent.com/53777086/199602671-a604c6da-fec0-487d-b67e-eb0e4380e4d6.png)

![image](https://user-images.githubusercontent.com/53777086/199602695-8d7afb20-3b6c-467f-ac78-37de03dc20d2.png)


![image](https://user-images.githubusercontent.com/53777086/199725350-b01c4ddd-3fec-4288-a698-02daf91f787b.png)

Removes the old Mining vendor console and all its bad code. Instead, the
chef produce console was generalized and a NEW mining vendor is a
subtype of it. If they try to Express this console, it will be 1.5x the
mining points (compared to 2x for the Chef produce console atm), so it
is technically possible, but it is still better to order it through
Cargo.
Different to the Kitchen crate, this one is a private order by the Shaft
Miner, using mining points instead of Credits. Cargo CAN emitter it
open, but I think that's an acceptable risk with all crates. As shown in
the screenshot, Cargo will immediately know who ordered the items so
knows who to call to pick it up when needed.

This also means Shaft Miner's vendor is now categorized somewhat. I
tried my best to make sense out of it but some items really don't make
sense (laser pointer, soap...)

I split the different sections of orderable items into different files
for better management, and de-hardcoded it and its TGUI to make it
easier for anyone who wants to add more to it.
I also made the produce console use paths and added ways 'categories' to
produce consoles, which indicates which sections you should and
shouldn't be allowed to see.
https://github.com/tgstation/tgstation/pull/71007 already did part of
this but it isn't merged yet so :/

Free golems are mostly unaffected by this. Their console only works in
express mode and doesn't increase the prices for it. The only downside
is the cooldown.

I still have some things to finish on this PR so it'll be left as draft
until at least tomorrow.

## Why It's Good For The Game

https://hackmd.io/ImTe5FLeTgmI7spTWKBaFQ?view

1. A large problem currently with Miners is that they don't interact
with the station, this will at least help integrate them more into their
own department, by making the cost of their equipment cheaper if they
bother to actually go through Cargo for their gear.

2. It also means that a non functional Cargo would affect Shaft Miners
too, and as they have access to the shuttle, maybe we can expect some
Miners to pick up the slack if needed.

3. The old mining vendor was the ONLY vendor in the game that had
infinite stock. It doesn't need a refill or anything like any other
vendor, and every other vendor uses credits, mining points is just shaft
miner credits. Why are they an exception? At least being ordered through
the shuttle makes sense.

4. It opens the QM being able to see easier what Miners are doing, and
prevents miners from hiding on Lavaland to do nothing but hunt fauna if
they were meant to be demoted or something by the QM. Basically, gives
the QM more control over the people working in their department.

## Changelog

🆑
add: Shaft Miner's equipment vendor now orders their equipment through
the Cargo shuttle, though you can spend 1.5x the points to express it,
making it a Mining version of the Chef's produce console, with a
weakened express tax.
/🆑
2022-11-30 19:29:28 -08:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
ShizCalev
9dab26371c Throws a bunch of parenthesis around to ensure dear Aunt Sally is always properly excused. (#71281)
Similar vein to #37116

This is supposed to be standard, yet here we are.

SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.


These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
2022-11-21 20:53:06 -08:00
jimmyl
a4b1fd4cd3 Adds two new whiteships, the "Personal Transit Shuttle" and the "Obelisk" (#71093) 2022-11-17 17:49:16 -07:00
Zephyr
58b4b07ef0 [MDB Ignore] Corrects Automatic Shuttle Boundary Generation (#71220)
When you load a map template, it does many things before considering
itself finalized.
One of these steps is to iterate over all the loaded items and
initialize/process them.
Unfortunately because a shuttle setups the bounds after
initTemplateBounds is called, the mobile docking port ends up being
initialized before the bounds are actually setup correctly.
The solution to this is to explicitly ignore the mobile docking port,
and have it initialize immediately after calculating the bounds.
2022-11-16 01:36:05 +00:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
tattle
ad5debaaa1 Add investigate_deaths (#71112)
## About The Pull Request
Adds INVESTIGATE_DEATHS, an investigate category intended to better show
causes of death.


![image](https://user-images.githubusercontent.com/66640614/200142461-c17b5e51-1116-4eef-bbfb-49bc024c0953.png)


![image](https://user-images.githubusercontent.com/66640614/200147306-09bef76e-68c6-4f0a-bdf9-0211eb274e66.png)

Also makes suicide_act take a `mob/living` as an argument instead of a
`mob`, and some minor style improvements since apparently I hate
atomicity.

## Why It's Good For The Game
Inspired by a mysterious death and dusting. More logging and leads for
admins investigating deaths.

Also fixes #59028

## Changelog
🆑 Tattle
admin: added investigate deaths to shed some more light on unusual
demises, dustings, and gibbings
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-11-07 16:22:37 -08:00
Mothblocks
910b97cd37 Save 0.4s by shaving off a lot of smaller init costs (#71007)
Starts shaving off a lot of less than 0.1s performance killers by, in
nearly every case, just writing better code.

Numbers are amount saved.

- /obj/machinery/bluespace_vendor/LateInitialize -> 29.4ms
Changes a loop over all machines to a specialized list.

- /obj/structure/table/glass/Initialize -> 42.53ms
Stops every table from initializing glass shards and table frames before
any destruction.

- /obj/structure/chair/Initialize -> 24.64ms
Removes an unnecessary addtimer that existed for chairs that weren't
anchored in emergency shuttles. Didn't do anything.

- /datum/orderable_item/New -> 44.3ms 
Instead of initializing every item to get its desc, just uses initial.
Added a unit test to make sure none are dynamic.

- /obj/machinery/computer/slot_machine/Initialize -> 26.19ms
Currently goes through every coin subtype, creates it, calls a proc,
then qdels it. Changes that to only run once. Could be optimized further
by making the coin info on a datum to avoid creating the object, but it
currently sits at 7.82ms, far below worth caring about for now.

- /obj/machinery/door_buttons/airlock_controller/findObjsByTag -> 3.51ms
Loops over just doors instead of typechecking airlock in machines.

- /obj/structure/closet/Initialize -> 60.57ms
Moves the code for taking everything on the tile from a next-tick timer
to LateInitialize.

- /obj/machinery/rnd/experimentor/Initialize -> 36.92ms
Changes a list that is generated by going through every item in the game
and getting information from a large amount of them to only run when
needed.

- /obj/structure/tank_dispenser/Initialize -> 20.81ms
No longer initializes every tank in it right away, only when needed.

- /obj/machinery/telecomms/LateInitialize -> 16.63ms
Removes `urange` to instead just loop over telecomms machines and check
distance. There's not that many of them.

- /mob/living/simple_animal/hostile/carp/cayenne/Initialize -> 3.17ms
Defers a GAGS overlay creation until its needed. BTW GAGS is
*horrendous* on init costs, and is the root cause for a lot of pretty
terrible performance. I investigated precompiling but the gains weren't
crazy, but likely could be the more stuff is GAGS'd.

- /turf/open/floor/engine/cult/Initialize -> 14.64ms
Temporary visual effect that is created is no longer done on mapload,
since nobody will see it.

- /datum/techweb/specialized/autounlocking/proc/autounlock -> 5.55ms
Changes some loops to shorter checks. This whole proc is pretty bad and
it's still 14.21ms for 17 calls.

- /matrix/New -> 13.41ms
- /matrix/proc/Translate -> 42.06ms
~~Changed the mineral matrice to only generate once, then take it from a
static.~~ An extra ~0.05s taken off by avoiding setting icon and
transform every Initialize.
2022-11-05 02:15:40 -07:00
LemonInTheDark
5b4ba051a0 Builds logic that manages turfs contained inside an area (#70966)
## About The Pull Request

Area contents isn't a real list, instead it involves filtering
everything in world
This is slow, and something we should have better support for.

So instead, lets manage a list of turfs inside our area. This is simple,
since we already move turfs by area contents anyway

This should speed up the uses I've found, and opens us up to using this
pattern more often, which should make dev work easier.

By nature this is a tad fragile, so I've added a unit test to double
check my work

Rather then instantly removing turfs from the contained_turfs list, we
enter them into a list of turfs to pull out, later.
Then we just use a getter for contained_turfs rather then a var read

This means we don't need to generate a lot of usage off removing turf by
turf from space, and can instead do it only when we need to

I've added a subsystem to manage this process as well, to ensure we
don't get any out of memory errors. It goes entry by entry, ensuring we
get no overtime.
This allows me to keep things like space clean, while keeping high
amounts of usage on a sepearate subsystem when convienient

As a part of this goal of keeping space's churn as low as possible, I've
setup code to ensure we do not add turfs to areas during a z level
increment adjacent mapload. this saves a LOT of time, but is a tad
messy

I've expanded where we use contained_turfs, including into some cases
that filter for objects in areas. need to see if this is sane or not.

Builds sortedAreas on demand, caching until we mark the cache as
violated

It's faster, and it also has the same behavior

I'm not posting speed changes cause frankly they're gonna be a bit
scattered and I'm scared to.
@Mothblocks if you'd like I can look into it. I think it'll pay for
itself just off `reg_in_areas_in_z` (I looked into it. it's really hard
to tell, sometimes it's a bit slower (0.7), sometimes it's 2 seconds
(0.5 if you use the old master figure) faster. life is pain.)

## Why It's Good For The Game

Less stupid, more flexible, more speed

Co-authored-by: san7890 <the@san7890.com>
2022-11-04 20:13:54 -07:00
GoblinBackwards
1c886d4324 Fixes mail changing existing nuke codes (#70435)
* Fixes mail changing existing nuke codes

* Fixes runtime if created without a self destruct

* Fix indent on admin message

* Makes default nuke code a define

* Rename define + autodoc

* Update code/game/objects/items/mail.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-11 22:57:09 -04:00
John Willard
422accbe4e [MDB IGNORE] Shuttle engines part 2: Engines are now machines (#69793)
* Makes engines machines instead of structures

* Updates the maps

* Fixes boards and anchoring

* Removes 2 unused engine types

Router was actually used a total of once, so I just replaced it with propulsion.
I think cutting down on these useless engine types that make no difference in-game would be a nice first step to adding more functionalities to them.

* Don't use power (since shuttles dont have)

Shuttles don't have APCs, instead they just have infinite power, so I'm removing their power usage for now. I'm hoping this can be removed when unique mechanics are added to engines, because I would like them to make use of power like other machines.

* re-organizes vars

* deletes deleted dm file

* Slightly improves cargo selling code

* Renames the updatepaths

* Removes in_wall engines

I hate this stupid engine it sucks it's useless it's used solely for the tram it provides nothing of benefit to the server
replaces them with regular engines
2022-10-05 21:51:38 -04:00
Yaroslav Nurkov
04ca99d7e9 NT Pay app. Money send on distance, transaction log! (#70108)
* base

* reasons

* GetToken proc, with a many remarks

* Add a way to change reason in transfer_money proc. Add a reasons.

* Reason to use the app. Commission. Standard application.

* Apply suggestions from code review - Tralezab

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>

* Tralezab & jlsnow301 advices. New format(everywhere)

* Nanotrasen

* Refactor TGUI(not me:( ). Fix useless capitalize

* Update code/modules/economy/account.dm

* Trans transforms in transaction

* coMmission. little autodoc mistalke. Translation != Transaction

* oops

* Merge Conflict

* ...

* back feats

* mistakes bye!

* ну да

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2022-10-05 18:25:38 -04:00
Salex08
5dada0e63a Removes ghost check for battlecruiser objective and fixes players being able to roll it multiple times in a row (#70194)
Removes the ghost check for the battlecruiser objective
Fixes the same player being able to reroll battlecruiser
2022-09-29 22:52:21 +01:00
LemonInTheDark
23bfdec8f4 Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) (#69115)
About The Pull Request

I've reworked multiz. This was done because our current implementation of multiz flattens planes down into just the openspace plane. This breaks any effects we attach to plane masters (including lighting), but it also totally kills the SIDE_MAP map format, which we NEED for wallening (A major 3/4ths resprite of all wall and wall adjacent things, making them more then one tile high. Without sidemap we would be unable to display things both in from of and behind objects on map. Stupid.)

This required MASSIVE changes. Both to all uses of the plane var for reasons I'll discuss later, and to a ton of different systems that interact with rendering.

I'll do my best to keep this compact, but there's only so much I can do. Sorry brother.
Core idea

OK: first thing.
vis_contents as it works now squishes the planes of everything inside it down into the plane of the vis_loc.
This is bad. But how to do better?

It's trivially easy to make copies of our existing plane masters but offset, and relay them to the bottom of the plane above. Not a problem. The issue is how to get the actual atoms on the map to "land" on them properly.

We could use FLOAT_PLANE to offset planes based off how they're being seen, in theory this would allow us to create lens for how objects are viewed.
But that's not a stable thing to do, because properly "landing" a plane on a desired plane master would require taking into account every bit of how it's being seen, would inherently break this effect.

Ok so we need to manually edit planes based off "z layer" (IE: what layer of a z stack are you on).

That's the key conceit of this pr. Implementing the plane cube, and ensuring planes are always offset properly.
Everything else is just gravy.
About the Plane Cube

Each plane master (except ones that opt out) is copied down by some constant value equal to the max absolute change between the first and the last plane.
We do this based off the max z stack size detected by SSmapping. This is also where updates come from, and where all our updating logic will live.

As mentioned, plane masters can choose to opt out of being mirrored down. In this case, anything that interacts with them assuming that they'll be offset will instead just get back the valid plane value. This works for render targets too, since I had to work them into the system as well.

Plane masters can also be temporarily hidden from the client's screen. This is done as an attempt at optimization, and applies to anything used in niche cases, or planes only used if there's a z layer below you.
About Plane Master Groups

BYOND supports having different "maps" on screen at once (IE: groups of items/turfs/etc)
Plane masters cannot cover 2 maps at once, since their location is determined by their screen_loc.
So we need to maintain a mirror of each plane for every map we have open.

This was quite messy, so I've refactored it (and maps too) to be a bit more modular.

Rather then storing a list of plane masters, we store a list of plane master group datums.
Each datum is in charge of the plane masters for its particular map, both creating them, and managing them.

Like I mentioned, I also refactored map views. Adding a new mapview is now as simple as newing a /atom/movable/screen/map_view, calling generate_view with the appropriate map id, setting things you want to display in its vis_contents, and then calling display_to on it, passing in the mob to show ourselves to.

Much better then the hardcoded pattern we used to use. So much duplicated code man.

Oh and plane master controllers, that system we have that allows for applying filters to sets of plane masters? I've made it use lookups on plane master groups now, rather then hanging references to all impacted planes. This makes logic easier, and prevents the need to manage references and update the controllers.

image

In addition, I've added a debug ui for plane masters.
It allows you to view all of your own plane masters and short descriptions of what they do, alongside tools for editing them and their relays.

It ALSO supports editing someone elses plane masters, AND it supports (in a very fragile and incomplete manner) viewing literally through someone else's eyes, including their plane masters. This is very useful, because it means you can debug "hey my X is yorked" issues yourself, on live.

In order to accomplish this I have needed to add setters for an ungodly amount of visual impacting vars. Sight flags, eye, see_invis, see_in_dark, etc.

It also comes with an info dump about the ui, and plane masters/relays in general.

Sort of on that note. I've documented everything I know that's niche/useful about our visual effects and rendering system. My hope is this will serve to bring people up to speed on what can be done more quickly, alongside making my sin here less horrible.
See https://github.com/LemonInTheDark/tgstation/blob/multiz-hell/.github/guides/VISUALS.md.
"Landing" planes

Ok so I've explained the backend, but how do we actually land planes properly?
Most of the time this is really simple. When a plane var is set, we need to provide some spokesperson for the appearance's z level. We can use this to derive their z layer, and thus what offset to use.

This is just a lot of gruntwork, but it's occasionally more complex.
Sometimes we need to cache a list of z layer -> effect, and then use that.
Also a LOT of updating on z move. So much z move shit.

Oh. and in order to make byond darkness work properly, I needed to add SEE_BLACKNESS to all sight flags.
This draws darkness to plane 0, which means I'm able to relay it around and draw it on different z layers as is possible. fun darkness ripple effects incoming someday

I also need to update mob overlays on move.
I do this by realiizing their appearances, mutating their plane, and then readding the overlay in the correct order.

The cost of this is currently 3N. I'm convinced this could be improved, but I've not got to it yet.
It can also occasionally cause overlays to corrupt. This is fixed by laying a protective ward of overlays.Copy in the sand, but that spell makes the compiler confused, so I'll have to bully lummy about fixing it at some point.
Behavior changes

We've had to give up on the already broken gateway "see through" effect. Won't work without managing gateway plane masters or something stupid. Not worth it.
So instead we display the other side as a ui element. It's worse, but not that bad.

Because vis_contents no longer flattens planes (most of the time), some uses of it now have interesting behavior.
The main thing that comes to mind is alert popups that display mobs. They can impact the lighting plane.
I don't really care, but it should be fixable, I think, given elbow grease.

Ah and I've cleaned up layers and plane defines to make them a bit easier to read/reason about, at least I think.
Why It's Good For The Game
<visual candy>

Fixes #65800
Fixes #68461
Changelog

cl
refactor: Refactored... well a lot really. Map views, anything to do with planes, multiz, a shit ton of rendering stuff. Basically if you see anything off visually report it
admin: VV a mob, and hit View/Edit Planes in the dropdown to steal their view, and modify it as you like. You can do the same to yourself using the Edit/Debug Planes verb
/cl
2022-09-27 20:11:04 +13:00
John Willard
faf3814a22 Fixes master lol (#70106) 2022-09-24 13:03:21 +02:00
VexingRaven
47dbaea18d Fixes Build Your Own Shuttle kit (#70068)
Adds /obj/docking_port/mobile/proc/postregister which is used to make the build your own shuttle move after it's loaded
2022-09-24 03:09:54 -04:00
VexingRaven
e50b514a58 Illiterate human-like mobs can send shuttles to a random destination + refactors snowflake checks on the shuttle consoles (#69836)
About The Pull Request

Currently there are a bunch of snowflake checks on the mining shuttle console's attack_hand proc, including a check for TRAIT_ILLITERATE which is hardcoded to specific destinations and is causing issues with the public lavaland shuttle in #69641. When I started looking at that issue I realized that this should all probably be done in ui_interact() instead, and also that checking specifically for TRAIT_ILLITERATE when there's a proc for this (can_read) makes little sense. So I moved it all to ui_interact and cleaned up the TRAIT_ILLITERATE check. I also moved some code related to getting the list of destinations of shuttle consoles into a proc which is shared between the ui_data proc and the can_read check.

Now any illiterate mob which isn't otherwise blocked from interacting (such as monkies, ash lizards, and humans with a quirk) which interact with the shuttle console will spend 10 seconds "randomly mashing buttons" before sending it to a random valid destination. This is (essentially) the current behavior for humans with illiteracy and was (per @timothymtorres ) the intended behavior for ash lizards when he added the illiteracy quirk to begin with in #66648. I'm just making it less snowflakey and I guess technically adding it to monkies too since they could also use the shuttle before that PR and it doesn't make sense to exclude them arbitrarily.
Why It's Good For The Game

Fixes #69641

Generally makes the code more standardized, attack_hand checks are legacy from before ui interact was unified into can_interact and ui_interact. Making the code apply to all shuttle consoles and randomly pick a valid destination makes the more maintainable and less prone to random issues than a hardcoded list.

Also makes the other existing checks more consistent, for example the labor shuttle will now also warn rev heads, block free golems, and let illiterates move them just like the mining and public lavaland shuttles do.
Changelog

cl VexingRaven
fix: The illiteracy quirk will no longer break the mining shuttle
refactor: Refactored some checks on the shuttle console to apply to all consoles
/cl
2022-09-24 11:49:05 +12:00
John Willard
528ade4e12 Fixes emergency pods not working (#69892)
* Fixes emergency pods not working

* ``get_control_console()`` currently doesn't work because it's runtiming instead of properly finding the shuttle computer, which would cause pod's request() to return and call parent, but parent handles sending the pods off, so I fixed it by not calling parent if they didn't have a console, and also fixed it finding its console.

* wtf emagged shuttles can just go?

* replaces || with &&
2022-09-15 08:32:09 -04:00
John Willard
2e771d6c48 Fixes inconsistencies in engine thrust (#69826)
current_engines and initial_engines were actually their thrust power, which I was unaware of because of undocumented vars.
I renamed the, documented them, and fixed them.
2022-09-14 14:02:35 -04:00
Thunder12345
1a7474df71 Adds fax machines to the supply shuttle blacklist (#69766)
Fax machines being present on the supply shuttle creates a risk that there may be ways to send other blacklisted items to CentCom in order to gain access. The neatest and safest solution to this broad realm of potential exploits is to keep the fax machine from being able to get there in the first place.
2022-09-12 15:15:48 -07:00
John Willard
253613c1c3 [MDB IGNORE] Shuttle engine code improvement and fixes (#69516)
* A lot of shuttle code improvements

* Makes use of ``as anything`` in many places
* Adds mapload to connect_to_shuttle()
* Renames many vars, including shuttle 'id' var to 'shuttle_id' and engine 'state' to 'engine_state'.
* Engines now weakref their attached ship, and disconnect when unwrenched from it.
* Removes check for force when deleting a mobile docking port, being deleted should still clear your stuff, regardless of being forced.

Because of all the above, I was able to remove a few pointless checks scattered around, like engine's alter_engine_power()

* better comment for port_id

* Fixes Cargo, Arrivals, and Pirate ships.

* Merge branch 'master' into shuttlecode-oh-no

* last few

* fixes the CI

* fixes

* Fixes infinite engines

* Revert "Merge branch 'master' into shuttlecode-oh-no"

This reverts commit 94eba37de9fe3f4a01dc40bb064771b764f379e3.

* trammies

* whiteship tram

* Makes use of ?. instead

apparently this is what weakrefs use, so 🤷

* i hate supernovaa41

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>

* removes lateinit that I never implemented

* adds _ref to weakref var name

* small change to weld time define

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2022-09-07 11:43:54 -04:00
tattle
fd9f50c552 [IDB IGNORE] Renames the inhand/misc folder to inhand/items (#69573)
Also adds balloons to inhand/items
2022-09-01 03:29:10 +02:00
necromanceranne
a5df710d1b People can now witness a shuttle hijacker complete their hacking stage, rather than somehow be entirely oblivious to someone typing on a keyboard. (#69377)
* Alerts people around the hijacker that they're hijacking.

* Also double-checks to make sure you have your hands free before you can manipulate the console.

* Update emergency.dm

Fixes a reversed check
2022-08-29 21:05:53 -05:00
tattle
d91390a447 [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1) (#69416)
Moves singulo and supermatter dmis into obj/engine, renamed from obj/tesla_engine
Moves Halloween, Christmas, and misc holiday items to obj/holiday
Moves lollipops to obj/food
Moves crates, closets, and storage to obj/storage
Moves assemblies to obj/assemblies
Renames decals.dmi to signs.dmi ...because they're signs and not decals
Moves statues, cutouts, instruments, art supplies, and crayons to obj/art
Moves balloons, plushes, toys, cards, dice, the hourglass, and TCG to obj/toys
Moves guns, swords, shields to obj/weapons
2022-08-24 20:49:35 -03:00
Seth Scherer
f1a363c825 Converts a shitload of istypes to their more concise macros (#69260)
* Converts a lot of istypes() to use their istype macro helpers.
2022-08-18 22:08:44 -04:00
John Willard
952c3ee0d3 Removes ComponentInitialize() (#69118)
* Removes ComponentInitialize()

Completely removes ComponentInitialize() as a proc, which was called on every single atom in the game, twice in some instances (like new players), over something that can already be done with Initialize().
This is the second attempt at doing this, after the first attempt fell apart for some reason. This time it was way easier though, since storages are no longer a Component.

* update icon blocker added before calling parent

* Update code/game/machinery/porta_turret/portable_turret.dm

Co-authored-by: san7890 <the@san7890.com>

* adds a mapload while I'm here

* moves human mood

* Does some UNRELATED thing to the PR

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-08-11 19:01:32 -04:00
Mooshimi
a3121f15c4 [GBP No Update] Perish, individual logging runtime (#69024)
missed 2 or 3(lol it was more when I look back at the files), LOG_GAME tags on the log_message line, and did some cleaning up since i was looking through every log_message again

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-08-10 07:56:40 -07:00
Mothblocks
0a29ded0f6 Revolution victories now call the shuttle when enough of the station is revolutionaries (#68630)
When 65% or more of the station is revs, the shuttle will automatically call. This shuttle can be recalled.

Approved with majority vote from me and @ninjanomnom

Should probably be test merged first, I touched some core shuttle code.

Roughly 60% of rev victories I checked called the shuttle shortly after. That's a lot, but there's still a high amount that aren't, either because the population genuinely wants to stay, or the revolutionary victory was a surprise. The latter of which I had happen to me like, recently! Remember that was the core problem revs victories continuing the round was trying to fix.

With that in mind, this plays nicely with both some player grievances with post-revs while keeping in line with the core of the feature. Players are still, in part, controlling the end of the round, but with affordance given to the most likely scenario.
2022-08-05 18:16:12 -07:00
Mooshimi
b09f3868f8 individual LOG_GAME (#68683)
About The Pull Request

    replaces a ton of log_game with user.log_message so the log is added to individual and global logs.
    adds a few logs for individual LOG_VICTIM, LOG_ATTACK etc logging.
    adds logging for bluespace launchpad's tele coords being changed.
    took the word "has" out of log_combat, as it's extra and just lengthens the log.

Why It's Good For The Admins

It's extremely laggy to open game.txt so an alternative is individual game logs
Changelog

cl
admin: A lot of game logs will now also be in individual game logs, for convenience in log diving.
admin: Added logging for bluespace launchpad x and y offset changes, which go to individual game logs.
admin: Attack logs will now be slightly shorter, one useless word was removed.
/cl
2022-08-05 09:32:02 +12:00
Timberpoes
786ac5c855 [MDB Ignore][Bounty][Complete Refactor] Papercode Redux: Too Many Damn Files <Map Conflict Edition> (#68612)
Papercode refactor
2022-08-02 19:27:42 +02:00
tattle
90512e8f8b Removes a couple instances of log_attack (#68542)
removes a couple instances of log_attack

Co-authored-by: tattle <article.disaster@gmail.com>
2022-07-22 11:56:12 -04:00
Kylerace
fe7513d282 addresses reviews on the tram pr made after merge, fixes diagonal movement bugs (#68033) 2022-07-16 21:44:41 -07:00
magatsuchi
7d0f393f5d Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code (#67478)
Currently, storage works as a subtype of /datum/component, utilizing GetComponent() and signals to operate. While this is a pretty good idea in theory, the execution was pretty trash, and we end up with alot of GetComponent() snowflake code (something that shouldn't even need to be used frankly), and a heaping load of scattered procs that lead into one another, and procs that don't get utilized properly.

Instead, this PR adds atom_storage and proc/create_storage(. . .) to every atom, allowing for the possibility of storage on quite frankly anything. Not only does this entirely remove the need for signals, but it heavily squashes down the number of needed procs in total (removing snowflake signal procs that just lead to one another), reducing overall proc overhead and improving performance.
2022-07-08 18:13:18 -07:00
Zonespace
ff6fea4fb8 Removes the code for four removed gateways (#68038)
* gets rid of the four axed gateways's code - Wizard Academy, Challenge, Space Battle, and Wild West.
2022-07-06 23:38:24 -04:00
John Willard
c9b3d9ab67 Fixes gravity gen sound & off gen loops (#67586)
* Fixes some minor problems with grav gen

* Fixes gravity generator completely obliterating your ears by having several gravity generator soundloops (now there's only 1) by starting soundloop on creation, during parent's Initialize (so it doubled since things like grav gen part (a generator inside the generator??), starts a soundloop too, now the station's gen just starts the loop if it spawns on)
* Fixes offstation gravity generator looking like it's turned on when it isn't, and fixes it having sound when it's off.
* Removes /station grav gen subtype, because it was frankly useless.
* Adds some early returns to gravity generator's process, and removes the unused set_state proc, which was replaced with enable() and disable() in the radiation rework.
* Lastly, removes grav gen parts from QDEL_NULL'ing their soundloop twice, since they called parent's Destroy() that did it for them anyways.

* fixes minor typo

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* more grav gen code improvement

This commit is solely focused on code improvement.

* gravity_field and sound_loop was moved from gravity generator to main gravity generator, since they're the only place it was used.
* Added checks for a main part across generator part procs, rather than using ? randomly.
* Autodocs all Gravity generator vars
* Adds better var names in for() loops, makes use of as_anything, and renames parts to generator_parts.
* Adds some better var names in general.

* Adds an UpdatePaths

* fixes infinite del loop

* fix to harddels

* Update gravitygenerator.dm

* merge conflict moment

* fix maps

* fixes merge conflict

* Update gravitygenerator.dm

* updates the updatepath

* Update gravitygenerator.dm

* Update gravitygenerator.dm

* merge conflict

* set_broken()

* Update gravitygenerator.dm

* unregister signal on destroy

* Update gravitygenerator.dm

* middle part

* Update gravitygenerator.dm

* more improvement + moves grav code to grav file

* Update gravitygenerator.dm

* handles map merge conflicts

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-06-28 10:24:43 -04:00
Gandalf
110edaa153 Security Level Datums (#67949) 2022-06-24 17:01:45 -07:00
Kylerace
8f0df7816b (code bounty) The tram is now unstoppably powerful. it cannot be stopped, it cannot be slowed, it cannot be reasoned with. YOU HAVE NO IDEA HOW READY YOU ARE (#66657)
ever see the tram take 10 milliseconds per movement to move 2100 objects? now you have
https://user-images.githubusercontent.com/15794172/166198184-8bab93bd-f584-4269-9ed1-6aee746f8f3c.mp4
About The Pull Request

fixes #66887

done for the code bounty posted by @MMMiracles to optimize the tram so that it can be sped up. the tram is now twice as fast, firing every tick instead of every 2 ticks. and is now around 10x cheaper to move. also adds support for multiz trams, as in trams that span multiple z levels.

the tram on master takes around 10-15 milliseconds per movement with nothing on it other than its starting contents. why is this? because the tram is the canary in the coal mines when it comes to movement code, which is normally expensive as fuck. the tram does way more work than it needs to, and even finds new ways to slow the game down. I'll walk you through a few of the dumber things the tram currently does and how i fixed them.

    the tram, at absolute minimum, has to move 55 separate industrial_lift platforms once per movement. this means that the tram has to unregister its entered/exited signals 55 times when "the tram" as a singular object is only entering 5 new turfs and exiting 5 old turfs every movement, this means that each of the 55 platforms calculates their own destination turfs and checks their contents every movement. The biggest single optimization in this pr was that I made the tram into a single 5x11 multitile object and made it only do entering/exiting checks on the 5 new and 5 old turfs in each movement.
    way too many of the default tram contents are expensive to move for something that has to move a lot. fun fact, did you know that the walls on the tram have opacity? do you know what opacity does for movables? it makes them recalculate static lighting every time they move. did you know that the tram, this entire time, was taking JUST as much time spamming SSlighting updates as it was spending time in SStramprocess? well it is! now it doesnt do that, the walls are transparent. also, every window and every grille on the tram had the atmos_sensitive element applied to them which then added connect_loc to them, causing them to update signals every movement. that is also dumb and i got rid of that with snowflake overrides. Now we must take care to not add things that sneakily register to Moved() or the moved signal to the roundstart tram, because that is dumb, and the relative utility of simulating objects that should normally shatter due to heat and conduct heat from the atmosphere is far less than the cost of moving them, for this one object.
    all tram contents physically Entered() and Exited() their destination and old turfs every movement, even though because they are on a tram they literally do not interact with the turf, the tram does. also, any objects that use connect_loc or connect_loc behalf that are on the same point on the tram also interact with each other because of this. now all contents of the tram act as if theyre being abstract_move()'d to their destination so that (almost) nothing thats in the destination turf or the exit turf can react to the event of "something laying on the tram is moving over you". the rare things that DO need to know what is physically entering or exiting their turf regardless of whether theyre interacting with the ground can register to the abstract entered and exited signals which are now always sent.
    many of the things hooked into Moved(), whether it be overrides of Moved() itself, or handlers for the moved signal, add up to a LOT of processing time. especially for humans. now ive gotten rid of a lot of it, mostly for the tram but also for normal movement. i made footsteps (a significant portion of human movement cost) not do any work if the human themselves didnt do the movement. i optimized has_gravity() a fair amount, and then realized that since everything on the tram isnt changing momentum, i didnt actually need to check gravity for the purposes of drifting (newtonian_move() was taking a significant portion of the cost of movement at some points along the development process). so now it simply doesnt call newtonian_move() for movements that dont represent a change in momentum (by default all movements do).

also i put effort into 1. better organizing tram/lift code so that most of it is inside of a dedicated modules folder instead of scattered around 5 generic folders and 2. moved a lot of behavior from lift platforms themselves into their lift_master_datum since ideally the platforms would just handle moving themselves, while any behavior involving the entire lift such as "move to destination" and "blow up" would be handled by the lift_master_datum.

also
https://user-images.githubusercontent.com/15794172/166220129-ff2ea344-442f-4e3e-94f0-ec58ab438563.mp4
multiz tram (this just adds the capability to map it like this, no tram does this)
Actual Performance Differences

to benchmark this, i added a world.Profile(PROFILER_START) and world.Profile(PROFILER_START) to the tram moving, so that it generates a profiler output of all tram movement without any unrelated procs being recorded (except for world.Profile() overhead). this made it a lot easier to quantify what was slowing down both the tram and movement in general. and i did 3 types of tests on both master and my branch.

also i should note that i sped up the "master" tram test to move once per tick as well, simply because the normal movement speed seems unbearably slow now. so all recorded videos are done at twice the speed of the real tram on master. this doesnt affect the main thing i was trying to measure: cost for each movement.

the first test was the base tram, containing only my player mob and the movables starting on the tram roundstart. on master, this takes around 13 milliseconds or so on my computer (which is pretty close to what it takes on the servers), on this branch, it takes between 0.9-1.3 milliseconds.

ALSO in these benchmarks youll see that tram/proc/travel() will vary significantly between the master and optimized branches. this is 100% because there are 55 times more platforms moving on master compared to the master branch, and thus 55x more calls to this proc. every test was recorded with the exact same amount of distance moved

here are the master and optimized benchmark text files:
master
master base tram.txt
https://user-images.githubusercontent.com/15794172/166210149-f118683d-6f6d-4dfb-b9e4-14f17b26aad8.mp4
also this shows the increased SSlighting usage resulting from the tram on master spamming updates, which doesnt happen on the optimized branch

optimized
optimization base tram.txt
https://user-images.githubusercontent.com/15794172/166206280-cd849aaa-ed3b-4e2f-b741-b8a5726091a9.mp4

the second test is meant to benchmark the best case scaling cost of moving objects, where nothing extra is registered to movement besides the bare minimum stuff on the /atom/movable level. Each of the open tiles of the tram had 1 bluespace rped filled with parts dumped onto it, to the point that the tram in total was moving 2100 objects. the vast majority of these objects did nothing special in movement so they serve as a good base case. only slightly off due to the rped's registering to movement.

on master, this test takes over 100 milliseconds per movement
master 2000 obj's.txt
https://user-images.githubusercontent.com/15794172/166210560-f4de620d-7dc6-4dbd-8b61-4a48149af707.mp4

when optimized, about 10 milliseconds per movement
https://user-images.githubusercontent.com/15794172/166208654-bc10086b-bbfc-49fa-9987-d7558109cc1d.mp4
optimization 2000 obj's.txt

the third test is 300 humans spawned onto the tram, meant to test all the shit added on to movement cost for humans/carbons. in retrospect this test is actually way too biased in favor of my optimizations since the humans are all in only 3 tiles, so all 100 humans on a tile are reacting to the other 99 humans movements, which wouldnt be as bad if they were distributed across 20 tiles like in the second test. so dont read into this one too hard.

on master, this test takes 200 milliseconds
master 300 catgirls.txt

when optimized, this takes about 13-14 milliseconds.
optimization 300 catgirls on ram ranch.txt
Why It's Good For The Game

the tram is literally 10x cheaper to move. and the code is better organized.
currently on master the tram is as fast as running speed, meaning it has no real relative utility compared to just running the tracks (except for the added safety of not having to risk being ran over by the tram). now the tram of which we have an entire map based around can be used to its full potential.

also, has some fixes to things on the tram reacting to movement. for example on master if you are standing on a tram tile that contains a banana and the TRAM moves, you will slip if the banana was in that spot before you (not if you were there first however). this is because the banana has no concept of relative movement, you and it are in the same reference frame but the banana, which failed highschool physics, believes you to have moved onto it and thus subjected you to the humiliation of an unjust slipping. now since tram contents that dont register to abstract entered/exited cannot know about other tram contents on the same tile during a movement, this cannot happen.

also, you no longer make footstep sounds when the tram moves you over a floor
TODO

mainly opened it now so i can create a stopping point and attend to my other now staling prs, we're at a state of functionality far enough to start testmerging it anyways.

add a better way for admins to be notified of the tram overloading the server if someone purposefully stuffs it with as much shit as they can, and for admins to clear said shit.
automatically slow down the tram if SStramprocess takes over like, 10 milliseconds complete. the tram still cant really check tick and yield without introducing logic holes, so making sure it doesnt take half of the tick every tick is important
go over my code to catch dumb shit i forgot about, there always is for these kinds of refactors because im very messy
remove the area based forced_gravity optimization its not worth figuring out why it doesnt work
fix the inevitable merge conflict with master lol
create an icon for the tram_tunnel area type i made so that objects on the tram dont have to enter and exit areas twice in a cross-station traversal

    add an easy way to vv tram lethality for mobs/things being hit by it. its an easy target in another thing i already wanted to do: a reinforced concept of shared variables from any particular tram platform and the entire tram itself. admins should be able to slow down the tram by vv'ing one platform and have it apply to the entire tram for example.

Changelog

cl
balance: the tram is now twice as fast, pray it doesnt get any faster (it cant without raising world fps)
performance: the tram is now about 10 times cheaper to move for the server
add: mappers can now create trams with multiple z levels
code: industrial_lift's now have more of their behavior pertaining to "the entire lift" being handled by their lift_master_datum as opposed to belonging to a random platform on the lift.
/cl
2022-06-24 13:42:09 +12:00
distributivgesetz
e1ea2761c3 Fix shuttle hijack timeout (#67798) 2022-06-16 22:05:50 -04:00
distributivgesetz
763a10d1cc Resonance cascade polishening, bugfixes and better logging (#67488)
This PR rewrites almost all messages related to cascade events. Some messages felt kinda clunky to read or could have been written better. Overall, the new messages add to the experience as a cascade being a terrifying event in a way that I felt the old ones missed, and they make the event feel overall a lot sharper.

While looking at the resonance cascade code, I noticed that there a lot of stuff about cascades in the air which was not touched on. So, as I do, this PR evolved into a polish and roundup PR for cascades. There was a lot of stuff still hanging out relating to the event, and although the big backend of it sits, there was still a bit left to be completed. Therefore this PR deserves more the title of the "Resonance cascade POLISHENING" instead of the "REFLAVAHRING". But yeah, you ever go on a massive tangent before?
2022-06-16 16:22:22 +01:00
Son-of-Space
8440d20981 [MDB IGNORE] Reformats Access IDs for accessibility and futureproofing (#67002)
* [DRAFT] Reformats Access IDs for accessibility and futureproofing

* replaced all the old defines and IDs everywhere

* replaced ID integers with strings, cleaned up a couple tram helpers

* replaces req_access_txt with req_access and fixes a few of my mistakes

Co-authored-by: san7890 <the@san7890.com>
2022-05-20 02:43:02 -04:00
Tim
aaef545968 Revert "Add stamped requisition forms now give bonus credits (#66230)" (#66851)
This reverts commit f021767645.

This reverts commit f021767 from:

    Add stamped requisition forms now give bonus credits #66230

This bug was encountered when we were testing this PR but I thought it got fixed.
Why It's Good For The Game

Cargo crates will now reappear.
2022-05-10 15:28:10 +12:00
Tim
f021767645 Add stamped requisition forms now give bonus credits (#66230)
Requisition forms now grant bonus credits when they are stamped by the appropriate stamp listed under "Authorization Required:" on the form. Initially I was just going to have the req forms give the same amount of credits as the manifest but I was convinced to lower both of them so it doesn't unbalance crate returns too much.
2022-05-08 11:28:26 -07:00
LemonInTheDark
98f32035d8 Parallax but better: Smooth movement cleanup (#66567)
* Alright, so I'm optimizing parallax code so I can justify making it do a
bit more work

To that end, lets make the checks it does each process event based.
There's two. One is for a difference in view, which is an easy fix since
I added a view setter like a year back now.

The second is something planets do when you change your z level.
This gets more complicated, because we're "owned" by a client.
So the only real pattern we can use to hook into the client's mob's
movement is something like connect_loc_behalf.

So, I've made connect_mob_behalf. Fuck you.

This saves a proc call and some redundant logic

* Fixes random parallax stuttering

Ok so this is kinda a weird one but hear me out.

Parallax has this concept of "direction" that some areas use, mostly
the shuttle transit ones. Set when you move into a new area.
So of course it has a setter. If you pass it a direction that it doesn't
already have, it'll start up the movement animation, and disable normal
parallax for a bit to give it some time to get going.

This var is typically set to 0.

The problem is we were setting /area/space's direction to null in
shuttle movement code, because of a forgotten proc arg.

Null is of course different then 0, so this would trigger a halt in
parallax processing.

This causes a lot of strange stutters in parallax, mostly when you're
moving between nearspace and space. It looks really bad, and I'm a bit
suprised none noticed.

I've fixed it, and added a default arg to the setter to prevent this
class of issue in future. Things look a good bit nicer this way

* Adds animation back to parallax

Ok so like, I know this was removed and "none could tell" and whatever,
and in fairness this animation method is a bit crummy.

What we really want to do is eliminate "halts" and "jumps" in the
parallax moveemnt. So it should be smooth.

As it is on live now, this just isn't what happens, you get jumping
between offsets. Looks frankly, horrible. Especially on the station.

Just what I've done won't be enough however, because what we need to do
is match our parallax scroll speed with our current glide speed. I need
to figure out how to do this well, and I have a feeling it will involve
some system of managing glide sources.

Anyway for now the animation looks really nice for ghosts with default
(high) settings, since they share the same delay.

I've done some refactoring to how old animation code worked pre (4b04f9012d). Two major
changes tho.

First, instead of doing all the animate checks each time we loop over a
layer, we only do the layer dependant ones. This saves a good bit of
time.

Second, we animate movement on absolute layers too. They're staying in
the same position, but they still move on the screen, so we do the same
gental leaning. This has a very nice visual effect.

Oh and I cleaned up some of the code slightly.
2022-05-07 14:59:41 -07:00
ArcaneMusic
6ad8000bd3 Adds the Accounting Console to the game (HOP Job Content) (#66304)
This PR adds the accounting console to the game, as a console that exists round start within the HOP's office. The accounting console allows for players to get 2 separate lists of information:

- A list of all the bank accounts associated with each crewmember on the station, listing their account balance, their job, and their paygrade modifier (Which is either 1 or 0.7, depending on their species)
- The audit log, a basic list of transactions of player purchases, listed listed in the following formal universally: [person] spent [cost]CR on [Purchase Source]. It's intentionally left without all the information so that players will need to investigate if they notice strange purchases coming from an account, as a kind of ghetto money forensics.
2022-04-25 21:31:05 -05:00