Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/game/objects/effects/chem/chemsmoke.dm
	code/modules/customitems/item_defines.dm
	code/modules/projectiles/guns/launcher/syringe_gun.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
	code/modules/reagents/reagent_containers/food/drinks.dm
	code/modules/reagents/reagent_containers/pill.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-05-15 11:28:05 +03:00
468 changed files with 7273 additions and 9076 deletions

View File

@@ -13,12 +13,13 @@
firemode_type = /datum/firemode/energy
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 100 //How much energy is needed to fire.
var/cell_type = /obj/item/weapon/cell
var/charge_cost = 200 //How much energy is needed to fire.
var/max_shots = 10 //Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value.
var/cell_type = null
var/projectile_type = /obj/item/projectile/beam/practice
var/modifystate
var/charge_meter = 1 //if set, the icon state will be chosen based on the current charge
//self-recharging
var/self_recharge = 0 //if set, the weapon will recharge itself
var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically
@@ -33,7 +34,7 @@
modifystate = isnull(current_mode.modifystate)? initial(modifystate) : current_mode.modifystate
charge_cost = isnull(current_mode.charge_cost)? initial(charge_cost) : current_mode.charge_cost
fire_sound = isnull(current_mode.fire_sound)? initial(fire_sound) : current_mode.fire_sound
update_icon()
update_held_icon()
@@ -45,7 +46,8 @@
..()
if(cell_type)
power_supply = new cell_type(src)
power_supply.give(power_supply.maxcharge)
else
power_supply = new /obj/item/weapon/cell/device/variable(src, max_shots*charge_cost)
if(self_recharge)
processing_objects.Add(src)
update_icon()
@@ -60,15 +62,15 @@
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(!power_supply || power_supply.charge >= power_supply.maxcharge)
return 0 // check if we actually need to recharge
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(!external || !external.use(charge_cost)) //Take power from the borg...
return 0
power_supply.give(charge_cost) //... to recharge the shot
update_icon()
return 1
@@ -93,16 +95,22 @@
return suit.cell
return null
/obj/item/weapon/gun/energy/examine(mob/user)
..(user)
var/shots_remaining = round(power_supply.charge / charge_cost)
user << "Has [shots_remaining] shot\s remaining."
return
/obj/item/weapon/gun/energy/update_icon()
if(charge_meter)
var/ratio = power_supply.charge / power_supply.maxcharge
//make sure that rounding down will not give us the empty state even if we have charge for a shot left.
if(power_supply.charge < charge_cost)
ratio = 0
else
ratio = max(round(ratio, 0.25) * 100, 25)
if(modifystate)
icon_state = "[modifystate][ratio]"
else

View File

@@ -7,7 +7,7 @@
slot_flags = SLOT_BELT|SLOT_BACK
w_class = 3
force = 10
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=3;magnets=2"
projectile_type = /obj/item/projectile/beam
fire_delay = 1 //rapid fire
@@ -43,7 +43,7 @@ obj/item/weapon/gun/energy/retro
w_class = 3
projectile_type = /obj/item/projectile/beam
origin_tech = null
charge_cost = 200 //to compensate a bit for self-recharging
max_shots = 5 //to compensate a bit for self-recharging
self_recharge = 1
/obj/item/weapon/gun/energy/lasercannon
@@ -55,7 +55,8 @@ obj/item/weapon/gun/energy/retro
origin_tech = "combat=4;materials=3;powerstorage=3"
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 250
charge_cost = 400
max_shots = 5
fire_delay = 20
/obj/item/weapon/gun/energy/lasercannon/mounted
@@ -72,7 +73,8 @@ obj/item/weapon/gun/energy/retro
fire_sound = 'sound/weapons/laser3.ogg'
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 50
charge_cost = 100
max_shots = 20
fire_delay = 1
/obj/item/weapon/gun/energy/sniperrifle
@@ -84,7 +86,8 @@ obj/item/weapon/gun/energy/retro
origin_tech = "combat=6;materials=5;powerstorage=4"
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
charge_cost = 250
charge_cost = 400
max_shots = 4
fire_delay = 35
force = 10
w_class = 4
@@ -106,7 +109,7 @@ obj/item/weapon/gun/energy/retro
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = "combat=1;magnets=2"
self_recharge = 1
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
fire_sound = 'sound/weapons/Laser.ogg'
projectile_type = /obj/item/projectile/beam/lastertag/blue
var/required_vest

