Commit Graph

367 Commits

Author SHA1 Message Date
Mloc-Argent
79495f710a Refactors the code to work with BYOND 500. Big commit.
Var changes:
* /obj/item/var/color is now item_color
* /obj/machinery/portable_atmospherics/canister/var/color is now canister_color
* /obj/machinery/atmospherics/var/color is now pipe_color
* /mob/living/simple_animal/mouse/var/color is now body_color
* /mob/living/simple_animal/chicken/var/color is now body_color

Proc changes:
* /obj/machinery/door/proc/animate() is now do_animate()
* /obj/machinery/transformer/proc/transform() is now do_transform()

Map changes are due to pipe instances being changed from color to pipe_color

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2013-10-06 19:47:30 +01:00
Cheridan
e029c078ef Merge pull request #1478 from Miauw62/variousfixes
Various Fixes
2013-10-05 12:04:13 -07:00
Miauw
4adf4fa4e9 Improved APC fix: breaker can be toggled regardless of power, power can be set to off or auto when there's no power instead of only off. 2013-10-04 20:14:07 +02:00
Miauw
67e7eb86bd You can no longer turn on depleted APCs for a split-second 2013-09-29 14:31:26 +02:00
Aranclanos
05e894751a Merge pull request #1413 from JJRcop/nar-sie-red-alert-fix
Fixes corner-case exploit regarding nar-sie and red alert
2013-09-28 15:47:15 -07:00
JJRcop
2524cc00c1 Fixes corner-case exploit regarding nar-sie and red alert
Changes the time the shuttle comes with a nar-sie to 3 minutes, as Centcom
is probably rushing anyway because there is a giant unidentified god
running around the station.
2013-09-25 12:22:49 -04:00
Cheridan
a1d3680ca2 Merge pull request #1434 from fleure/coils
Fixed cable coils disappearing when combined
2013-09-23 20:59:27 -07:00
Fleure
5b7c4a4364 Fixed cable coils disappearing when combined 2013-09-22 00:50:38 +01:00
Malkevin
ce0828c600 Radiation Collector analyzing
Checking a collector's last power output via analyzers has been moved to multitools, because that actually made sense (betcha didn't know this existed, I know I didn't)

Analyzers can now be used to check the gas level of the tank in a loaded radiation collector (yay no more crowbars)
You can also use them on pipes to check gas levels (yay no more pipe meters)

