Merge branch 'master' of https://github.com/tgstation/-tg-station into VisionUpdateRefactor

Conflicts:
	code/ATMOSPHERICS/components/unary_devices/cryo.dm
	code/_onclick/hud/alert.dm
	code/_onclick/hud/hud.dm
	code/datums/mutations.dm
	code/datums/wires/robot.dm
	code/game/atoms.dm
	code/game/gamemodes/blob/overmind.dm
	code/game/machinery/alarm.dm
	code/game/machinery/machinery.dm
	code/game/machinery/suit_storage_unit.dm
	code/game/objects/items/weapons/tanks/tanks.dm
	code/game/objects/items/weapons/tools.dm
	code/game/objects/structures/morgue.dm
	code/modules/admin/verbs/adminjump.dm
	code/modules/atmospherics/machinery/atmosmachinery.dm
	code/modules/mob/inventory.dm
	code/modules/mob/living/carbon/alien/humanoid/death.dm
	code/modules/mob/living/carbon/alien/larva/death.dm
	code/modules/mob/living/carbon/brain/death.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/carbon/human/death.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_damage.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/carbon/human/species.dm
	code/modules/mob/living/carbon/human/species_types.dm
	code/modules/mob/living/carbon/life.dm
	code/modules/mob/living/carbon/monkey/death.dm
	code/modules/mob/living/life.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/mob/living/silicon/ai/death.dm
	code/modules/mob/living/silicon/ai/life.dm
	code/modules/mob/living/silicon/pai/death.dm
	code/modules/mob/living/silicon/pai/pai.dm
	code/modules/mob/living/silicon/robot/death.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/living/silicon/silicon.dm
	code/modules/mob/living/simple_animal/guardian/guardian.dm
	code/modules/mob/login.dm
	code/modules/mob/mob.dm
	code/modules/projectiles/gun.dm
	code/modules/reagents/chemistry/reagents/blob_reagents.dm
	tgstation.dme
This commit is contained in:
phil235
2016-02-04 14:34:45 +01:00
887 changed files with 27975 additions and 28805 deletions

View File

@@ -1,5 +1,6 @@
/obj/item/ammo_box/a357
name = "speed loader (.357)"
desc = "Designed to quickly reload revolvers."
icon_state = "357"
ammo_type = /obj/item/ammo_casing/a357
max_ammo = 7
@@ -7,6 +8,7 @@
/obj/item/ammo_box/c38
name = "speed loader (.38)"
desc = "Designed to quickly reload revolvers."
icon_state = "38"
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6

View File

@@ -154,6 +154,7 @@
/obj/item/ammo_box/magazine/m10mm
name = "pistol magazine (10mm)"
desc = "A gun magazine."
icon_state = "9x19p"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c10mm
@@ -272,6 +273,7 @@ obj/item/ammo_box/magazine/tommygunm45
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g slugs)"
desc = "A drum magazine."
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun
origin_tech = "combat=3;syndicate=1"

View File