View File

@@ -4,8 +4,8 @@
icon_state = "energystun100"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 10
charge_cost = 100 //How much energy is needed to fire.
projectile_type = /obj/item/projectile/beam/stun
origin_tech = "combat=3;magnets=2"
modifystate = "energystun"

View File

@@ -6,14 +6,14 @@
slot_flags = SLOT_BELT|SLOT_BACK
force = 10
fire_sound='sound/weapons/Laser.ogg'
charge_cost = 50
projectile_type = /obj/item/projectile/beam
sel_mode = 2
max_shots = 10
firemodes = list(
list(name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'),
list(name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'),
list(name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=100),
list(name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=400),
)
/obj/item/weapon/gun/energy/pulse_rifle/mounted
@@ -27,6 +27,7 @@
fire_delay = 25
fire_sound='sound/weapons/pulse.ogg'
projectile_type=/obj/item/projectile/beam/pulse
charge_cost=400
/obj/item/weapon/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob)
user << "<span class='warning'>[src.name] has three settings, and they are all DESTROY.</span>"
@@ -37,4 +38,4 @@
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
slot_flags = SLOT_BELT|SLOT_HOLSTER
icon_state = "m1911-p"
cell_type = /obj/item/weapon/cell/crap
max_shots = 5

View File

@@ -9,7 +9,8 @@
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
charge_cost = 100
charge_cost = 300
max_shots = 10
projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
@@ -29,7 +30,7 @@
item_state = "decloner"
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/declone
/obj/item/weapon/gun/energy/floragun
@@ -39,6 +40,7 @@
item_state = "floramut"
fire_sound = 'sound/effects/stealthoff.ogg'
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/floramut
origin_tech = "materials=2;biotech=3;powerstorage=3"
modifystate = "floramut"
@@ -65,7 +67,6 @@
slot_flags = SLOT_BELT|SLOT_BACK
w_class = 4
projectile_type = /obj/item/projectile/meteor
charge_cost = 100
cell_type = /obj/item/weapon/cell/potato
self_recharge = 1
recharge_time = 5 //Time it takes for shots to recharge (in ticks)
@@ -110,7 +111,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
w_class = 4.0
charge_cost = 200
max_shots = 5
projectile_type = /obj/item/projectile/change
origin_tech = null
self_recharge = 1
@@ -127,7 +128,7 @@
name = "staff of animation"
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
projectile_type = /obj/item/projectile/animate
charge_cost = 100
max_shots = 10
obj/item/weapon/gun/energy/staff/focus
name = "mental focus"
@@ -140,11 +141,11 @@ obj/item/weapon/gun/energy/staff/focus
/*
attack_self(mob/living/user as mob)
if(projectile_type == "/obj/item/projectile/forcebolt")
charge_cost = 200
charge_cost = 400
user << "<span class='warning'>The [src.name] will now strike a small area.</span>"
projectile_type = "/obj/item/projectile/forcebolt/strong"
else
charge_cost = 100
charge_cost = 200
user << "<span class='warning'>The [src.name] will now strike only a single person.</span>"
projectile_type = "/obj/item/projectile/forcebolt"
*/

View File

@@ -4,9 +4,8 @@
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
charge_cost = 100
max_shots = 5
projectile_type = /obj/item/projectile/beam/stun
cell_type = /obj/item/weapon/cell/crap
/obj/item/weapon/gun/energy/taser/mounted
name = "mounted taser gun"
@@ -15,7 +14,7 @@
/obj/item/weapon/gun/energy/taser/mounted/cyborg
name = "taser gun"
cell_type = /obj/item/weapon/cell/secborg
max_shots = 6
recharge_time = 10 //Time it takes for shots to recharge (in ticks)
@@ -26,9 +25,8 @@
item_state = "stunrevolver"
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
projectile_type = /obj/item/projectile/energy/electrode/stunshot
cell_type = /obj/item/weapon/cell
max_shots = 8
/obj/item/weapon/gun/energy/crossbow
@@ -37,13 +35,13 @@
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=2;magnets=2;syndicate=5"
slot_flags = SLOT_BELT
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
projectile_type = /obj/item/projectile/energy/bolt
cell_type = /obj/item/weapon/cell/crap
max_shots = 5
self_recharge = 1
charge_meter = 0
@@ -56,5 +54,5 @@
desc = "A weapon favored by mercenary infiltration teams."
w_class = 4
force = 10
matter = list("metal" = 200000)
matter = list(DEFAULT_WALL_MATERIAL = 200000)
projectile_type = /obj/item/projectile/energy/bolt/large

View File

@@ -7,6 +7,7 @@
var/release_force = 0
var/throw_distance = 10
muzzle_flash = 0
fire_sound_text = "a launcher firing"
//This normally uses a proc on projectiles and our ammo is not strictly speaking a projectile.

View File

@@ -15,7 +15,7 @@
var/obj/item/weapon/grenade/chambered
var/list/grenades = new/list()
var/max_grenades = 5 //holds this + one in the chamber
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
//revolves the magazine, allowing players to choose between multiple grenade types
/obj/item/weapon/gun/launcher/grenade/proc/pump(mob/M as mob)
@@ -80,7 +80,7 @@
chambered.det_time = 10
chambered.activate(null)
return chambered
/obj/item/weapon/gun/launcher/grenade/handle_post_fire(mob/user)
message_admins("[key_name_admin(user)] fired a grenade ([chambered.name]) from a grenade launcher ([src.name]).")
log_game("[key_name_admin(user)] used a grenade ([chambered.name]).")

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "syringe-cartridge"
var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot
matter = list("metal" = 125, "glass" = 375)
matter = list(DEFAULT_WALL_MATERIAL = 125, "glass" = 375)
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
@@ -53,10 +53,9 @@
if(L.can_inject())
if(syringe.reagents)
syringe.reagents.trans_to_mob(L, 15, CHEM_BLOOD)
syringe.break_syringe(iscarbon(hit_atom)? hit_atom : null)
syringe.update_icon()
icon_state = initial(icon_state) //reset icon state
update_icon()
@@ -67,15 +66,15 @@
item_state = "syringegun"
w_class = 3
force = 7
matter = list("metal" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
slot_flags = SLOT_BELT
fire_sound = 'sound/weapons/empty.ogg'
fire_sound_text = "a metallic thunk"
recoil = 0
release_force = 10
throw_distance = 10
var/list/darts = list()
var/max_darts = 1
var/obj/item/weapon/syringe_cartridge/next

View File

@@ -8,9 +8,9 @@
icon_state = "revolver"
origin_tech = "combat=2;materials=2"
w_class = 3
matter = list("metal" = 1000)
matter = list(DEFAULT_WALL_MATERIAL = 1000)
recoil = 1
var/caliber = "357" //determines which casings will fit
var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled
var/load_method = SINGLE_CASING|SPEEDLOADER //1 = Single shells, 2 = box or quick loader, 3 = magazine
@@ -18,7 +18,7 @@
//For SINGLE_CASING or SPEEDLOADER guns
var/max_shells = 0 //the number of casings that will fit inside
var/ammo_type = null //the type of ammo that the gun comes preloaded with
var/ammo_type = null //the type of ammo that the gun comes preloaded with
var/list/loaded = list() //stored ammo
//For MAGAZINE guns
@@ -50,7 +50,7 @@
chambered = ammo_magazine.stored_ammo[1]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
if (chambered)
return chambered.BB
return null
@@ -186,7 +186,7 @@
)
if(auto_eject_sound)
playsound(user, auto_eject_sound, 40, 1)
ammo_magazine.update_icon()
ammo_magazine.update_icon()
ammo_magazine = null
update_icon() //make sure to do this after unsetting ammo_magazine
@@ -213,8 +213,8 @@
set name = "Unload Ammo"
set category = "Object"
set src in usr
if(usr.stat || usr.restrained()) return
unload_ammo(usr)
*/
*/

View File

@@ -41,3 +41,24 @@
name = input
M << "You name the gun [input]. Say hello to your new friend."
return 1
// Blade Runner pistol.
/obj/item/weapon/gun/projectile/revolver/deckard
name = "Deckard .44"
desc = "A custom-built revolver, based off the semi-popular Detective Special model."
icon_state = "deckard-empty"
ammo_type = /obj/item/ammo_magazine/c38/rubber
/obj/item/weapon/gun/projectile/revolver/deckard/update_icon()
..()
if(loaded.len)
icon_state = "deckard-loaded"
else
icon_state = "deckard-empty"
/obj/item/weapon/gun/projectile/revolver/deckard/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
flick("deckard-reload",src)
..()