Commit Graph

2359 Commits

Author SHA1 Message Date
SkyratBot
5aeef22b2f [MIRROR] Merge MACHINE/port_gen/Initialize definitions [MDB IGNORE] (#9429)
* Merge MACHINE/port_gen/Initialize definitions (#62747)

This apparently happened in 58d0f12c5c, four year ago, where a New()
was renamed to Initialize().

Apparently in this case, the second definition runs first, and the first
definition runs in the second's parent call. Since the second immediately
calls the first as a parent call, just merging them with the first's body
first preserves behavior.

This is slightly horrifying.

* Merge MACHINE/port_gen/Initialize definitions

Co-authored-by: esainane <esainane+github@gmail.com>
2021-11-13 09:02:30 -05:00
SkyratBot
3ecaa1cca1 [MIRROR] Fix spelling on multilayer cable reset [MDB IGNORE] (#9401)
* Fix spelling on multilayer cable reset (#62721)

* Fix spelling on multilayer cable reset

Co-authored-by: esainane <esainane+github@gmail.com>
2021-11-11 21:50:14 -05:00
SkyratBot
71b5f92eda [MIRROR] [MDB IGNORE] dir sanity, primarily on WALLITEMs [MDB IGNORE] (#9315)
* [MDB IGNORE] dir sanity, primarily on WALLITEMs (#62601)

About The Pull Request

Wall items mostly use the direction from the floor to the wall in the named mapping helper. Wall items mostly use the direction from the wall to the floor for the internal dir variable.

This leads to a headache when it comes to working out what conflicts with what, and what needs placing where.

Wall frames provided a member, inverse, which specified whether or not to invert the direction of the item when looking for conflicts. It was also used to specify whether to look for conflicts outside of the wall (cameras and lights appear external to the wall) or inside the wall (most wall items). This flag was set for Intercoms, APCs, and Lights. Since APCs and Lights expect a floor-to-wall direction, and Intercoms expect a wall-to-floor direction, this means that APCs and Lights were getting the correct direction, and Intercoms were getting the wrong direction.

Some implications of this setup were:

    You could build an APC on top of another wall item, provided there was nothing external attached to the wall and the area didn't have an APC.
    You could stack Intercoms indefinitely on top of the same wall, provided you weren't in a one-tile wide corridor with something on the opposite wall.

Or both! Here's twenty Intercoms placed on the wall, and a freshly placed APC frame after placing all Intercoms and deconstructing the old APC:

endless-stack-of-intercoms

Not everything used this inverse variable to adjust to the correct direction. For example, /obj/machinery/defibrillator_mount just used a negative pixel_offset to be visually placed in the correct direction, even though the internal direction was wrong, and never set! This also let you stack an indefinite number of defib mounts on the same wall, provided it wasn't a northern wall... except you could do this to northern walls too, since defibs weren't considered a wall item for the purposes of checking collisions at all!

Ultimately, every constructable interior wall item either used this inverse variable to adjust to the correct placement, set a negative pixel_offset variable to have its offset adjusted to the correct placement, or overrode New or Initialize to run its own checks and assignment to pixel_x and pixel_y!
Inventory: Table of various paths, related paths, and the adjustments they used

Unfortunately, untangling /obj/structure/sign is going to be another major headache, and this has already exploded in scope enough already, so we can't get rid of the get_turf_pixel call just yet. This also doesn't fix problems with the special 2x1 /obj/structure/sign/barsign.

Some non-wall items have been made to use the new MAPPING_DIRECTIONAL_HELPERS as part of the directional cleanup.

tl;dr: All wall mounted items and some directional objects now use the same direction that they were labelled as. More consistent directional types everywhere.
Why It's Good For The Game

fml
Changelog

cl
refactor: Wall mounted and directional objects have undergone major internal simplification. Please report anything unusual!
fix: You can no longer stack an indefinite amount of Intercoms on the same wall.
fix: Defibrillator Mounts, Bluespace Gas Vendors, Turret Controlers, and Ticket Machines are now considered wall items.
fix: Wall mounted items on top of the wall now consistently check against other items on top of the wall, and items coming out of the wall now consistently check against other items coming out of the wall.
fix: The various directional pixel offsets within an APC, Fire Extinguisher Cabinet, Intercom, or Newscaster have been made consistent with each other.
fix: The pixel offsets of Intercoms, Fire Alarms, Fire Extinguisher Cabinets, Flashers, and Newscasters have been made consistent between roundstart and constructed instances.
fix: Constructed Turret Controls will no longer oddly overhang the wall they were placed on.
qol: Defibrillator mounts now better indicate which side of the wall they are on.
fix: Some instances where there were multiple identical lights on the same tile have been fixed to only have one.
/cl

* [MDB IGNORE] dir sanity, primarily on WALLITEMs

* apc directionals

* bluespace vendor fix

* defib fix

Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2021-11-10 17:17:26 -05:00
SkyratBot
3b655bfa17 [MIRROR] Stops the "You lack optic scanners, you get stunned" singularity proc from affecting blinded or dead mobs. [MDB IGNORE] (#9363)
* Stops the "You lack optic scanners, you get stunned" singularity proc from affecting blinded or dead mobs. (#62688)

* Stops the "You lack optic scanners, you get stunned" singularity proc from affecting blinded or dead mobs.

* oh dang

* Update singularity.dm

* Stops the "You lack optic scanners, you get stunned" singularity proc from affecting blinded or dead mobs.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2021-11-10 10:31:43 -05:00
SkyratBot
98428cdfb5 [MIRROR] Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. [MDB IGNORE] (#9298)
* Replaces a portion of C-style for loops with the more commonplace for loops, which are faster.

* Update code/modules/projectiles/boxes_magazines/_box_magazine.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2021-11-08 10:50:29 -05:00
SkyratBot
b7b6bd501f [MIRROR] removes double spaces AFTER symbols [MDB IGNORE] (#9226)
* removes double spaces AFTER symbols

* Fixing conflicts

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-11-05 18:15:12 -04:00
SkyratBot
49b23fee26 [MIRROR] Adds feedback when successfully emaging a generator [MDB IGNORE] (#9229)
* Adds feedback when successfully emaging a generator (#62524)

* Adds a span_notice when emaging a PACMAN

* Adds feedback when successfully emaging a generator.

* Adds feedback when successfully emaging a generator

Co-authored-by: Stonetear <89315023+Stonetear@users.noreply.github.com>
2021-11-04 06:52:22 -04:00
SkyratBot
e90627be0e [MIRROR] Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed [MDB IGNORE] (#9176)
* Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed

* Fixing conflicts

* Makes it compile, yeet all the RAD armor from everywhere (thanks RegEx!)

* Removing more lingering rad armor (woo)

* Damnit powerarmors

* Bye bye rad collectors!

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-11-02 10:36:46 -04:00
SkyratBot
efa1d383ce [MIRROR] [FUCK] Fixes wires not being placeable [MDB IGNORE] (#9140)
* Fixes wires not being placeable (#62455)

So, uh, well, basically, the condition was checking for something that was true in BYOND's terms when it shouldn't've been. Whoops!

We all love working power, don't we?
Fixes #62446 (Not being able to place cables at all)

* [FUCK] Fixes wires not being placeable

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2021-10-30 02:27:04 +01:00
SkyratBot
b6ffb1e31b [MIRROR] Refactor /turf/var/intact [MDB IGNORE] (#9114)
* Refactor /turf/var/intact (#62331)

Turfs have a variable, intact, which conflates three meanings:

    Determining whether there's something that can be pried out, such as directly with a crowbar or indirectly with a tile stack and a crowbar off-hand.
    Determining whether underfloor pieces are visible.
    Determining whether underfloor pieces can be interacted with - by players with tools, through interaction with effects like chemical acid, or foam.

When plating is hit with a stack of tiles, /turf/open/floor/attackby checks whether the turf is intact, and if so, ends the attack chain regardless of whether or not the attempt to hotswap a turf (with a crowbar) is successful or not. However, turfs which want the underfloor to be visible - such as catwalks and glass - set the intact variable to FALSE, and so can be repeatedly placed over one another, as if they were the first tile to be placed over the plating.

This refactors /turf/var/intact into two distinct variables:

    /turf/var/overfloor_placed, for whether or not there is something over plating.
    /turf/var/underfloor_visible, for whether or not the various underfloor pieces should be invisible, visible, or both visible and interactable.

All references to /turf/var/intact have been replaced with an equivalent overfloor_placed or underfloor_visible reference, depending on which check is appropriate. underfloor_accessibility can take one of UNDERFLOOR_HIDDEN, UNDERFLOOR_VISIBLE, or UNDERFLOOR_INTERACTABLE. This prevents cases such as acid foam or tools phasing through glass floors to affect the underfloor pieces underneath, and covers all kinds of unusual, not-wiring-visiblity usage such as Holodeck completeness, Revenant interaction, or station integrity checking.

* Refactor /turf/var/intact

* Thank

Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-10-30 00:19:21 +13:00
SkyratBot
7954d664a8 [MIRROR] removes double spaces before symbols [MDB IGNORE] (#9117)
* removes double spaces before symbols (#62397)

This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.

* removes double spaces before symbols

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-10-29 04:14:00 +01:00
SkyratBot
1d4407a29b [MIRROR] SM: Fix pressure bonus system [MDB IGNORE] (#9093)
* SM: Fix pressure bonus system (#62255)

* SM: Fix pressure bonus system

Fixes #62124 (Pressure wasn't actually doing anything)

> This is a multiplier meant to be used at low pressures.
> The lower the pressure the higher the multiplier.
> This is to encourage low pressure setups and so cold setups.
> At higher pressures (from around 100 kpa and up) it will max to 1

Current behavior is what follows.
As pressure drops, the multiplier remained at 1 until it dropped to 5.96kPa.
It then very marginally increased until it reaches x1.17 at 0kPa.

This commit introduces a system that solves the constants for the equation
based on human readable parameters, and sets provisional parameters for it. Also makes behavior better match the stated intent.

You can varedit the parameters to see the real effects of changes, just be
sure to proc call update_constants().

Constants default to what amounts to 0 so it fails loud (I WANT TO HEAR SUFFERING -Lemon)

* SM: Fix pressure bonus system

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-28 13:03:10 -04:00
SkyratBot
19a8384360 [MIRROR] Makes the American sausage a sausage subtype & Advanced roasting stick fixes [MDB IGNORE] (#8949)
* Makes the American sausage a sausage subtype & Advanced roasting stick fixes (#62193)

Makes the American sausage a proper subtype of sausage, which makes it actually edible, apparently. It also makes it stick on the advanced roasting stick!
The advanced roasting stick will no longer try to grill itself over a bonfire with a griddle installed, allowing you to use the actual bonfire for your roasting needs.

There was actually a check that was supposed to limit the amount of times you could roast a sausage to a measly 1. It wasn't actually working. This PR removes that in favor of mad cooks creating these:

* Makes the American sausage a sausage subtype & Advanced roasting stick fixes

* fixes

Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2021-10-23 00:23:39 +01:00
SkyratBot
08b4db1d91 [MIRROR] Power generation (collectors, coils, grounding rods) cleanup [MDB IGNORE] (#8871)
* Power generation (collectors, coils, grounding rods) cleanup (#62144)

* Energy collection: Mass rework

Radiation Collectors and Tesla Coils are now subtyles of a common
energy_accumulator type. This type combines common code such as smoothing
output over energy received, computing power output, and handling wire
connections.

Inline calculations using machine energy units are now performed by
common math functions in maths.dm. Rather than reference 0.1,
1 SECONDS is used to make it clear this is to calculate to and from
tickrate dependent units.

Constants which are written in terms of tickrate dependent units are now
written in terms of joules, and use these helpers to convert to and from
these units. With SSmachines.wait / (1 SECONDS) being 2, this usually
means doubling the values of constants which were previously defined in
terms of machine energy units.

* Energy collection: Map path update

> git ls-files | grep dmm | xargs sed -i 's1rad_collector1energy_accumulator/&1g'
> git ls-files | grep dmm | xargs sed -i 's1tesla_coil1energy_accumulator/&1g'
> git ls-files | grep dmm | xargs sed -i 's1grounding_rod1energy_accumulator/&1g'

* Power generation (collectors, coils, grounding rods) cleanup

* object path update (#8882)

* [MDB IGNORE] Missed some paths (#8886)

* object path update

* oops missed a couple paths

Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: ORCACommander <orcacommander1@gmail.com>
2021-10-17 23:17:02 +01:00
SkyratBot
227fa82fa9 [MIRROR] SM: Randomly damage/heal on dusting a Clown [MDB IGNORE] (#8894)
* SM: Randomly damage/heal on dusting a Clown (#62178)

When the SM dusts a true Clown (HoP assignment doesn't count), it randomly takes from -300 to 300 damage.

* SM: Randomly damage/heal on dusting a Clown

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-17 23:15:59 +01:00
SkyratBot
05378f6034 [MIRROR] SM Zap: Fix forked target selection [MDB IGNORE] (#8869)
* SM Zap: Fix forked target selection (#62143)

Supermatter forked lightning can now hit targets previously used by a sibling.

The default setup - and anything using two grounding rods - was still entirely safe, as "pass by ref begone" code did allow target reuse in ancestors. Any split could only exclude one grounding rod, and if one branch split again, neither branch's targets would be passed back to the target list of the first split.

The same issue was not present in `proc/tesla_zap`. Probably still shouldn't have two of these, though.

* SM Zap: Fix forked target selection

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-16 20:37:49 -04:00
SkyratBot
230a34588f [MIRROR] modules/atmospherics major cleanup [MDB IGNORE] (#8818)
* modules/atmospherics major cleanup

* E

* E

* 0

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-10-14 22:44:30 +01:00
SkyratBot
feb3aa2489 [MIRROR] Bullets only directly damage the SM so much [MDB IGNORE] (#8809)
* Bullets only directly damage the SM so much (#62079)

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

* Bullets only directly damage the SM so much

Co-authored-by: Maurukas <66576896+Maurukas@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2021-10-14 15:07:51 +01:00
Pinta
6bb61699a9 [MOSTLY MODULAR][REFACTOR] Refactors Mediguns into a subtype of Cell-Loaded guns. (#8724)
* The start

* More work

* firing modes

* Now displays ammo type when swapping and examining

* code refactoring

* replaces a bunch of code

* custom medicell text

* Update emitter.dm

* removes some testing stuff that isn't needed anymore

* repaths medicells

* This bothered me

* now uses conversion kit framework from https://github.com/Skyrat-SS13/Skyrat-tg/pull/8506/files instead of crafting
2021-10-13 20:20:57 +01:00
SkyratBot
6cdded2bad [MIRROR] no more regal rat runtimes, and, cheeeeeeeeeeeese can now be eaten by it [MDB IGNORE] (#8793)
* no more regal rat runtimes, and, cheeeeeeeeeeeese can now be eaten by it (#62032)

* no more regal rat runtimes, and, cheeeeeeeeeeeese can now be eaten by it

Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com>
2021-10-13 19:09:58 +01:00
SkyratBot
e95434e3ca [MIRROR] re-adds the yellow slimecore as an EMP-proof cell [MDB IGNORE] (#8785)
* re-adds the yellow slimecore as an EMP-proof cell (#62013)

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

* re-adds the yellow slimecore as an EMP-proof cell

Co-authored-by: Invalid <51190031+InvalidArgument3@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2021-10-13 19:09:51 +01:00
SkyratBot
211ab982c7 [MIRROR] lower sound level of coils, add a cooldown to avoid overlapping sounds [MDB IGNORE] (#8777)
* lower sound level of coils, add a cooldown to avoid overlapping sounds (#62002)

Add a calculation to the coil sound and extrarange so that they are not deafening
Thanks to the discord user @ hawk#1896 for the sound calculations

Less deafening sounds and better feedback to the players (louder zaps mean higher power output)

* lower sound level of coils, add a cooldown to avoid overlapping sounds

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
2021-10-13 19:08:40 +01:00
SkyratBot
58c7729d88 [MIRROR] Rad collectors gone, tesla coils to generate power [MDB IGNORE] (#8697)
* Rad collectors gone, tesla coils to generate power (#61917)

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

* Rad collectors gone, tesla coils to generate power

* replaces rad collectors

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Kat <evesovereign@hotmail.co.uk>
2021-10-10 17:13:06 +01:00
SkyratBot
1f0529edf6 [MIRROR] SM: Prevent unmovable SM variants from moving, round 2 [MDB IGNORE] (#8739)
* SM: Prevent unmovable SM variants from moving (#62000)

Previously, a hostile statue could move it by bumping into it. It would
still be dusted, but this left open the possibility of supposedly
immobile engines moving, albeit slowly and expensively.

* SM: Prevent unmovable SM variants from moving, round 2

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-10 15:39:00 +01:00
SkyratBot
16fcccbb3c [MIRROR] APC: Remove a useless null check [MDB IGNORE] (#8706)
* APC: Remove a useless null check (#61965)

You literally return if !home 4 lines above aaaaaaaaaaaaaaaaaaaaaaaaaaaa

* APC: Remove a useless null check

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-09 09:16:51 -04:00
SkyratBot
3c4865d797 [MIRROR] SM: Prevent unmovable SM variants from moving [MDB IGNORE] (#8708)
* SM: Prevent unmovable SM variants from moving (#61970)

Previously, a hostile statue could move it by bumping into it. It would still be dusted, but this left open the possibility of supposedly immobile engines moving, albeit slowly and expensively.

Hostile Statues have a move_force of 9000, but continued to be able to bump the SM until move_force was varedited to 1999 or below. This means (at least) immovable rods and all megafauna could all bump an "immobile" SM one tile per life.

* SM: Prevent unmovable SM variants from moving

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-09 09:15:57 -04:00
SkyratBot
95ab2d2efb [MIRROR] Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. [MDB IGNORE] (#8714)
* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. (#61943)

* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-10-09 09:11:52 -04:00
SkyratBot
cc93b11d23 [MIRROR] _HELPERS/unsorted.dm has been sorted [MDB IGNORE] (#8627)
* _HELPERS/unsorted.dm has been sorted

* Feexing conflicts

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-10-06 22:07:01 +01:00
SkyratBot
d85ff7bcfc [MIRROR] Fix cable restraint not rendering in crafting menu [MDB IGNORE] (#8583)
* Fix cable restraint not rendering in crafting menu (#61842)

Fixed the cable restraints not showing up in the radial crafting menu. This was caused by the cable restraint (cuff) icon being moved to the restraint.dmi file - I didn't see this old reference elsewhere in the code. (first TG commit, please let me know if I am missing anything.

* Fix cable restraint not rendering in crafting menu

Co-authored-by: Peter <30943236+PeterMorrison1@users.noreply.github.com>
2021-10-03 23:00:42 +01:00
SkyratBot
1231c6fa58 [MIRROR] Add local APC cache to /area [MDB IGNORE] (#8550)
* Add local APC cache to /area (#61655)

About The Pull Request

for(var/obj/machinery/power/apc/APC in GLOB.apcs_list) in get_apc makes chuck norris shed a tear
Why It's Good For The Game

tears are bad
Changelog

cl
code: /area now retains a local reference to the APC in the area, if any
/cl

* Add local APC cache to /area

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-02 02:34:42 +01:00
SkyratBot
6a3a1aed83 Rendering refactor P1: Plane unification and render relaying (pictures and video included) (#8479)
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-10-01 00:08:39 +01:00
SkyratBot
e68e985ddc [MIRROR] Fix being shocked while laying cables having a 50% chance to give you two cables instead of one. [MDB IGNORE] (#8483)
* Fix being shocked while laying cables having a 50% chance to give you two cables instead of one. (#61754)

Title

deconstruct already gives cable

* Fix being shocked while laying cables having a 50% chance to give you two cables instead of one.

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
2021-09-29 11:55:11 -04:00
SkyratBot
c23bd1cb8c [MIRROR] every case of initialize that should have mapload, does (#8374)
* every case of initialize that should have mapload, does

* E

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-24 23:07:53 +01:00
SkyratBot
e8d78089fc [MIRROR] [TM Candidate] Overhauls orbit and POI code to fix part of issue #61508 where players could observe /mob/living/new_player on the lobby. (#8339)
* [TM Candidate] Overhauls orbit and POI code to fix part of issue #61508 where players could observe /mob/living/new_player on the lobby.

* E

* Missed merge

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-24 18:16:17 +01:00
SkyratBot
7ffa436d0a [MIRROR] memories are no longer added if the target isn't aware of them. (#8299)
* memories are no longer added if the target isn't aware of them. (#61375)

Fixing an oversight with the memories system. Memories shouldn't be added to people who aren't possibly aware of them.

* memories are no longer added if the target isn't aware of them.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2021-09-20 23:21:27 +01:00
SkyratBot
0a2eca44a9 [MIRROR] The pinpointer once again tracks shunted AIs (#8215)
* The pinpointer once again tracks shunted AIs (#61454)

* The pinpointer once again tracks shunted AIs

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-09-17 21:02:34 +01:00
SkyratBot
baf91da388 [MIRROR] Fixes (somehow) killing nar-sie in the last second not properly clearing the hostile environment (#8159)
* Fixes (somehow) killing nar-sie in the last second not properly clearing the hostile environment (#61116)

Someone forgot to add GLOB.cult_narsie so I think what would happen is, despite narsie being dead, the shuttle wouldn't leave.

Was a non issue because the round ends if nar nar is last minute killed. There is not enough time for the shuttle to even leave.

That said, unimportant failures are still failures, so let's get going

* Fixes (somehow) killing nar-sie in the last second not properly clearing the hostile environment

Co-authored-by: FlamingLily <80451102+FlamingLily@users.noreply.github.com>
2021-09-15 03:29:19 +01:00
SkyratBot
e510e35167 [MIRROR] [READY] Adds memory system, and engraving walls with chisels (#8066)
* [READY] Adds memory system, and engraving walls with chisels

* EEE

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-13 23:36:51 +01:00
Gandalf
8eb1a428f3 Revert "Revert "[MIRROR] Refactor area and turf lighting"" (#8063)
* Revert "Revert "[MIRROR] Refactor area and turf lighting (#7775)" (#7902)"

This reverts commit 64c4c52d12.

* This should probably fix it

* I love linters

Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-09-10 19:01:18 -04:00
Jérémie Hakier
5cedaa840f The ultimate sin 2021-09-10 17:42:34 -04:00
SkyratBot
04302a770a [MIRROR] moves obj_integrity and associated procs to the atom level (#8016)
* moves obj_integrity and associated procs to the atom level

* Feex good

* Whoops forgot the maps

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-10 16:47:01 +01:00
jjpark-kb
652d7a7fbb less destructive rodstopper (#8085) 2021-09-10 15:47:53 +01:00
Gandalf
64c4c52d12 Revert "[MIRROR] Refactor area and turf lighting (#7775)" (#7902)
This reverts commit 1219e433be.
2021-09-08 18:48:29 +01:00
SkyratBot
a2aaacdead [MIRROR] large refactor of machine/power code to cut down on processing time and wasted lists (#7920)
* large refactor of machine/power code to cut down on processing time and wasted lists (#60317)

original pr here: #59789 (Closed because he didn't think it was good enough)
came back to this because i realized that

    all machines were area sensitive, meaning they had a list with at least a reference to themselves (assuming they arent in the contents of another movable which most arent) for the purposes of handling power differences when their area changes
    pipes are machines
    there are ~14k machines and ~6k pipes
    i made this problem worse with a recent pr by making it a nested list

so i needed to track what machines needed power, and this pr had work already done that could be used for that purpose. now machines that have use_power == NO_POWER_USE do not have this extra memory overhead for no reason

currently every machine that uses power draws that amount from its area from a dynamic channel via auto_use_power() which is called every SSmachines fire(), then in apc/process() the area's dynamic power draw is reset and the power is used. with static power its not calculated then reset every loop, its just taken from the grid. so now machines handle updating their static power usage from their current area (this doesnt touch power machines that require a wire connection). in order to allow this, use_power, idle_power_usage, and active_power_usage have setters to track state correctly and update the static power usage on the machines current area and handle area sensitivity.

also goes through a lot of heavy abusers of SSmachine processing time and tries to make it faster. makes airalarm/process() into a signal handler for COMSIG_TURF_EXPOSE since air alarms only need to process for changes.
Why It's Good For The Game

SSmachines isnt the heaviest hitter in terms of total cpu and certainly not in terms of overtime, but its not a lightweight. it frequently takes > 50ms to complete a run and seems to be in the top 5 or so of subsystem costs looking at some round profilers

also gets rid of a few thousand lists since every pipe no longer has two useless lists each (and any other machines that dont use power)

Love ya kyler

Co-authored-by: Rohesie <rohesie@ gmail.com>

* large refactor of machine/power code to cut down on processing time and wasted lists

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Rohesie <rohesie@ gmail.com>
2021-09-02 03:11:59 +01:00
SkyratBot
eae7233c5b [MIRROR] small refactor to can_interact() so that borg range is fully respected (#7891)
* small refactor to can_interact() so that borg range is fully respected (#60693)

Its a relatively small refactor that changes the previous machinery "can_interact()" proc that literally did a full override despite half of their checks already existing in not one, but TWO parent procs, so i removed the redundant checks, added callbacks to its parents and then added the cyborg range check on the can_interact_with() itself. in doing so i also moved the interaction range var from silicons only, to mobs as a whole and defaulted it to a single tile, silicons override it to 7 (so pAIs and borgs like before) but then set AI and AI.eye to "null", because i have a check in can_interact that if there is no range set, then the range is effectively unlimited. and i even added code for when AI is carded and their wireless transmission is disabled it sets their range to "0" aka, it has no range to do anything even if it could

this was really complicated for me so despite my extensive testing it probably would be a bad thing if any of you want to test my code yourself to ensure there isnt a bug with this (theres no runtimes ive come across)

note: i did a lot of searching and going through machinery to ensure i caught all the little snowflake overrides and added can_interact() checks to them, but i may have missed one or two things, especially maybe a altclick or ctrlclick somewhere, however i believe i caught most of them

one nice side effect of this refactor is that you can actually set another mobs range to something other than 1 tile and they can interact at range, rather than only silicons getting this ability, an admin could VV a human to have a 3 tile arm reach as a meme if they want

* small refactor to can_interact() so that borg range is fully respected

Co-authored-by: 小月猫 <alina.r.starkova@gmail.com>
2021-08-31 20:26:36 +01:00
SkyratBot
1219e433be [MIRROR] Refactor area and turf lighting (#7775)
* Refactor area and turf lighting

* AAAAAAAA

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-29 00:43:40 +01:00
SkyratBot
8820e84ded [MIRROR] fixed field generators (#7807)
* Update field_generator.dm (#60918)

* fixed field generators

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2021-08-27 10:34:17 -04:00
SkyratBot
a2388b9961 Fixes solar stacking (#60799) (#7667)
Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
2021-08-20 18:53:55 +01:00
SkyratBot
75a4f842aa unused proc begone (#60843) (#7666)
Co-authored-by: Colovorat <lolqwert569@gmail.com>

Co-authored-by: Colovorat <35225170+Colovorat@users.noreply.github.com>
Co-authored-by: Colovorat <lolqwert569@gmail.com>
2021-08-20 18:53:46 +01:00
SkyratBot
169c42a262 [MIRROR] Refactors connect_loc_behalf into a component (#7613)
* Refactors connect_loc_behalf into a component (#60678)

See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)

* Update glass.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 20:29:11 +01:00