Merge pull request #375 from Fox-McCloud/Thickmaterial

Thickmaterial
This commit is contained in:
ZomgPonies
2015-02-22 08:26:02 -05:00
28 changed files with 230 additions and 270 deletions
+2 -2
View File
@@ -280,7 +280,7 @@ BLIND // can't see anything
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
item_state = "s_helmet"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -301,7 +301,7 @@ BLIND // can't see anything
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = STOPSPRESSUREDMAGE
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
slowdown = 2
+5
View File
@@ -198,6 +198,7 @@
w_class = 4//bulky item
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
flags = THICKMATERIAL
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
@@ -210,6 +211,7 @@
item_state = "swat_suit"
w_class = 4//bulky item
gas_transfer_coefficient = 0.90
flags = THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 3
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
@@ -218,6 +220,9 @@
/obj/item/clothing/suit/armor/tdome
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
flags = THICKMATERIAL
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
/obj/item/clothing/suit/armor/tdome/red
name = "Thunderdome suit (red)"
+2 -2
View File
@@ -4,7 +4,7 @@
icon_state = "bio"
desc = "A hood that protects the head and face from biological comtaminants."
permeability_coefficient = 0.01
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR | THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
siemens_coefficient = 0.9
@@ -18,7 +18,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = ONESIZEFITSALL
flags = ONESIZEFITSALL | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
+5 -3
View File
@@ -21,7 +21,7 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/extinguisher)
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
flags = STOPSPRESSUREDMAGE
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
@@ -55,7 +55,7 @@
name = "bomb hood"
desc = "Use in case of bomb."
icon_state = "bombsuit"
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR | THICKMATERIAL
armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
cold_protection = HEAD
@@ -74,6 +74,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 2
armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0)
@@ -102,7 +103,7 @@
name = "Radiation Hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation"
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
loose = 8
@@ -114,6 +115,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
flags = THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1.5
+28 -13
View File
@@ -42,7 +42,7 @@
// Set up DNA.
if(!delay_ready_dna)
dna.ready_dna(src)
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
@@ -205,8 +205,8 @@
stat("Distribution Pressure", internal.distribute_pressure)
if(mind)
if(mind.changeling)
stat("Chemical Storage", mind.changeling.chem_charges)
stat("Genetic Damage Time", mind.changeling.geneticdamage)
stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
stat("Absorbed DNA", mind.changeling.absorbedcount)
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
stat("Energy Charge", (wear_suit:cell:charge))
@@ -539,8 +539,8 @@
if(id)
return id.rank ? id.rank : if_no_job
else
return if_no_id
return if_no_id
//gets assignment from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
@@ -1073,6 +1073,21 @@
xylophone=0
return
/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone)
. = 1 // Default to returning true.
if(user && !target_zone)
target_zone = user.zone_sel.selecting
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
if(above_neck(target_zone))
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"].</span>"
/mob/living/carbon/human/proc/vomit(hairball=0)
if(stat==2)return
@@ -1301,7 +1316,7 @@
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs, var/default_colour)
var/datum/species/oldspecies = species
if(!dna)
if(!new_species)
@@ -1318,26 +1333,26 @@
if(species.language)
remove_language(species.language)
if(species.default_language)
remove_language(species.default_language)
remove_language(species.default_language)
species = all_species[new_species]
if(oldspecies)
if(oldspecies.default_genes.len)
oldspecies.handle_dna(src,1) // Remove any genes that belong to the old species
if(force_organs || !organs || !organs.len)
species.create_organs(src)
if(vessel)
vessel = null
make_blood()
if(species.language)
add_language(species.language)
if(species.default_language)
add_language(species.default_language)
@@ -1359,7 +1374,7 @@
r_skin = 0
g_skin = 0
b_skin = 0
if(!dna)
dna = new /datum/dna(null)
dna.species = species.name
+7 -2
View File
@@ -124,6 +124,11 @@
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
return
/mob/living/silicon/can_inject(var/mob/user, var/error_msg)
if(error_msg)
user << "<span class='alert'>Their outer shell is too tough.</span>"
return 0
/mob/living/silicon/IsAdvancedToolUser()
return 1
@@ -207,7 +212,7 @@
show_emergency_shuttle_eta()
show_system_integrity()
show_malf_ai()
//Silicon mob language procs
/mob/living/silicon/can_speak(datum/language/speaking)
@@ -290,7 +295,7 @@
set category = "IC"
flavor_text = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
/mob/living/silicon/binarycheck()
return 1
+8 -1
View File
@@ -213,6 +213,13 @@ proc/hassensorlevel(A, var/level)
return zone
/proc/above_neck(zone)
var/list/zones = list("head", "mouth", "eyes")
if(zones.Find(zone))
return 1
else
return 0
/proc/stars(n, pr)
if (pr == null)
pr = 25
@@ -491,4 +498,4 @@ var/list/intents = list("help","disarm","grab","harm")
else // Everyone else (dead people who didn't ghost yet, etc.)
lname = name
lname = "<span class='name'>[lname]</span> "
M << "<span class='deadsay'>[lname][follow][message]</span>"
M << "<span class='deadsay'>[lname][follow][message]</span>"
+26 -61
View File
@@ -18,8 +18,8 @@
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 0
w_class = 1.0
throw_speed = 7
throw_range = 15
throw_speed = 3
throw_range = 7
m_amt = 10
var/colour = "black" //what colour the ink is!
pressure_resistance = 2
@@ -41,72 +41,37 @@
colour = "white"
/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
/obj/item/weapon/pen/attack(mob/living/M, mob/user)
if(!istype(M))
return
user << "<span class='warning'>You stab [M] with the pen.</span>"
// M << "\red You feel a tiny prick!" //That's a whole lot of meta!
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [M.name] ([M.ckey])</font>")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
return
if(M.can_inject(user, 1))
user << "<span class='warning'>You stab [M] with the pen.</span>"
// M << "<span class='danger'>You feel a tiny prick!</span>"
. = 1
add_logs(user, M, "stabbed", object="[name]")
/*
* Sleepy Pens
* Sleepypens
*/
/obj/item/weapon/pen/sleepypen
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
/obj/item/weapon/pen/sleepy
flags = OPENCONTAINER
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/sleepypen/New()
var/datum/reagents/R = new/datum/reagents(30) //Used to be 300
reagents = R
R.my_atom = src
R.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N
/obj/item/weapon/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M)) return
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, 55)
/obj/item/weapon/pen/sleepy/New()
create_reagents(55)
reagents.add_reagent("stoxin", 30)
reagents.add_reagent("mutetoxin", 15)
reagents.add_reagent("tirizene", 10)
..()
return
/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
..()
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(reagents.total_volume)
if(M.reagents) reagents.trans_to(M, 50) //used to be 150
return
/*
* Parapens
*/
/obj/item/weapon/pen/paralysis
flags = OPENCONTAINER
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/paralysis/New()
var/datum/reagents/R = new/datum/reagents(55)
reagents = R
R.my_atom = src
R.add_reagent("stoxin", 30)
R.add_reagent("mutetoxin", 15)
R.add_reagent("tirizene", 10)
..()
return
/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
..()
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(reagents.total_volume)
if(M.reagents) reagents.trans_to(M, 55) //used to be 150
return
@@ -125,6 +125,11 @@
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = null
/obj/item/ammo_casing/shotgun/fakebeanbag
name = "beanbag shell"
desc = "A weak beanbag shell."
+10 -4
View File
@@ -24,18 +24,24 @@
return
/obj/item/weapon/gun/projectile/process_chambered()
/obj/item/weapon/gun/projectile/process_chambered(var/eject_casing = 1, var/empty_chamber = 1)
// if(in_chamber)
// return 1
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
AC.loc = get_turf(src) //Eject casing onto ground.
AC.SpinAnimation(10, 1) //next gen special effects
chambered = null
if(eject_casing)
AC.loc = get_turf(src) //Eject casing onto ground.
AC.SpinAnimation(10, 1) //next gen special effects
if(empty_chamber)
chambered = null
chamber_round()
if(AC.BB)
if(AC.reagents && AC.BB.reagents)
var/datum/reagents/casting_reagents = AC.reagents
casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts/bullets
casting_reagents.delete()
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.update_icon()
@@ -12,18 +12,7 @@
return
/obj/item/weapon/gun/projectile/revolver/process_chambered()
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
chambered = null
chamber_round()
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.BB = null
AC.update_icon()
return 1
return 0
return ..(0, 1)
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = 0
@@ -36,21 +36,10 @@
/obj/item/weapon/gun/projectile/shotgun/process_chambered()
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
if(AC.BB)
if(AC.reagents && AC.BB.reagents)
var/datum/reagents/casting_reagents = AC.reagents
casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts
casting_reagents.delete()
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.BB = null
AC.update_icon()
return 1
return 0
return ..(0, 0)
/obj/item/weapon/gun/projectile/shotgun/chamber_round()
return
/obj/item/weapon/gun/projectile/shotgun/attack_self(mob/living/user as mob)
if(recentpump) return
+12 -6
View File
@@ -75,7 +75,7 @@
proj_hit = 1
qdel(src)
proc/on_hit(var/atom/target, var/blocked = 0)
proc/on_hit(var/atom/target, var/blocked = 0, var/hit_zone)
if(!isliving(target)) return 0
if(isanimal(target)) return 0
var/mob/living/L = target
@@ -107,6 +107,12 @@
loc = A.loc
return 0// nope.avi
var/reagent_note
if(reagents && reagents.reagent_list)
reagent_note = " REAGENTS:"
for(var/datum/reagent/R in reagents.reagent_list)
reagent_note += R.id + " ("
reagent_note += num2text(R.volume) + ") "
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
// close distance, actually RAISE the chance to hit.
var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
@@ -124,18 +130,18 @@
playsound(loc, hitsound, 20, 1, -1)
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
if(M.ckey && chatlog_attacks)
msg_admin_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
msg_admin_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
if(!iscarbon(firer))
M.LAssailant = null
else
M.LAssailant = firer
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>[reagent_note]"
if(M.ckey && chatlog_attacks)
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
spawn(0)
if(A)
@@ -144,6 +144,8 @@
name = "dart"
icon_state = "cbbolt"
damage = 6
embed = 0
sharp = 0
New()
..()
+14 -1
View File
@@ -297,4 +297,17 @@
starting_chems = list("kelotane","bicaridine","anti_toxin")
/obj/item/weapon/gun/dartgun/vox/raider
starting_chems = list("space_drugs","stoxin","impedrezene")
starting_chems = list("space_drugs","stoxin","impedrezene")
/obj/effect/syringe_gun_dummy //moved this shitty thing here
name = ""
desc = ""
icon = 'icons/obj/chemical.dmi'
icon_state = "null"
anchored = 1
density = 0
New()
var/datum/reagents/R = new/datum/reagents(15)
reagents = R
R.my_atom = src
@@ -14,18 +14,19 @@
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
flags = OPENCONTAINER
slot_flags = SLOT_BELT
var/ignore_flags = 0
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/reagent_containers/hypospray/attack(mob/living/M, mob/user)
if(!reagents.total_volume)
user << "\red [src] is empty."
return
if (!( istype(M, /mob) ))
if(!istype(M))
return
if (reagents.total_volume)
if(reagents.total_volume && (ignore_flags || M.can_inject(user, 1)))
user << "\blue You inject [M] with [src]."
M << "\red You feel a tiny prick!"
@@ -61,6 +62,7 @@
possible_transfer_amounts = list(10)
icon_state = "combat_hypo"
volume = 60
ignore_flags = 1 // So they can heal their comrades.
/obj/item/weapon/reagent_containers/hypospray/combat/New()
..()
@@ -75,6 +77,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10)
volume = 10
ignore_flags = 1 //so you can medipen through hardsuits
flags = null
/obj/item/weapon/reagent_containers/hypospray/autoinjector/New()
@@ -55,6 +55,11 @@
if(!proximity) return
if(!target.reagents) return
if(isliving(target))
var/mob/living/M = target
if(!M.can_inject(user, 1))
return
if(mode == SYRINGE_BROKEN)
user << "\red This syringe is broken!"
return
+51 -120
View File
@@ -1,136 +1,67 @@
/obj/item/weapon/gun/syringe
name = "syringe gun"
desc = "A spring loaded rifle designed to fit syringes, designed to incapacitate unruly patients from a distance."
icon = 'icons/obj/gun.dmi'
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
icon_state = "syringegun"
item_state = "syringegun"
w_class = 3.0
w_class = 3
throw_speed = 2
throw_range = 10
force = 4.0
var/list/syringes = new/list()
var/max_syringes = 1
force = 4
m_amt = 2000
clumsy_check = 0
fire_sound = 'sound/items/syringeproj.ogg'
var/list/syringes = list()
var/max_syringes = 1
/obj/item/weapon/gun/syringe/process_chambered()
if(!syringes.len) return 0
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
if(!S) return 0
in_chamber = new /obj/item/projectile/bullet/dart/syringe(src)
S.reagents.trans_to(in_chamber, S.reagents.total_volume)
in_chamber.name = S.name
syringes.Remove(S)
del(S)
return 1
/obj/item/weapon/gun/syringe/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue [syringes.len] / [max_syringes] syringes."
usr << "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
return
/obj/item/weapon/gun/syringe/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = I
if(S.mode != 2)//SYRINGE_BROKEN in syringes.dm
if(syringes.len < max_syringes)
user.drop_item()
I.loc = src
syringes += I
user << "\blue You put the syringe in [src]."
user << "\blue [syringes.len] / [max_syringes] syringes."
else
usr << "\red [src] cannot hold more syringes."
/obj/item/weapon/gun/syringe/attack_self(mob/living/user as mob)
if(!syringes.len)
user << "<span class='notice'>[src] is empty.</span>"
return 0
var/obj/item/weapon/reagent_containers/syringe/S = syringes[syringes.len]
if(!S) return 0
S.loc = user.loc
syringes.Remove(S)
user << "<span class = 'notice'>You unload [S] from \the [src]!</span>"
return 1
/obj/item/weapon/gun/syringe/attackby(var/obj/item/A as obj, mob/user as mob, var/show_msg = 1)
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
if(syringes.len < max_syringes)
user.drop_item()
user << "<span class='notice'>You load [A] into \the [src]!</span>"
syringes.Add(A)
A.loc = src
return 1
else
usr << "\red This syringe is broken!"
/obj/item/weapon/gun/syringe/afterattack(obj/target, mob/user , flag)
if(!isturf(target.loc) || target == user) return
..()
/obj/item/weapon/gun/syringe/can_fire()
return syringes.len
/obj/item/weapon/gun/syringe/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
return 1 //SHOOT AND LET THE GOD GUIDE IT (probably will hit a wall anyway)
/obj/item/weapon/gun/syringe/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
if(syringes.len)
spawn(0) fire_syringe(target,user)
else
usr << "\red [src] is empty."
/obj/item/weapon/gun/syringe/proc/fire_syringe(atom/target, mob/user)
if (locate (/obj/structure/table, src.loc))
return
else
var/turf/trg = get_turf(target)
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
if((!S) || (!S.reagents)) //ho boy! wot runtimes!
return
S.reagents.trans_to(D, S.reagents.total_volume)
syringes -= S
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if(!D) break
if(D.loc == trg) break
step_towards(D,trg)
if(D)
for(var/mob/living/carbon/M in D.loc)
if(!istype(M,/mob/living/carbon)) continue
if(M == user) continue
//Syringe gun attack logging by Yvarov
var/R
if(D.reagents)
for(var/datum/reagent/A in D.reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
if (istype(M, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
if(M.ckey)
msg_admin_attack("[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(D.reagents)
D.reagents.trans_to(M, 15)
M.visible_message("<span class='danger'>[M] is hit by the syringe!</span>")
del(D)
break
if(D)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density) del(D)
sleep(1)
if (D) spawn(10) del(D)
return
usr << "<span class='notice'>[src] cannot hold more syringes.</span>"
return 0
/obj/item/weapon/gun/syringe/rapidsyringe
name = "rapid syringe gun"
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to four syringes."
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
icon_state = "rapidsyringegun"
max_syringes = 4
/obj/effect/syringe_gun_dummy
name = ""
desc = ""
icon = 'icons/obj/chemical.dmi'
icon_state = "null"
anchored = 1
density = 0
New()
var/datum/reagents/R = new/datum/reagents(15)
reagents = R
R.my_atom = src
max_syringes = 6
@@ -250,7 +250,7 @@
if(prob(75))
new_item = new /obj/item/weapon/pen(src.loc)
else
new_item = new /obj/item/weapon/pen/sleepypen(src.loc)
new_item = new /obj/item/weapon/pen/sleepy(src.loc)
if(prob(30))
apply_image_decorations = 1
if(16)