@@ -129,60 +129,49 @@
O.emp_act(severity)
/obj/item/weapon/gun/afterattack(atom/target as mob|obj|turf, mob/living/carbon/human/user as mob|obj, flag, params)//TODO: go over this
/obj/item/weapon/gun/afterattack(atom/target, mob/living/user, flag, params)
if(flag) //It's adjacent, is the user, or is on the user's person
if(target in user.contents) //can't shoot stuff inside us.
return
if(!ismob(target) || user.a_intent == "harm") //melee attack
return
if(user.zone_selected == "mouth")
handle_suicide(user, target, params)
return
if(target == user) //so we can't shoot ourselves (unless mouth selected)
if(target == user && user.zone_selected != "mouth") //so we can't shoot ourselves (unless mouth selected)
return
//Exclude lasertag guns from the CLUMSY check.
if(clumsy_check && can_shoot())
if(istype(user, /mob/living))
var/mob/living/M = user
if (M.disabilities & CLUMSY && prob(40))
user << "<span class='userdanger'>You shoot yourself in the foot with \the [src]!</span>"
var/shot_leg = pick("l_leg", "r_leg")
process_fire(user,user,0,params, zone_override = shot_leg)
M.drop_item()
return
if(isliving(user))
if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can.
var/mob/living/L = user
if(!can_trigger_gun(L))
return
if(!can_shoot()) //Just because you can pull the trigger doesn't mean it can't shoot.
return
if(flag)
handle_suicide(user, target, params) //
return
//Exclude lasertag guns from the CLUMSY check.
if(clumsy_check)
if(istype(user))
if (user.disabilities & CLUMSY && prob(40))
user << "<span class='userdanger'>You shoot yourself in the foot with \the [src]!</span>"
var/shot_leg = pick("l_leg", "r_leg")
process_fire(user,user,0,params, zone_override = shot_leg)
user.drop_item()
return
process_fire(target,user,1,params)
/obj/item/weapon/gun/proc/can_trigger_gun(mob/living/carbon/user)
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
/obj/item/weapon/gun/proc/can_trigger_gun(var/mob/living/user)
if(!handle_pins(user) || !user.can_use_guns(src))
return 0
if(!handle_pins(user))
return 0
if(trigger_guard)
if(user.has_dna())
if(user.dna.check_mutation(HULK))
user << "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>"
return 0
if(NOGUNS in user.dna.species.specflags)
user << "<span class='warning'>Your fingers don't fit in the trigger guard!</span>"
return 0
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.martial_art && H.martial_art.name == "The Sleeping Carp") //great dishonor to famiry
user << "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>"
return 0
return 1
@@ -417,9 +406,6 @@ obj/item/weapon/gun/proc/newshot()
semicd = 0
if(!can_trigger_gun(user))
return
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
if(chambered && chambered.BB)

View File

@@ -55,13 +55,15 @@
/obj/item/weapon/gun/magic/Destroy()
if(can_charge) SSobj.processing.Remove(src)
if(can_charge)
SSobj.processing.Remove(src)
return ..()
/obj/item/weapon/gun/magic/process()
charge_tick++
if(charge_tick < recharge_rate || charges >= max_charges) return 0
if(charge_tick < recharge_rate || charges >= max_charges)
return 0
charge_tick = 0
charges++
return 1

View File

@@ -74,7 +74,7 @@
if(!istype(user_turf))
return 0
var/obj/dummy = new(user_turf)
dummy.pass_flags |= PASSTABLE & PASSGLASS & PASSGRILLE //Grille/Glass so it can be used through common windows
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
for(var/turf/turf in getline(user_turf,target))
if(turf.density)
qdel(dummy)

View File

@@ -30,7 +30,8 @@
return (chambered.BB ? 1 : 0)
/obj/item/weapon/gun/projectile/shotgun/attack_self(mob/living/user)
if(recentpump) return
if(recentpump)
return
pump(user)
recentpump = 1
spawn(10)
@@ -52,7 +53,8 @@
chambered = null
/obj/item/weapon/gun/projectile/shotgun/proc/pump_reload(mob/M)
if(!magazine.ammo_count()) return 0
if(!magazine.ammo_count())
return 0
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
chambered = AC
@@ -217,6 +219,7 @@
sawn_desc = "I'm just here for the gasoline."
unique_rename = 0
unique_reskin = 0
var/slung = 0
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
..()
@@ -226,11 +229,18 @@
slot_flags = SLOT_BACK
icon_state = "ishotgunsling"
user << "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>"
slung = 1
update_icon()
else
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>"
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/update_icon()
..()
if (slung && (slot_flags & SLOT_BELT) )
slung = 0
icon_state = "ishotgun-sawn"
// Sawing guns related procs //
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user)

View File

