Commit Graph

48 Commits

Author SHA1 Message Date
cacogen
1f010e7144 Selectively randomisable characters (#46108)
* Selectively randomisable characters

* it's a list now

* this doesn't work

* it's totally fucking fucked mate big time

* it works

* so sick of this goddamn pull request and yes i know this is a retarded way to do this it didn't work the other way

* anturk forestalls the inevitable suicide

'associative lists are more performant'

* final changes anturk requested

'remove all the "in randomise" and it's ready'
2019-09-06 08:50:12 +02:00
RandolfTheMeh
48fbc073e5 [TMC] Defib Rework, Organ Damage Effects (#45104)
* Brain damage works on organ damage procs, some defib reworks

* Heart and Lung damaging effects and failure, liver damage and failure moved to its organ again

* Cleans up reused global

* Organ damage procs on living and living/carbon

* Changes brain damage procs again

* SR heals all organs on revive, no decay for cybernetic implants, stomach damage and fail effects.

* Damage and failure effects for the appendix, ears, and some touchups on the stomach

* Committing changes so I don't lose them

* Organs now cease decaying in the proper containers

* Organ Fridges

* Reverts map changes

* Adds coronary bypass, lobectomy, trying to deal with organ_stat runtime

* Actually fixes merge conflict

* Smartfridge tweaks

* Think I figured out map merger

* Evidently not

* Still runtiming with glass shards even after I remove the map changes?

* Fixes runtime error with brain_item

* Runtime fix on living/carbon/life

* Cleaning up old PR code

* Brain damage fix, moves defines to actually be in _DEFINES, under DNA since that's where organ slots were

* Wrong math operation used

* Brains in MMIs no longer decay

* Removes redundant variable, and defibs no longer work on heart attacks caused by failing hearts

* Removes misleading comment

* init freezes organs in case organ crates are added, morgue corpses are frozen, removes adjustLiverLoss

* Removes random spaces, scanners check brain damage severity now

* Swaps numbers for defines, fixes brain surgery, rebalances coronary bypass bleed since that was insane last I tested it

* List change

* Runs off of an index instead of using cut

* Brains can be put into organ fridges

* Fixes minor type, hotfix for cloning problem

* Removes pointless check

* Demon hearts no longer decay

* Nightmare hearts no longer decay

* Removes istype() check on process, sets can_decompose instead

* Condenses organ damage report

* Removes organ failure messages

* Less organ damage spam, implements organ threshold messages instead

* Brain damage messages go to owner, not source

* Self-examine shows damaged organs

* Minor code cleanup, adds autodoc comments to the new procs

* Inverts standard organ vars to prevent random organs decaying, adds a few more autodoc comments.

* Merged the booleans into a set of flags

* Healthy living improves organ healing rates

* dunno why this didn't update

* my actions have consequences

* Sets ORGAN_SYNTHETIC for overlooked robotics organs

* Doubles heart decay time

* 3 minute heart decay

* Lobectomy/Coronary_Bypass heal more

* removes hivemind spells from the changes
2019-07-29 02:18:22 -07:00
Qustinnus
b33d1c49a3 [READY] Floydmats (Datum materials) & custom toolboxes (#45118)
* Initial work

* more

* ass

* wsedfwedff

* asss

* test

* stuff

* fuck

* sss

a

* kms

* asdadwedwdfwefwef

* start

* test

* dwwdew

* ewefwfef

* Redemption machine (#8)

* Redemption machine

* Removes debug messages

* changes

* fuckmyshitup

* coin mint works with new material shenanigans (#10)

* Auto stash before merge of "materials" and "origin/materials"

* woops

* furnace (#11)

* autolathe manufacturing of toolboxes

* eggs in a basket

* some small changes

* matcolors

* documentation

* more documentation and effects

* done

* Color man bad (#12)

* fixes designs

* ass

* more fixes

* fuck me

* firestacks adder

* epic fixes

* fixes designs

* DONE DIDDILY DOO

* removes category macro

* ch-ch-ch-changes

* fixes some stuff

* Fixes display of ore values (#9)

* Redemption machine

* Removes debug messages

* Re-adds value display

* Replaces the fire stacking component with an element instead (#13)

* fixes examine

* fixes ligma bugs

* double ligma boofus

* fix

* misses some defines

* fixes ORM

* Update code/datums/components/material_container.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* fixes

* Makes glass objects weaker (#14)

* Makes glass objects weaker

* uses correct proc

* fixes shit

* honk honk

* better

* oh shit oh fuck

* fixes

* fuck ORMs

* fixes the biogen

* documentation

* ass (#15)

* component

* changes

* ass

* ass

* doc

* Auto stash before merge of "materials-plasmacomponent" and "origin/materials-plasmacomponent"

* fixes rounding

* fixed
2019-07-24 11:27:01 -04:00
AnturK
4be070827f Fixes simple animal emotes / Refactors emote list (#44458)
* Fixes simple animal emotes.

* Makes emotes support multiple datums per key properly.

* Apply suggestions from code review

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>
2019-06-13 09:33:48 -04:00
Armhulen
84d4b3aae6 Mushroom people, revived! (#35858)
* caps fixed, small other fixes and mushpunch

* honey, i fixed the bugs!

* STUPID YORII DUMB GIRL STINK LEAVE

* boolean is such a fun word

* zoinks

* F_XED

* fixes part 2

* TRUEs and FALSEs

* don't drink and code boys unless you're goofball or like maybe kor

* for entirely different reasons i mean

* at what point is goofball too drunk to troll but not drunk enough to shitcode

* cool your jets, travis.

* what a TRAVIS-TY

* mush added to yet another blacklist!
2018-03-07 21:34:56 -06:00
Dax Dupont
7d9b8e453f Fixes moff wing prefs not being applied 2018-01-21 01:22:48 -06:00
ShizCalev
8eafaccc88 Cleans up unused code 2017-11-20 00:03:33 -05:00
kevinz000
caa1e1f400 Massive research refactor; changes research system to techwebs; Decentralized research 2017-11-18 19:55:40 -08:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
Cyberboss
9e1ef0ffe2 Global variable wrappers (#25325)
* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
2017-04-06 23:26:13 -06:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Lzimann
b3c83baf42 Refactors the emote code into datums. 2016-12-22 20:28:41 -02:00
Incoming
b5d92f7a66 New lizard sprites and digitigrade limbs final initial pull 2016-09-19 23:09:50 -04:00
Core0verload
3af3bd2938 R&D machinery refactor (#18295)
* RnD machinery refactor

* Small changes

* Removed designs selling
2016-06-08 17:18:22 +12:00
Shadowlight213
86cbe14d15 Conflict fixes 2016-05-19 20:42:26 -07:00
Razharas
0a3ddc886c Turns tablecrafting into personal crafting (#17341)
* Converts tablecrafting to datums

* Adds crafting.dm

Adds crafting.dm

* Fix merge conflicts

Fix merge conflicts

* Fixes dme

* Fixes returns

Fixes returns

* Only check hands and remove old paths

Only check hands and remove old paths

* Recipe fixes

Recipe fixes

* Removed action button

Removed action button
Added small ui button to inventory near the intent wheel
Removed debug
href_list is not longer /list

* Added adjucent checks

Added adjucent checks

* Snacks now get chems from parts

Snacks now get chems from parts

* Complex food fuckery fixed

Complex food fuckery fixed

* Fixes old recipe

Fixes old recipe

* Fix to infinite loops in reagent extraction

Fix to infinite loops in reagent extraction
It was finding old empty containers and tries to extract from them

* Fixes hands not checking

Fixes hands not checking

* Fixes reagents fucking up

Fixes reagents fucking up

* Even more reagent fuck ups fixed and comments

Even more reagent fuck ups fixed and comments

* Fixes all the shit i could find

Fixes all the shit i could find

* Removes debug and mechs

Removes debug and mechs

* Argument renaming

Argument renaming

* Fixes all argument names

Fixes all argument names

* Final fix of arguments

Final fix of arguments
2016-05-09 18:14:48 +02:00
Shadowlight213
6d6e9818cb More WIP
Initial work on spacemove in atmosphere
Getting stunned now launches you and doubles the stun.
2016-04-24 17:41:10 -07:00
Shadowlight213
303bdec6f5 Angel WIP commit 1
Added basic angel wing Mutant parts
2016-04-22 13:36:43 -07:00
Firecage
754491ce4c Changes relatives paths into absolute paths and makes some if()'s better 2016-01-17 01:36:56 +02:00
Incoming
84fc69d825 Removes gender restrictions from socks. 2015-12-30 20:53:40 -05:00
Cheridan
2ebbeef108 Merge pull request #13108 from Incoming5643/I_didnt_even_have_to_touch_savefiles_to_break_them_this_time
Fixes species selection not saving properly between rounds
2015-11-19 21:30:28 -06:00
Incoming
cb5401467d Species selection wasn't saving properly. Why? Because species_list used id as a reference, but roundstart_species used name.
THESE AREN'T THE SAME THINGS.

Both lists now use id, and savefiles will properly look for/save said ids
2015-11-18 22:29:20 -05:00
Incoming
1f9f0dfc40 Adds subtypesof(). It's shorthand for typesof(path) - path.
Replaces typesof(path) - path with subtypesof(path) in obvious places. I was a bit conservative, there's probably a few more places that could use this.
2015-11-16 18:55:57 -05:00
c0
a06271733e Fixes and changes 2015-08-12 20:31:35 +03:00
Ricotez
b8811f23e0 -Added two new types of mutant accessories for humans: tail_human and ears. These ears are considered mutant parts and don't override normal human ears.
-Added one ear and one tail accessory to these categories, obtained from the kitty ears. The ears are obviously cat ears, but the tail can pass for a monkey tail without ears.
-Humans can now also edit alien/mutant colours. They have access to the full range of colours, but if the player switches back to lizard and the colour is too dark, it'll be reset to the default.
-Renamed the original tail to tail_lizard. All references are properly updated and nothing has to be changed.
-Could not solve an annoying bug with the setup window, where a lizard tail is rendered whenever a human tail is set. This problem only exists in the setup window and does not affect the sprite in-game.
2015-06-27 20:57:54 +02:00
Incoming
b92f518435 Readds wagging tail feature with WJohn's help on sprites
Changes some sprites to better show off highlighting
2015-06-13 20:34:38 -04:00
Incoming
007b2bf580 All of WJohn's Lizard Sprites are finally in game!
Each portion individually selectable upon character creation, the number of lizard combinations is bordering on absurdist with six customizable fields.

36,864 unique combinations!
(309,237,645,312 If you count color variations)

Never feel like you can't be unique again! Have fun looking fabulous as the crew beats your special little skull in!
2015-06-05 20:18:56 -04:00
TZK13
127aabbfa9 Adds socks as an underwear option. 2014-12-22 19:27:46 -06:00
paprka
b8eb9e3587 general code optimizations 2014-10-08 10:10:03 -07:00
paprka
5210419a87 undershirts 2014-08-11 22:41:07 -07:00
CollenN
2aab5fa71c Finalizes Mutantrace Datum Update
https://github.com/tgstation/-tg-station/pull/3609

Squashes the commits from the above pull request. Should hopefully be a
lot less cluttered.
2014-06-19 17:42:14 -04:00
Perakp
edb2154b48 - Changes changeling abilities from verbs to proc_holder objects.
- Functionality should be unchanged
- Admins can varedit chemical costs of individual abilities.
- Allows coders to implement sting upgrades more easily.
2014-03-02 09:12:03 +02:00
Razharas
1c394dd334 Implemented crude crafting
Debug messages are still inside, pushing only cozx pete asked me to
2014-01-22 02:11:16 +04:00
supersayu
711654c15e Moved #defines
Moves the constants from defines and compile_options files into the __DEFINES directory.  The compile options in the latter file that are actually tweakable remain in their existing file in the code directory.
Constants from DEFINES.dm, globals.dm, names.dm, and global_lists.dm have been moved into the _globalvars subdirectory.
stylesheet.dm has been moved into the interface directory since that's a better place for it.

This move contains no code changes for stock TG.  It is purely an organizational move meant to clean up hard to read code.
Some global constants that appear to be unused have been put into unused.dm, but not unticked.  This list is by no means exhaustive.

Branches should be aware that they need to move any additional defines and global constants manually.
2013-10-23 16:11:45 -04:00
Incoming
952b946eff Aesthetic changes to the code to help unmuddy update_icons.dm a bit:
female_uniform_icons is now defined in global_lists.dm
A generate_uniform proc has been made in clothing.dm to handle icon generation
2013-09-18 15:12:24 -04:00
Ikarrus
2dfb0ac9f0 Latejoiners can no longer be antagonists if:
[Number of antagonists] >= [Number of Players Joined] / [Scaling coefficient] + 1
2013-05-26 00:24:45 -06:00
carnie
043028db83 Resolves #283
DNA modification uses normally distributed random numbers. Radiation strength dictates the standard deviation of the change in the hex character which is hit (higher output means greater chance for a large change) . Similarly, radiation duration dictates how likely we are to hit the hex-character we clicked on (longer duration means more likely to hit). Irradiation is strength*duration. All balancing is done via multiplier defines so you can rebalance it easily.

DNA blocks and structuring all use defines. Making modification/expansion easier. I'll likely expand this into a datum-based system to allow more interesting features, reduce code further and allow admins to interact with the way dna strings behave.

DNA strings can be spliced together using merge_text().
 e.g. string 1: "Hello World"
 string 2: "Seeya______"
 result: "Seeya World"
 This isn't used except for admin-spawnable SE injectors at the moment.

r_hair, g_hair, b_hair, r_facial, g_facial, b_facial, r_eyes, g_eyes, b_eyes were removed and made into 3 short hex-colors.

Skin tones now support colours other than shades of brown. I've had to restrict it heavily until other stuff is done. Skin tones include Albino Caucasian, Oriental, Mediterranean, etc.

Data disks and DNA injectors were reworked to use associative lists so transferring data is just a matter of doing list.Copy()

var/dna is now defined at /mob/living/carbon level. Only monkeys and humans may have dna currently. Support is there for all carbon-based lifeforms to have dna.

DNA modifier console has almost all controls on one screen.

UIs and UEs can be injected separately (appearance and name, respectively)

dna helper procs like ready_dna() and such were changed to make them more versatile. There is now a hardset_dna() proc as an alternative to ready_dna which can initialize dna with properties passed into it or update an existing dna string (useful for cloning and antag spawning)

Every block of SEs are in randomised positions.

Disabled automatic logging of world.log, as it produced undesirable behaviour.

Mr Muggles and God Emperor of Mankind disks removed.

Floor() removed. (it was completely uneccesary, that is what round() is).

Fixed spelling mistakes in modularchangling.dm (thanks tenebrosity)

Tanning removed from beaches (again)

Experimental: monkeys and humans do not have dna until first attempt to read dna (using check_dna_integrity(mob))
This is mainly due to the way everything is hardcoded into New().

Changelog.html updated
Signed-off-by: carnie <elly1989@rocketmail.com>
2013-04-24 09:37:30 +01:00
Aranclanos
8a68a70335 The automatic shuttle call will now be triggered if there are no communications console on the station z level or an active AI. The shuttle will not have the standard 10 minutes to arrive, instead, it will take 25 minutes, so they have 20 minutes to recall.
They will use the new proc autoshuttlecall() in the emergency_shuttle controller.

Instead of taking a loop on world, there's a new list, shuttle_caller_list, it includes all communication consoles and AIs.

Fixed some weird things regarding recalling the shuttle if the arriving time of the shuttle was bigger than 10 minutes.
2013-04-13 02:17:41 -03:00
carnie
5ca166cae0 Refactored underwear to use datum/sprite_accessory/underwear similar to hair and facial_hair.
People may select any underwear (regardless of gender) at a dresser, but not in preferences.
random_underwear(gender) will return a random pair of underwear suitable for your gender.
Removed an unused variable in sprite_accessory

The new_player preferences screen now randomizes character slots for which there is no data (so no more bald, fat, white guys in diapers greeting new players)
datum/preferences character settings are randomised at New().
replaced /datum/preferences/proc/randomize_appearance_for(human/H) with /datum/preferences/proc/random_character(), it does the same stuff without the copying to a mob. Basically, now when you want to make a random character you just do var/datum/preferences/A = new(); A.copy_to(human_mob), randomisation of appearance and name will already be done. Easy.

Reworked the savefile updating/versioning code to make it easier to work with. I've used it to update underwear preferences to the new system as an example.

Signed-off-by: carnie <elly1989@rocketmail.com>
2013-03-28 11:11:40 +00:00
Cheridan
10bd174a03 Underwear update! Adds two new undie styles, a modest tankini for ladies and red briefs for the guys.
Adjusts a couple hardcoded lines to make adding more undies in the future easier.
Adds dressers! Similar to mirrors, they let you change your underpants.
2013-03-27 00:08:45 -05:00
aranclanos@hotmail.com
df1b5394da Changes on how some simple hostile mobs search for targets, they now make a list of mobs at sight with the heareable() proc and add the mechs of a new global list instead of checking all the atoms in a radius of 21x21.
The new global list is called mechas_list, it contains all the mechs (sadly the 8 mechs of centcomm are added to this list, just to avoid problems with other servers with different maps)
Clowns, goats and spiders still use the old way to track targets (the view() proc).

The goal of this commit is to reduce lag, it will be really noticeable on the carp migration event, they should be 70% less laggy.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5820 316c924e-a436-60f5-8080-3fe189b3f50e
2013-03-08 07:22:34 +00:00
giacomand@gmail.com
4989c88a22 Committing carn's modifications to events and other things. Full details below.
http://forums.nanotrasen.com/viewtopic.php?f=16&t=12245#p189186

Ported all the random events to Pete/Gia's event system:
>Event system now supports weighting. default is 10. a weight of 5 is half as likely as default, 20 twice as likely....etc.
>Increased the frequency of events (dust happens over 60% of the time though)
>tidied up some ninja code: ninjas now get ~5 objectives. So they are hardmode.
>made the gravity toggle into a random event
>event system now supports round-start events
>event system now supports holiday events
>event system now supports events which can only happen after the round has lasted a certain number of ticks
>event system now supports max_occurrences for events. Setting any event's max_occurrences to 0 will stop it randomly occurring
>events now support being fed associative lists inside new(). This allows you to override their variables easily.
>wormhole events no longer cause loads of lag. They are extremely deadly. wormholes should be avoided

Other:
>replaced the procs for fetching candidates for ninjas and aliums with /proc/get_candidates(be_special_flag), it returns a list of active clients with that be_special preference enabled.
>minor fixes to minds
>your memories are displayed to you at Login()
>removed aliens_allowed
>removed ninjas_allowed
>pick_n_take() is now more efficient (uses Cut() rather than Remove()


Things I added:

 - Made the pandemic call ..() instead of doing the checks itself.
 - Made the staff of animation use more charge.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5720 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-17 11:44:37 +00:00
petethegoat@gmail.com
75a7d34ec9 Committing datum based surgery proper. There's a brief explanation in surgery.dm, if you want to know how it works.
Basically, surgeries are now initiated by bedsheets or surgical drapes, and consist of separate steps.
Appendicitis is sort of hacky, but it should work for now. I'll update it when I add processing organs.

Added getbrain() and getappendix() procs, which can be used instead of checking the old (now missing) x_op_stage variables.

Added a surgical apron, using old sprites by matty.

Updated the map:
Removed the note with spell descriptions from the wizard's den for Kor.
Updated the operating room.
Updated xenobio to have appropriate tools for slime surgery.

Path changes:
/obj/item/brain > /obj/item/organ/brain
/obj/item/weapon/reagent_containers/food/snacks/appendix > /obj/item/organ/appendix
/obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed > /obj/item/organ/appendix


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5703 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-14 01:20:58 +00:00
giacomand@gmail.com
e6d0ec4859 - Major optimisations to handle_reactions().
How is this an improvement? Before we looped through every possible reaction to see if a reaction would occure with our list of reagents. Now we already make a list of reagents which can have a reactions, cutting down on searching every single time. This will decrease the loop expensive iterations from 100s to only a handful.

How does it work? We format our chemical_reactions_list like this:

chemical_reactions_list[reagent_id] = list()

And then we fill that list of possible reactions. Thanks to Exadv1, to cut down on redundancy we only need to have a reaction in a single list at a single time, because our handle_reaction() loop will handle that.

Here is a paste of the structure of the list on runtime. http://privatepaste.com/327bb61628

(has: = an entry in the list that it is nested in)

 - Fixed mecha weapons shooting over people lying down.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5569 316c924e-a436-60f5-8080-3fe189b3f50e
2013-01-17 20:34:47 +00:00
elly1989@rocketmail.com
73b54b017b Removed mob/var/UI, it now uses client.prefs.UI_style
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
2012-11-22 15:22:08 +00:00
elly1989@rocketmail.com
bebf4983f8 Removed the toggle_gravity_on() and toggle_gravity_off() verbs and moved them into a single toggle in the FUN section of the secrets panel.
Likewise, removed the spawn_xeno verb and made an equivalent bit of code in the FUN section of the secrets panel.
Fixed the create_xeno proc. It was supposed to ask you which type of alien to spawn but it was sending the popup to src, which should have been usr.
Create_xeno can now spawn queens and larva.
Create_xeno is fed a ckey (optional) rather than a ghost mob. Which will make it more versatile and reliable should clients log out during popups and such.

Created an client.is_afk(duration) proc. If the client has been inactive for duration frames (11 frames is roughly 1 second), it will return the number of frames it has been inactive. Otherwise it returns 0. If no duration value is given it defults to 3000 which is roughly 5 minutes. There's a bunch of code I need to replace with this which I will do after I've got the rest of the admin rank stuff finished as that takes priority.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5040 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-11 19:15:11 +00:00
elly1989@rocketmail.com
b1fdee2e32 Changed some global_list stuff:
>tried to make the comments less confusing.
>Removed the procs for rebuilding the lists (they weren't meant to be used and half were broken anyway).
>added a directory. It maps ckey to client like so directory[ckey] = client. It could be used for PMs, banning, and various other admin tools rather than using \ref[]
>var/list/admins is now a list of clients whom are admins.
>var/list/admin_datums is what var/list/admins used to be. A map from ckey -> admin datum
Most of this is so I can add modular admin ranks in a non-horrendous way and fix some existing issues.
>var/list/client_list is now var/list/clients (laziness sorry)
>removed some needless loops and stuff.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4951 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-24 20:11:39 +00:00
elly1989@rocketmail.com
7b720a20b6 >Moved most of the helper procs into code/__HELPERS. If you see ANYTHING generic enough to be a helper proc just throw it in there and help purge the copypasta 5ever
>Replaced dd_text2list, dd_text2listcase, tg_text2listcase and tg_text2list with text2list and text2listEx. text2list will return a list of each and every character in the string if you set separator=""
>added return_file_text(filepath) which returns text from a file after doing some checks: does the file exist? is the file empty? It prints helpful error messages to the world.log if it runs into problems
>Replaced dd_file2list(filepath, seperator) with file2list(filepath, seperator). It just calls text2list(return_file_text(filepath), seperator). rather than copypasta
>Replaced time_stamp() so it's not as retarded
>Lots of the world setup stuff uses file2list now, rather than file2text -> sanity -> text2list
>Added error() warning() testing() procs. These print messages to world.log with a prefix. e.g. ## ERROR: msg.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4948 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-24 14:39:36 +00:00