Commit Graph

221 Commits

Author SHA1 Message Date
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
chaoko99
c0ee47579d Adds a preference to have an intent check for guns (#3653)
what title says
2017-12-17 11:37:16 +02:00
Alberyk
ebc9b81ee1 Adds more loadout options, underwear options and increases the loadout limit points (#3943)
-adds towels, which you can find at the fitness room, or at the loadout with whatever color you want
-adds new undershirt options at people's requests
-adds a colorable sweater to the loadout, from baystation
-adds more flower hairpin options
-increases the max loadout points by five
-fix an issue with the tactical armor having the holster overlay when it should not
2017-12-17 11:18:50 +02:00
Lohikar
cd910c072c Asteroid tweaks (#3951)
changes:

Z-levels below the surface now use 'rocky' ash instead of ash turfs. (Sprites from TG)
Fixed an issue where openturfs would incorrectly inherit their mimiced turf's gender.
Tweaked the names & descriptions of sand (now ash) and rock.
Reduced some pointless locate() calls in icon smoothing code for turf paths.
Replaced the empty space map with runtime Z expansion.
Fixes #2756.
2017-12-10 00:20:35 +02:00
Lohikar
81685214df Cache light fixture overlays (#3948)
changes:

Light fixture overlays are now cached.
BlendRGB is now cached (used by light fixture overlays)
Nightmode now only tints the bulb instead of both the bulb and the fixture itself.
2017-12-10 00:17:09 +02:00
Lohikar
58519daeba Recharger QoL Tweaks (#3826)
changes:

Rechargers now briefly show a progress bar showing the current charge level of the device currently charging.
Examining a recharger will now specify what is in the charger.
Atoms can now mark themselves as requiring an icon update on initialize instead of overriding Initialize() just to call update_icon().
Charger code is now slightly more modular, using proc/get_cell() to get a ref to the power cell instead of hard-coded if-else chains for each supported type.
2017-11-18 18:46:14 +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
Zuhayr
30d92571cf Nymph head flowers. (#3634)
Adds a head flower to 5% of diona nymphs.
Also changes get_random_colour() to return a proper RGB string instead of expecting the caller to add the #.
2017-10-16 11:47:45 -05:00
Lohikar
4773a8a626 MC Performance Tweaks (#3621)
Ports some StonedMC performance tweaks from /tg/, should reduce the amount of fighting between BYOND sleeps and the MC.
2017-10-14 19:31:14 +03:00
Karolis
031b958039 Fixes to getFlatIcon and more. (#3353)
(Rebased and reopened #3347)

Attempted to fix pipe and door rendering
Fixed Table, carpet rendering
Ported full map-capture tool from bay, with python script to merge captured images.
2017-09-19 15:43:01 +03:00
Lohikar
e28c29a551 Port Integrated Electronics from Polaris (#3371)
Ports Polaris' integrated electronics system, whichallows for Roboticists & Electricians/Engineers to build custom devices and machines for a variety of purposes.
2017-09-12 21:41:39 -05: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
Lohikar
c80d893e71 Misc Synthetic Code Cleanup & Minor Tweaks (#3307)
Mostly synthetic code cleanup, some tweaks to human examine and ID cards too.

changes:

Synthetic sprint procs have been compressed down to one proc for all machine subspecies vs. one per subspecies.
Synthetic sprint now only stuns synthetics with empty cells for 30 seconds for all types.
Refactored synthetic limb roboticization.
Changed how a lot of synthetic/industrial checks work.
ID portraits are now 128x128, and scaled without blurring.
Species can now specify an examine text color (for their species name) that differs from their flesh color.
Fixed some eye checks not respecting species.vision_organ.
Examine pulse-checking now uses do_mob & has a progress bar.
2017-08-29 23:21:29 +03: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
Alberyk
011b5506c4 Adds messenger bags (#3289)
Ports the messenger bags from baystation 12, also adds the syndicate and wizard version. And fixes some issues with some jobs missing the bag vars and miners not getting their industrial bags.
2017-08-20 14:02:55 +03:00
skull132
1ed2f3c556 Merge branch 'master' into development 2017-08-11 22:56:23 +03:00
Lohikar
4544637b48 Make wall object check saner & compile-time-checked (#3252)
Makes /proc/gotwallitem use typecaches & a compile-time checked list of types instead of a list of strings. Probably faster, not that it really matters here.
2017-08-09 19:56:45 +03:00
skull132
81bb348a42 Merge branch 'master' into development 2017-08-06 22:09:41 +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
Ron
ad96a34dd8 Removes some in worlds (#3227)
Removes some in worlds and some commented out code that I don't think will ever be used.
2017-08-06 19:50:53 +03:00
Lohikar
20150cd113 Devour fixes (#3231)
Bunch of fixes and balance tweaks to the devour system. Notable changes are that xenomorphs can eat people again and that human-types no longer take ridiculous amounts of damage from devour.

changes:

Devour type checks now actually operate on species for human-types and are all-around hopefully more sane.
Replaced an obsolete define with a boolean.
Fixed xenomorphs being unable to swallow human-types.
Rebalanced digestion damage to not kill human-types in one tick.
Digestion now deals fire+brute instead of cloneloss (bite still deals cloneloss as I didn't touch its damage function)
Misc code tweaks.
2017-08-05 21:03:49 +03:00
Alberyk
b4fa4a8b3a Baystation12 merchant port (#3155)
Port of the merchant mechanics from baystation12.
All of the trader, prices and most essential system are done, as well the job datum and the like. Mapping the shuttle, the base and a new dock will be done in a later pr.
Also adds phazon construction and several other items used in this pr.
The chance of the merchant slow being open at round start can be changed via the config, it is 20% by default.
2017-08-04 21:36:04 +03:00
Lohikar
1545ba469e Orbit Fixes (#3207)
changes:

Fixed an issue where the segment count argument of orbit() was ignored, leading to the Tesla not animating as it was intended to.
Fixed an issue where /datum/event had two completely unrelated definitions (fixes #3192).
2017-08-02 19:55:53 +03:00
Lohikar
36164a15d4 Better action progress bars (#3175)
changes:

Progress bars will now stack if there is multiple ones on a single turf.
Progress bars' update speed is now mediated by stoplag() instead of arbitrary numticks numbers.
A callback can now be passed to do_after or do_mob which will be called every check - if the callback returns FALSE, the action is cancelled.
Progress bars no longer show an X briefly when their associated action is cancelled.
Progress bar itself is from /tg/, do_after changes are not.
2017-07-31 20:23:47 +03:00
Lohikar
cfb7357c6f Area cleanup, Minor BST tweaks, Nuke Fixes, Explosion fixes (#3164)
changes:

Ported some timer fixes from /tg/ (timerid overflow fix, invalid deltimer logging)
Removed pointless air alarm elections.
Cleaned up some area code and moved area var definitions into areas.dm.
The nuke now only destroys Zs connected to the Z it detonates on. (Fixes #2552)
The nuke no longer destroys CC.
Nukes now dust mobs.
Cascades now dust all mobs on all non-admin levels.
Fixed a bug where SSexplosives would not honor the is_rec var.
Improved the efficiency of /proc/random_station_area().
Bluespace Bugs can now teleport out again.
Bluespace Technicians can now turn off their x-ray vision without needing to remove their glasses.
Human-types no longer make footstep sounds when lying down, unconscious, or dead.
2017-07-27 18:10:38 +03:00
skull132
d765f2e808 Fixes #3063, #3064 (#3069)
Fixes #3063
Fixes #3064

Makes the asteroid area equivalent to the space area: cannot be powered with an APC, an APC cannot be placed there, and blueprints will allow you to create new areas there. Also tick checks a blueprint proc which caused the lag in the first place, just for future reference.
2017-07-16 20:46:01 +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
Lohikar
670834cf2b Port a mergeSort fix from /tg/ (#3012)
Port of tgstation/tgstation#27527.
2017-07-11 23:55:09 +03:00
Lohikar
5fcb59e23f Sort the hair lists (#3013)
Makes the various hair style lists sorted alphabetically for usability's sake.
2017-07-11 23:54:52 +03:00
Lohikar
606a9c7541 Icon caching & human icon tweaks (#3000)
changes:

Body marking icons are now cached in SSicon_cache.
Renamed the body-hair cache (used only by Resomi) to make it more clear what it is.
Humans now use SSoverlay for applying overlays, though they force-compile instead of waiting for it to tick.
Fixed a bug where getFlatIcon() did not work properly with SSoverlay overlays.
2017-07-10 20:09:52 +03:00
Lohikar
33c61f9f1e Remove some world loops (#2965)
changes:

Replaces a lot of in-world loops with more specific lists.
Recipes are now copied in SSmachinery/Recover()
Fixed bad sorting on all_areas list.
Added skeleton Destroy() to SMESes as they did not have one and are failing to GC.
Seems to shorten SSatoms init a bit, maybe from removal of in-world in MULEs?
2017-07-09 00:24:28 +03:00
Lohikar
8af0051fd6 More macros (#2955)
changes:

Holomaps now use an area flag instead of a proc to determine which areas do not draw on the holomap.
The supply shuttle once more has a roof.
The supply shuttle's landing zone is now dynamically lit.
Turfs only generate visibility updates on Initialize() after mapload - visualnet is not initialized by then anyways.
Merged /datum/gas_mixture/(init) into /datum/gas_mixture/New().
Converted a ZAS proc into a macro.
Made ZAS attempt to remove a turf from a zone instead of always rebuilding it in a certain case.
Macroized two misc procs.
Fixes #2947.
2017-07-06 23:37:58 +03:00
skull132
e92f1fdd2e Fix some RTs - 03JUL2017 (#2938)
Fix the most common RTs from Sunday's testing.

Also works on orebags. Limits their capacity to 200, as anything higher than that breaks the fancy inventory system something awful. Maybe I should write a UT to test and confirm this. Expanding: I don't think TICK_CHECK in inventory procs is a good idea, without fully implementing a non-fancy storage subclass. Non-fancy would just be speedy without all of the fancy inventory orientation bullshit. But CBA to do that now and I'm not sure if it's worth it for the edgecase of drone satchels atm.
2017-07-05 23:26:35 +03:00
Lohikar
d0fcc77f31 List stuff (#2932)
changes:

Converted some list procs to macros (why the fuck was islist() a proc?!)
Removed some old sorting procs and replaced their few remaining calls with sortTim() calls.
2017-07-03 12:03:14 +03:00
Lohikar
f885bffdae More tweaks (#2889)
changes:

Clipboard overlays are now a little gentler on SSoverlays.
Ported potential performance improvements for getFlatIcon and listclearnulls from /tg/.
Icon smoothing now clears the base icon by default; SMOOTH_NO_CLEAR_ICON disables this behavior.
Potential SSoverlays performance improvement from /tg/.
Speculative fix for #2826.
2017-07-01 23:09:10 +03:00
Lohikar
42f91d8117 Remove privacy poll & other tweaks/fixes (#2863)
changes:

Removed the privacy poll as it is unused.
Observing no longer creates a new mannequin, instead fetching one from SSmobs.
Observer ghosts now have a description again.
Converted new_player.dm to absolute pathing.
Fixed a bad init on holomaps.
Removed a sleep from light fixture Initialize().
Added a queue length stat to the MC panel for Icon Smoothing.
Halved time taken to create lighting overlay objects.
Species & body marking lists are now sorted alphabetically.
Commented out calls to lighting profiler to remove overhead of string interpolation in some procs.
Blood dries instantly if present during mapload instead of setting a timer.
2017-07-01 21:53:39 +03:00
Lohikar
27251ee9ee Remove the datum pool (#2873)
Removes the datum pool.

New-qdel is faster than pooling, and we didn't use it anyways.
2017-06-30 13:10:14 +03:00
Lohikar
84f2ec8105 Area fixes (#2875)
changes:

Fixes copy_contents_to not working.
Fixes elevators attempting to spawn roofs when it didn't really make sense.
Minor efficiency tweaks in move_contents_to and elevators.
2017-06-30 13:09:19 +03:00
Lohikar
ce54f5a76c Significantly speed up testing server boot (#2846)
Dramatically speeds up boot with testing (MC_TICKLIMIT_INIT > 100) configs; stoplag() would penalize procs that go over 100% tick-usage by delaying them further. This is not required during server boot & the lobby, and resulted in significantly longer boot times.

This PR ports a fix from /tg/ that forces stoplag() only sleep 1 tick if it sleeps during server boot, as well as adjusting the example config to be more suited for testing.
2017-06-29 00:20:14 +03:00
LordFowl
f604e14933 Refactors baseturf (#2778)
Modifies baseturf to be used instead of not used. Now all functions that used to call "get_base_turf_by_area(T)" will now call "T.baseturf". Turfs that do not have a baseturf defined will set their baseturf to be the result of "get_base_turf_by_area()", which will descend into "get_base_turf_by_z" and ultimately into "turf/space", if none of the previous stages catch.

ChangeTurf will now only keep baseturf persistent from father to child if the child has no baseturf set by code.

This allows for special turfs, such as ceilings, to have their own base turf, such as open space, to be used instead of the area/z baseturf.

Fixes #2763
2017-06-22 13:16:06 +03:00
Lohikar
fa5a8eecd9 PDA sorting fixes & tweaks (#2760)
changes:

Fixed the PDA list not being sorted.
PDAs now show if they have a pen in them or not in their examine text.
PDAs can be ctrl-shift-clicked to remove their pen.
Added a proc designed to simplify common mob sanity checks; see comments for documentation.
2017-06-19 01:26:24 +03:00
Lohikar
1423250412 Update DMM Suite (#2711)
Updates the DMM Suite from /tg/ upstream, adding the ability to load tgm format maps, tick-checks, and better compatibility with SSatoms / Initialize().

Also adds some framework for random ruin generation, though it is not functional yet.
2017-06-15 12:41:45 +03:00
NanakoAC
17850e797e Box Nibbling Rework (#2131)
Currently, a mouse gnawing open a box to get its contents generates about a screen's worth of chatspam. And the same applies to eating a box of raisins or similar large meal. I feel this isn't appropriate for the size of the creature nor the severity of the act. In any case ive come up with a better method.

Main attraction of this PR, is that the box nibbling no longer uses visible messages, it only outputs to chat once, when it finally ruptures. In the meantime, any nibbling which doesn't break the box will instead shake it around and make a nibbling sound. Shaking code stolen from locker resist
Mice nibbling things is a quiet clicking noise, easy to ignore. so its unintrusive
Update: I've now extended this to all animal nibbling, not only boxes, but also on food too. To cut down on chatspam from small animals eating things.

The result of this change is that a creature eating a box or a meal is simultaneously easier than before to notice, if you care about it. And easier to ignore, if you don't care.

Also included, two bugfixes:

Re-adds the reverted console canpass behaviour that was lost a couple patches ago
adds a little robustness fix to animals, to deal with an issue where they were getting their stat set back to 0 without properly waking up. still not sure why it happens but now the icons will properly update when they do
2017-06-15 12:32:40 +03:00
Alberyk
17354e5109 Ports body markings from polaris (#2607)
Ports the body marking system from polaris. And I think I got all the SQL related procs.
2017-06-06 00:43:45 +03:00
Lohikar
42464b68e2 Timed verbs (#2620)
This PR adds a new helper (ADD_VERB_IN(target, time, verb)) to add verbs to a mob using timers instead of spawn.

Also converted a few instances of spawn-verb-adding to the new helper.
2017-06-05 23:36:35 +03:00
Lohikar
95fdd6f925 Kitchen tweaks (#2570)
changes:

Reduced power usage of oven and fryer.
Reduced warm up time of oven and fryer.
Oven now heats up to exactly 200C instead of to 198.85C.
Fixed some issues with cooking appliances' sanity checks.
Recipe datums are now initialized once instead of per-appliance.
Moved some cooking verbs to the Objects tab instead of a null category.
2017-06-05 11:20:55 +03:00
Lohikar
a28fbd1415 Icon smoothing fixes (#2624)
Fixes some issues with smoothing, including asteroid flooring losing its sprite for no apparent reason.
2017-06-05 11:15:47 +03:00
Lohikar
1db5663128 Move various icon caches into a new subsystem for organization (#2538)
changes:

Blood overlays are now cached and do not involve world iteration.
Moved every global icon cache I could find into a new SS for organization & easier debugging. SS does not fire or init.
2017-05-31 08:37:39 +03:00