Commit Graph

717 Commits

Author SHA1 Message Date
Iamgoofball
befeda6a5d Janitors and Shaft Miners start with the ExperTrak Skill Tracker preinstalled on their PDAs. (#71022)
see https://tgstation13.org/phpBB/viewtopic.php?f=10&t=32695
2022-11-03 23:52:33 -05:00
itseasytosee
8e4bc80d92 Easy's Super Omega "unarmed strike based species var moved to limbs" refractor, unarmed strike striking with specific body parts rather than it just being flavor, and brain based attacking limb selection extra chunky edition. And also bodypart traits. (#70422)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Ok first if you don't want to read any further explanation you can watch
these two videos and you will understand all of the mechanical depth of
this change.


https://user-images.githubusercontent.com/55666666/194788103-8019dad8-7e44-4cc8-bc8f-0a4f8f00a357.mp4


https://user-images.githubusercontent.com/55666666/194788109-345a3146-fb4b-4a2e-9c2a-e2ee786ba97d.mp4

### **Disclaimer: Effect on gameplay extremely limited and niche read at
your own risk**

Starting at the top, regarding the species datum, the vars attack_type,
punchdamagelow, punchdamagehigh, punchstunthreshold, attack_verb,
attack_effect, attack_sound, and miss_sound have been removed.

All bodyparts (not just arms) now have corresponding variables for how
they should act if utilized in an unarmed attack. The bodyparts vars are
correlated to their corresponding species. All arm type bodyparts have
been repathed through a common parent for the purposes of keeping
variables consistent. The same is true for the legs.

When a carbon begins an unarmed attack, it will check the carbon's brain
to see what limb should be used for the attack.
If the brain has no answers it will default to the arm that corresponds
to the active hand of the attacker. Currently in all brains except
monkeys, it check to see if the attackers target target is laying down,
and if so, call for a kick with the leg that corresponds with the
attackers active hand. If the attacker has no useable legs, or the
attacker does not have a corresponding leg to the active hand, or the
target is not laying down, the brain will simply default for an attack
with the active hand.

Monkeys brains (take note the difference between having a monkey brain
and being controlled by monkey AI) are the exception, they will simply
always choose their heads, and by default an attack with the head is a
bite attack.

As an example:
Previously ethereal would make attacks that used the verb "burn" and did
burn damage despite what limbs they possessed.
Now anybody with an ethereal limb will make an unarmed attack that does
burn damage and has all the same verbs as an ethereal would.

And finally, the chunky finger species trait has been moved over to the
species arms. Effect on other sources like insuls remains unchanged.
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
The main motivation is moving direct mechanical elements off of species
to, quoting tralezab here, "Make species like a blueprint."
Opens more opportunities for coders to add specific elements to limbs,
perhaps we could see a buff to unarmed strikes from robot arms, or a
species that headbutts people to death.
Also undeniably cool, and fixes some weirdness like fully auged
ethereals still doing their normal ethereal attack.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑 itseasytosee
refactor: Elements of unarmed strikes are now limb dependent instead of
species dependent. Go rip off an ethereal arm, sew it onto yourself, and
burn some people.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: itseasytosee <noodlenymphftw@gmail.com@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-11-01 23:06:21 +00:00
san7890
5b6f3d2226 Macro Defines the On-Station Year (#70827)
* Macro Defines the On-Station Year

Hey there,

This PR just removes the repeating pattern of (GLOB.year_integer+540) across several different code files and replaces it with a macro `CURRENT_STATION_YEAR`.

In case we decide SS13 will need to take place in a new year, it'll be easier to do such, but it also helps with mistakes in year transcription should that ever be a thing.

* double the define - define trouble
2022-10-29 14:08:41 -05:00
John Willard
6202f65661 Fixes & Improves ntnrc client & ntnet conversations (#70854)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-29 08:40:36 +00:00
san7890
7566d4c508 Adds Station's Date To NTos Window (check the time+date on your tablet!) (#70754)
* The date and time is now displayed in NtOS tablets, showing the in-game date (540 years after current), bringing the feature from old PDAs over.
2022-10-26 19:54:11 -04:00
ShizCalev
6bb879a599 sets pdas to use the pda worn icon again (#70748)
* PDA tablets now have a worn PDA icon again, which was lost in the transition to tablets.
2022-10-26 06:22:57 -04:00
John Willard
f1f46275f0 Removes tablet hard drives entirely (HDD & SSD) (#70678)
* Removes HDD's entirely

HDDs have been removed, though the code for it is still currently lingering as it's required for portable disks. I'll have to find a solution to this one day, but as I am going to sleep, this is a problem for future me.

* starts on removing SSD

* updatepaths and kills off SSD

* update path :D

* Fixes to programs and icons

* Ready for review now

I read over everything I did and tried to fix anything I saw wasn't done right. Hopefully better comments now.

* merge conflict  fix

* can't win them all

* takes viruses into account in paths, fixes it in snowcabin

* Renames the updatepaths

* removes the qdel loop

* accidentally new'ed programs twice

* Fix program's computer var

* destroy pen and disk, dont run kill program on something killed

* more fixes for pens and idle threads

* Fixes PDAs installing apps twice.

* simplifies inserted disk & PDA disk

* fuck's sake

* Use istype instead

* revert

* Revert "revert"

This reverts commit 9ede628c6fef9c7c86417234f6d8ada1ff9e2fef.

* why did that happen

* Update code/modules/modular_computers/computers/item/tablet.dm

* MC_SSD added to master lol

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-10-26 00:29:50 +00:00
Tim
bf35df42bf Add AltClick removes pAIs for tablets (#68251)
* Add AltClick removes pAIs

* Add context screentips for pAIs to tablets

* Fix screentip context syntax error

* Fix syntax error

* Merge remote-tracking branch 'upstream/master' into patch-10

* Refactor contextual screentips to work

* Fix runtimes

* Apply code review changes

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

* Add balloon alert to tablet items

* Refactor screentips to be more robust

* Change add_context to be more robust

* Add more balloon alerts

* Some idiot set user to null so I gotta remove this

* Change pen screentip to display inserted item

* Add screentip to insert items

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-25 14:59:24 -04:00
John Willard
1619a5fe84 Fixes some inconsistencies with computers (#70679)
* Modular computers now have their initial name if they don't have an idenfitication and job, which previously meant they would have the name ()
* Removes MACHINE modular computer's process, because all it did was update the name, then call computer's process. Now it just does what every computer does, BUT UpdateDisplay on ITEM modular computers will now update the machine's name.
* Additionally, I moved the modular computer processor's New to an Initialize, and removed the shutdown_computer code, because we already register update_icon signal to update the computer's appearance, why do we need to do it twice?
2022-10-21 18:09:54 -04:00
texan-down-under
e056997093 Screwdriver Pen (#70467)
* base

* bam

* icon and element fix

* terminate

* Update code/modules/paperwork/pen.dm

* Update code/modules/paperwork/pen.dm

* sigh

* Update code/_globalvars/lists/maintenance_loot.dm

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* Update code/modules/paperwork/pen.dm

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>

* Update code/modules/paperwork/pen.dm

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

* factoring

* escapism

* balloon notif

* bottom vars

* Update code/modules/paperwork/pen.dm

* Update code/modules/paperwork/pen.dm

* Apply suggestions from code review

* updates the sprite to be based on new pen icon

* pushes the comsig call to an attack_self

* Update code/modules/paperwork/pen.dm

* Update code/modules/paperwork/pen.dm

* imagos icon

Co-authored-by: etherware-novice <candy@notarealaddr.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com>
2022-10-21 02:41:58 -04:00
John Willard
9bf96c7763 Misc PDA code improvements (#70555)
* How to conflict with PRs: A guide

* Removes unnecessary support for the now-removed job disks from Tablet's TGUI menu, and tablet's ui_act.
* Adds autodoc comments to computer files
* Removes the unused 'unsendable' var on computer files
* Generally improves code on tablets, now process isn't looping through every idle thread twice!
* Moves the check for program in idle_threads above checking if supported by hardware, because it's already running, so there's no need to check.

* eh

* revert a scipaper change
2022-10-19 22:16:57 -04:00
John Willard
218a153464 Removes a ton of unused tablet vars, re-organizes the rest (#70344)
* Removes a ton of unused vars, re-organizes the rest

Removes a ton of unused vars from Modular computers
Re-organizes the rest, and adds autodoc comments to most of them
Moved 2 vars (saved_image and invisible) from the tablet to the messenger app, since that's where it was used. I didn't see the point of having these vars be on every computer anyways, only PDAs have the app.
Renames Clown's honk virus var
Makes Messenger app's saved image, actually used.

* static list and NODECONSTRUCT_1 check

* oops
2022-10-19 20:34:08 -04:00
John Willard
d23e95b3bc Curator and Mime PDAs now start with their ringer off (#70604) 2022-10-19 00:46:25 -07:00
san7890
2878345ebb Swaps sleep() to use SECONDS define, changes some sleep(1) to sleep(1 TICKS) (#70452) 2022-10-18 21:25:23 -07:00
GoblinBackwards
89beb98495 Modular computer fixes (#70606)
* Moves a lot of modular computer attackbys to the cpu instead, which is what handles it all. This allows their parts to be removed and the console deconstructed/repaired once again.
2022-10-18 20:21:28 -04:00
GoldenAlpharex
e613c875b7 PDA Ringtone Preference (#70485)
* Creates some new defines for constant values in the Messenger app
* Created a new type of preference, text preferences, with a FeatureShortTextInput TGUI component
* Uses said new preference to re-add a PDA ringtone preference.
2022-10-16 17:33:40 -04:00
Tim
0c1ea43ba2 [NO GBP] Fix traitor PDA uplinks to be accessible by illiterate people (#70368)
* Illiterate people can now use a PDA in hand to open their uplink immediately if they are the owner of the uplink.
2022-10-14 06:56:34 -04:00
GoldenAlpharex
c7408b32f2 Fixes communication being nearly impossible (except over radio) when there's a null client in the global player list (#70404) 2022-10-13 21:31:48 -07:00
GoldenAlpharex
8e3147f166 Fixes the formatting in the Messenger app's message history and makes the current ringtone appear in the input box when trying to change it (#70458)
* Changing your PDA ringtone now has your current ringtone in your input box, like the previous PDAs used to.
* The incoming Messenger messages are now HTML encoded in message history, allowing it to display apostrophes and such.
* The prompt to send a PDA message now shows you the person you're trying to send a PDA message to.
2022-10-12 23:18:43 -04:00
John Willard
dc5f5fb5f4 The curator's PDA now works in space (#70319)
* The curator's PDA is now long-ranged

The Curator's PDA is now long ranged and allows for it to be used while out in space.
I recently removed the modular computer parts that allowed PDAs to be upgraded to connect to NTNet while on different Z-levels, so thought this would be a good replacement since Curators are a space exploration job, so being able to still talk to other players or use the newscaster app while away, is something I think would be beneficial.
2022-10-11 14:20:20 -07:00
Zonespace
f468194083 Fixes the DOS tool (#70312)
* Fixes the tablet's emagged 'DOS' app, which wasn't checking ID properly.
2022-10-05 18:38:49 -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
Mickyan
db905aff48 Assistant PDAs start with the bounty board app preinstalled (#70291)
* bounty app for assistants

* moved to no department section
2022-10-05 01:41:33 +00:00
vincentiusvin
99b8d6b494 Changed Supermatter Internal Math + UI Additions (#69240)
Basically all what I'm doing is categorize and display whatever modifiers are currently applying to the SM. This way players can see powerloss, temperature generation, damage taking, temp limit adjustment etc all in live instead of diving code or looking it up in the wiki.

I have taken the liberty of making most of these modifiers additive instead of multiplicative since it's easier to illustrate how much a given modifier is doing when they are all additive. E.G: The gas you added gave you an extra 2500 joules instead of the gas you added gave you a 1.2x multiplier.

To make this job not CBT there are a few gameplay changes that are needed to make things fall into the framework and some general cleanup. Most noteworthy might be:

    Space damage taking (opted for 

SM damage and balance #66692 instead of SM can explode on space tiles again #35275 just because it's newer. Wont mind changing if asked). Also removed the power gen see the edit in
Changed Supermatter Internal Math + UI Additions #69240 (comment). Wont mind bringing it back and tweaking if asked.
SM will now use the same heat limit for everything that once used variations of it. Unified healing temp limit (influenced by psychologist) with damage heat limit (influenced by gases and low moles, yeah that's a thing). In practice this means your rock will heal at higher temps instead of the old one.
Heat output production. See:

    Changed Supermatter Internal Math + UI Additions #69240 (comment) and heat penalty from gases.
    I'm really sorry for tacking this on to this PR, but there's no good way to present the heat output effect of gases to the SM in a way I'm satisfied with if I don't do this. Kinda hard to atomize too since it relies on the cleanup. Rolled back!

Work left:

    Oh and need to make the NTOS things work.
    Ntos Done! Since the active crystal is now deprecated and we use localstate, the notification system got changed a bit. SM will now ping you if you subscribed to it. Only works when minimized and not closed, like the old one.
    Oh and also documentation.
    Think its in an ok spot now.
    Reimplement transmission view and low pressure power bonus. Yeah thats a thing.
    Looks like the low pressure power bonus is actually broken. It evaluates to ~2 for pretty much any x given. So im axing it.
    Reimplement moles doubling heat resistance. Yep thats also a thing.
    Readd the pluox and miasma pressure scaling thing.
    Done, also multiplied the reaction rate by half but multiplied the mole manipulation by 2 for pluox gen. Did this so it's easier to understand.
    Dump shit into the changelog.

Why It's Good For The Game

Future coders will now need to write a bit more code when they want to add another modifier. Meaning it's a tad more rigid if someone wants to go out of the existing framework. Also demands a little bit of math but nothing more than basic algebra.

But on the flipside, this means future coders that want to add a brand new modifier to the SM will need to justify and document it (with only a single string descriptor so its not even that much work). Makes the work of people maintaining the code waaay easier at the expense of feature coders. Also makes whatever change they want to apply be relayed immediately to the players.

I mean jesus christ we didnt even know PN was really good for SM until it's added to the wiki.
Changelog

🆑
del: Removed the broken pressure power multiplier which always evaluates to 2. Multiplied base SM power production by 2.
del: SM will no longer gain power when exposed to space. It actually used to do that, but only when the tile it's on has gas so you don't really notice it.
qol: added the factor breakdowns to the SM ui.
qol: added the gas effect breakdowns to the SM ui.
qol: Made the supermatter selection in NT CIMS ui frontend based. Notifications will be based on you pressing the bell button instead of opening a SM page.
code: Instead of showing the environment breakdown of the SM tile, the NT CIMS will show you the exact gas mixture that it uses for calculation.
code: Total moles in NT CIMS will now be substituted with absorbed moles, which is the thing we use to calculate scrung delams. Scrungs at 1800.
balance: Unified the SM taking damage on space (last modified 2018) with SM taking damage around space (added 2020, last modified 2022). Chose the latter formula, it's significantly stronger.
balance: SM will start healing at the same damage at which it stops taking heat damage. Instead of the old fixed healing at ~313K.
balance: made the low mole heat resistance thing on SM not scale with heat resistant gases.
balance: Made the supermatter temperature power gain multiplier thing linear at 1/6 instead of 50/273 or 30/273.
balance: Psychologist heat reduction is weaker on high heat gas.
refactor: rerouted how external damage (bullets) and external power (emitter) is applied to SM.
refactor: restructured the internal power calculations for SM. Power should be applied on each atmos tick instead of separately.
refactor: restructured how the SM calculates the damage that it takes. No changes expected except for the low mole temp limit multiplier thing.
refactor: Restructured SM pluox generation and miasma consumption. No changes expected though.
\🆑
2022-10-02 16:28:55 -07:00
John Willard
91f02f2a6b canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE (#69790)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

The most idiotic thing I've seen is canUseTopic's defines, they literally just define TRUE, you can use it however you want, it doesn't matter, it just means TRUE. You can mix and match the args and it will set that arg to true, despite the name.

It's so idiotic I decided to remove it, so now I can reclaim a little bit of my sanity.
2022-10-01 09:47:52 -07:00
John Willard
b570fceab6 Increases the capacity of command disks (#70105) 2022-09-27 22:30:48 -07:00
John Willard
243231eb48 Properly checks flags with & instead of == (#70130)
* Makes flags properly check themselves

Byond ref: https://www.byond.com/docs/ref/#/operator/&
Basically, flags should use & instead of ==
We can have more than 1 slot on any item, so it's preferred that we do this instead. Even if it doesn't immediately fix any problems, it's something that should be the standard anyways to prevent it from ever being a problem.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-09-27 21:51:45 +00: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
7c990173e0 Removes network cards and printers from tablets (#70110) 2022-09-26 11:18:58 -07:00
ShizCalev
5c9d863998 Demoralization fixes (#69924)
* Demoralization fixes

Blind mobs will no longer be demoralized by posters and graffiti.
Illiterate mobs will no longer be demoralized by the words on posters.
Mobs will no longer be demoralized by posters & graffiti if it's too dark to see them.

Also makes can_read use reading check flags, one for literacy and one for light.
2022-09-24 03:26:31 -04:00
John Willard
ca229574f6 Removes AI and Charge parts from tablets, adds support for more later. (#70012)
* Removes recharger tablet parts

Removes 'advanced' tablet subtypes that we used before PDAs were added, in some jobs.
Replaces Roboticist's advanced tablet mail with a laptop
Moves the notepad's note var from the tablet, to the note app
Moves modular computer's defines into their own file

Machine computers now directly use power from the machine they're in, while the rest uses power cells.
Silicon tablets don't use power at all.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-09-22 20:58:20 -07:00
ShizCalev
ea2e4335b0 adds inhand icons for tablets & pdas (#70038) 2022-09-22 03:11:28 -04:00
VexingRaven
d59c41613b Fixes Signal Commander program breaking all signalers on default frequency (#69773)
* Fixes signalcommander program breaking all signalers on default frequency
2022-09-11 20:27:34 -04: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
LemonInTheDark
930c5e635e Moves "catch this var/flag" code from obj/init and datum/new into the types that use it (#69634)
* Optimizes away /obj/Initialize

We were spending like 0.15 seconds just checking for blueprints, obj
flags and network ids
All these things can just be applied where they're wanted, saves time

Oh and I replaced object flags with an emag injector. I'll give it a
sprite and name later I promise

* Requires a GenerateTag() call to set DF_USE_TAG, rather then doing a check in atom New

This is technically harder to use, but I don't really want people using
tags, and it saves 0.15 seconds

* Moves generatetag to /datum

* I am dumb

* Saves 0.5 seconds, makes init emissive blockers actually work

Ok so background. If an overlay is added with add_overlay, and not
"managed" somehow, it will effectively never be removed, because
nothing's tracking it.

Update_overlays uses the managed_overlays list/var (one of those) to do
this.
I'm gonna piggyback off this to make emissive overlays actually like,
respect overlay updates.

Oh and uh, I've saved maybe 0.5 seconds by caching the new emissive, and
not using add_overlay. There's a chance this will lead to overlay
corruption, but since we never readd the flattened, I think we'll be
safe

* Fixes plane not being set right, changes color logic too, since alpha will override past color sets

* Makes it actually work. also makes rand posters update appearance to clear away the overlay, since it shows on right click and looks bad

* Fixes blockers showing as emissives. It turns out alpha sets override the color list we use. Not sure why we pretend to support them

* Makes the injector support traits, adds an amazing sprite
2022-09-06 03:17:17 -07:00
Mothblocks
c5ba0db5b1 Paper bins now create paper dynamically, rather than creating thousands of pieces of paper on init every round (#69586)
* Paper bins now create paper dynamically, rather than creating thousands of pieces of paper on init every round

* Fix hard del, fix static initialization

* Fix fire_act not using paper_stack
2022-09-04 09:34:34 +12:00
RandomGamer123
3792bfb389 Add check for ordering permissions before using department account as payee for NIRN, also fixes #68765 (#69290)
About The Pull Request

See title
Why It's Good For The Game

Fixes #68765, also currently, while NIRN is meant to parallel the features of the cargo console for non-heads of staff, requests are also paid by the department account instead of the general cargo budget for non-heads of staff
Changelog

cl
fix: Putting a budget card into NIRN now gives the proper error message if you are trying to buy something privately, and treat you as a normal cargo request order by someone without any permissions otherwise
fix: NIRN orders should now charge the department that bought it only if a head of staff ordered it
/cl
2022-09-02 09:50:15 +12:00
distributivgesetz
714aa3b150 [MDB IGNORE] APC controller and Power Monitor/AmpCheck fixes, aka How do I write PR titles (#69146)
About The Pull Request

bgug fix stuff
APC controller UI has its elements section'ed off. The backend has been redone to make the behaviour of the APC controller a bit less janky. The console should be more stable, and all the soul has been removed from the code and the UI.

before this PR stales out from nobody wanting to review my pr, I should probably outline what exactly changed:

    APC controller consoles have had their APC code almost entirely reworked. They no longer have to hold a reference to the person using the controller currently, and APCs themselves no longer hold a reference to the controller, instead to the person directly. A lot of code was moved to APC themselves to make it a lot more stable.
    APC controller used to call toggle_breaker without passing args, causing a runtime. Fixed in 

    Fixes the power flow control console not actually being able to toggle breakers #69343
    APC controller UI has had the Window.Content tags moved up to the top component, and a lot has been sectioned off to make the UI more sane.
    AmpCheck used to look for a wire on it's turf, or as a fallback look for the Area APC. A check to see if the APC has a terminal did so on a weakref, causing a runtime and preventing the program from ever finding a valid APC in it's area, making it show nothing. This has been fixed. On the other hand, the power monitor console did not store the ground wire or APC terminal as a weakref, this has been updated. As a fallback, if there are still no APCs in the powernet, the UI will show a dimmer popup.
    There was a "secret" power monitor variation in code so PDAs could not access monitors in hidden places. With the removal of PDAs, this control console is useless.

Why It's Good For The Game

Tiny bit of (much needed) polish on some useful tools in the engineering department.
Changelog

cl
fix: Fixed runtime when using AmpCheck without connecting the console with a wire.
fix: Fixed a few runtimes that could occur when using APC controller consoles.
qol: Sucked soul out of APC controller code and UI.
del: Removed "secret" power monitor console.
/cl
2022-09-02 09:45:45 +12:00
John Willard
25ecf75355 Ringer is no longer needed to get Ntmessengers recieved. (#69498)
* When getting a message, you will have it sent to your chat regardless of ringer status, as it's unrelated to the ringtone being on/off.
2022-09-01 13:44:41 -05:00
ShizCalev
4cbdc3a2db Adds more multiz support (#69420)
* Adds more multiz support by making use of ``is_valid_z_level`` instead of simply checking if z is the same.
2022-09-01 00:07:14 -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
Coldud
80770657cb once again improves pda message immersion (#69534)
About The Pull Request

Reimplements #37735 (add 1% chance to have "Sent from my PDA" appended to a message) as it was lost during the transition to tablets.

Why It's Good For The Game

Feature parity with previous system.
2022-08-30 20:59:51 -07:00
Tastyfish
7eef1a5547 Standardize and improve status display UI's (#68976)
* Standardized and improves status display app, making it share the same UI as the Communication Console's version of it, and moves shared status display screens into global lists instead of vars.

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2022-08-29 22:58:23 -04: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
MrMelbert
59cc93b364 Removes the "proximity crew pinpointer" (the ones parameds spawn with), paramedic PDAs start with the lifeline app instead (#68993)
* Parameds start with the Lifeline tablet app instead of a proximity pinpointer, with a Calomel bottle replacing their now empty medical belt slot.
2022-08-07 19:50:31 -04: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
John Willard
ee21cf88a5 Merges ordnance data disks (#68376)
JohnFulpWillard
Member
JohnFulpWillard commented 23 days ago
About The Pull Request

Merges ordnance data disk and frontier data disk, since the ordnance data disk's description says it is for ordnance-related stuff, yet doesnt have the main app people need to do Ordnance, which I found weird.

I additionally moved the NT Frontier app to the rest of the programs folder, and renamed it Frontier so it is easier to find.
Why It's Good For The Game

This allows the semi-public ordnance data disk (as they are found in vending machines) to actually contain the ordnance app it claims it provides, making it easier for an Atmospherics Technician (or anyone, really) to get the app needed to upload gasses they make, as experiments for their nodes.

This makes it easier for Engineering to do Engineering-related experiments to get Engineering-related tech nodes, much like Medical can by doing Dissection surgeries, while also giving more use to the Frontier's ability to put authors, since now Science and Atmospherics can see eachother completing experiments and maybe even try to outdo the other.
Changelog

cl
balance: Ordnance data disks now have the Frontier app on them, and has entirely replaced Frontier data disks.
/cl
2022-08-05 09:16:43 +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
Watermelon914
69226b3bd7 Drastically improved the USB connection for air alarms. Any airlock can now be made into a shell (#68632)
The USB connections for air alarms have been improved and now include scrubber control, vent control and the setting of the air alarm mode. Also fixes a bug where the limits were not being properly set.

The scrubber, vent and limit control can be duplicated in the circuit to allow multiple limits/scrubbers/vents to be controlled by one circuit.

Any airlock can be made into a shell during construction by configuring the airlock electronic before insert.
2022-07-29 13:52:29 +02:00