@@ -148,6 +148,7 @@
icon_state = ".50"
/obj/item/projectile/bullet/sniper/penetrator
icon_state = "gauss"
name = "penetrator round"
damage = 60
forcedodge = 1
@@ -172,7 +173,7 @@
icon_state = ".50"
/obj/item/projectile/bullet/sniper/accelerator
icon_state = "red_laser"
icon_state = "gaussweak"
name = "accelerator round"
damage = 5
stun = 0
@@ -183,7 +184,7 @@
..()
damage += 5
if(damage > 40)
icon_state = "heavylaser"
icon_state = "gaussstrong"
breakthings = TRUE
else if(damage > 25)
icon_state = "laser"
icon_state = "gauss"

View File

@@ -210,3 +210,9 @@
icon_state = "firing_pin_blue"
suit_requirement = /obj/item/clothing/suit/bluetag
tagcolor = "blue"
/obj/item/device/firing_pin/Destroy()
if(gun)
gun.pin = null
return ..()

View File

@@ -151,12 +151,11 @@
reagents.handle_reactions()
return 1
/obj/item/projectile/bullet/dart/metalfoam
New()
..()
reagents.add_reagent("aluminium", 15)
reagents.add_reagent("foaming_agent", 5)
reagents.add_reagent("facid", 5)
/obj/item/projectile/bullet/dart/metalfoam/New()
..()
reagents.add_reagent("aluminium", 15)
reagents.add_reagent("foaming_agent", 5)
reagents.add_reagent("facid", 5)
//This one is for future syringe guns update
/obj/item/projectile/bullet/dart/syringe

View File

