* [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>
* the gluttony ruin is no longer radioactive (#62692)
* fun for the whole family
* renamed a variable
* the gluttony ruin is no longer radioactive
Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
* Misc Map Merge and Turf fixes for Icebox (#62490)
Fix insidious dup APC in Icebox Port Maint
Fix golden violin that's been embedded in the wall for > 1 year
Adjusts genturf areas to the north of the station so that the gulag doesn't vent due to chasms
Fix a stray genturf in the bar
Fix some more stray genturfs in Icemoon Below
Fix an ultra-spooky Active Turf in the Plasma facility ruin
* Icebox map merge, AT and genturf cleanup
Co-authored-by: Vire <66576896+Maurukas@users.noreply.github.com>
* 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>
* Removes "Singularity and Tesla for Dummies" manual book (#62308)
This PR removes the manual "Singularity and Tesla for Dummies" from the game. It also removes it from the two places it spawns: Engineering in DeltaStation and an Ice Ruin.
Also this is my first PR and I have little experience with DM so please be nice
Why It's Good For The Game
The Singularity and Tesla engines were removed from the game a while ago, so having these books in game is unnessessary
Also, opening the book shows a huge-ass "Tesla and singularity engines have been removed!" message front and center.
* Removes "Singularity and Tesla for Dummies" manual book
* book burning 1984
Co-authored-by: malton33 <44654353+malton33@users.noreply.github.com>
Co-authored-by: Kat <evesovereign@hotmail.co.uk>
* 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>
* 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>
* Abandoned Zoo ruin: Fix tile duplication (#61833)
The abandoned zoo had a tile which contained two copies of an APC, rack,
stun prod, and wire cable. This removes one of each, fixing warnings
about APCs and powernets.
* Abandoned Zoo ruin: Fix tile duplication
Co-authored-by: esainane <esainane+github@gmail.com>
* Derelict: Remove duplicate APCs (#61733)
Two APCs were fighting for control over
`/area/ruin/space/derelict/bridge/access` at (66,80) and (63,61).
This removes the APC at (63,61) and the two wires leading up to it.
Two APCs were fighting for control over
`/area/ruin/space/derelict/hallway/secondary` at (35,23) and (58,24).
This removes the APC at (58,24), which is directly over a wire path,
so does not require any power cables to be removed.
* Derelict: Remove duplicate APCs
Co-authored-by: esainane <esainane+github@gmail.com>
* Fix Atmos Tanks Connecting to pipenets when mapped [MDB IGNORE] (#61646)
## About The Pull Request
Fixes#61594#59556 changed atmos tanks so that they do not automatically connect to adjacent pipes, but can support up to 4 directional connection, and merge with neighboring tanks to form one large one. Old tanks would connect based on their dir variable. New tanks would not. A work around was to varedit both dir *and* initialize_direction variables to the same value in the map editor - but this is not expected behavior for mapping.
This adds a check for mapload in the tank's initialize proc. If the tank is initializing during mapload, dir will be copied to initialize_directions (as it is in most other atmos devices), and the tank will connect in the specified direction(s).
The behavior of player constructed tanks is unchanged.
## Why It's Good For The Game
The primary purpose of these large, constructed atmos tanks is to provide a bulk source of gas to a map, such as a plasma tank for the incinerator, or air supply tanks to ruins or disconnected parts of the station. This enables them to be readily used for their purpose.
This fixes the 41 broken atmospheric tanks currently mapped in the codebase.
* Fix Atmos Tanks Connecting to pipenets when mapped [MDB IGNORE]
Co-authored-by: Maurukas <66576896+Maurukas@users.noreply.github.com>
* Mapping DLC - Random Spawner Pack [MDB IGNORE] (#60522)
First off, I am aware of the Feature Freeze for this month. This PR was initially started in #60401 about a month ago to break the changes into smaller PRs. The end result for this PR is a poor man's attempt at roguelike procedural generation. Enjoy!
Link to the README for how the new spawner system works.
Added the following new random mapping spawners:
pen, crayon, stamp, paper, pamphlet, briefcase, folder, wardrobe closet, wardrobe closet colored, backpack, narcotics, permabrig_weapon, permabrig_gear, prison, material, carpet, ornament, generic decoration, statue, showcase, paint, tool, tool_advanced, tool_rare, material_cheap, material, material_rare, toolbox, flashlight, canister, tank, vending_restock, atmospherics_portable, tracking_beacon, musical_instrument, gambling, coin, money_small, money, money_large, drugs, dice, cigarette_pack, cigarette, cigar, wallet_lighter, lighter, wallet_storage, deck, toy, toy_figure, booze, snack, condiment, cups, minor_healing, injector, surgery_tool, surgery_tool_advanced, surgery_tool_rare, firstaid_rare, firstaid, patient_stretcher, medical supplies, crate, crate_abandoned, girder, grille, lattice, spare_parts, table_or_rack, table, table_fancy, tank_holder, crate_empty, crate_loot, closet_private, closet_hallway, closet_empty, closet_maintencne, chair, chair_maintence, chair_flipped, chair_comfy, barricade, data_disk, graffiti, mopbucket, caution_sign, bucket, soap, box, bin, janitor_supplies, soup, salad, dinner
Removed deprecated wizard trap, vault, and armory spawners.
* Mapping DLC - Random Spawner Pack [MDB IGNORE]
* HNNGH
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Off-station (ruins) shield wall gens start unlocked (#61312)
Adds a variant of shield wall generators (the kind in xenobio and the teleporter) without access restrictions, for use in ruins.
Consistency with most things in space not having access requirements. Given its use is limited to the RD, captain, or silicons, having a bunch of them in space and unusable is not really sensible. Unlocks the few in away missions as well (and in one case turns a varedited one into just the unlocked one)
* Off-station (ruins) shield wall gens start unlocked
Co-authored-by: YakumoChen <king_yoshi42@yahoo.com>
* Baton refactor. item/melee/baton is now a subtype of item/melee/baton (formerly classic_baton)
* EEEE
* E
* follow the fucking guidelines
* E
* Update CentCom_skyrat.dmm
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Repaths everything referring to "toxins" while actually meaning either the room in science or plasma gas. While this PR might be disrespectful to our forefathers, given this is (I believe) a holdover from as far back as the Exadv1 days, this has constantly irked me since I started working with the code. None of the player-facing stuff has referred to plasma as toxin since before 4407 hit, besides the Toxins Lab, and yet all of the type-paths are still pointing at toxins, making it a nightmare to search for in a map editor, and making the code needlessly easy to confuse with that of toxin damage. So this just fires it into the sun.
Anything relating to Toxins, the science subdepartment, now makes reference to Ordnance instead. This felt fitting enough given the focus of the subdepartment is around the creation of and testing of explosives.
Anything relating to plasma gas has, fittingly, been made to refer to plasma gas.
Edit: Ah yes, I feel I should probably apologise off the bat for the size of this PR- the code touched is mostly atmos machinery and simplemobs, a few sprites here and there, and of course the station maps + a few offstation maps.
Makes the code more legible and makes mapping less painful.
(The payment has been made)
Co-authored-by: EOBGames <58124831+EOBGames@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* start of reagent forging
* reagent forging
* add the three items to ashwalker den
* try again
* ore smelting, and more
* sorry trace, buffs primitive
* more changes
* gosh, camelCase will always be the best
This is a first addition to help add a little more to the space ruins we currently have. It's my first ever attempt at making any sort of map for ss13, so it will definitely not be the same level of polish as other ruins.
That being said, as I learn to make more maps, these ruins will see a revamp.
* Adds baseturf helpers to the lavaland syndie base and seed vault (#60419)
* Adds baseturf helpers to the lavaland syndie base and seed vault
Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
* Replace bespoke maintenance loot types with hardcoded ones (#60295)
Some older templates, and a couple of shuttle templates used a custom
type syntax on the map to set up maintenance loot with a higher loot
count.
However, these x3, x4, etc. spawns already exist, and don't need to be
bespoke modified.
Replaces those custom types with the ones already defined.
* Replace bespoke maintenance loot types with hardcoded ones
Co-authored-by: coiax <yellowbounder@gmail.com>
* Fixes charlie station supermatter fluff paper and makes it's code not terrible (#60176)
Yes apparently you can code fluff paper badly. Whoever updated it to the supermatter version did the update in the map file for some reason. Fixes#60171.
A Charlie station fluff paper about the Supermatter is no longer misnamed "singularity generator". THERE WAS NEVER SUCH A THING AS A SINGULARITY GENERATOR. OCEANIA HAD ALWAYS BEEN AT WAR WITH EASTASIA.
* Fixes charlie station supermatter fluff paper and makes it's code not terrible
Co-authored-by: interestingusernam3 <51925758+interestingusernam3@users.noreply.github.com>
* Fix cursed spring ruin acting as a polymorph teleport forwarder (#59994)
* Fix cursed spring ruin acting as a polymorph teleport forwarder
Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
* Replaces broken valueless space cash item in old AI sat ruin with a 200 credit one (#59757)
Replaces broken valueless space cash item (ie, just the stack/spacecash item) in the old AI sat ruin with a 200 credit one
Fixes undocumented bug. Also less glitched items in the game (and this apparently can cause potential money duplication according to comments in the space cash code)
* Replaces broken valueless space cash item in old AI sat ruin with a 200 credit one
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
* During unit tests, does extra verification on text based overlays (#59553)
This makes it so during unit tests, adding a text based overlay to something will runtime if the icon does not have an icon state matching that text. I would do this during normal compiles as well but getting the icon states from an icon is surprisingly expensive.
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* During unit tests, does extra verification on text based overlays
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* Replaces unusable TEG board on derelict with a set of turbine ones (#59563)
* Replaces unusable TEG board on derelict with a set of turbine ones
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>