Commit Graph

133 Commits

Author SHA1 Message Date
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02: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
Rolan7
f2493b4c37 Makes trays a subclass of bag.
This somewhat changes how items are placed on them, but for the better as it's more consistent with existing mechanics.
Hitting someone with the tray still scatters the contents around!  Works on nonhumans.
Placing icons on the tray still makes them show up on the tray.  Using the tray on a table now places the items onto the table, or places the tray itself if it's empty.  Robots can't lose their tray this way, I checked.
Service borgs can actually use their tray to carry things!  Trays can hold all sorts of stuff, as long as it's small...
A service borg can carry the nuke disk around.  The pinpointer does follow it correctly.
If the service borg stashes its tray module, dies, explodes, gibselfs, or is forced to stash its modules by damage, it drops all the tray's contents on the ground.

Fixes #236 (service borgs can't use trays) and #2991 (Items on food trays can't be picked up).  Didn't address #1919, the layer issue.

Fixes the "bajillion lines changed" with the maps.
2014-05-07 13:04:22 -04:00
Nnelg
caf7d424e6 Trying to fix compilation error.
Changed "M as mob" in arguments list to "mob/M"; I think the former made it look for proc/can_equip() instead of mob/proc/can_equip().


Also, it no longer returns 0 for a null slot parameter.
2014-04-14 17:56:05 -05:00
Nnelg
4283977188 Cut out snowflake mob_can_equip code.
Now it calls mob/proc/can_equip(obj/item/I, slot, disable_warning = 0) instead.

Good-riddance, nasty ugly if(istype(...))!


Future task: update corgi/xeno/whatever code to use this proc, now that it's nice and clean.
2014-04-14 14:35:13 -05:00
Aranclanos
7bcb69ad88 Removes the click cooldown from almost everything, now it should be always be 0.1 seconds.
Ranged weapons and laser eyes have a cooldown of 0.4.
Grilles, windows, windoors, walls and blobs have a cooldown of 0.8.
Hitting mobs will also have a cooldown of 0.8.
Removes the unused USEDELAY flag.
2014-03-28 06:32:47 -03:00
MrPerson
2858bf1c18 Fix for changling powers arm blade and fleshy space suit.
More del(AM) -> qdel(AM) and Del() -> Destroy()
Fixes a terrible bug that would have meant players could only ghost once.
2014-03-21 22:26:50 -07:00
MrPerson
3c58091437 Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel
Hopefully nothing went wrong but you never know.

Conflicts:
	code/FEA/FEA_fire.dm
	code/controllers/supply_shuttle.dm
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/machinery/autolathe.dm
	code/game/machinery/drying_rack.dm
	code/modules/hydroponics/hydroponics.dm
	code/modules/projectiles/projectile/magic.dm
	code/modules/reagents/Chemistry-Recipes.dm
	code/modules/reagents/reagent_dispenser.dm
