Commit Graph

76 Commits

Author SHA1 Message Date
Lohikar
06514840f7 Z-Mimic (#3907)
* Openturf icon fixes and improvements

* more things

* Remove some pointless/bad layering/planing

* yeah well I didn't need this anyways

* Refactor Z mimickry to be at /turf

* more refactoring

* Cleanup, use turf/flags instead of z_mimic_flags

* Fix turf/Entered()

* misc optimizations

* fixes

* Major icon smoothing optimizations

* Speed up boot some more

* Fix AO

* Remove some redundant code

* Tie Z-lights to Z-mimic instead of openturfs

* Fix an opacity issue with no_mutate turfs

* Fix some issues with Z-mimic AO not properly clearing

* Fix some OT->OT changetuf bugs

* Add helpers for changing Z-mimic operational state on turfs

* Fix some merge issues, change how F_CUT smoothhint works a bit.

* indentation

* SSopenturf -> SSzcopy
2017-12-30 04:42:18 +02:00
Lohikar
6debd29cb7 Iterative Explosions (#3838)
This PR replaces recursive explosions with a new spreading engine: iterative explosions.
Should behave similarly, but also be more reliable, potentially faster.

Iterative explosions also support simple-explosion-esque directional explosion sounds/shake, and will now traverse Z-levels if the explosion is strong enough.

Also changes playsound() to transmit sounds across Z-levels. Uses BYOND's 3rd coordinate on /sound to make sound sound above/below the player if they're using headphones. Removed for now, can't get Z-falloff working right.

Fixes #2199.
2017-12-30 04:38:12 +02:00
Lohikar
3b19323055 Basalt turfs (#3985)
changes:

Adds three new turf types: lava (separate from the existing lava which is bound to the flooring system), basalt (a child of asteroid turfs), and chasm open spaces.
canSmoothWith lists on asteroid turfs are now in the form of a shared global list for performance reasons.
'Ash' turfs have been repathed to /turf/simulated/asteroid/ash. Base asteroid turf type should not be used directly anymore; maps have been updated to new path.
Airless openspace, chasms, and airless chasms now have map-time debug icons.
No player-visible changes, just prepwork for future things and performance tweaks.

Sprites from TG.
2017-12-24 22:30:36 +02:00
Lohikar
bb5a34eaf8 Misc. Optimizations (#3993)
changes:

Overlays now creates less temporary lists.
Falling no longer queues unsimulated atoms that wouldn't fall anyways (incl. LOs).
Pixel-shifted AO is now cached too.
Changed some references to get_map_cell() to macro equivalents in random maps.
Added smoothing hinting to the icon smoother, allowing for major performance improvements in common cases.
Space initialization no longer involves appearance churn (and is much faster as a result).
2017-12-23 21:27:51 +02:00
Lohikar
f73849368f Make get_smooth_underlay_icon work properly with space parallax (#3906)
Fixes an issue where space underlays on diagonally smoothed turfs would not work properly with space parallax.
2017-12-18 00:20:35 +02:00
Lohikar
5e33bd0e2c Misc tweaks (#3916)
changes:

/obj/visual_effect has been repathed to /obj/effect/visual.
Openspace movables will no longer use the space plane when on an openturf mimicing a space turf.
Lights now only update on direction change if your direction actually changed.
Fixed some bad set_dir() procs that were either pointless or that didn't return parent.
Mapped-in or maint dirtier-spawned glowing goo no longer self-deletes after 2 minutes.
Fixed an issue that may have caused some openspace movables to not properly handle direction changes.
2017-12-09 00:36:53 +02:00
Lohikar
0d50eed14e Better openspace (#3744)
changes:

Openturfs now properly handle recursive icon copy.
Openturfs can now have icons, for translucent or bordered turfs. This works with the smoothing engine (or anything really)
Added openturf debug verb that lists ordering of the openturf.
Openturfs can now mark themselves as solid, for things like windows or ice.
BSTs can now toggle falling for themselves.
Fixes #3488.
2017-10-29 13:31:04 +02:00
Lohikar
61b5203d24 Runtime Map Loading (#3597)
changes:

Maps are no longer compiled in, instead loaded directly from the DMMs at runtime.
Z level defines have been moved from the config to map datums.
Unit tests now use typecaches.
DMMS now actually works.
DMMS has been updated slightly.
DMMS is now capable of loading simple lists of non-text types.
DMMS is now faster when loading many types without mapped in attributes and when loading area instances.
Asteroid generation is now defined on the map datum instead of being hard-coded in SSasteroid.
Holodeck presets are now defined on the map datum.
Atmos machinery now uses Initialize().
2017-10-18 23:07:34 +03:00
Juani2400
d4a6ea6949 [MAP] Several major remaps, and additions #3 (#3465)
- Remap: Atmopsherics.
- Remap: Captain's Office.
- Remap: Head of Staff Conference Room.
- Remap: Chief Medical Officer's Office.
- Remap: Medical Briefing Room.
- Remap: Security Processing and Holding Cell.
- Modification: Robotics Laboratory.
- Addition: Desk Ringers in several locations.
- Fix: #3391, #3374, #3345, #3341, #3308, #3306, #3277, #3244, #3173,
#3094.
- Several other minor changes.
- A new subtype of folder has been sprited for the Security folders.
- More colours of flooring decals were added.
- New colours for pipes were added (Lohikar).
2017-09-20 16:42:02 +02:00
Lohikar
fe8d586b31 Ambient Occlusion (#3419)
Adds an implementation of Europa's wall ambient occlusion, extended to operate on openturfs as well.
2017-09-15 09:49:53 -05:00
Lohikar
748846821c Fix Stairs (#3403)
changes:

Stairs now actually work.
Stairs now only move your mob up when you exit the last step.
Walking off the side of a staircase will now cause your mob to faceplant on the ground briefly.
Openturf now handles objects that cover more than one turf properly, such as multi-tile doors.
2017-09-10 22:52:50 +03:00
skull132
16d33365c2 Merge branch 'master' into development
# Conflicts:
#	code/modules/client/preference_setup/loadout/loadout_xeno.dm
#	code/modules/customitems/item_defines.dm
2017-09-09 21:38:02 +03:00
Lohikar
dc85579850 Closet & use_check() tweaks (#3346)
changes:

use_check() will now show failure messages to the affected mob by default. It still returns the failure reason & permits disabling of messages via. the show_messages parameter.
Lockers now take 2 seconds to weld or disassemble.
A progress bar is now shown to mobs with the progress bars pref enabled while attempting to break out of welded lockers.
2017-08-29 23:25:19 +03:00
Alberyk
608cf8feda Adds more sounds (#3327)
Adds sounds for opening lockers, going down ladders, turning on your internals, removing and placing extinguishers in the cabinet, sounds for bone breaking and sound to the bsa.
2017-08-27 16:58:34 -05:00
Alberyk
9c9f63cacc Fix Mecha Z Teleportation (#3334)
Fixes a bug where people could teleport out of exosuits with Z movement verbs.
2017-08-22 23:53:58 -05:00
Lohikar
f3ad54e8aa Assorted tweaks & fixes (#3305)
changes:

Fixed #3203.
Tajara or Unathi CEs now get gloves that actually fit them.
OOs now respect direction changes from their mimicked object.
Replaced all references to trange() with RANGE_TURFS().
Replaced all references to is_type_in_oview() with locate() in oview().
Fixed a runtime caused by recursive explosions falling off the edges of the map.
Carp despawn now works properly with the new asteroid turfs.
Carp despawn now uses WEAKREF instead of SOFTREF.
Added tick-checks to the carp migration event.
Vaurca now have the IS_VAURCA reagent_tag.
Cleaned up butanol alien handling a bit.
2017-08-20 14:10:15 +03:00
Lohikar
fb73735ceb Minor Performance Tweaks (#3265)
changes:

/datum/wires no longer has an (init) proc.
SMES wires now use timers instead of spawn.
Cleanables' random_icon_states list is now lazy. (eliminates ~4000 lists from dirt)
/obj/effect can no longer be pushed around by conveyor belts.
Lighting overlays are now explicitly prevented from being moved by conveyor belts.
2017-08-11 22:57:57 +03:00
Ron
cb5e227320 Converts some istype's to use helpers (#3224)
Converts various istype's to use helpers. Mainly:
Cable
Wrench
Screwdriver
Multitool
Crowbar
Wirecutter

And makes the helpers defines.
2017-08-06 22:08:42 +03:00
Lohikar
2fb9387988 More Openturf fixes (#3198)
Fixes a bug where openturf would unexpectedly delete an overlay if it was updated via. update_above() when it was already queued for update. Also fixes #3191 and includes some minor performance optimizations.
2017-07-31 21:49:51 +03:00
Lohikar
63df52956b Add openturf icon (#3181)
Adds a mapping-time icon for openturf to make mappers' lives a little easier when working with them.

No player visible changes.
2017-07-31 20:23:17 +03:00
Lohikar
ff5cd35ef8 More Openturf Tweaks (#3137)
changes:

Openturfs now darken the lower level less (0.4 lighting multiplier vs. 0.25).
You can now examine human-types and other objects with special examine behavior through Z-levels. (OOs proxy examine())
Fixed a bug where shadower updates caused by LO updates caused visual inconsistencies.
2017-07-23 12:40:44 +03:00
Erki
07cedfb335 Some more fixes (#3130)
Fixes #2173
Fixes #1927
Fixes #3100
Fixes #3087
Fixes #3124
2017-07-23 01:03:41 +03:00
Erki Meinberg
283f63d098 Preferences fixes, ahoy! (#3045)
Fixes #1670
Fixes #1780
Fixes #1781
Fixes #1493
2017-07-21 20:50:59 +03:00
MarinaGryphon
9eb0142bfb Fixes #3054 (#3056)
This was an incredibly easy fix that removed some stupid code I never should have had to fix. >:(
Hoists should be fixed when this is merged (and if this compiles, given my apparent coding skill).
2017-07-16 15:33:42 +03:00
MarinaGryphon
f04baf71ac No more multi-Z grabs, + ladder grabbing (#3025)
Grabs break if the mobs aren't on the same Z level. You also take someone you're grabbing up ladders with you.
2017-07-15 17:03:37 +03:00
Lohikar
41e39f52d1 Wall Icon Refactor (#3023)
changes:

Atom types can now define custom adjacency code for the smoothing system.
Walls now draw using the generic icon smoothing system.
Walls now pre-bake colors into their icons instead of doing it client-side with the color var.
Walls can now use the SSoverlay appearance cache; wall icon updates should be faster.
The "rusty" wall type now actually works.
Smoothing now uses mutable_appearance instead of image in some places.
Should be a bit easier on clients, though I haven't done profiling.

This PR breaks 510 compatibility.
2017-07-15 16:22:21 +03:00
MarinaGryphon
830a4edc66 Catwalk hoisting and other fixes, take two (#3031)
Unanchored catwalks can raise and lower objects on them.
Mechs can be hoisted using catwalks.
forgive me for i have sinned
2017-07-15 16:20:41 +03:00
MarinaGryphon
12ccc4e7a7 Attempting fixes for some hoist bugs. (#3027)
Hoists now release hoistees if they wriggle out somehow. Shouldn't happen anyway, but consistency_check should handle any odd shenanigans.
Silicons should be able to be hoisted. Buckling wasn't anchoring them, for some strange reason.
Fixed a bad message, where [user] was used instead of [usr].
You can't directly unbuckle people from hoist hooks.
2017-07-14 19:55:14 +03:00
MarinaGryphon
ebd50a8e00 Falling In Reverse: Hoists Update (#2573)
Adds hoists! Traverse Z-levels in style!
Use a hoist kit to deploy it on the same tile as you, in the direction you're facing.
Drag an object or mob to the hoist clamp in order to attach them to it.
Left click on a hoist to move up or down, depending on its current direction. This will also pull anything attached to the clamp along with it.
When the clamp is blocked and can't move up or down further, it will automatically switch direction.
To disconnect someone (or something) from a clamp, drag the clamp to the tile you want to put them on. It must be within one tile of both you and whatever is attached to the clamp.
When you're done using a hoist, you can collapse it back into a hoist kit with the Collapse Hoist verb, for easy transportation.
Hoist kits are not available on the map, so they have to be spawned in.
It is preferred to use hoist kits instead of directly spawning a hoist, where possible, when testing.
2017-07-10 21:32:26 +03:00
Lohikar
2ee49b1b9e Fix parallax (#2983)
changes:

Parallax now actually moves properly on Move().
Parallax movement can now be toggled as a preference.
Merged all movable/Move() overrides for performance reasons.
2017-07-09 19:35:02 +03:00
skull132
82cc56dd62 Fix below.above not being nulled. (#2977)
Fixes RT spam. wew.
2017-07-09 01:48:46 +03:00
Lohikar
dbc70d9f49 Openturf & Lighting Improvements (#2961)
changes:

Openturf now uses ~200 MB less memory when sunlight is enabled.
Openturf now handles recursive OO copy better.
Lighting objects now update their existing color list if they can instead of creating a new one each time.
The sun can no longer fall out of the sky.
Openturfs should be a little gentler on clients.
Openturf darkening factor can be more easily changed.
Reset-Openturfs no longer hangs SSgarbage.
2017-07-06 23:40:16 +03:00
Lohikar
2185094d35 Openturf fixes, dynamically lit holodeck, and quick-pickup tweaks (#2943)
changes:

The station's holodeck is now dynamically lit.
Improved quick-pickup's tick checking & converted to assoc lists instead of if (thing in list).
Fixed an edge case where openspace overlays would not properly cleanup on forceMove to a non-turf.
Fixes #2941.
2017-07-06 23:34:55 +03:00
skull132
405366d15f Fixes #2803, #2553, #2597 & #2498 (#2940)
Fixes #2803
Fixes #2553
Fixes #2597 (Couldn't find a cleaner way to make this work, unfortunately. Not all procs-as-verbs can be used as procs.)
Fixes #2498
Fixes #2912
2017-07-04 00:52:42 +03:00
Lohikar
9c010f92d1 isopenturf() macro, update_above improvements (#2931)
changes:

Added a isopenturf() macro, equivalent to istype(thing, /turf/simulated/open).
Converted most/all instances of istype(/turf/simulated/open) to isopenturf().
Made update_above()' aware of queue status & inlined a proc-call.
2017-07-03 12:04:18 +03:00
Lohikar
c8ddab832a Map tweaks (#2923)
changes:

Crusher's ladder now properly has an openturf under it.
Made some aesthetic adjustments to the engine's cooling radiator.
2017-07-03 00:21:27 +03:00
Lohikar
c838fddb22 initialize() -> atmos_init() (#2816)
Renames Atmos machinery's initialize() proc to atmos_init(), to better distinguish it from atom Initialize().
2017-06-26 12:06:57 +03:00
Lohikar
b83a2d908b Fix zpipes not having color (#2812)
changes:

Z-pipes now properly show pipe color.
2017-06-25 14:56:06 +03:00
Ron
1dc0fee3cd Rework of Multi Z vent crawling PR (#2775)
Reworks #2689
Includes: Vent crawling up and down.

Quote from original PR:

Main feature is that ventcrawling between Z levels now works perfectly. It takes 10 seconds to climb up or down a pipe...
2017-06-23 15:55:41 +03:00
Lohikar
05cceb7a1a Queued icon update tweaks (#2787)
changes:

Queued icon updates now update the atom's associated openspace overlay or openturf.
update_oo() renamed to update_above(), and moved up to /atom. Only meaningful on /turf (updates above openturf if present) and /atom/movable (updates associated OO if present).
Demoted SSfalling to a regular subsystem (1ds tickrate).
Increased SSlighting's tickrate from 2 ds to 1 ds.
2017-06-22 13:23:30 +03:00
LordFowl
8cf51e60e0 Buffs Fall Damage (#2758)
Fixes an issue where damage to the chest would never be applied.
Nerfs Weakened.
2017-06-19 00:43:42 +03:00
skull132
324dba97dc Fix some runtimes (#2755) 2017-06-18 13:48:24 +03:00
skull132
36cb778548 Add roofs (#2737)
Implements roofs
2017-06-17 22:18:39 +03:00
LordFowl
08219273d3 Newton's Thirdish Law (#2714)
Items falling now deal a set amount of damage based on velocity calculations, with no more randomisation. This damage is randomly distributed throughout the head and torso by first calculating the damage dealt to the head - anywhere between zero and 1/2th of total damage, and then calculating the damage to the torso - head damage subtracted from total damage.
2017-06-15 12:38:01 +03:00
LordFowl
6f3fa4eba9 Shafted (#2704)
Ladders now have proper open-space shafts. Their sprite has been edited to remove the faux-hole, and also the down sprite is now at the same vertical pixel adjustment as the up sprite, so it looks kinda like they connect.

For security's sake, you can no longer fall down an openspace if there is a ladder on the openspace tile. Strangelly enough there was already code for not falling down if there was a ladder below you.

Added flight to some simple mobs that had been excluded from Alberyk's initial runthrough (parrots, bees, bats, and shades.)

The purpose of this PR is that you can now fly up ladder shafts.
2017-06-13 22:52:42 +03:00
Lohikar
0db557ac29 machinery_process() & auto_use_power efficiency tweaks (#2657)
changes:

Machinery now uses machinery_process() instead of process(), allowing machines to be put into SSprocessing-style lists in addition to the machinery list.
Automatic power calculations now involve less proc-calls.
2017-06-12 19:09:36 +03:00
skull132
1a95ddf774 Emergency ladder sprites + placement (#2658)
Ladders added to emergency storage lockers (random chance), engineering storage (1), and EVA (1).

We'll see if that's too much or not.
2017-06-10 22:40:21 +03:00
VikingPingvin
68415f6cf5 Portable Ladders (#2434)
Add portable ladders as items.
Deploy on floors that have an open space above them, and in open spaces that have floors beneath them.
Fold them, to reuse them.

Need item,structure base and structure body sprites. Probably an in hand sprite too.
2017-06-05 11:19:12 +03:00
skull132
4d7b0f6076 Fixes leg actuators not blocking fall damage (#2546) 2017-05-30 16:26:32 +03:00
Lohikar
0ad3d4c189 Round-end statistics (#2483)
This PR adds a system to display round statistics at the end of the round, with the option of logging said statistics to the feedback database.

Tracked stats:

Most deaths by ckey.
Number of people cloned.
Number of times humans have fallen into openturfs.
Number of times humans have died from falling into openturfs.
Number of times humans have been gibbed.
2017-05-29 22:42:19 +03:00