@@ -123,7 +123,8 @@
/proc/wabbajack(mob/living/M)
if(istype(M))
if(istype(M, /mob/living) && M.stat != DEAD)
if(M.notransform) return
if(M.notransform)
return
M.notransform = 1
M.canmove = 0
M.icon = null
@@ -132,16 +133,13 @@
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi) qdel(Robot.mmi)
if(Robot.mmi)
qdel(Robot.mmi)
Robot.notify_ai(1)
else
for(var/obj/item/W in M)
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
if(!M.unEquip(W))
qdel(W)
continue
W.layer = initial(W.layer)
W.loc = M.loc
W.dropped(M)
var/mob/living/new_mob
@@ -153,8 +151,10 @@
if("robot")
var/robot = pick("cyborg","syndiborg","drone")
switch(robot)
if("cyborg") new_mob = new /mob/living/silicon/robot(M.loc)
if("syndiborg") new_mob = new /mob/living/silicon/robot/syndicate(M.loc)
if("cyborg")
new_mob = new /mob/living/silicon/robot(M.loc)
if("syndiborg")
new_mob = new /mob/living/silicon/robot/syndicate(M.loc)
if("drone")
new_mob = new /mob/living/simple_animal/drone(M.loc)
var/mob/living/simple_animal/drone/D = new_mob
@@ -183,42 +183,70 @@
/*var/alien_caste = pick("Hunter","Sentinel","Drone","Larva")
switch(alien_caste)
if("Hunter") new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc)
if("Sentinel") new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc)
if("Drone") new_mob = new /mob/living/carbon/alien/humanoid/drone(M.loc)
else new_mob = new /mob/living/carbon/alien/larva(M.loc)
if("Hunter")
new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc)
if("Sentinel")
new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc)
if("Drone")
new_mob = new /mob/living/carbon/alien/humanoid/drone(M.loc)
else
new_mob = new /mob/living/carbon/alien/larva(M.loc)
new_mob.languages |= HUMAN*/
if("animal")
if(prob(50))
var/beast = pick("carp","bear","mushroom","statue", "bat", "goat","killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp")
switch(beast)
if("carp") new_mob = new /mob/living/simple_animal/hostile/carp(M.loc)
if("bear") new_mob = new /mob/living/simple_animal/hostile/bear(M.loc)
if("mushroom") new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc)
if("statue") new_mob = new /mob/living/simple_animal/hostile/statue(M.loc)
if("bat") new_mob = new /mob/living/simple_animal/hostile/retaliate/bat(M.loc)
if("goat") new_mob = new /mob/living/simple_animal/hostile/retaliate/goat(M.loc)
if("killertomato") new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc)
if("spiderbase") new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider(M.loc)
if("spiderhunter") new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider/hunter(M.loc)
if("blobbernaut") new_mob = new /mob/living/simple_animal/hostile/blob/blobbernaut(M.loc)
if("magicarp") new_mob = new /mob/living/simple_animal/hostile/carp/ranged(M.loc)
if("chaosmagicarp") new_mob = new /mob/living/simple_animal/hostile/carp/ranged/chaos(M.loc)
if("carp")
new_mob = new /mob/living/simple_animal/hostile/carp(M.loc)
if("bear")
new_mob = new /mob/living/simple_animal/hostile/bear(M.loc)
if("mushroom")
new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc)
if("statue")
new_mob = new /mob/living/simple_animal/hostile/statue(M.loc)
if("bat")
new_mob = new /mob/living/simple_animal/hostile/retaliate/bat(M.loc)
if("goat")
new_mob = new /mob/living/simple_animal/hostile/retaliate/goat(M.loc)
if("killertomato")
new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc)
if("spiderbase")
new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider(M.loc)
if("spiderhunter")
new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider/hunter(M.loc)
if("blobbernaut")
new_mob = new /mob/living/simple_animal/hostile/blob/blobbernaut(M.loc)
if("magicarp")
new_mob = new /mob/living/simple_animal/hostile/carp/ranged(M.loc)
if("chaosmagicarp")
new_mob = new /mob/living/simple_animal/hostile/carp/ranged/chaos(M.loc)
else
var/animal = pick("parrot","corgi","crab","pug","cat","mouse","chicken","cow","lizard","chick","fox","butterfly")
switch(animal)
if("parrot") new_mob = new /mob/living/simple_animal/parrot(M.loc)
if("corgi") new_mob = new /mob/living/simple_animal/pet/dog/corgi(M.loc)
if("crab") new_mob = new /mob/living/simple_animal/crab(M.loc)
if("pug") new_mob = new /mob/living/simple_animal/pet/dog/pug(M.loc)
if("cat") new_mob = new /mob/living/simple_animal/pet/cat(M.loc)
if("mouse") new_mob = new /mob/living/simple_animal/mouse(M.loc)
if("chicken") new_mob = new /mob/living/simple_animal/chicken(M.loc)
if("cow") new_mob = new /mob/living/simple_animal/cow(M.loc)
if("lizard") new_mob = new /mob/living/simple_animal/lizard(M.loc)
if("fox") new_mob = new /mob/living/simple_animal/pet/fox(M.loc)
if("butterfly") new_mob = new /mob/living/simple_animal/butterfly(M.loc)
else new_mob = new /mob/living/simple_animal/chick(M.loc)
if("parrot")
new_mob = new /mob/living/simple_animal/parrot(M.loc)
if("corgi")
new_mob = new /mob/living/simple_animal/pet/dog/corgi(M.loc)
if("crab")
new_mob = new /mob/living/simple_animal/crab(M.loc)
if("pug")
new_mob = new /mob/living/simple_animal/pet/dog/pug(M.loc)
if("cat")
new_mob = new /mob/living/simple_animal/pet/cat(M.loc)
if("mouse")
new_mob = new /mob/living/simple_animal/mouse(M.loc)
if("chicken")
new_mob = new /mob/living/simple_animal/chicken(M.loc)
if("cow")
new_mob = new /mob/living/simple_animal/cow(M.loc)
if("lizard")
new_mob = new /mob/living/simple_animal/hostile/lizard(M.loc)
if("fox")
new_mob = new /mob/living/simple_animal/pet/fox(M.loc)
if("butterfly")
new_mob = new /mob/living/simple_animal/butterfly(M.loc)
else
new_mob = new /mob/living/simple_animal/chick(M.loc)
new_mob.languages |= HUMAN
if("humanoid")
new_mob = new /mob/living/carbon/human(M.loc)