* added a check for the midnight rollover of timeofday
* the manual tracking orientation is now synchronized with the sun position update
* now checking if the solar panel/tracker/computer is not already in the solars_list before adding it
* added a message noticing the beginning of a solar panel/tracker deconstruction
* tweaked the manual tracking for better accuracy : the orientation is increased/decrease internally and updated altogether the sun.
* Changed the way the sun was orbiting around the station (or is it the other way around ?), based on real time rather than an inaccurate ticks counter.
* The sun can now be up to twice as fast or slow as standard rotation (1h)
* The sun start with a random angle to the station at round start
* The sun can rotate clockwise or counter-clockwise
Changes to Solars :
* The panels calculate the shortest rotation to get from their position to another.
That also fixed the bug where the panel would backtrack all the way when finished a full rotation (e.g 355° to 1°)
* The exposition to the sun of a panel is now correctly calculated (fixed the bug, where
if the sun was, for example, at 1° and the panel at 359°, no light would arrives to the panel)
* Corrected the timers for the timed rotation.
* Panels made with reinforced glass now have the double of health
Works pretty well. If it can't GC something, it'll just del() it and be done.
Speed is amazing, holy shit.
New procs you should be aware of:
qdel(atom/movable) - sets up an object for garbage collection. Call this rather than del(atom/movable).
atom/movable/Destroy() - called right before the object is GC'd, so it still has a loc. Also called if the object is del()'d.
new controller - garbage.dm has all the details on this. Basically it nulls all references on GC'd objects and force del() them if necessary.
Generally speaking, objects should use Destroy() for behavior prior to deletion rather than Del(). You should also always call the parent so the object gets the right gc_destroyed var set.
ISSUES:
Tries to GC mobs atm. This actually works for new players, not so much for humans/monkies/simple_animals/anything. I'm guessing it needs to clear out their mind and HUD and maybe other things.
Gibbing is really bugged. It works, but the overlays just sit there for awhile and ugh. I'm very tempted just to del() mob/living and mob/camera and call it a day.
qdel() equipment doesn't unequip the item.
Pipes don't generally GC correctly. Debugging suggests they get referenced in many pipenets and that isn't cleared properly. However some do work fine. Need assistance here.
Bots don't GC, probably in the radio controller.
Lots of other shit doesn't GC but it's hard to find them because of the pipe spam.
I think I'm calling Destroy() twice by accident.
-Turns out there was already a Gaussian PRNG proc already, used by mechs and turrets. I've replaced it with my one as mine has almost half the cost. (currently broken! still waiting for fixes to be pulled!)
-replaced between(min, val, max) with Clamp(val, min, max)
-get_turf(thing) now uses var/list/locs to locate its turf, rather than iterating up through loc of its loc of its loc...etc
-sign(num) moved to maths.dm
-InRange(val, min, max) replaced with IsInRange(val, min, max) (they were identical)
-Removed ismultitool() iswrench() iscoil() iswire() iswelder() iscrowbar() etc
-removed modulus(num) as abs() performs the same task! *roll-eyes*
-removed get_mob_with_client_list() as it is no longer needed (we have var/list/player_list now)
-removed get_turf_or_move() as it simply called get_turf
-removed get_turf_loc() as it was identical to get_turf()
*Additions:*
-The "Declare Ready" link in the lobby will automatically become "Join Game" if the round starts before you declare ready, so you don't have to click it twice
-Added a solars_list. The sun will use this list instead of the machines list. I made a proc which decided on whether to use this list or the powernet nodes list depending on what is smallest. I replaced some loops to use this proc.
-The sun will reference this list for debugging purposes. The sun will also remove solar equipment in the list which are not connected to a powernet.
-Cut down on some duplicated code.
-Fixed an issue with solar panels not updating their direction correctly.
-Changed the proc updateicon()'s name to update_icon()
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5418 316c924e-a436-60f5-8080-3fe189b3f50e
-Added a solar pack crate to order.
-Machines that have a use_power of 0 will no longer be turned off due to lack of power in the area.
-Fixed a bug with the solar computer not reconnecting to the powernet when dismantled and remantled.
-Increased the cap of crates to 30.
-Some performance tweaks.
-Some standardization.
-All objects of type /obj/machinery/power will try to disconnect from the powernet before deleting, this will help reduce the node list size.
-Added a heat_proof variable for doors. It will effect glass airlocks and it'll determine whether they can block heat or not. Research glass airlocks will always have it enabled.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5344 316c924e-a436-60f5-8080-3fe189b3f50e
-New wraith sprites by TankNut!
-Decreased flare duration, again(!)
-Made a based interact proc and changed the updateDialog to call that instead of attack_hand. This caused issues with the APC and getting the power cell out of it. I then changed all machines that had their own defined proc (that was everywhere)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5001 316c924e-a436-60f5-8080-3fe189b3f50e
-Atmos delay is now based on active players, to help fight lag for massive player rounds.
-Changed some for(blah in world) loops to use the correct lists.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4958 316c924e-a436-60f5-8080-3fe189b3f50e
machine.process() now uses a return value to remove itself from the processing machines list. This is more efficient and will help reduce costs especially at round start where some 5000+ machines were removed from the list using first-find. Now there is no searching involved. Instead of machines.Remove(src) just do .=PROCESS_KILL that will return the flag to the proc which called it (the MC) and trigger its removal from the list. If you're deleting something don't even bother removing it from the machines list, there is no need to.
Simplified the last_processed stuff for the MC. It's now a single variable rather than 3. It is simply a typepath rather than a reference to an object (this is so it works even if said object is deleted)
MC stats in admin status_panels now show the length of the processing lists (indicated by #). I've just realised I forgot to mention what the abbreviations are:
The less obvious ones are: Dis=diseases; Net=pipes; Pnet=powernets; Mch=Machines; Tick=the game-mode ticker.
Beach-water now uses an overlay image rather than a separate object.
Fixed a typo in the shuttle console.
Hydroponics trays no longer use first-find within their process() for checking the plant is in the tray (why is that even there anyway? talk about lazy)
Removed some junk/placeholder procs like organ/proc/process() return
Removed newscasters from the processing machines lists.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4603 316c924e-a436-60f5-8080-3fe189b3f50e
All credits to the author for this handy little script.
I Committed the modified python script to tool directory. Although it needs to be in the root folder of your repo to work.
To notice the improved compile times, in dreammaker go to Build > Preferences > and untick "automatically set file_dir for subfolders"
If this commit inteferes with any large projects just revert it, do your thing, then rerun the script. Easy-peasy.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4488 316c924e-a436-60f5-8080-3fe189b3f50e
-Almost every instance of 'for(mob in world)' has been killed. Because GODDAMN was it being run a bunch. Instead, a series of global lists have been made, and they are all handled auto-magically through New()'s, Del()'s, Login()'s, death()'s, etc...
Lists are as follows:
-mob_list : Contains all atom/mobs by ref
-player_list : Like mob_list, but only contains mobs with clients attached
-admin_list : Like player_list, but holds all mobs with clients attached and admin status
-living_mob_list : Contains all mobs that ARE alive, regardless of client status
-dead_mob_list : Contains all mobs that are dead, which comes down to corpses and ghosts
-cable_list : A list containing every obj/structure/cable in existence
Note: There is an object (/obj/item/debuglist) that you can use to check the contents of each of the lists except for cables (Since getting a message saying "a cable," x9001 isn't very helpful)
These lists have been tested as much as I could on my own, and have been mostly implemented. There are still places where they could be used, but for now it's important that the core is working. If this all checks out I would really like to implement it into the MC as well, simply so it doesn't check call Life() on every mob by checking for all the ones in world every damn tick.
Just testing locally I was able to notice improvements with certain aspects, like admin verbs being MUCH more responsive (They checked for every mob in the world every time they were clicked), many sources of needless lag were cut out (Like Adminwho and Who checking every single mob when clicked), and due to the cable_list powernet rebuilding is MUCH more efficient, because instead of checking for every cable in the world every time a powernet was broken (read: A cable was deleted), it runs though the pre-made list, and even with a singulo tearing all the way across the station, the powernet load was VERY small compared to pretty much everything else.
If you want to know how any of this works, check global_lists.dm, there I have it rigorously commented, and it should provide an understanding of what's going on.
Mob related in worlds before this commit: 1262
After: 4
I'm helping
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4179 316c924e-a436-60f5-8080-3fe189b3f50e
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.
r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds
[VGTG]
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
Set the solar control computers to 'off' by default since you have to set them off then back on again to get them working properly anyway.
Fixed a typo in glass/attackby() causing lit-glass tiles to not be created. Fixes issue 593
Moved certain procs in human/life.dm() into an if(stat != DEAD). This means that certain procs will update only if the mob is alive.
Affected procs:
- handle_virus_updates()
- handle_changeling()
- handle_mutations_and_radiation()
- handle_chemicals_in_body()
- handle_disabilities()
- handle_random_events()
- update_canmove()
- - If dead, it forces mob.canmove to 0, meaning you don't get to be the walking dead.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3925 316c924e-a436-60f5-8080-3fe189b3f50e
/obj/effects is now /obj/effect.
/obj/station_objects is now /obj/structure.
Did a bit of minor blob work.
The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly.
Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up.
The medbay/tox monkeys names are random once more. More random name monkeys will help with changeling and clean up the observe/mob menus.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
Two new categories were made: station_objects and effects. station_objects, which I'm sure someone will want renamed to 'structures' contains the objects which don't need process() or power code.
Effects contains objects which are either landmarks, triggers, spawners or decal.
Screenshot:
http://www.kamletos.si/new%20object%20tree.PNG
I didn't notice any bugs, but with a revision editing 276 files of byond code, you never know.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2323 316c924e-a436-60f5-8080-3fe189b3f50e
Solars should work a bit better now.
Removed the old shield item as it has not been used in forever and was cluttering up some of the mob code.
IonRifle only has 5 shots before it needs to be reloaded down from 10.
Lowered the weakbullet's stun to match the taser.
You can no longer recall the shuttle on meteor.
Fixed a bug I caused on rev where if the revs were in space and dead it would count them as living.
Bit of blob work.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2220 316c924e-a436-60f5-8080-3fe189b3f50e
Flashlights
Cigs/lighters
Solars
RCDs can no longer build airlocks on doors
Airlocks now smash glass that is under them when they close
AI sat firewall that is not really quite a firewall removed
The solars will no longer update if they lack a controler
Cut down on machines that don't actually do anything like fake sleepers and shuttle engines
There is still a few shuttle engines around and I have no idea where, my map was already corrupted once by this so I am just leaving the define in for now.
After a talk with some of the head coders
Cyborgs can no longer be traitors at round start
Some of the off Z1 areas cleaned up
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2028 316c924e-a436-60f5-8080-3fe189b3f50e
- Solars now bring out a fixed value. 700W each, meaning 60 of them (one array) generates 42000W. Not enough to power the station? That's the point. Although 4 x 42000W = 168000. This might be nerfed soon.
- Sun removed. Seriously, that thing ate up processor time and was completely useless.
- Solar tracker remains on the map but is completely useless. Will remove.
- Also reverted the cable updates from r1729. The code from prior to that revision might be as laggy as it was, but it works properly. After the revision powernets didn't calculate available power properly and did not update properly when new pieces were made (They stopped updating at the first wire piece which ended in a knot (non-smooth cable piece))
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1897 316c924e-a436-60f5-8080-3fe189b3f50e
- added roller bed (for medics). Place human, buckle him to this bed, the bed raises and can be pulled.
- eggs and tomatoes can be smashed of wall, floor [s]or captain's face[/s] not yes.
Code by Balagi, sprites by Farart.
-some fixes for the crew monitoring computer. It can be disassembled now.
-added crew monitoring circuit board. Requires programming 3, biotech 2, magnets 2.
-Mech Bay Power Control Console и Solar Control can be disassembled now.
-added crew Mech Bay Power Control Console circuit. Requirements are programming=2, powerstorage=3.
-Solar Control circuit boardcan be researched. Requirements are programming=2, powerstorage=2.
-R&D Console can be researched and created (requires programming 6). But R&D Console cannot be deconstructed for tech points. That's intended.
Code by Jack Rost.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1880 316c924e-a436-60f5-8080-3fe189b3f50e
Singularity Engine
-Recoded some parts, still works mostly the same
Welders
-Recoded, it works mostly the same but is easier to use in code
-Cyborgs have a larger fuel tank
-Brought most if not all of the areas that use welders upto spec
Moved the changeling chem recharge code into the human life proc
New players who log out before spawning in are now deleted
New minor Common event
Machines around the station use more power, system might need some changes later
Likely few other minor changes that I just cant think of atm
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@945 316c924e-a436-60f5-8080-3fe189b3f50e
As a side effect, I had to add some ex_act() procs to things because the rods kept getting stuck on them.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@941 316c924e-a436-60f5-8080-3fe189b3f50e