Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/modules/mob/living/carbon/carbon.dm
	code/modules/organs/organ_internal.dm
	code/modules/organs/organ_objects.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/syringes.dm
This commit is contained in:
Kelenius
2015-03-31 17:44:42 +03:00
273 changed files with 8890 additions and 6038 deletions
+8 -7
View File
@@ -3,6 +3,10 @@
name = "gun"
desc = "Its a gun. It's pretty terrible, though."
icon = 'icons/obj/gun.dmi'
item_icons = list(
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
)
icon_state = "detective"
item_state = "gun"
flags = CONDUCT
@@ -90,14 +94,14 @@
if(user && user.client && !(A in aim_targets))
var/client/C = user.client
//If help intent is on and we have clicked on an eligible target, switch to aim mode automatically
if(user.a_intent == "help" && isliving(A) && !C.gun_mode)
if(user.a_intent == I_HELP && isliving(A) && !C.gun_mode)
C.ToggleGunMode()
if(C.gun_mode)
aiming = PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
if (!aiming)
if(user && user.a_intent == "help") //regardless of what happens, refuse to shoot if help intent is on
if(user && user.a_intent == I_HELP) //regardless of what happens, refuse to shoot if help intent is on
user << "\red You refrain from firing your [src] as your intent is set to help."
else
Fire(A,user,params) //Otherwise, fire normally.
@@ -105,7 +109,7 @@
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
if (A == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
handle_suicide(user)
else if(user.a_intent == "hurt") //point blank shooting
else if(user.a_intent == I_HURT) //point blank shooting
Fire(A, user, pointblank=1)
else
return ..() //Pistolwhippin'
@@ -134,10 +138,7 @@
handle_post_fire(user, target, pointblank, reflex)
update_icon()
if(user.hand)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
update_held_icon()
//obtains the next projectile to fire
+1 -54
View File
@@ -40,7 +40,7 @@
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species && H.species.name != "Vox" && H.species.name != "Vox Armalis")
if(H.species && H.species.name != "Vox")
user << "<span class='warning'>\The [src] does not respond to you!</span>"
return 0
return ..()
@@ -52,56 +52,3 @@
if(spikes < 1) return null
spikes--
return new /obj/item/weapon/spike(src)
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
/obj/item/weapon/gun/energy/noisecannon
name = "alien heavy cannon"
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
icon = 'icons/obj/gun.dmi' //Actual on-sprite is handled by icon_override.
icon_state = "noisecannon"
item_state = "noisecannon"
recoil = 1
force = 10
projectile_type = /obj/item/projectile/energy/sonic
cell_type = /obj/item/weapon/cell/super
fire_delay = 40
fire_sound = 'sound/effects/basscannon.ogg'
var/mode = 1
sprite_sheets = list(
"Vox Armalis" = 'icons/mob/species/armalis/held.dmi'
)
/obj/item/weapon/gun/energy/noisecannon/attack_hand(mob/user as mob)
if(loc != user)
var/mob/living/carbon/human/H = user
if(istype(H))
if(H.species.name == "Vox Armalis")
..()
return
user << "<span class='warning'>\The [src] is far too large for you to pick up.</span>"
return
/obj/item/weapon/gun/energy/noisecannon/update_icon()
return
//Projectile.
/obj/item/projectile/energy/sonic
name = "distortion"
icon = 'icons/obj/machines/particle_accelerator2.dmi'
icon_state = "particle"
damage = 60
damage_type = BRUTE
check_armour = "bullet"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
embed = 0
weaken = 5
stun = 5
/obj/item/projectile/energy/sonic/proc/split()
//TODO: create two more projectiles to either side of this one, fire at targets to the side of target turf.
return
+2
View File
@@ -29,6 +29,7 @@
power_supply.give(power_supply.maxcharge)
if(self_recharge)
processing_objects.Add(src)
update_icon()
/obj/item/weapon/gun/energy/Del()
if(self_recharge)
@@ -87,3 +88,4 @@
icon_state = "[modifystate][ratio]"
else
icon_state = "[initial(icon_state)][ratio]"
@@ -24,16 +24,18 @@
obj/item/weapon/gun/energy/retro
name = "retro laser"
icon_state = "retro"
item_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
fire_sound = 'sound/weapons/Laser.ogg'
slot_flags = SLOT_BELT
w_class = 3
projectile_type = /obj/item/projectile/beam
fire_delay = 10
fire_delay = 10 //old technology
/obj/item/weapon/gun/energy/captain
name = "antique laser gun"
icon_state = "caplaser"
item_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 5
fire_sound = 'sound/weapons/Laser.ogg'
@@ -48,7 +50,7 @@ obj/item/weapon/gun/energy/retro
name = "laser cannon"
desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
icon_state = "lasercannon"
item_state = "laser"
item_state = null
fire_sound = 'sound/weapons/lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
slot_flags = SLOT_BELT|SLOT_BACK
@@ -57,6 +59,7 @@ obj/item/weapon/gun/energy/retro
fire_delay = 20
/obj/item/weapon/gun/energy/lasercannon/mounted
name = "mounted laser cannon"
self_recharge = 1
use_external_power = 1
recharge_time = 10
@@ -65,6 +68,7 @@ obj/item/weapon/gun/energy/retro
name = "xray laser gun"
desc = "A high-power laser gun capable of expelling concentrated xray blasts."
icon_state = "xray"
item_state = "xray"
fire_sound = 'sound/weapons/laser3.ogg'
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
projectile_type = /obj/item/projectile/beam/xray
@@ -116,10 +120,12 @@ obj/item/weapon/gun/energy/retro
/obj/item/weapon/gun/energy/lasertag/blue
icon_state = "bluetag"
item_state = "bluetag"
projectile_type = /obj/item/projectile/beam/lastertag/blue
required_vest = /obj/item/clothing/suit/bluetag
/obj/item/weapon/gun/energy/lasertag/red
icon_state = "redtag"
item_state = "redtag"
projectile_type = /obj/item/projectile/beam/lastertag/red
required_vest = /obj/item/clothing/suit/redtag
@@ -29,12 +29,10 @@
projectile_type = /obj/item/projectile/beam/stun
modifystate = "energystun"
update_icon()
if(user.l_hand == src)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
update_held_icon()
/obj/item/weapon/gun/energy/gun/mounted
name = "mounted energy gun"
self_recharge = 1
use_external_power = 1
@@ -26,6 +26,7 @@
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
item_state = "decloner"
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 100
@@ -35,7 +36,7 @@
name = "floral somatoray"
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
icon_state = "floramut100"
item_state = "obj/item/gun.dmi"
item_state = "floramut"
fire_sound = 'sound/effects/stealthoff.ogg'
charge_cost = 100
projectile_type = /obj/item/projectile/energy/floramut
@@ -59,7 +60,7 @@
projectile_type = /obj/item/projectile/energy/floramut
modifystate = "floramut"
update_icon()
return
update_held_icon()
/obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag)
//allow shooting into adjacent hydrotrays regardless of intent
@@ -115,6 +116,7 @@
name = "staff of change"
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
icon = 'icons/obj/gun.dmi'
item_icons = null
icon_state = "staffofchange"
item_state = "staffofchange"
fire_sound = 'sound/weapons/emitter.ogg'
@@ -168,6 +170,7 @@ obj/item/weapon/gun/energy/staff/focus
desc = "It's a cute rubber duck. With an evil gleam in it's eye."
projectile_type = /obj/item/projectile/icarus/pointdefense
icon = 'icons/obj/watercloset.dmi'
item_icons = null
icon_state = "rubberducky"
item_state = "rubberducky"
charge_cost = 0
@@ -9,10 +9,12 @@
cell_type = /obj/item/weapon/cell/crap
/obj/item/weapon/gun/energy/taser/mounted
name = "mounted taser gun"
self_recharge = 1
use_external_power = 1
/obj/item/weapon/gun/energy/taser/mounted/cyborg
name = "taser gun"
cell_type = /obj/item/weapon/cell/secborg
recharge_time = 10 //Time it takes for shots to recharge (in ticks)
@@ -21,6 +23,7 @@
name = "stun revolver"
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
item_state = "stunrevolver"
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
@@ -105,14 +105,14 @@
current_user = user
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
tension = 1
while(bolt && tension && current_user == user)
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
tension = 0
icon_state = "crossbow"
return
tension++
icon_state = "crossbow-drawn"
@@ -120,7 +120,7 @@
tension = max_tension
usr << "[src] clunks as you draw the string to its maximum tension!"
return
user.visible_message("[usr] draws back the string of [src]!","<span class='notice'>You continue drawing back the string of [src]!</span>")
/obj/item/weapon/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
@@ -66,7 +66,7 @@
for(var/obj/item/O in src.contents)
total_stored += O.get_storage_cost()
if(total_stored + W.get_storage_cost() <= max_storage_space)
user.drop_item(W)
user.remove_from_mob(W)
W.loc = src
user << "You shove [W] into the hopper."
else
@@ -133,4 +133,5 @@
name = "syringe gun revolver"
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to five syringes. The spring still needs to be drawn between shots."
icon_state = "rapidsyringegun"
item_state = "rapidsyringegun"
max_darts = 5
@@ -51,7 +51,7 @@
name = "\improper STS-35 automatic rifle"
desc = "A durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 7.62mm rounds. It is unmarked."
icon_state = "arifle"
item_state = "l6closednomag" //placeholder
item_state = null
w_class = 4
force = 10
caliber = "a762"
@@ -63,12 +63,13 @@
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon()
..()
icon_state = (ammo_magazine)? "arifle-0" : "arifle"
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/wt550
name = "\improper W-T 550 Saber"
desc = "A cheap, mass produced Ward-Takahashi PDW. Uses 9mm rounds."
icon_state = "wt550"
item_state = "c20r" //placeholder
item_state = "wt550"
w_class = 3
caliber = "9mm"
origin_tech = "combat=5;materials=2"
@@ -90,7 +91,7 @@
name = "\improper Z8 Bulldog"
desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it."
icon_state = "carbine"
item_state = "l6closednomag" //placeholder
item_state = "z8carbine"
w_class = 4
force = 10
caliber = "a556"
@@ -45,6 +45,7 @@
name = "dart gun"
desc = "A small gas-powered dartgun, capable of delivering chemical cocktails swiftly across short distances."
icon_state = "dartgun-empty"
item_state = null
caliber = "dart"
fire_sound = 'sound/weapons/empty.ogg'
@@ -63,6 +63,7 @@
name = "desert eagle"
desc = "A robust handgun that uses .50 AE ammo"
icon_state = "deagle"
item_state = "deagle"
force = 14.0
caliber = ".50"
load_method = MAGAZINE
@@ -107,6 +108,7 @@
name = "\improper Stechtkin pistol"
desc = "A small, easily concealable gun. Uses 9mm rounds."
icon_state = "pistol"
item_state = null
w_class = 2
caliber = "9mm"
silenced = 0
@@ -2,6 +2,7 @@
name = "revolver"
desc = "A classic revolver. Uses .357 ammo"
icon_state = "revolver"
item_state = "revolver"
caliber = "357"
origin_tech = "combat=2;materials=2"
handle_casings = CYCLE_CASINGS
@@ -42,6 +42,7 @@
/obj/item/weapon/gun/projectile/shotgun/pump/combat
name = "combat shotgun"
icon_state = "cshotgun"
item_state = "cshotgun"
origin_tech = "combat=5;materials=2"
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
ammo_type = /obj/item/ammo_casing/shotgun
@@ -51,7 +52,7 @@
name = "double-barreled shotgun"
desc = "A true classic."
icon_state = "dshotgun"
item_state = "shotgun"
item_state = "dshotgun"
//SPEEDLOADER because rapid unloading.
//In principle someone could make a speedloader for it, so it makes sense.
load_method = SINGLE_CASING|SPEEDLOADER
+60 -46
View File
@@ -6,36 +6,44 @@
nodamage = 1
check_armour = "energy"
on_hit(var/atom/change)
wabbajack(change)
/obj/item/projectile/change/on_hit(var/atom/change)
wabbajack(change)
/obj/item/projectile/change/proc/wabbajack (mob/M as mob in living_mob_list)
/obj/item/projectile/change/proc/wabbajack(var/mob/M)
if(istype(M, /mob/living) && M.stat != DEAD)
if(M.monkeyizing) return
if(M.has_brain_worms()) return //Borer stuff - RR
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.overlays.Cut()
M.invisibility = 101
if(M.monkeyizing)
return
if(M.has_brain_worms())
return //Borer stuff - RR
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi) del(Robot.mmi)
if(Robot.mmi)
del(Robot.mmi)
else
for(var/obj/item/W in M)
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
del(W)
continue
W.layer = initial(W.layer)
W.loc = M.loc
W.dropped(M)
M.drop_from_inventory(W)
var/mob/living/new_mob
var/randomize = pick("robot","slime","xeno","human")
var/options = list("robot", "slime")
for(var/t in all_species)
options += t
options -= "Xenomorph Queen"
options -= "Xenomorph"
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species)
options -= H.species.name
else if(isrobot(M))
options -= "robot"
else if(isslime(M))
options -= "slime"
var/randomize = pick(options)
switch(randomize)
if("robot")
new_mob = new /mob/living/silicon/robot(M.loc)
@@ -48,36 +56,42 @@
if("slime")
new_mob = new /mob/living/carbon/slime(M.loc)
new_mob.universal_speak = 1
if("xeno")
var/alien_caste = pick("Hunter","Sentinel","Drone","Larva")
new_mob = create_new_xenomorph(alien_caste,M.loc)
new_mob.universal_speak = 1
if("human")
new_mob = new /mob/living/carbon/human(M.loc, pick(all_species))
if(M.gender == MALE)
new_mob.gender = MALE
new_mob.name = pick(first_names_male)
else
new_mob.gender = FEMALE
new_mob.name = pick(first_names_female)
new_mob.name += " [pick(last_names)]"
new_mob.real_name = new_mob.name
var/datum/preferences/A = new() //Randomize appearance for the human
A.randomize_appearance_for(new_mob)
else
return
var/mob/living/carbon/human/H
if(ishuman(M))
H = M
else
new_mob = new /mob/living/carbon/human(M.loc)
H = new_mob
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
if(M.gender == MALE)
H.gender = MALE
H.name = pick(first_names_male)
else
H.gender = FEMALE
H.name = pick(first_names_female)
H.name += " [pick(last_names)]"
H.real_name = H.name
new_mob.a_intent = "hurt"
if(M.mind)
M.mind.transfer_to(new_mob)
H.set_species(randomize)
H.universal_speak = 1
var/datum/preferences/A = new() //Randomize appearance for the human
A.randomize_appearance_for(H)
if(new_mob)
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
new_mob.a_intent = "hurt"
if(M.mind)
M.mind.transfer_to(new_mob)
else
new_mob.key = M.key
new_mob << "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>"
del(M)
return
else
new_mob.key = M.key
new_mob << "<B>Your form morphs into that of a [randomize].</B>"
del(M)
return new_mob
M << "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>"
return
+2 -2
View File
@@ -80,12 +80,12 @@
var/mob/living/M = loc
if(M == T) return
if(!istype(M)) return
if(src != M.equipped())
if(src != M.get_active_hand())
stop_aim()
return
//reflex firing is disabled when help intent is set
if (M.a_intent == "help")
if (M.a_intent == I_HELP)
M << "\red You refrain from firing your [src] as your intent is set to help."
return