2014-03-02 21:39:27 -08:00
Razharas
2aa4f2728f Merge pull request #2912 from Miauw62/ihavenoideawhati'mdoing
Fixes some misc NODROP stuff I think
2014-03-02 13:30:23 -08:00
hornygranny
c31647376e This is for discussion of things that need to be changed to move away from purely stun based combat. Please only comment if you have something to contribute, rather than just saying you like or dislike it.
Shoes do not increase your movement speed
Stun/weaken on basically everything reduced from 10+ to 5 ticks
Time to unbuckle/uncuff self halved
2014-02-27 10:56:06 -08:00
Miauw
82185a03c7 Makes NODROP items play a bit nicer with pockets. 2014-02-25 21:13:57 +01:00
Miauw
3d6a2ce74d Fixes some misc NODROP stuff I think (don't worry I did actually test) 2014-02-25 21:07:57 +01:00
MrPerson
cac49a611e Make items equipped by mobs unequip themselves as part of Destroy()
Change the GC's loops to for() loops instead of while() loops. Also fixed a really stupid mistake where it would cut random shit out of the destroyed list instead of what was just processed.
Made it use world.time instead of world.timeofday to get rid of stupid midnight rollover errors.
Also there's a split between caps on var clearing and deletion checks
Moved the invisibility = 101 bit out of the GC and into atom/Destroy()
2014-02-24 16:56:34 -08:00
MrPerson
9eee3e5067 First pass at a qdel() garbage collection system for tgstation
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.
2014-02-23 14:55:12 -08:00
Miauw
9b8656247c u_equip is now called unEquip PANIC 2014-02-13 20:58:33 +01:00
Miauw
b8b57ff4f1 Replaced canremove with NODROP. 2014-02-13 19:52:46 +01:00
Miauw
8c7ef19be6 Replaced before_take_item() and drop_from_inventory() with u_equip 2014-02-12 19:51:37 +01:00
Cheridan
5b5d7eecb9 Merge pull request #2592 from Tenebrosity/git_gud_shoes
Fixes grammar of examine messages for objects that are pairs
2014-02-02 16:36:57 -08:00
Tenebrosity
6ae7051977 Removes an if check based on Pete's suggestion
Thanks
2014-02-03 06:18:34 +13:00
fleure
68abd1f0e4 Merge pull request #2510 from Tenebrosity/throwsounds
Removes throwtapsound var from items
2014-02-02 04:33:23 -08:00
Tenebrosity
f3da1a0904 Fixes examine message for pair objects
Before:
This is some brown shoes. It is a normal-sized item.

After:
These are some brown shoes. They are a normal-sized item.
2014-02-02 15:49:20 +13:00
Cheridan
1d54687b2b Merge pull request #2477 from Tenebrosity/Branch_Branch_attacksounds
Attack sounds for all melee weapons
2014-02-01 18:01:59 -08:00
Pete Goodfellow
4460869113 Removes unused vars from /obj/item 2014-01-29 17:19:20 +00:00
Tenebrosity
0851b341da - Removes the throwtapsound var from items. It was unnecessary.
- Thrown items play throwhitsound on impact. If no throwhitsound is defined, they play hitsound instead. If that isn't defined, they play genhit.ogg. The latter fixes \#2508. The volume of the sound is dependant on the item's throwforce and/or weight class.

- Adds 15 throwforce to the fireaxe, which previously had only 1.
2014-01-29 10:51:14 +13:00
Jesus Hussein Chris
52339906c4 Attack sounds for all melee weapons
Weapons that do no damage play a tap sound, except for the bike horn and banhammer.

Adds a different attack message for forceless attacks. It says tapped or
patted on instead of attacked in.

Adds force zero check to armour before attempting to block attacks.

Adds hitsounds to the welder, lighter, matches, cigarettes, energy sword and energy axe for when they're on and off.

Adds 5 force to the lighter when it's lit. Same as when you accidentally burn yourself lighting it. Adds a hitsound and the correct damage type to the lighter.

Adds hitsound volume scaling based on the weapon's force and its weight class. Adds tap sound scaling based on a weapon's weight class.

Removes boldness from item attack messages on non-human mobs. The attack is still bolded for the player
controlling the mob.

Adds a force check to blood spurts when attacking non-human mobs. If the weapon doesn't have a force, no blood will come out.

Adds adminhelp.ogg as the banhammer's hitsound with Cheridan's permission.

Adds a much needed period to the catatonic human examine message.

Makes the activation and deactivation sounds of toy swords, energy swords and energy shields quieter. What an earsore.

Makes description, item_state and name of matches that have burned out on their own consistent with those put out by the player. Changes match, cigarette and lighter attack verbs and forces based on whether they're lit or not.

Fixes a bug that allowed players to light cigarettes with burnt matches.

Names lit cigarettes and children of cigarettes lit [name].

Fixes a bug with the energy blade that kept it at weight class 5 after it was deactivated.

Changes the welder out of fuel message slightly to be less fragmented.

Removes dead air from most of the weapon sound effects used in this pull to make them more responsive. In other words, the fire extinguisher sound will play a lot sooner after you click than before. Equalised their peak volumes to all be -0.1dB and in an attempt to make altering volumes based on force more consistent.

Thank you @YotaXP for help with the item_attack.dm attack messages.

Thank you @optimumtact for help with code for testing item_attack volumes.

Thank you @Giacom for help with the code for scaling hitsound and tap sound volume by hitforce.

Thank you @Tastyfish for telling me why my proc wasn't working.

Thank you to anyone else on #coderbus who helped me who I've forgotten to mention.
2014-01-28 22:46:41 +13:00
fleure
277a33c184 Merge pull request #2482 from Tenebrosity/throwsounds
Thrown objects play throwhitsound
2014-01-24 11:37:06 -08:00
Tenebrosity
e4739afc44 Item throwtapsound var for forceless objects 2014-01-23 23:07:24 +13:00
Tenebrosity
b77434b1cb Items now have a throwhitsound var
If throwhitsound isn't defined, a thrown item calls the hitsound
instead. If that isn't defined, no sound is played.

Circular saw now calls pierce.ogg as its throwhitsound instead of its
hitsound.
2014-01-23 16:37:54 +13:00
Giacomand
86d4d5307a You can now properly clean your hands of blood. Fixes #2258.
When you touch an item, to spread the blood, it would take the "bloody_hands" to 0; which is checked if true while you wash your hands. I limited it to only go down to 1, so it will still be true unless you wash your hands.
Fixed an issue where blood_DNA was being cleared before the blood_hands variable was being set to 0. Now you can properly hide your bloody hands with gloves and when you take them off the hands will still be bloody.
Removed an unused variable.
Set the bloody_hands_mob to null where it was appropriate.
The amount of blood you can transfer to other items, when you touch them, will be a little random for variety.
Revive() will now heal your hallos damage.
2014-01-22 17:42:36 +00:00
errorage
bfcd050b77 Partial commit for the cyborg UI upgrade, which gets rid of the pop-up window for module selection, instead displaying the available modules in storage-item like fashion. 2014-01-06 12:17:07 +01:00
Cheridan
bb9c09df46 Obsoletes flags = FPRINT | TABLEPASS*
*TABLEPASS was already totally obsolete.
FPRINT was used, but it was on virtually everything anyway.

Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense.

If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only  where it was intentional (holodeck items could use this for example).
2013-12-30 15:03:17 -06:00
Razharas
358a85eb3d Completed the transition to a new proc
All the logging i have found in the code was changed to use the
proc(maybe i missed something)
Killed all runtimes found so far
Proc now handles all the checks, no need to add checks in the body of
object
2013-12-17 22:56:04 +04:00
Aranclanos
8251c0ea42 Merge branch 'HydroTweaksNov2013' of https://github.com/Rolan7/-tg-station into HydroTweaksNov2013
Conflicts:
	html/changelog.html
2013-12-08 06:29:48 -03:00
Aranclanos
a4a13681f3 Merge branch 'master' of https://github.com/Razharas/-tg-station into ImGonnaStingYa
Conflicts:
	code/game/gamemodes/changeling/changeling_powers.dm
2013-12-05 07:01:09 -03:00
Rolan7
e3d2f9ffe7 DONE Leather gloves now have heat protection like black gloves (to allow removing lights bulbs/tubes)
DONE	Plants require 4 light, mushrooms only 2
DONE	Harvesting should report how many items were harvested (whether plantbag is used or not)
DONE	Plantbag should have a mode to only pick up one kind of plant at a time.  Trash and ore bags too.
DONE	1 unit of mutagen should cause non-species mutations.  (Radium too)
DONE	Uranium should be like radium but even weaker
2013-11-28 23:07:50 -05:00
Razharas
b7b45881b2 Made abstract a flag and other stuff
Everything that had abstract var now has ABSTRACT flag
Everything that checked abstract var now checks ABSTRACT flag
Fixed some runtimes
Fixed click code and face direction changing while cuffed
Added del to all attack_* of the proboscis in case shit goes real
AStar is still weird so added  a simple sanity check
2013-11-18 03:53:50 +04:00
Razharas
6d0bbc8b24 Further improvement of ling code
Yadda yadda
2013-11-17 02:09:43 +04:00
Kyrah Abattoir
560b50ec1b Reformatted the way objects and items structure their description text, added the little object "icon" everyone seems to be using.
Added superclass invoke for the arcane tome

Added superclass invoke to light switches, removed it's (unused) description.

FLightswitch description repetition derp

examine superclass invoke for gas flow meter, space heater, fire extinguishers, grenades/IEDs, fancy boxes and welder. Changed description for welder and fire extinguisher to show their content in a similar style.

Fixed tank, linen bins and janicart description, and added welder of previous commit (forgot to commit it)

REMOVED icon in mop_bucket description (now provided by item class).
REMOVED unused examine() override in clothing/gloves
REMOVED custom examine() for glass/rag
CHANGED using examine superclass on paperwork/paperbin, removed redundant description code
CHANGED examine superclass for power/apc
ADDED universal maxcharge readout for all the powercell types.
CHANGED using examine superclass on machinery/light, removed redundant description code

FIXED weapon/virusdish use a description field.
TWEAK lowercased some of the portable generators.

Fixed improperness of pacman names
2013-11-16 22:15:50 +01:00
Razharas
453da53560 Ling changes and some click additiong to items 2013-11-16 23:10:55 +04:00
Cheridan
637e7f72c9 Nuke Op Population Scaling and Content Update
to be edited
2013-11-03 16:41:57 -06:00
Robson Richards
6aeb425326 Fixes the DME (I hope)
Removes some Stray Colons.
2013-10-12 15:51:00 +01:00
Robson Richards
1c70008d0c Changes Limbs into Obj's
Reworked all the paths for it
Reworked all the procs for it
2013-10-11 19:11:55 +01:00
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
supersayu
475042a212 Click code rework
Fixes #646, #579, #863

Completely redoes the click code.  Moves all click related code into code/_onclick for reference.  Also moves hud datum code and all the screen object code I could find into code/_onclick/hud, as it is related.  Item attack(), attackby(), afterattack(), and attack_self() have been moved into item_attack.dm for consistency.

Completely removes dummy objects and adds atom.Adjacent(user).  This proc checks for border items and anything marked with throwpass for determining whether or not you can reach a given square.  A turf helper, ClickCross(), was added to facilitate this.

Removes the monolithic Atom.Click() proc in favor of an overridable click handler attached to mobs.  Click code no longer uses the : path operator as a consequence, and mob/lastDblClick has been moved to Client/next_click.  A few end arounds were necessary (screen objects, buildmode, and spells), but this has been handled by repurposing Atom.Click(); if you have special click code, insert it in the object's Click() function and return 1 to prevent normal processing.

This update adds support for attack_ghost(); the previous "new" click handler had support for it but was never finished.  I have taken the liberty of letting ghosts click portals, the gateway, and the teleporter to jump to the intended target square, and kept the previous default action of examine()ing every damn thing you click.  It is to be suggested that you could do more with this proc when ghost interactions are enabled.

This update also adds support for double clicking.  It is currently only used for ghosts and AIs, because the original (first) click still registers normally.  For both of these, double clicking a square will jump you to it, and double clicking a mob will follow it.  In the case of ghosts, double clicking bots and the singularity will also set you following it; if you double click your own corpse, you will re-enter it; this also works if your body is in a closet, sleeper, DNA scanner, etc.  Default mobs ignore double clicks as normal.

-- NOTE --

There are two flags which were previously unused or misused by click code: USEDELAY and NODELAY.  Ostensibly, USEDELAY would double the normal 1sec delay, and NODELAY would remove it.

Using either of these flags as intended would significantly affect the timing of the game.  In particular, USEDELAY is currently applied to guns and about everything else that acts at range.  I am adding USEDELAY as a half-second increase for now, but I have not put a significant amount of thought into it.  I considered lowering the normal 1sec delay to .8sec to balance it, but the consequences of that on combat involve more calculations than I care to make.

NODELAY seems to never have been used, and I did not implement it, but I could do so trivially.
2013-09-17 18:15:54 -04:00
Zelacks
1e0c23a736 Fix for laserproof vest
Passes the hit zone down to the reflect check
Creates a check for where the projectile hit in laserproof vest
If does not target the chest or groin the reflect chance is halved
2013-09-09 16:58:49 +08:00
Ergovisavi
ea20a2b646 Overhauls this entire pull
All item/obj now have the var reflect_chance which based on a prob check, determines if an object will reflect energy projectiles while in the wear_suit, l_hand or r_hand slots, a reflect_chance of 100 will always cause the player to reflect, 0 (Base of every object besides the ablative armor) will never reflect. Objects are reflected like ablative currently does.

modifies the bullet_act of humans to incorporate this new system
gives the ablative armor the same chance to reflect it had before
gives dualsabers if wielded and the user is not a hulk a 100% chance to reflect energy projectiles
adds specific wield() and unwield() to dualsabers in order to add check if hulk
2013-09-02 12:18:50 -07:00
Giacomand
2a24846001 * The blob will now destroy items. 2013-08-14 01:11:09 +01:00
Aranclanos
f6ee47b11e Removed the alien check on obj/item/attack_paw(), the "your claws aren't capable of such fine manipulation" little piece of code is now in obj/item/attack_alien(). 2013-06-29 20:01:46 -03:00
Pete Goodfellow
8285222255 Fixes #649 equip e causes items to stack
Fixes #663 monkeys can't use pickup verb
2013-05-28 23:17:11 +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