Commit Graph

78 Commits

Author SHA1 Message Date
YesterdaysPromise
71a1fee2f1 Explodes device.dmi (#80025)
## About The Pull Request

I woke up today and thought 'what would be easy thing to do today so I
can say I've done something?'. Then I remembered I saw several gangtool
usages the time I split radio up, and I could remedy those. 7 hours
later, device.dmi is split in a folder of its own, and I've also given
unique sprites to door remotes and landing desginators.


## Why It's Good For The Game

The device.dmi was kind of a mess.

## Changelog

🆑
/🆑
2023-12-09 13:31:50 +01:00
san7890
7f7688b60a Demotes the "electrical conductivity" flag from flags_1 to obj_flags (#80033)
## About The Pull Request

Code to handle this flag only ever existed on the `/obj` sublevel, so
there's no need for it to be on the `/atom` level `flags_1`. There was
probably a point in time in which mobs or turfs conducted electricity
but there's zero code for it anymore so we truly just live in a society
now.
## Why It's Good For The Game

Frees up a slot on `flags_1` (which is really nice actually), proper
scoping of certain bitflag stuff, etc.
## Changelog
Not relevant to players.

I may have screwed something up, will be doing a few passes on this
myself to ensure all the search and replaces went alright but we should
be good™️
2023-12-01 21:43:46 -05:00
John Willard
b52ce868bc Cuts down on unnecessary non-TGUI stuff (#79590)
## About The Pull Request

Removes INTERACT_MACHINE_SET_MACHINE on machines that don't use a
non-TGUI UI.
Removes set_machine from TGUI things that forgot to remove them
previously.
Decouples advanced camera consoles from UI procs since it doesn't
actually use one.

## Why It's Good For The Game

TGUI machines don't need to be using these procs and vars, and this
makes it more clear what does and doesn't use a TGUI menu from a glance.
I explain it a bit better
[here](https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA) if you're interested.

## Changelog

No player-facing changes.
2023-11-09 15:13:09 -08:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

This PR does not change mineral balance. What this does is moves over
every individual cost, both in crafting recipes attached to an object
over to a define based system. We have 3 defines:

`sheet_material_amount=2000` . Stock standard mineral sheet. This being
our central mineral unit, this is used for all costs 2000+.
`half_sheet_material_amount=1000` . Same as above, but using iron rods
as our inbetween for costs of 1000-1999.
`small_material_amount=100` . This hits 1-999. This covers... a
startlingly large amount of the codebase. It's feast or famine out here
in terms of mineral costs as a result, items are either sheets upon
sheets, or some fraction of small mats.

Shout out to riot darts for being the worst material cost in the game. I
will not elaborate.

Regardless, this has no functional change, but it sets the groundwork
for making future changes to material costs much, MUCH easier, and moves
over to a single, standardized set of units to help enforce coding
standards on new items, and will bring up lots of uncomfortable balance
questions down the line.

For now though, this serves as some rough boundaries on how items costs
are related, and will make adjusting these values easier going forward.

Except for foam darts.

I did round up foam darts.

Adjusting mineral balance on the macro scale will be as simple as
changing the aforementioned mineral defines, where the alternative is a
rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam
dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
MrMelbert
aa95daa4e8 Fixes an exploit with stacking igniters. Refactors some assembly flag oddities. Limits assembly holders at 12 assemblies. (#71264)
## About The Pull Request

Soft revert of #71224 , Fixes #71222

Fixes an exploit involving attachment of multiple igniters to one
assembly.
- Multiple igniters or condensers can no longer be attached to the same
assembly holder
- Assembly holders have a limit of 12 assemblies maximum
- I'm not sure if this is too low or limited, I picked it arbitrarily.
Please inform me if it could be upped a smidge.
- This lag exploit was born because of limitless assembly holders, which
is a little silly even with the exploit aside. All that uncapped holders
can bring are exploits or bugs, which I feel confident limited can
prevent. What use is there even for having so many?
- Cleans up / refactors some aspects of assemblies and assembly holders.
- Assemblies had a weird wire type flag that was only ever used by
signallers, but also used wrong by signallers. I did some scanning of
the code and realized that ... a lot of this was just straight up
unused, and not even assigned anywhere.
- Now, there is a flag assembly flag var, which everything is read off
of. Tested it and still seemed to all work fine.

## Why It's Good For The Game

Lag exploits are bad. 

## Changelog

🆑 Melbert
fix: Fixed an exploit involving igniters attached to themselves.
Assembly holders are now limited to 12 assemblies maximum, and you
cannot attach multiple igniters to the same assembly.
refactor: Refactored some assembly jank, namely in how they pulse and
are pulsed.
/🆑
2022-11-22 16:31:51 -08: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
SuperSayu
94cbfb30c3 Various assembly fixes. (#69772)
About The Pull Request

Fixes #69043 assemblies not providing a UI when part of a one-tank bomb. (This doesn't count voice analyzers, which don't have UI)
Fixes #68139 assemblies triggering themselves (and often turning themselves off).
Fixes timers ceasing to loop if the timer is set to less than the 3-second anti-spam threshold.
#69335, #68733 signalers occasionally runtiming due to qdel'd weak reference datums. Already addressed by another PR
Proximity sensors and mousetraps work on more wire datums, but proximity sensors are still buggy.
Igniter-sensor pairs can detonate fuel tanks properly, including plumbed fuel tanks. Fuel tank explosions scale with how much fuel is in them; this is slightly nerfed from existing values.

The fuel tank detonation code has been made generic, but other reagent dispensers have rigging turned off. If turned on with a varedit, you can rig and detonate water and other reagent tanks. Reagent tanks can theoretically both explode and spread reagents if it should happen to contain both welding fuel and other stuff. I have not actually tested this part of it, but I have detonated both water tanks and fuel tanks and each works correctly.

In making mousetraps work on wire datums, I had the opportunity to make it so that you could place a mousetrap in a door's wire and it would activate when someone passed through the door (useful to bolt a door open when someone authorized goes through, for example). This is a fun mechanic but does not make sense for a simple mousetrap to be so powerful, so it is disabled. Ideally, you could put the laser tripwire in a door's wires to do the same thing, but that would be a massive rework. Mousetraps still work in on-found mode for all wire datums, and will work on items with wiring datums (like C4 and chem bombs) when stepped on.

The signaler runtimes were a result of weak_ref datums being deleted, and the communications system not handling that. It's probably not ideal to run null checks in the post_signal loop, but I am not going to worry about it.

Many of the assemblies were not properly registering when the assembly holder was attached to an item. This was most important for proximity sensors, but that also has other problems that I haven't been able to track down.

The problem with UI not appearing was a result of the transition to TGUI however long ago that was; the proc that assures TGUI that you have the right item needed to be aware of one-tank bombs and similar, or else when you pass along an interact request it says "but you can't see it" and ignores you.
Why It's Good For The Game

Bugfixen.

The thing with the reagent dispensers only got this complicated when I realized that the plumbed fuel tank variant wasn't a subtype and therefore couldn't be rigged. And then... I basically just scaled it because the flat scale no matter the contents of the tank offended me. You could wrench open tanks, drain them entirely of fuel, rig them, and they would still go off like a pile of dynamite.

I used to have code in my branch that turned chem bombs into variants depending on the trigger, with mousetraps being mines for example. That's honestly the main reason I went out of my way to make mousetraps work better as assemblies. I could wish it were better supported, but mousetraps on grenade wiring will have to do for now.
Changelog

cl
balance: Welding fuel tank explosions have been scaled slightly down and require the fuel tanks to actually be full of welding fuel
fix: You can detonate welding fuel tanks with an igniter-sensor assembly
fix: You can reach your one-tank bomb's assembly controls by activating the item in your hand.
fix: Certain assemblies should no longer turn themselves off.
fix: Clumsy fools handling a mousetrap-based multi-part assembly may set it off by accident
/cl
2022-09-30 13:07:02 +13:00
MrMelbert
ff1ecff081 Adds support for "realistic" public elevators (elevator doors, elevator panel, etc) (#68888)
* Elevators are a bit more friendly part 1
- Emaggable elevator buttons / support for emaggable device assemblies
- Delayed travel between floors
- Elevators can now show a warning sign to areas below while travelling
- Elevators can now optionally wound heavily instead of gibbing

* Adds supoprt for "lift doors"

* Comment tweak

* Splitting these variables

* Functional prototype

* multiz debug

* Elevator button framework

* Unifies these behaviors

* Emergency doors

* Lift button framework

* UI closes on floor change

* Testing changes

* Fix

* UI Tweaks

* Panel works pretty swell

* Minor tweaks

* Move to static

* Bonus tram change

* User experience

* Slight tweak to mapload stuff

* This is silly

* Some UI tweaks, need to update css

* CSS and ui overhaul

* Documentation updates.

* Multi-z lift support

* Multitile lift fix
2022-08-09 22:32:25 -07:00
MacBlaze1
720e833d58 Allows more than two assemblies to be connected together (#65240)
This PR changes how assemblies and assembly holders work, and allows you to connect more than just a signaler and an igniter together. You could have a signaler, a repeating timer, and an igniter together to constantly produce sparks. Making the assembly holder is the same as before, but now you can add assemblies to it. This also allows signalers to be triggered via right clicking them while holding them in your active hand.
2022-03-17 13:52:26 -05:00
John Willard
6c0aba5da4 removes double spaces AFTER symbols (#62515)
* removes double spaces AFTER symbols

* found more
2021-11-03 21:09:35 -04:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
Kylerace
01f899c946 At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure (#57117) 2021-03-03 05:05:52 -08:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Arkatos
14fd4d745b Basic assembly cleanup, ui_status and ui_host fixes 2020-02-17 19:58:40 +01:00
timmyred456
aba80b9b45 Added Basic sounds to all componets. (igniter,infrared, ect)
Added pickup_sound and drop_sound to all componets using the provided sounds, they are not all unique sounds, and share the same sound files, but i think its a nice little addition,

also added these sounds to the mousetrap as it fit nicely.
2019-11-14 20:39:59 -05:00
Qustinnus
a394ccdc2b Material datum chairs & tables and applies materials to all items (Now with less pain for mining & RnD) (#46525)
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can)

this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc.

also applies materials to everything, with fixes, which can close #46299
2019-10-08 11:06:02 -04:00
Qustinnus
b33d1c49a3 [READY] Floydmats (Datum materials) & custom toolboxes (#45118)
* Initial work

* more

* ass

* wsedfwedff

* asss

* test

* stuff

* fuck

* sss

a

* kms

* asdadwedwdfwefwef

* start

* test

* dwwdew

* ewefwfef

* Redemption machine (#8)

* Redemption machine

* Removes debug messages

* changes

* fuckmyshitup

* coin mint works with new material shenanigans (#10)

* Auto stash before merge of "materials" and "origin/materials"

* woops

* furnace (#11)

* autolathe manufacturing of toolboxes

* eggs in a basket

* some small changes

* matcolors

* documentation

* more documentation and effects

* done

* Color man bad (#12)

* fixes designs

* ass

* more fixes

* fuck me

* firestacks adder

* epic fixes

* fixes designs

* DONE DIDDILY DOO

* removes category macro

* ch-ch-ch-changes

* fixes some stuff

* Fixes display of ore values (#9)

* Redemption machine

* Removes debug messages

* Re-adds value display

* Replaces the fire stacking component with an element instead (#13)

* fixes examine

* fixes ligma bugs

* double ligma boofus

* fix

* misses some defines

* fixes ORM

* Update code/datums/components/material_container.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* fixes

* Makes glass objects weaker (#14)

* Makes glass objects weaker

* uses correct proc

* fixes shit

* honk honk

* better

* oh shit oh fuck

* fixes

* fuck ORMs

* fixes the biogen

* documentation

* ass (#15)

* component

* changes

* ass

* ass

* doc

* Auto stash before merge of "materials-plasmacomponent" and "origin/materials-plasmacomponent"

* fixes rounding

* fixed
2019-07-24 11:27:01 -04:00
vuonojenmustaturska
8ddc9677c7 examine-code refactor (#44636)
* 1/4 done? maybe?

* more

* stuff

* incremental stuff

* stuff

* stuff & things

* mostly done but not yet

* stuffing

* stuffing 2: electric boogaloo

* Git Commit and the Kingdom of the Crystal Skull

* make it actually compile

* found more stuff

* fixes

* fix AI laws appearing out of order

* fix windows

* should be the remaining stuff

* this time for real

* i guess it should compile too

* fix sechuds
2019-06-19 22:07:57 +02:00
Garen Crownguard
291583440f screwdriver_act signal (#39877) 2018-08-27 05:56:45 -04:00
ShizCalev
b4d11c6eab Shows assemblies some love. ♥ (#37632)
* Shows assemblies some love.

* TRUE

* More cleanup and fixes

* feedback

* does needful

* true
2018-05-06 15:05:37 +03:00
Fox McCloud
057aa31cda Kills off /obj/item/device (#37297)
* Kills off /obj/item/device

* whoops

* whoops

* Fix
2018-04-23 15:00:23 +02:00
pigeons
6135ec864f Refactors bitflag macro values into bitshifts (#37234)
* Refactors bitflag values into bitshifts

* minor formatting edits

* Unbitshifts a macro set that skipped 3 for whatever reason
2018-04-19 18:36:35 -04:00
kevinz000
f300a5c155 Interaction/Attack Hand Refactor (#36405) 2018-03-23 11:20:54 +01:00
BordListian
65d8972b8c Enables the RPED to construct/replace beakers, igniters and bluespace crystals (#35779)
* - Makes it possible to load the rped with beakers, assemblies and other such parts

* - Fixes cell ratings being not really related to desirability

* - sorry uhhh emp cells need to be slightly better than regular cells
2018-02-23 21:35:11 +02:00
kevinz000
caa1e1f400 Massive research refactor; changes research system to techwebs; Decentralized research 2017-11-18 19:55:40 -08:00
MoreRobustThanYou
305af6e113 Removes spawns from assembly code (#31475)
* Removes spawns from assembly code

* defines
2017-10-10 14:30:27 -04:00
Ian Turk
7460f2c5b8 Replaced flags with flags_1 2017-08-16 13:01:15 -06:00
Jordan Brown
af4d9a85c9 Repaths /obj/item/weapon to /obj/item (#29929) 2017-08-16 10:38:51 -03:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Cyberboss
b86e224571 Makes qdeleted and qdestroying macros (#23666)
* Makes qdeleted and qdestroying macros

* Makes QDELETED and QDESTROYING uppercase

* Swap qdel checks istype's for != null's

* Fix it

* How was this missed?
2017-02-06 00:59:27 +13:00
oranges
395637363d Refactor out an old cooldown system (#22179)
You can do this a lot more efficiently with world time cooldowns,
avoiding the need for spawn counters
2016-12-18 10:11:50 +01:00
Mervill
09ea5ad2e5 w_class now uses defines 2016-12-01 21:33:14 -08:00
LatD
fe76e64641 Origin tech changes and some fixes 2016-05-17 20:57:01 +03:00
Razharas
6f8ce47951 New proximity code
New proximity code
2016-01-26 07:47:33 +03:00
Bjorn Neergaard
b2629a56e2 Make wires use defines, put a wire var on /atom, fix tgui ui_host runtimes 2016-01-22 19:25:33 -06:00
Bjorn Neergaard
87b0857b93 Refactor wire datums
Finish wire port and refactor wire datums to use string keys; widen color
range to support more wires and more colors.
2016-01-22 19:22:09 -06:00
bear1ake
c52c4a5346 Merge remote-tracking branch 'tgstation/master' into point-zero
Conflicts:
	code/modules/research/protolathe.dm
2015-09-12 21:07:40 +09:00
phil235
e74ca82a47 Merge branch 'master' of https://github.com/tgstation/-tg-station into ReagentReactionRuntimeFix
Conflicts:
	code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm
	icons/obj/assemblies/new_assemblies.dmi
2015-09-10 21:49:39 +02:00
bear1ake
f697ae90f5 removes a bunch of .0 2015-09-10 20:57:30 +09:00
Aranclanos
ec8aeb53bc Fixes tank transfer bombs clogging the MC and multiple infinite loops with assembly deletion. 2015-08-31 07:12:20 -03:00
c0
72c6daef8b Fastfix 2015-08-31 10:16:34 +03:00
Razharas
d1c417e996 Merge pull request #11416 from xxalpha/airlockQDEL
Added qdel(wires) to a bunch of objects Destroy proc.
2015-08-31 00:08:27 +03:00
c0
4374c96117 Fixes 2015-08-28 10:44:34 +03:00
xxalpha
19947d4fa0 Added qdel(wires) to a bunch of objects Destroy proc.
Return ..()
2015-08-27 11:10:58 +01:00
phil235
ed39df47f7 Fixes two runtimes in reagent reaction code (caused by my recent changes)
Fixes timer device not showing its countdown overlay when not attached (sprite was removed by accident probably).
Fixes timer/infrared beam/proximity sensor not being usable when freshly spawned because they weren't being processed.

Fixes infrared beam runtime (when the device is deleted the beam itself isn't, causing runtimes when crossing it).
2015-08-23 17:29:57 +02:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00