We discovered that most of the problems were were having was because of BYOND passing lists (e.g. SE and UI) by-ref instead of the assumed by-val.
This commit adds dna.Clone() and (UI|SE).Copy() where needed. These should be used where DNA or SE/UI lists are COPIED, otherwise changes made in the reference will affect the real strand.
This change also messes with the gene activation logic.
Conflicts:
code/game/dna/dna2_domutcheck.dm
code/game/dna/genes/powers.dm
We discovered that most of the problems were were having was because of BYOND passing lists (e.g. SE and UI) by-ref instead of the assumed by-val.
This commit adds dna.Clone() and (UI|SE).Copy() where needed. These should be used where DNA or SE/UI lists are COPIED, otherwise changes made in the reference will affect the real strand.
This change also messes with the gene activation logic.
DNA now stores blocks internally as numbers and only makes the uni_identity and struc_enzymes strings when something has changed. This is vastly more efficient.
In addition, the API for using it has been simplified. Common tasks, such as setting a sub-block, or getting a value from the block, are handled entirely by the DNA datum with simple, easy-to-use procs.
Tested on local server, but may need balancing and additional look-over since the code is from our server (/vg/) and I likely broke or forgot something.
- modifying how runes are called to use reflection
- adding highlander code to make sure that there can only be one mask
- adding Spread Shadows spell
- adding cult admin investigation log
- adding mask icon
- creating the mask entity
- modifying the code for cult icons
- updating the camera net
- adding visibility network updates to all mobs
- unifying the culting and deculting process
- adding "Make Mask" function to Player Panel
Removed var/constant/Pi It's already defined in setup.dm
Moved a bunch of global_lists to global_lists.dm
Fixed hair randomisation. (still bits to do)
Moved a lot of preferences_setup.dm stuff into __HELPERS/mobs.dm They'll be FAR more helpful as generic procs, rather than something tied to preferences.
Merged mob/var/nopush into status_flags with the CANPUSH flag
Merged mob/var/nodamage into status_flags with the GODMODE flag
Removed mob/var/be_syndicate and mob/var/be_random_name as they are not used.
Added /proc/ui_style2icon(ui_style) proc. It converts a string like "Midnight" into its corresponding dmi file. The code fore creating a new hud uses it.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5164 316c924e-a436-60f5-8080-3fe189b3f50e
-Cameras won't shock you anymore, when cutting the power wire.
-Cultists cannot be gibbed by placing more runes that is allowed, instead it says no and to clear any unused runes.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4926 316c924e-a436-60f5-8080-3fe189b3f50e
Added in a message for player-parrots trying to use the 'sit' verb when no perch is in range.
Removed the 'Warning, this is unfinished!' message when trying to spawn parrots.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4925 316c924e-a436-60f5-8080-3fe189b3f50e
-Now when examining someone you can tell if their brain is missing, and it doesn't give the 'catatonic' part (Because the player is in a different mob and it's kind of misleading)
-Committed Lugar223's patch for the temperature gun, preventing the window from re-opening as it heats up/cools down
Fixes Issue 900
-Fixed the issue where dead players could use pAI carts if they left the window open
Fixes Issue 967
-Changed how the Destructive Analyzer handles sheets, now it will only deconstruct 1 sheet out of the stack at a time. Also found a bug where it would destroy its own components, so that is fixed as well.
Fixes Issue 989
-Secborgs can no longer put their stun baton or energy gun in rechargers, added a check for /mob/living/silicon
Fixes Issue 972
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4807 316c924e-a436-60f5-8080-3fe189b3f50e
- 'usr' was used in place of 'src' which caused problems since the AI's emp_act() can call ai_call_shuttle().
Added comments to mob/attackby and changed a magic number into the #define we have set for it.
Simple animals must now be manually added to a proc before admins can animalize players into them. Hopefully this will encourage coders who make new simple animals to test them being player-controlled before they allow them to become admin-spawnable.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4594 316c924e-a436-60f5-8080-3fe189b3f50e
Simple_animal fixes:
- Mice now properly get added to the mob list.
- Simple animals no longer use emotes if they have a client attached.
- Bears no longer run their AI stuff if they have a client attached.
This means that admins can now use the 'Animalize' button to turn players into mice and bears!
Map fixes:
- That window near arrival shuttle is back where it is supposed to be.
- Nuke op shuttle has red floors again.
- Holodeck's beach program once again has a beach.
- The beach once again is a beach.
- Re-added plating in the centcomm control room (where A.L.I.C.E. is.)
Changelog updated.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4583 316c924e-a436-60f5-8080-3fe189b3f50e
Unfortunately I had to disallow certain animal types until they can be fixed.
- Mice: I know, it sucks. Mice were the reason I started making this button to begin with, and it's something that both players and admins are requesting. The problem is that when a mob is turned into a mouse, for some reason it becomes impossible to pull up their player panel. If that gets fixed, I'll allow this button to turn players into mice.
- Space Bears: The bear's AI does not seem to turn off when it is player controlled. Basically the bear will automatically maul nearby players to death and spam emotes regardless of the player's actions or inaction.
- Parrots: They are unfinished. They have no sprite, no movement and are completely untested. They were one of Poly's creations that never ended up getting finished. I like the idea of parrots though, someone should work on them!
- Space Worms: Another unfinished project. Currently they drop new space worms when the player moves and you can end up eating your own tail. Eating your tail drops a new space worm and regenerates your tail. I only spent about 15 seconds as a space worm, so there are probably more issues.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4557 316c924e-a436-60f5-8080-3fe189b3f50e
> A clown's medical, crew, and security records are updated with his newname. (read below for details)
> reject_bad_name() now checks for dumb names like "space","floor","wall","r-wall","monkey","unknown","inactive ai" (if you know any other important ones let me know)
> clname() [clown-name] and ainame() [AI name], procs which allow those players to rename themselves, were merged into /mob/proc/rename_self(var/role, var/allow_numbers=0)
This proc gives the mob 3 chances to name itself. It checks names using reject_bad_name() (the same thing that checks the round-start names). If it fails 3 times it will not change the name. If it succeeds it will call the proc in the next bullet point.
> /mob/proc/fully_replace_character_name(var/oldname,var/newname) will replace most references to a mob's oldname and replace it with newname. It updates name, real_name, mind.name, updates their id, updates their pda and updates all their data_core records (manifest records like medical, security, general, locked)
> data_core procs merged because they were massive and all identical.
> accidentally fixed an AI sound which accidentally played upon login. It conflicted with the "Welcome to the station crew" announcement. So I commented that out to try the 'new' fixed one. If people hate it I'll comment it back to how it was.
> naming a mob with the big name at the top of viewvars will use fully_replace_character_name()
> Removed an uneccessary regenerate_icons() proc from every player which spawns. Should speed up spawns a smidge
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4396 316c924e-a436-60f5-8080-3fe189b3f50e
Minds part2 - Carn loses her mind.
The way datum/mind stuff works has been changed a lot. I really can't explain everything. If you have any questions it'd just be easier if you leave a comment or ask me in coderbus.
Generally, minds now represent IC characters rather than following a client around constantly. Minds can change owners, mobs, (names WIP).
Technical babble:
The var/current and var/original variables of the mind datum must always be of type mob/living (or null). Please do not mind.transfer_to(ghost_mob). If you want to ghost somebody use ghostize()! It will do all the technical stuff for you.
mob/dead/observer/var/corpse was removed. mob/dead/observer/var/mind is now used as a reference to the last mind the player had (so respawning code has something to reference), but also because mind.current is a far more useful way of tracking a corpse. If somebody triggers a mind.transfer_to() call on your corpse, your mind will be tranfered to another mob/living or something...that will then be considered your corpse. This could allow for more interesting mind_transfers. For instance, the "raise corpse" rune ghostizes any player in the corpse to be raised and selectes a random dead player to take possesion of their character! The person possesing them will have all of their memories, objectives, etc. The poor guy who was originally the owner cannot re-enter body if there is another player in his body...but if that player is ghosted he can once again return. Exorcisms anybody?
Changes to cloning and hydroponics. I will likely have to rework these later as they're hacky as hell right now.
A lot of stuff is now handled by Login/Logout rather than in hundreds of different places. One such example, mind datums get their variables updated at Login and Logout.
Fixed a few minor bugs. I'll update the issues manually in a bit because I literally cannot think atm.
TL;DR guide:
-If you want to make somebody a ghost use ghostize(). Or you will need to find a doctor to stitch your bits back on. :)
-You don't have to worry about making minds. Simply doing key="carnwennan" or whatever will either: A) make a new mind and initialise it if there isn't one or B) take possession of the mind currently attached to the mob.
-It's safe to transfer a mind even if a key isn't in-body (e.g. they are ghosted/admin-observing etc!) Minds have an active variable which tracks whether they are currently synced with a key. This is to avoid dragging ghosts back into their bodies when say, a wizard mind_transfers them.
-Transferring a mind whilst var/active=1 will cause the following: mob.key = mind.key. So no need to do that separately (in fact you'll lag things if you do, so don't)
-If you do want to initialize a mind manually, say if you don't have a client to login to the mob yet, simply do new_mob.mind_initialize(). Simple! When someody is logged into that mob they will take ownership of the mind and it will sync up.
NOTE: a lot is probably broken since this is a pretty massive change. Please let me know asap (with actual info! Shouting at me, "IT BORKED HALP", doesn't help)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4342 316c924e-a436-60f5-8080-3fe189b3f50e
This part focuses on:
-structuring the way silicon mobs initialise upon login (there was some hideous copypasta in Login() and New() which used spawn() to change the order of the calls so it was all jumbled up. I think I've got it sorted now.
-Borgs var/real_name was not initialising as "Cyborg". Meaning the name checks were kind of borked.
-Ghosts are now deleted at logout if they no longer have a key. This will stop unneeded ghosts being left lying around. It will not delete ghosts with keys assigned (so people can't respawn or anything). Removed all the del(ghost_ref) stuff I could find. Generally movign the key from a ghost should be the last thing you do as the ghost will be deleted by Logout. However I've put it in a spawn() to hopefully avoid coders accisentally using it in a way which causes runtimes.
-Fixed clone-plants spawning dud potato-people left, right and centre. They'll now dump seeds if it fails for whatever reason.
-Cultist and Rev status are removed at mob/living/silicon/Login() rather than having to be called on a special-case basis everywhere. This may not be necessary when this stuff is finished.
-Removed a bunch of :
-Commented mob/living/Login() with the rest of the antag-indicator code from cloning.dm and hydroponics.dm for any coders whom feel brave/suicidal to fix the related issues
Next on the agenda, replacing mob/var/original_name with datum/mind/var/name to fix the ticker runtimes
Then, fixing mind/proc/transfer_to(mob) once and for all. (There are issues with duplicate minds, role updates, inconsistent initialisation etc etc *yawn*
There's probably a few obscure bugs in there somewhere. Might want to hold off on the updates for a bit. Coderbus will likely spot them all by the end of the week.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4322 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
-Added a new wire to Cyborgs. The Camera wire allows you to disable the Cyborg's camera. It will show on Security Consoles as "Cyborg-155 (deactivated)". Pulsing it provides you and the Cyborg with a message of the Cyborg's camera focusing loudly. It will also kick anyone who is watching the Cyborg's camera out.
-Traitor Cyborgs, when scrambling their codes, now have a completely disabled camera. It will not show up on Security Consoles at all, even as deactivated.
-Added a new small guide for new Cyborgs. It is similar to the AI's with some more useful information specific to Cyborgs.
-Commented out the old message, it was copy+pasted everywhere.
-Changed RandomBorgWires to not rely on lucking out and landing on a previously unused index.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4089 316c924e-a436-60f5-8080-3fe189b3f50e
-Fixed an unlisted issue involving RD consoles. Now you can use a screwdriver to change the access protocols on the board itself, to be either a core console or robotics one
-Fixed Issue 546, the part of the AIize() that cleared the music was a part of human code, but at round-start it is 'new_player' that is AIized. Moved that part to mob/AIize()
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4014 316c924e-a436-60f5-8080-3fe189b3f50e
Replaced every l_hand = and r_hand = and all that if(hand) crap to use standardised procs. This means we can use procs like Dropped() reliably as they will always be called when things are dropped.
Thorough documentation to come. But generally, if you want a mob's icons to update after deleting something in the inventory...use drop_from_inventory(the_thing_you_wanna_drop) just before deleting it. If you wanna put something in a mob's hands use put_in_hands() (or one of the variants). It'll try putting it in active hand first, then inactive, then the floor. They handle layers, overlays, screenlocs calling various procs such as dropped() etc for you. Easy
mob.equipped() is now mob.get_active_hand() because there was another totally unrelated proc named equipped() and stuff was confusing.
Weakening was made instantaneous.
Minor optimisations for human/handle_regular_status_updates(). I'll port these changes over to the other mobs next. Basically it should stop it constantly incrementing every status effect even after death.
umm... bunch of overlays related fixes... I think that's everything. :/
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3900 316c924e-a436-60f5-8080-3fe189b3f50e
- No longer able to be cultists because their objectives completely contradicts robotic laws. Fixes issue 510.
- No longer able to be revolutionaries.
- - There was existing code for this already, but it should function properly now.
- - It now takes into account admin's borging players.
pAI's can no longer see revolutionaries or cultists.
- pAI's get a brand new mind instead of wiping their previous antag status.
- This way it prevents players exploiting the cult/rev hud icons and it does not affect the end-round scores and statistics.
Piano's 'repeat' has a limit of 10.
- This will stop byond from thinking playsong() is an infinite loop and crashing the server.
- Added a check so that players can not bypass the limit without stopping the song first.
- 10 is just an arbitrary number I chose, feel free to change it but keep it within reason... and byond's limits.
Fixed a bunch of 'emergancy' misspellings.
- Commit log worthy material right here.
Fixed a bunch of 'emergancy' misspellings.
- Commit log worthy material right here.
Changelog updated.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3878 316c924e-a436-60f5-8080-3fe189b3f50e
update_clothing() has been broken up into it's key parts. A full explanation can be found in code/modules/mob/living/carbon/human/update_icons.dm
the tl;dr of it is that overlay updates are no longer called by the gameticker. Instead they are called by procs such as u_equip db_cick etc. This means faster updates (although admittedly, more of them can be called per tick). This however is offset by the fact that specific overlays can be updated now, vastly improving its efficiency. This will especially help when there are large numbers of dead mobs.
Fixed the throw code for TKgrab so it can be toggled.
Cloaking for aliens/humans/ninjas was changed. It's very crude at the moment and for that I apologise. But it works and is very efficient.It also stops cloaked individuals becomming invincible due to people being unable to hit them (even when they know exactly where they are)
Fixed a bunch of bugs with damage-overlays. They were updating FAR FAR to frequently. They were also horribly inefficient. They should now be virtually seamless when updating and only use cached icons, so they aren't affected by lag as badly. This may help with explosions lag a little.
There's still a tonne of stuff I need to refine with this. I'll be refining it down into some helper procs to reduce on code duplication and such
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3811 316c924e-a436-60f5-8080-3fe189b3f50e
Fixes issue 417
- Ghosts no longer block AI spawning
- Grilles no longer shock you if you're in an exosuit
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3279 316c924e-a436-60f5-8080-3fe189b3f50e