Codewise, the several inconsistant instances of the analyzer code have been moved to a single proc. The following have been converted to use this:
-Pipes (they didn't have this before. Also changed the attackby code to be less dumb...)
-Pipe tanks (you know those big ones in maint everyone forgets about)
-Portable Atmospherics (canisters, air pumps, scrubbers)
-Flamethrower
-Tanks
-And now collectors
2013-09-19 22:15:11 +01:00
supersayu
a993ce62db Bugfixen and minor changes. Fixes #136.
Adjusts the click code to not use client/Click().  The code is largely unchanged, except that it allows the compiler default behaviour of calling atom/Click(), and then forwards the call to mob/ClickOn().  I had some reports that melee combat mixed with movement was behaving oddly, and I believe it may be due to the use of client/Click; the byond documentation says that redefining client/Click() causes additional overhead, and it isn't strictly necessary.

Alters the way double clicks are handled, in an attempt to better handle clickspam, as often occurs during pitched combat.  This may also be responsible for the above, but I don't know.

Inserts proximity (aka flag) checks in all afterattack() procs.  The old assumption was that unless an item used the USEDELAY flag, afterattack() was only called when adjacent, but this is no longer true.  This led to beakers, soap, crayons, etc, all being usable at all ranges.

Removes the NODELAY flag, which was unused.  Removes all existing uses of the USEDELAY flag so that it can be readded to things that need extra delay.

Removes the hand_* procs, previously used by restrained actions.  Instead, the mob helper mob/RestrainedClickOn() has abosrbed basically all the functionality they were used for, which is really only monkeys with jungle fever.

Adds a special case of the Adjacency() proc for doors.  This fixes #136, airlocks being unreachable due to border fire doors.  However, this only takes us back to the unpleasant position where you have to open-hand the door, switch to a crowbar, and pry open the firedoor; it still needs a better fix.
2013-09-17 18:19:14 -04:00
supersayu
4c44e7cd89 Glove update
Integrates gloves into click code.  Gloves now have a proc/Touch(atom, proximity) which is called before humans do an attack_hand().  It can also occur when you click on something at range, so be sure to check the proximity flag.

Adds code to make ninja gloves work properly with this and pulls it out of the various attack_hand() procs.

Other suggested uses: secret society rings, magic/cult gloves, weaponized gloves (chemical, electric, needles, etc), powered exosuit hands (for picking up crates), I dunno, there are options
2013-09-17 18:19:13 -04:00
supersayu
c172e52dce Adds telekinesis to click code. Fixes issue #1202, #1129, #247.
This adds two atom procs, attack_tk() and attack_self_tk().  attack_tk is used as per attack_hand; attack_self_tk exists on all atoms (not just items) but is similar to the item proc, but without the assumption that it is in the user's hand.

Removes the functionality where entering throw mode would create a tk grab, as it is redundant.

As a default, attack_tk does the following:
* Creates a telekinetic throw for items and un-anchored objects
* Does an attack_hand (paw, animal, etc) for anchored objects
* Does nothing to mobs

As a default, attack_self_tk does nothing.  An attack_self_tk was added to closets to open and close them since that's a common thing.

The following items have added attack_tk procs:
* Fire axe cabinet, extinguisher cabinet, and bedsheet bin will drop into their square instead of putting it in your hand
* Doors only open telekinetically if they require no access
* Chairs will rotate if nobody is buckled to them
* Filing cabinets will remove a paper at random.
* Tables and racks return to prevent telehulk smash

This is INCOMPLETE.  Adding proper TK interaction to everything is something best done in pieces.

In particular, interacting with mobs and items both open up the floodgates for bugs, so we/I need to decide how we want it to go before we commit, and then fix bugs along the way.  Stumbling forward, fixing bugs, and then changing course halfway would be a bad idea.
2013-09-17 18:19:09 -04:00
Cheridan
899a53787a Removes an unused var defined for every obj. 2013-09-03 09:38:30 -05:00
Cael Aislinn
2f698f5c7c Merge pull request #1197 from Cheridan/Admin
Admin Log Tweaks
2013-08-23 07:20:45 -07:00
Cael Aislinn
12e8a54e13 Merge pull request #1170 from Cheridan/Cult
Nar-sie change + Construct Names
2013-08-23 07:07:22 -07:00
Cheridan
e6f025d350 Narsie eats everyone. 2013-08-22 22:18:30 -05:00
Cheridan
be4625fce6 Admin Log Tweaks
-Wire cut logs are now accessed via the Investigate verb, instead of popping up in the admin chat log.
-Wizard Fireball explosions no longer create admin chat log messages either.

-Adding and removing Player Notes is now logged.
-The note that is added automatically to people who get banned, now displays the duration of ban.
2013-08-20 21:51:39 -05:00
Giacomand
6c26a1b26a The APC's extra Topic() parameter was causing a runtime to occur when you used ..(). Fixed it by removing the parameter and re-arranging the code so it wasn't required. Fixes Issue #1148. 2013-08-20 21:58:35 +01:00
Cheridan
62a6a02db9 Constructs get named-numbers now so you can actually tell who's being a gryphon/reading WGW over the radio.
Tweaks to Newsie
2013-08-15 14:35:04 -05:00
Cheridan
296b90c34c Narnar loves you 2013-08-14 20:18:56 -05:00
Giacomand
29424a34bf Merge pull request #905 from Aranclanos/MachineryTopic
Machinery Topic(): mob and self checks fix.
2013-07-24 01:23:30 -07:00
Giacomand
acde3b71df * Cleaned the malf module code and made it easier to add powers.
* Fixed multiple bugs with the cameras and the malf powers. All malf powers should be in working order now.
 * Added a new power that creates an automatic cyborg machine that will allow the AI's minions to put living humans through it to build a cyborg army. This power will cost all their malf points and will stop them from being able to shunt, to balance it.
2013-07-12 17:32:15 +01:00
Giacomand
33e8976274 Removed the nuke code. You cannot nuke the station anymore.
Added a Jump to Node power.
Cleaned up the code.
Changed some more values.
Added a blob_act() to camera.
Removed most "if(gamemode == "blob") checks to stop people from using it to metagame.
Removed cells exploding when being blob_act()'d
2013-07-10 01:49:06 +01:00
Giacomand
e9e9f51e00 Merge pull request #898 from Aranclanos/LightBubTK
Light bulbs dissapearing with TK fix.
2013-07-05 06:08:42 -07:00
Aranclanos
90b894fe66 Made all the machinery use ..() on the Topic(), instead of having a copy pasta everywhere to see if the human is dead or others. This will stop dead AIs interacting with machineries or others. 2013-07-03 13:16:53 -03:00
Aranclanos
48d97a57c6 Light bulbs will first drop on the floor before being picked up. Because of the TK grab object on their hand, TK users will be unable to pick up the light bulb and it will stay on the floor. 2013-07-02 04:08:59 -03:00
Giacomand
c986f001dd Merge pull request #837 from Aranclanos/Sleepers
Pulling sleeper exploit fix.
2013-06-28 04:37:03 -07:00
Aranclanos
2f3e1eb9e6 Removed a bunch of copy pasted code regarding moving pulled atmos by clicking on turfs or conveyors. Now this is handled by a mob proc, Move_Pulled()
Now all turfs work with this feature. (shuttle shitty turfs didn't because they were not part of /floor)
Added a check on Move_Pulled() to see if the pulled atom is on a turf. This will stop the sleeper exploit and others.
2013-06-21 17:55:32 -03:00
AlexanderUlanH
2fcf26667c Overhauled Projectiles
Changed atom's bullet_act to call the projectile's on_hit, and changed
most bullet_acts to call on_hit as well.  Removed some now-unnecessary
snowflake code.

These changes will make projectiles which should effect non-mobs, such
as the gyrojet and the ion rifle, work properly.  Inanimate objects can
now be empulsed with the ion rifle, whose projectiles used to dissipate
on hitting anything but a mob.  Gyrojets now explode on most objects, as
opposed to just on walls and mobs, and the snowflake code that made them
work on walls is no longer necessary.  The code for pulse rifles'
breaking walls has been moved from a check in turf to a check in pulse
beams, and has been expanded to include structures, allowing them to
(slowly) break girders.  For coders, it means that on_hit is a reliable
proc for the effect of a bullet's hitting an object.
2013-06-19 23:24:00 -04:00
Cael Aislinn
871b775100 Merge pull request #655 from Carn/HelpersTidy
*Small tidy-up of various helper procs*
2013-05-31 23:24:38 -07:00
Pete Goodfellow
dcf7c34990 Changed the suicide text for cable coils if you're standing on a stool bed or chair.
Fixed some table icon_states that Cheri missed.
2013-05-28 21:31:28 +01:00
carnie
b84d12d949 *Small tidy-up of various helper procs*
-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
2013-05-27 12:21:43 +01:00
carnie
5e7cffcf5c update_icons.dm changes for humans. This ties in with the dna changes and the changes to skin_tone and hair colours
>update_mutantrace() is no more, it is now part of update_body()
>Moved a lot of stuff into update_base_icon_state(), this will allow making mutantraces modular.
Almost all icon operations are now removed from human overlays (obviously some are still required for recolouring hair and eyes). Any remaining dynamically generated overlay icons are applied individually. This will allow byond to cache them better. This will also eliminate the bug where humans are initially invisible/unclickable when you first encounter them (due to network latency where the icons are being downloaded).
>UpdateDamageIcons() renamed to update_damage_overlays(), so it has the same sort of name as the other procs
>update_icons=true or false arguments removed from human overaly-update procs, no longer required. (i.e. the update_body() update_inv_whatever etc procs do not call update_icons() - see documentation for details)
>mutantrace icon_states moved into human.dmi
>skeletons are now a mutantrace, not a mutation.
>update_icons system should now be even more efficient (thanks partly to aranclanos)
>documentation rewritten
>copypasted code moved into helper procs - super tidy code :3

Other:
>Removed compile error where the core code was reliant on compiling away mission code. >:[
>s_tone renamed to skin_tone

Modified   code/modules/mob/living/carbon/human/update_icons.dm
Modified   code/__DEFINES.dm
Modified   code/datums/datumvars.dm
Modified   code/datums/limbs.dm
Modified   code/game/dna.dm
Modified   code/game/gamemodes/changeling/changeling_powers.dm
Modified   code/game/gamemodes/cult/cult_items.dm
Modified   code/game/gamemodes/cult/runes.dm
Modified   code/game/machinery/doors/airlock.dm
Modified   code/game/machinery/portable_turret.dm
Modified   code/game/machinery/teleporter.dm
Modified   code/game/mecha/combat/combat.dm
Modified   code/game/objects/items.dm
Modified   code/game/objects/items/stacks/medical.dm
Modified   code/game/objects/items/stacks/sheets/glass.dm
Modified   code/game/objects/items/weapons/storage/bible.dm
Modified   code/modules/assembly/mousetrap.dm
Modified   code/modules/hydroponics/hydroitemcode.dm
Modified   code/modules/mob/living/carbon/carbon.dm
Modified   code/modules/mob/living/carbon/human/death.dm
Modified   code/modules/mob/living/carbon/human/human.dm
Modified   code/modules/mob/living/carbon/human/human_damage.dm
Modified   code/modules/mob/living/carbon/human/human_defines.dm
Modified   code/modules/mob/living/living.dm
Modified   code/modules/mob/living/simple_animal/friendly/slime.dm
Modified   code/modules/mob/mob_grab.dm
Modified   code/modules/power/lighting.dm
Modified   code/modules/reagents/Chemistry-Reagents.dm
Modified   code/unused/_debug.dm
Modified   icons/effects/genetics.dmi
Modified   icons/mob/human.dmi
Modified   maps/RandomZLevels/wildwest.dm
Modified   tgstation.dme

Signed-off-by: carnie <elly1989@rocketmail.com>
2013-05-10 18:41:08 +01:00
Tastyfish
7b325f9c6e re-arranged cable actions so src wouldn't get deleted before everything was completed 2013-05-05 05:17:31 -04:00
Tastyfish
208255be6b Merge branch 'master' of https://github.com/tgstation/-tg-station
Conflicts:
	code/modules/power/cable.dm
2013-04-21 00:42:18 -04:00
Pete Goodfellow
6e19734145 Cable coils now update mob inhands correctly when used up. Changed cable coil items to use the existing update_icon() proc, instead of their own updateicon(). 2013-04-18 19:59:50 +01:00
Tastyfish
b75af7e816 Fixed cablecoil not updating user mob at all and added a give() proc to more standardly give coils more and cleaned up coil joining 2013-04-18 03:35:10 -04:00
Cheridan
8a314e7cd2 Shunted AI Tracking
-When an AI shunts into an APC, the pinpointer will begin tracking it. When the AI returns to its core, the pinpointer will go back to locating the nuke disc.
2013-04-05 16:16:23 -05:00
Pete Goodfellow
fa37559c82 Fixes cable.dm. Cheri!! 2013-03-30 17:51:27 +00:00
Cheridan
2dd68fc86d Janitor/Wire/Hydro Sprite Stuff.
-Adds janitor cart sprites for pete. Removes trash.dmi and merges it with janitor.dmi.
-Moves the 8 separate wire .dmis and puts them in their own folder.
-Moves plants.dmi into the flora folder.
-Adds sprites in hydroponics-related .dmis for my upcoming project. Greatly cleans up hydroponics.dmi
2013-03-29 23:33:40 -05:00
Pete Goodfellow
1260c80d6b Merge pull request #87 from Giacomand/Solar_Branch
Fixes the solar control computer so it's overlay works in auto mode.
2013-03-27 12:18:58 -07:00
Uristqwerty
bf4b58cc7d Fixed infinite loop in powernet rebuild.
If a machine was not anchored, it would spin forever, doing nothing.
Fixed on baystation a while ago.
2013-03-25 16:28:04 -04:00
Giacomand
e83432c07d * Fixes the solar control computer so it's overlay works in auto mode. 2013-03-23 00:13:19 +00:00
carnie
809539603b Merge branch 'master' of git://github.com/MrPerson/-tg-station into Testing 2013-03-18 02:20:15 +00:00
MrPerson
af938060f6 Revert "Remove transfer_fingerprint_to in favor of add_fingerprint"
This reverts commit 4a7ba48b11.

I misunderstood what this proc was doing.
2013-03-12 08:22:17 -07:00
MrPerson
4a7ba48b11 Remove transfer_fingerprint_to in favor of add_fingerprint
Add_fingerprint has sanity checks, which makes it a superior proc.
This fixes at the very least:
The following runtime has occured 14 time(s).
runtime error: Cannot execute null.Copy().
proc name: transfer fingerprints to (/atom/proc/transfer_fingerprints_to)
  source file: detective_work.dm,155
  usr: Engineering Cyborg-743 (/mob/living/silicon/robot)
  src: the disposal pipe (/obj/structure/disposalpipe/segment)
2013-03-12 04:40:00 -07:00
MrPerson
b76f521767 Fixes for the following 3 runtimes
runtime error: Cannot read null.occupant
proc name: Topic (/obj/machinery/computer/scan_consolenew/Topic)
Added a check to make sure there's an occupant.

runtime error: Cannot read null.key
proc name: toggle power (/obj/machinery/particle_accelerator/control_box/proc/toggle_power)
Added a check for if there's a usr.

runtime error: Cannot read null.backup_author
proc name: attack hand (/obj/machinery/newscaster/attack_hand)
Added a check for if the feed still exists.
2013-03-12 02:27:57 -07:00
Giacomand
64971367a7 - Removed unneeded tags in the map file. The map was updated to Pete's changes to the sleeper before it was changed.
- Moved the cable define into the cable file.
2013-03-12 00:12:24 +00:00
Cheridan
971cf6e628 Cable coils and cable cuffs now use the inhand sprites. Only red and blue, for now. 2013-03-11 11:53:27 -05:00
Pete Goodfellow
b02c459505 Adding google code commits r5836 to r5849. RIP in peace google code. 2013-03-11 04:26:54 +00:00