130 Commits

Author SHA1 Message Date
Spookerton ebbf0e33fb between() -> clamp() & swaps args 1 and 2 in uses 2024-02-05 15:47:07 +00:00
Spookerton 978f4511a5 examine signature changed to include distance
- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
2024-01-31 13:49:52 +00:00
spookerton 1ccb2df2de trivial 1:1 overlays -> overlay proc changes
NB. In some cases we go from a more complex image() to a single icon_state string and I assume this works for every case but do not care to check because of the sheer scale of extra fiddly effort. Buyer beware, not my code.
2022-04-24 07:50:21 +01:00
atermonera 7a9806d9b4 Removes weapons 2022-04-17 19:14:32 -08:00
atermonera c7f1880394 Revert "What was supposed to be another straightforward major system overhaul that once again spiraled out of control (#8220)"
This reverts commit 4d8c43f106.
2022-03-29 16:01:32 -08:00
atermonera 61e12c7839 Fixes powertool sprites, fixes unfastening atmospheric devices 2022-02-05 14:18:10 -08:00
Atermonera 4d8c43f106 What was supposed to be another straightforward major system overhaul that once again spiraled out of control (#8220)
* get_tool_quality has numerical meaning

* Basic tools set tool quality

* Toolspeed is replaced by tool quality checks

* Addresses assorted results from live test

* Extra cleanup
2022-01-16 15:52:55 -08:00
MistakeNot4892 2f0a618d45 /atom New() => Initialize() [MDB IGNORE] (#8298)
* Find and replace argless atom New() to Initialize().

* Manual replacement of no-arg New() to Initialize().

* Manually replacing remaining New() overrides.

* Fixing linter issues with now-removed New() args.

* Tidying area init overrides.

* Porting Neb's atom subsystem.

* Trying to isolate init problems.

* Adjusting Init code post-test.

* Merging duplicate Initialize() procs.

* Merge resolution.
2021-11-14 00:09:14 -08:00
MarinaGryphon 593246b595 Linter diagnostics + bans non-var relative pathing (#8150)
* Linter diagnostics + bans non-var relative pathing

* Enable DreamChecker Annotations

* make it executable

* update hashFiles

* oops

* tries to fix it... again

* trying again

* path

* repath

* fix perms

* fixes weird capitalisation issue
2021-06-20 13:14:29 -09:00
Neerti fdabe51ee8 Linter Introduction + Cleanup (#8085)
* Adds linter defines to repo.

* Uncomments linter defines already in the code.

* Resolves unreachable code linter errors.

* Nukes decade+ old syndie specops code except for computer since that's mapped in?????

* Resolves procs has no parent linter error.

* Proc signature fixes

* Bad comments

* "In" danger

* Type safety

* Implied nested list abuse

* Top level ..() usage

* Sleepy coder typos

* Invalid kwargs calls

* Pointless returns

* Linter hacks (see full message)

Byond doesn't care and it has no effect but linter doesn't like var/proc
for holding references to procs, despite that it's valid byond code.

Also, the linter seems to have serious issues figuring out relative
proc names. This commit is a sort of take-it-or-leave-it thing. It's not
required, it just cuts down on warnings, but this code is valid DM code.

* WHATEVER THIS IS

* Trick dreamchecker linter into ignoring this file's sins in it's weird use of vars

* Fix list decoration syntax - Its a list, not list of lists

- To declare that a var is a list you can `var/list/blah = list()` syntax or the `var/blah[0]` syntax.  Both do exactly the same thing. But if you do `var/list/blah[0]` that is just like doing `var/list/list/blah = list()`

* Hopefully stops the ai holder subtype folder from going quantum and sometimes changes capitalization over time, and incidentally causing 20+ linter errors.

* Fixes unwrapped negated object in list linter error.

* Resolves colon-like list accessing linter error.

* Turns linter on in linter config.

* Fixes closet indentation properly and cleans up suit storage unit switch.

Co-authored-by: Aronai Sieyes <arokha@arokha.com>
Co-authored-by: Leshana <Leshana@users.noreply.github.com>
2021-05-25 18:17:26 -09:00
ShadowLarkens dad9020f9a TGUI Engineering... and a bunch of other random things 2020-10-21 13:02:19 -07:00
Aronai Sieyes 6c6644f86c Rewrite examine() to pass a list around (#7038) 2020-04-29 13:42:16 -07:00
Atermonera 8b1d3a3908 Merge pull request #7006 from VOREStation/pol-powersprites
Ports some power.dmi sprites from Bay
2020-04-28 14:56:31 -07:00
Aronai Sieyes 51846b4bfe Port some power sprites from Bay 2020-04-27 10:50:56 -04:00
Aronai Sieyes c9086829ec Convert some telecomms constants into defines 2020-04-27 10:34:13 -04:00
Aronai Sieyes 1abf90b306 Add 2 new pipe types 2020-04-05 22:50:11 -04:00
Aronai Sieyes ad5f0485f7 Clean up things 2020-03-25 22:10:56 -04:00
Leshana 938384cb1b In fact lets use the constants instead of bare numbers for use_power everywhere. 2020-03-21 19:41:01 -04:00
Leshana c2d16acdca Always call update_use_power() instead of directly setting the use_power var.
- This will let us react to the change appropriately.
- While we're here, lets define some constants so we can stop using bare numbers.
- Always use those constants when calling update_use_power()
2020-03-21 16:40:22 -04:00
Arokha Sieyes 5b15917d32 to_chat replacing stream operator 2020-02-17 13:14:08 -05:00
Atermonera acf5b7d836 Unregulated passive regulators don't limit flow (#6657) 2020-02-02 14:09:28 -08:00
Shadow 46d7ca5d31 Round Two 2020-01-11 11:53:07 -06:00
kevinz000 46c79c7d3e [READY]Makes a bunch of processes subsystems instead (#5814
* Converts various New() definitions to Initialization()
* Adds absolute pathing
2019-01-15 22:58:06 -08:00
Neerti 8ec3691911 Merge pull request #5770 from Atermonera/standard_rotation
Standardizes rotation verbs
2018-12-28 04:36:52 -05:00
atermonera b8c9bb6c31 Standardizes rotation verbs 2018-12-08 21:27:10 -08:00
kevinz000 c2c688c4c8 caps 2018-12-06 18:34:37 -08:00
Atermonera de65c3c643 NanoUI now processes again 2018-08-25 21:13:16 -07:00
Anewbe 729ce71aa0 Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format 2018-08-02 21:45:15 -05:00
Leshana 776b221828 Rewrite pipe construction
- Moved pipe construction defines into __defines/construction.dm
- Unified pipe *unwrenching* by creating a standard proc along with the `construction_type` var.
- Eliminated the pipe fitting name & icon_state lookup tables by adding `pipe_state` var on atmos machinery and referencing that.
    - Each pipe which can be made from a fitting object should override `pipe_state` with the icon state to be used on the pipe fitting object.
- Eliminated the giant switch statement of doom in pipe construction by delegating that work to `on_construction` proc.
    - To make this work, every pipe must implement `get_neighbor_nodes_for_init` which returns a list of nodes which should be re-initialized on that pipe's construction.
- Combined the SCRUBBERS, SUPPLY and REGULAR pipe fitting classes together by storing the `piping_layer` variable and using the `setPipingLayer` procs
- Standardized the code for searching for node neighbors into the `can_be_node` proc.
    - This proc is also improved in that is a mutual check, `check_connectable` is called on BOTH objects, so they have to mutually agree to connect as nodes. Eliminates lots of special edge case logic.
    - Updated all the `amos_init` procs to use `can_be_node`.  In the most common cases, even that boilerplate code is consolidated into the `STANDARD_ATMOS_CHOOSE_NODE` macro.
- Implemented `pipe_flags` which lets pipes declare (or override) certain requirements.
- Adds a "pipe_recipe" datum to help out things that construct pipes.  By taking it out of the dispenser, we open the road for multiple dispenser types.  No, no RPD yet.  Soon.
    - Enhances the pipe dispenser to operate on pipe recipe datums instead of hard coded lists of pipes it can construct.   These datums are also (partially) initialized from the pipe machine types themselves, reducing having to define stuff in multiple places.
    - Switched pipe dispenser UI to use browse().   Not a NanoUI, but makes it a bit prettier with low effort.
    - Changed pipe dispenser to use a button selector to switch between Regular/Scrubbers/Supply instead of having separate list items.
- Added icon states to HE pipes to support the "connected on neither side" state.
2018-03-20 23:29:27 -04:00
Leshana 5847319443 Update every initialize() proc to return an initialize hint.
* Yes, all of them.
* Also did a few corrections to redundant New() and broken Destroy() along the way
* Renamed the turf_initializer.initialize() proc to InitializeTurf to avoid confusion.
* Subsumed /area/proc/initialize into /atom/proc/initialize() - Made /area's LateInitialize to get same behavior as before.
2018-02-05 15:50:13 -05:00
Leshana ab87edeae9 Fix construction of HE pipes, Vents, and Scrubbers Plus qdel issues.
The initialize() routines of HE pipes, vents an scrubbers need to be atmos_init() after all.
If you register yourself with radio controller you need to de-register yourself too.
2018-01-19 23:45:40 -05:00
Leshana 224fe42e77 Prepare Atmospherics Machinery for SSatoms (#4501)
* to_chat() replacement.

* Revert calling target.init_dir() before connecting.

* This change was added in https://github.com/PolarisSS13/Polaris/pull/3775 to counteract `dir` not being set prior to New() for dynamically loaded maps.  The root cause was /atom/New() not calling _preloader.load().  Undoing the change now that /atom/New() is fixed.
* The addition of the init_dir() proc itself however, is useful, because there ARE other times some atmos machinery will want to re-initialize its dir, specifically whenever it is rotated.
* init_dir() must be called in the constructor of all atmospherics machines capable of connecting to another.   Since it has to happen for ALL machines, lets move that call to /obj/machinery/atmospherics/New()

* Rename /obj/machinery/atmospherics initialize() to atmos_init()

* These days `initialize()` is used to handle general object initialization that is moved outside of New().  The node connection discovery of atmos machinery needs to happen after all that, and so needs to be in a separate proc.
* Make sure to actually call atmos_init during system startup.
2018-01-06 10:52:56 -06:00
killer653 fb8ba69ada Fixes all the other stuff 2017-10-15 20:56:13 -04:00
Anewbe f3b989f33e Merge pull request #3809 from Cyantime/unwrench
Fixes pipe caps to always be removable
2017-09-11 17:21:10 -04:00
Cyantime 82626c6936 Removes pipe pressure check copypaste. Fixes pipe caps to always be removable. 2017-09-09 21:24:52 -04:00
Neerti 1bc28c07c0 Port's TG's Maploader 2017-09-08 12:49:26 -04:00
Neerti 99eb6f9404 Updates Tools
Adds toolspeed var, which is a multiplier on how 'fast' the tool works.  0.5 means it goes twice as fast.
Adds usesound var, which determines what sound is used when a tool is being used.
Changes a lot of code to use those two vars instead.
Adds 'ayyy' tools, which are ported from /tg/'s abductor gamemode.  They're currently admin only but I might make them obtainable by xenoarch later.
Adds powertools, also from /tg/.  CE starts with them in a new toolbelt that spawns in their locker, ported from (you guessed it) /tg/.
Changes welder sprites to look nicer, ported yet again from /tg/.  Modified the blue welder slightly so it can be the electric welder sprite.
Adds various sounds from /tg/, for tools and welders.
2017-08-03 04:49:23 -04:00
Leshana 8752999a14 Atmospherics Destroy() cleanup - return qdel hints. 2017-06-05 23:01:39 -04:00
Zuhayr 18c2f33eab Ported ventcrawling from vg. 2016-09-21 17:16:03 +01:00
Neerti 0a389a418b Revert "Ported ventcrawling from vg." 2016-09-20 17:21:58 -04:00
Zuhayr 843c48a9ee Ported ventcrawling from vg. 2016-09-16 04:05:49 +01:00
mwerezak 5603884095 Removes #undefine 2015-08-18 17:20:39 -04:00
Zuhayr 3b712adb5f Removed intact var in favour of is_plating() proc, fixed issues with invisible initialized pipes. 2015-08-16 17:51:19 -07:00
PsiOmega cee5f1a057 Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts:
	code/game/objects/items.dm
2015-07-06 18:33:09 +02:00
PsiOmega cdb4270f48 Merge remote-tracking branch 'upstream/master' into dev-freeze 2015-07-06 17:31:41 +02:00
mwerezak bd59733fdb Fixes #9714
Fixes incorrect arguments to calculate_transfer_moles()
2015-07-05 01:18:38 -04:00
GinjaNinja32 81d23c85cc code/ATMOSPHERICS \red \blue etc to span classes 2015-05-29 19:36:15 +01:00
PsiOmega 1ae0ad6d92 Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
2015-04-24 09:59:05 +02:00
PsiOmega 4326b8c5d8 Merge remote-tracking branch 'upstream/master' into dev-freeze 2015-04-03 09:22:23 +02:00
mwerezak a116723fcd Updates canister process() to use atmos helper procs 2015-04-02 00:04:44 -04:00