Merge remote-tracking branch 'origin/master' into bay_examine

# Conflicts:
#	code/game/objects/structures/displaycase.dm
This commit is contained in:
Tigercat2000
2015-09-15 14:08:36 -07:00
208 changed files with 2587 additions and 3346 deletions
@@ -183,9 +183,9 @@
caliber = "a762"
projectile_type = "/obj/item/projectile/bullet"
/obj/item/ammo_casing/a545
desc = "A 5.45mm bullet casing."
caliber = "a545"
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = "/obj/item/projectile/bullet/heavybullet"
/obj/item/ammo_casing/rocket
@@ -116,6 +116,17 @@
..()
icon_state = "[initial(icon_state)]-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/uzim9mm
name = "uzi magazine (9mm)"
icon_state = "uzi9mm-32"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 32
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
..()
icon_state = "uzi9mm-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/smgm9mm
name = "SMG magazine (9mm)"
icon_state = "smg9mm"
@@ -163,17 +174,14 @@
multiple_sprites = 2
max_ammo = 8
/obj/item/ammo_box/magazine/m545
name = "box magazine (5.45mm)"
icon_state = "5.45m"
/obj/item/ammo_box/magazine/m556
name = "toploader magazine (5.56mm)"
icon_state = "5.56m"
origin_tech = "combat=5;syndicate=1"
ammo_type = "/obj/item/ammo_casing/a545"
caliber = "a545"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30
/obj/item/ammo_box/magazine/m545/update_icon()
..()
icon_state = "[initial(icon_state)]-[round(ammo_count(),10)]"
multiple_sprites = 2
/obj/item/ammo_box/magazine/m762
name = "box magazine (7.62mm)"
+46 -37
View File
@@ -8,6 +8,8 @@
icon = 'icons/obj/gun.dmi'
icon_state = "detective"
item_state = "gun"
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
flags = CONDUCT
slot_flags = SLOT_BELT
materials = list(MAT_METAL=2000)
@@ -43,6 +45,8 @@
var/can_flashlight = 0
var/heavy_weapon = 0
var/randomspread = 0
var/burst_size = 1
proc/ready_to_fire()
if(world.time >= last_fired + fire_delay)
@@ -124,9 +128,6 @@
user << "<span class='warning'>[src] is not ready to fire again!"
return
if(!process_chambered()) //CHECK
return click_empty(user)
if(heavy_weapon)
if(user.get_inactive_hand())
recoil = 4 //one-handed kick
@@ -142,48 +143,55 @@
var/spread = 0
var/turf/targloc = get_turf(target)
if(chambered)
for (var/i = max(1, chambered.pellets), i > 0, i--) //Previous way of doing it fucked up math for spreading. This way, even the first projectile is part of the spread code.
if(i != max(1, chambered.pellets)) //Have we fired the initial chambered bullet yet?
in_chamber = new chambered.projectile_type()
for(var/f = 1 to burst_size)
if(!process_chambered()) //CHECK
return click_empty(user)
if(chambered)
for (var/i = max(1, chambered.pellets), i > 0, i--) //Previous way of doing it fucked up math for spreading. This way, even the first projectile is part of the spread code.
if(i != max(1, chambered.pellets)) //Have we fired the initial chambered bullet yet?
in_chamber = new chambered.projectile_type()
ready_projectile(target, user)
prepare_shot(in_chamber)
if(chambered.deviation)
if(randomspread) //Random spread
spread = (rand() - 0.5) * chambered.deviation
else //Smart spread
spread = (i / chambered.pellets - 0.5) * chambered.deviation
if(!process_projectile(targloc, user, params, spread))
return 0
else
ready_projectile(target, user)
prepare_shot(in_chamber)
if(chambered.deviation)
if(randomspread) //Random spread
spread = (rand() - 0.5) * chambered.deviation
else //Smart spread
spread = (i / chambered.pellets - 0.5) * chambered.deviation
if(!process_projectile(targloc, user, params, spread))
return 0
else
ready_projectile(target, user)
prepare_shot(in_chamber)
if(!process_projectile(targloc, user, params, spread))
return 0
if(recoil)
spawn()
shake_camera(user, recoil + 1, recoil)
if(recoil)
spawn()
shake_camera(user, recoil + 1, recoil)
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(f == 1) // Only print this once
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
if(heavy_weapon)
if(user.get_inactive_hand())
if(prob(15))
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
user.drop_item()
if(heavy_weapon)
if(user.get_inactive_hand())
if(prob(15))
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
user.drop_item()
break
update_icon()
if(user.hand)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
update_icon()
if(user.hand)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
sleep(fire_delay)
/obj/item/weapon/gun/proc/ready_projectile(atom/target as mob|obj|turf, mob/living/user)
in_chamber.firer = user
@@ -204,6 +212,7 @@
in_chamber.loc = get_turf(user)
in_chamber.starting = get_turf(user)
in_chamber.current = curloc
in_chamber.OnFired()
in_chamber.yo = targloc.y - curloc.y
in_chamber.xo = targloc.x - curloc.x
if(params)
-1
View File
@@ -70,7 +70,6 @@
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_override = 'icons/mob/vox.dmi'
icon_state = "noisecannon"
item_state = "noisecannon"
recoil = 1
@@ -3,7 +3,6 @@
desc = "A hybrid taser designed to fire both short-range high-power electrodes and long-range disabler beams."
icon_state = "advtaser"
item_state = null //so the human update icon uses the icon_state instead.
icon_override = 'icons/mob/in-hand/guns.dmi'
cell_type = "/obj/item/weapon/stock_parts/cell"
origin_tech = null
fire_sound = 'sound/weapons/Taser.ogg'
+1 -2
View File
@@ -1,9 +1,8 @@
/obj/item/weapon/gun/energy/hos
name = "head of security's energy gun"
name = "\improper X-01 MultiPhase Energy Gun"
desc = "This is a modern recreation of the captain's antique laser gun. This gun has several unique fire modes, but lacks the ability to recharge over time."
icon_state = "hoslaser"
item_state = null //so the human update icon uses the icon_state instead.
icon_override = 'icons/mob/in-hand/guns.dmi'
force = 10
fire_sound = 'sound/weapons/Taser.ogg'
origin_tech = "combat=3;magnets=2"
@@ -17,15 +17,15 @@
clumsy_check = 0
obj/item/weapon/gun/energy/laser/retro
name ="retro laser"
name ="retro laser gun"
icon_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."
/obj/item/weapon/gun/energy/laser/captain
name = "\improper QSJ-01 premium laser pistol"
icon_state = "caplaser"
item_state = "caplaser"
icon_override = 'icons/mob/in-hand/guns.dmi'
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 = 10
origin_tech = null
@@ -3,7 +3,6 @@
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
icon_state = "ionrifle"
item_state = null //so the human update icon uses the icon_state instead.
icon_override = 'icons/mob/in-hand/guns.dmi'
fire_sound = 'sound/weapons/IonRifle.ogg'
origin_tech = "combat=2;magnets=4"
w_class = 5.0
@@ -36,7 +35,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 = "gun"
fire_sound = 'sound/effects/stealthoff.ogg'
projectile_type = "/obj/item/projectile/energy/floramut"
origin_tech = "materials=2;biotech=3;powerstorage=3"
@@ -128,11 +127,13 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
w_class = 1
/obj/item/weapon/gun/energy/mindflayer
name = "mind flayer"
name = "\improper Mind Flayer"
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
icon_state = "xray"
projectile_type = "/obj/item/projectile/beam/mindflayer"
@@ -231,7 +232,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified for extreme power output to crush rocks, but often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
icon_state = "kineticgun"
item_state = "kineticgun"
icon_override = 'icons/mob/in-hand/guns.dmi'
projectile_type = "/obj/item/projectile/kinetic"
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
charge_cost = 5000
@@ -309,7 +309,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
attack_verb = list("attacked", "slashed", "cut", "sliced")
charge_cost = 250
fire_delay = 15
icon_override = 'icons/mob/in-hand/guns.dmi'
can_charge = 0
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
@@ -389,7 +388,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to far off locations."
icon_state = "telegun"
item_state = "ionrifle"
icon_override = 'icons/mob/in-hand/guns.dmi'
fire_sound = 'sound/weapons/wave.ogg'
origin_tech = "combat=6;materials=7;powerstorage=5;bluespace=5;syndicate=4"
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
@@ -1,80 +1,182 @@
/obj/item/weapon/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
icon = 'icons/obj/gun_temperature.dmi'
icon_state = "tempgun_4"
item_state = "tempgun_4"
slot_flags = SLOT_BACK
w_class = 4.0
fire_sound = 'sound/weapons/pulse3.ogg'
desc = "A gun that changes temperatures."
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
desc = "A gun that changes the body temperature of its targets."
var/temperature = 300
var/target_temperature = 300
charge_cost = 90
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
projectile_type = "/obj/item/projectile/temp"
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
projectile_type = /obj/item/projectile/temp
cell_type = /obj/item/weapon/stock_parts/cell/temperaturegun
var/powercost = ""
var/powercostcolor = ""
var/emagged = 0 //ups the temperature cap from 500 to 1000, targets hit by beams over 500 Kelvin will burst into flames
var/dat = ""
/obj/item/weapon/gun/energy/temperature/New()
..()
update_icon()
processing_objects.Add(src)
New()
..()
processing_objects.Add(src)
/obj/item/weapon/gun/energy/temperature/Destroy()
processing_objects.Remove(src)
..()
Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
user.set_machine(src)
update_dat()
user << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x120")
onclose(user, "tempgun")
attack_self(mob/living/user as mob)
user.set_machine(src)
var/temp_text = ""
if(temperature > (T0C - 50))
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
/obj/item/weapon/gun/energy/temperature/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
emagged = 1
user << "<span class='caution'>You double the gun's temperature cap! Targets hit by searing beams will burst into flames!</span>"
desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked."
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
if (..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
target_temperature = min((500 + 500*emagged), target_temperature+amount)
else
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]&deg;C) ([round(temperature*1.8-459.67)]&deg;F)</FONT>"
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
Current output temperature: [temp_text]<BR>
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
target_temperature = max(0, target_temperature+amount)
if (istype(loc, /mob))
attack_self(loc)
add_fingerprint(usr)
return
user << browse(dat, "window=freezegun;size=450x300;can_resize=1;can_close=1;can_minimize=1")
onclose(user, "window=freezegun", src)
Topic(href, href_list)
if (..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(500, src.current_temperature+amount)
/obj/item/weapon/gun/energy/temperature/process()
switch(temperature)
if(0 to 100)
charge_cost = 300
powercost = "High"
if(100 to 250)
charge_cost = 180
powercost = "Medium"
if(251 to 300)
charge_cost = 90
powercost = "Low"
if(301 to 400)
charge_cost = 180
powercost = "Medium"
if(401 to 1000)
charge_cost = 300
powercost = "High"
switch(powercost)
if("High") powercostcolor = "orange"
if("Medium") powercostcolor = "green"
else powercostcolor = "blue"
if(target_temperature != temperature)
var/difference = abs(target_temperature - temperature)
if(difference >= (10 + 40*emagged)) //so emagged temp guns adjust their temperature much more quickly
if(target_temperature < temperature)
temperature -= (10 + 40*emagged)
else
src.current_temperature = max(0, src.current_temperature+amount)
if (istype(src.loc, /mob))
attack_self(src.loc)
src.add_fingerprint(usr)
return
temperature += (10 + 40*emagged)
else
temperature = target_temperature
update_icon()
if (istype(loc, /mob/living/carbon))
var /mob/living/carbon/M = loc
if (src == M.machine)
update_dat()
M << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x102")
process()
switch(temperature)
if(0 to 100) charge_cost = 1000
if(100 to 250) charge_cost = 500
if(251 to 300) charge_cost = 100
if(301 to 400) charge_cost = 500
if(401 to 500) charge_cost = 1000
if(power_supply)
power_supply.give(50)
update_icon()
return
if(current_temperature != temperature)
var/difference = abs(current_temperature - temperature)
if(difference >= 10)
if(current_temperature < temperature)
temperature -= 10
else
temperature += 10
else
temperature = current_temperature
return
/obj/item/weapon/gun/energy/temperature/proc/update_dat()
dat = ""
dat += "Current output temperature: "
if(temperature > 500)
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]&deg;C)</FONT>"
dat += "<FONT color=red><B> SEARING!</B></FONT>"
else if(temperature > (T0C + 50))
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]&deg;C)</FONT>"
else if(temperature > (T0C - 50))
dat += "<FONT color=black><B>[temperature]</B> ([round(temperature-T0C)]&deg;C)</FONT>"
else
dat += "<FONT color=blue><B>[temperature]</B> ([round(temperature-T0C)]&deg;C)</FONT>"
dat += "<BR>"
dat += "Target output temperature: " //might be string idiocy, but at least it's easy to read
dat += "<A href='?src=\ref[src];temp=-100'>-</A> "
dat += "<A href='?src=\ref[src];temp=-10'>-</A> "
dat += "<A href='?src=\ref[src];temp=-1'>-</A> "
dat += "[target_temperature] "
dat += "<A href='?src=\ref[src];temp=1'>+</A> "
dat += "<A href='?src=\ref[src];temp=10'>+</A> "
dat += "<A href='?src=\ref[src];temp=100'>+</A>"
dat += "<BR>"
dat += "Power cost: "
dat += "<FONT color=[powercostcolor]><B>[powercost]</B></FONT>"
/obj/item/weapon/gun/energy/temperature/proc/update_temperature()
switch(temperature)
if(501 to INFINITY)
item_state = "tempgun_8"
if(400 to 500)
item_state = "tempgun_7"
if(360 to 400)
item_state = "tempgun_6"
if(335 to 360)
item_state = "tempgun_5"
if(295 to 335)
item_state = "tempgun_4"
if(260 to 295)
item_state = "tempgun_3"
if(200 to 260)
item_state = "tempgun_2"
if(120 to 260)
item_state = "tempgun_1"
if(-INFINITY to 120)
item_state = "tempgun_0"
icon_state = item_state
/obj/item/weapon/gun/energy/temperature/proc/update_charge()
var/charge = power_supply.charge
switch(charge)
if(900 to INFINITY) overlays += "900"
if(800 to 900) overlays += "800"
if(700 to 800) overlays += "700"
if(600 to 700) overlays += "600"
if(500 to 600) overlays += "500"
if(400 to 500) overlays += "400"
if(300 to 400) overlays += "300"
if(200 to 300) overlays += "200"
if(100 to 200) overlays += "100"
if(-INFINITY to 100) overlays += "0"
/obj/item/weapon/gun/energy/temperature/proc/update_user()
if (istype(loc,/mob/living/carbon))
var/mob/living/carbon/M = loc
M.update_inv_back()
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/weapon/gun/energy/temperature/update_icon()
overlays = 0
update_temperature()
update_user()
update_charge()
+3 -1
View File
@@ -4,10 +4,12 @@
icon = 'icons/obj/gun.dmi'
icon_state = "staffofnothing"
item_state = "staff"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
fire_sound = 'sound/weapons/emitter.ogg'
flags = CONDUCT
w_class = 5
var/projectile_type = "/obj/item/projectile/magic"
var/projectile_type = /obj/item/projectile/magic
var/max_charges = 6
var/charges = 0
var/recharge_rate = 4
@@ -14,7 +14,6 @@ obj/item/weapon/gun/magic/staff/animate
projectile_type = "/obj/item/projectile/magic/animate"
icon_state = "staffofanimation"
item_state = "staffofanimation"
icon_override = 'icons/mob/in-hand/staff.dmi'
obj/item/weapon/gun/magic/staff/healing
name = "staff of healing"
@@ -22,7 +21,6 @@ obj/item/weapon/gun/magic/staff/healing
projectile_type = "/obj/item/projectile/magic/resurrection"
icon_state = "staffofhealing"
item_state = "staffofhealing"
icon_override = 'icons/mob/in-hand/staff.dmi'
obj/item/weapon/gun/magic/staff/chaos
name = "staff of chaos"
@@ -30,7 +28,6 @@ obj/item/weapon/gun/magic/staff/chaos
projectile_type = "/obj/item/projectile/magic"
icon_state = "staffofchaos"
item_state = "staffofchaos"
icon_override = 'icons/mob/in-hand/staff.dmi'
max_charges = 10
recharge_rate = 2
@@ -49,7 +46,6 @@ obj/item/weapon/gun/magic/staff/door
projectile_type = "/obj/item/projectile/magic/door"
icon_state = "staffofdoor"
item_state = "staffofdoor"
icon_override = 'icons/mob/in-hand/staff.dmi'
max_charges = 10
recharge_rate = 2
@@ -1,25 +1,73 @@
/obj/item/weapon/gun/projectile/automatic //Hopefully someone will find a way to make these fire in bursts or something. --Superxpdude
name = "prototype SMG"
desc = "A lightweight, prototype 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
/obj/item/weapon/gun/projectile/automatic
w_class = 3.0
origin_tech = "combat=4;materials=2"
automatic = 1
mag_type = "/obj/item/ammo_box/magazine/smgm9mm"
var/alarmed = 0
var/select = 1
can_suppress = 1
fire_delay = 0
isHandgun()
return 0
burst_size = 3
fire_delay = 2
action_button_name = "Toggle Firemode"
/obj/item/weapon/gun/projectile/automatic/isHandgun()
return 0
/obj/item/weapon/gun/projectile/automatic/proto
name = "\improper Nanotrasen Saber SMG"
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
mag_type = "/obj/item/ammo_box/magazine/smgm9mm"
origin_tech = "combat=4;materials=2"
/obj/item/weapon/gun/projectile/automatic/update_icon()
..()
overlays.Cut()
if(!select)
overlays += "[initial(icon_state)]semi"
if(select == 1)
overlays += "[initial(icon_state)]burst"
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
if(..() && chambered)
alarmed = 0
. = ..()
if(.)
return
if(istype(A, /obj/item/ammo_box/magazine))
var/obj/item/ammo_box/magazine/AM = A
if(istype(AM, text2path(mag_type)))
if(magazine)
user << "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>"
magazine.forceMove(get_turf(src.loc))
magazine.update_icon()
magazine = null
else
user << "<span class='notice'>You insert the magazine into \the [src].</span>"
user.remove_from_mob(AM)
magazine = AM
magazine.forceMove(src)
chamber_round()
A.update_icon()
update_icon()
return 1
/obj/item/weapon/gun/projectile/automatic/ui_action_click()
burst_select()
/obj/item/weapon/gun/projectile/automatic/verb/burst_select()
var/mob/living/carbon/human/user = usr
select = !select
if(!select)
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-automatic.</span>"
else
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size] round burst.</span>"
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/proc/empty_alarm()
if(!chambered && !get_ammo() && !alarmed)
@@ -29,13 +77,15 @@
return
/obj/item/weapon/gun/projectile/automatic/c20r
name = "syndicate SMG"
desc = "A lightweight, bullpup .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
name = "\improper C-20r SMG"
desc = "A two-round burst .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
icon_state = "c20r"
item_state = "c20r"
origin_tech = "combat=5;materials=2;syndicate=8"
mag_type = "/obj/item/ammo_box/magazine/smgm45"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
fire_delay = 2
burst_size = 2
/obj/item/weapon/gun/projectile/automatic/c20r/New()
..()
@@ -52,9 +102,16 @@
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper 'Type U3' Uzi"
desc = "A lightweight, burst-fire submachine gun, for when you really want someone dead. Uses 9mm rounds."
icon_state = "mini-uzi"
origin_tech = "combat=5;materials=2;syndicate=8"
mag_type = "/obj/item/ammo_box/magazine/uzim9mm"
burst_size = 2
/obj/item/weapon/gun/projectile/automatic/l6_saw
name = "syndicate LMG"
name = "\improper L6 SAW LMG"
desc = "A heavily modified 7.62 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation."
icon_state = "l6closed100"
item_state = "l6closedmag"
@@ -66,19 +123,17 @@
var/cover_open = 0
can_suppress = 0
burst_size = 5
fire_delay = 3
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob)
cover_open = !cover_open
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
update_icon()
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? round(magazine.ammo_count() * 2, 25) : "-empty"]"
/obj/item/weapon/gun/projectile/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
if(cover_open)
user << "<span class='notice'>[src]'s cover is open! Close it before firing!</span>"
@@ -86,7 +141,6 @@
..()
update_icon()
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_hand(mob/user as mob)
if(loc != user)
..()
@@ -109,113 +163,77 @@
return
..()
/obj/item/weapon/gun/projectile/automatic/bulldog
name = "syndicate shotgun"
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
icon_state = "bulldog"
item_state = "bulldog"
icon_override = 'icons/mob/in-hand/guns.dmi'
w_class = 3.0
origin_tech = "combat=5;materials=4;syndicate=6"
mag_type = "/obj/item/ammo_box/magazine/m12g"
fire_sound = 'sound/weapons/Gunshot4.ogg'
can_suppress = 0
/obj/item/weapon/gun/projectile/automatic/bulldog/New()
..()
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/bulldog/proc/update_magazine()
if(magazine)
src.overlays = 0
overlays += "[magazine.icon_state]"
return
/obj/item/weapon/gun/projectile/automatic/bulldog/update_icon()
src.overlays = 0
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
empty_alarm()
return
/obj/item/weapon/gun/projectile/automatic/c90gl
name = "syndicate assault rifle"
desc = "A bullpup and compact 5.45x39 assault rifle with a unique toploading design, designated 'C-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
icon_state = "c90gl"
item_state = "c90gl"
icon_override = 'icons/mob/in-hand/guns.dmi'
/obj/item/weapon/gun/projectile/automatic/m90
name = "\improper M-90gl Carbine"
desc = "A three-round burst 5.56 toploading carbine, designated 'M-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
icon_state = "m90"
item_state = "m90"
origin_tech = "combat=5;materials=2;syndicate=8"
mag_type = "/obj/item/ammo_box/magazine/m545"
mag_type = "/obj/item/ammo_box/magazine/m556"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
action_button_name = "Toggle Grenade Launcher"
can_suppress = 0
var/select = 1 //1 for boolets, 0 for explosions.
var/obj/item/weapon/gun/projectile/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
/obj/item/weapon/gun/projectile/automatic/c90gl/New()
/obj/item/weapon/gun/projectile/automatic/m90/New()
..()
underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/c90gl/afterattack(var/atom/target, var/mob/living/user, flag, params)
if(select)
/obj/item/weapon/gun/projectile/automatic/m90/afterattack(var/atom/target, var/mob/living/user, flag, params)
if(select == 2)
underbarrel.afterattack(target, user, flag, params)
else
..()
empty_alarm()
return
/obj/item/weapon/gun/projectile/automatic/m90/attackby(var/obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_casing))
if(istype(A, text2path(underbarrel.magazine.ammo_type)))
underbarrel.attack_self()
underbarrel.attackby(A, user, params)
else
underbarrel.afterattack(target, user, flag, params)
/obj/item/weapon/gun/projectile/automatic/c90gl/attackby(var/obj/item/A, mob/user, params)
if(select)
..()
else
underbarrel.attackby(A, user, params)
/obj/item/weapon/gun/projectile/automatic/c90gl/attack_self(var/mob/living/user)
if(select)
..()
else
underbarrel.attack_self(user)
/obj/item/weapon/gun/projectile/automatic/c90gl/update_icon()
/obj/item/weapon/gun/projectile/automatic/m90/update_icon()
..()
overlays.Cut()
if(select)
overlays += "c90prim"
else
overlays += "c90gren"
icon_state = "c90gl[magazine ? "-[Ceiling(get_ammo(0)/6)*6]" : ""][chambered ? "" : "-e"]"
switch(select)
if(0)
overlays += "[initial(icon_state)]semi"
if(1)
overlays += "[initial(icon_state)]burst"
if(2)
overlays += "[initial(icon_state)]gren"
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/c90gl/proc/underbarrel_swap()
/obj/item/weapon/gun/projectile/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
if(select)
select = 0
user << "<span class='notice'>You switch to grenades.</span>"
else
select = 1
user << "<span class='notice'>You switch to bullets.</span>"
switch(select)
if(0)
select = 1
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size] round burst.</span>"
if(1)
select = 2
user << "<span class='notice'>You switch to grenades.</span>"
if(2)
select = 0
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-auto.</span>"
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/c90gl/ui_action_click()
underbarrel_swap()
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "tommy gun"
name = "\improper Thompson SMG"
desc = "A genuine 'Chicago Typewriter'."
icon_state = "tommygun"
item_state = "tommygun"
@@ -223,4 +241,20 @@
origin_tech = "combat=5;materials=1;syndicate=2"
mag_type = "/obj/item/ammo_box/magazine/tommygunm45"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
can_suppress = 0
fire_delay = 1
burst_size = 4
/obj/item/weapon/gun/projectile/automatic/ar
name = "ARG"
desc = "A robust assault rile used by Nanotrasen fighting forces."
icon_state = "arg"
item_state = "arg"
slot_flags = 0
origin_tech = "combat=5;materials=1"
mag_type = "/obj/item/ammo_box/magazine/m556"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
burst_size = 3
fire_delay = 1
@@ -3,14 +3,17 @@
/obj/item/weapon/gun/projectile/automatic/gyropistol
name = "gyrojet pistol"
name = "\improper Gyrojet rocket pistol"
desc = "A prototype pistol designed to fire self propelled rockets."
icon_state = "gyropistol"
fire_sound = 'sound/effects/Explosion1.ogg'
origin_tech = "combat=3"
mag_type = "/obj/item/ammo_box/magazine/m75"
isHandgun()
return 1
burst_size = 1
fire_delay = 0
/obj/item/weapon/gun/projectile/automatic/gyropistol/isHandgun()
return 1
/obj/item/weapon/gun/projectile/automatic/gyropistol/New()
..()
@@ -36,6 +39,7 @@
icon_state = "dshotgun-sawn"
item_state = "gun"
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher"
fire_sound = 'sound/weapons/grenadelaunch.ogg'
w_class = 3
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user, params)
@@ -48,7 +52,6 @@
name = "multi grenade launcher"
icon_state = "bulldog"
item_state = "bulldog"
icon_override = 'icons/mob/in-hand/guns.dmi'
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi"
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg
@@ -1,56 +1,50 @@
/obj/item/weapon/gun/projectile/automatic/pistol
name = "syndicate pistol"
name = "\improper FK-69 pistol"
desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors."
icon_state = "pistol"
w_class = 2
origin_tech = "combat=2;materials=2;syndicate=2"
mag_type = "/obj/item/ammo_box/magazine/m10mm"
can_suppress = 1
isHandgun()
return 1
burst_size = 1
fire_delay = 0
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/pistol/isHandgun()
return 1
/obj/item/weapon/gun/projectile/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/m2411
name = "M2411"
/obj/item/weapon/gun/projectile/automatic/pistol/m2411
name = "\improper M2411 pistol"
desc = "John Browning's classic updated for the modern day. Uses .45 rounds."
icon_state = "m2411"
w_class = 3.0
origin_tech = "combat=3;materials=2"
mag_type = "/obj/item/ammo_box/magazine/m45"
isHandgun()
return 1
can_suppress = 0
/obj/item/weapon/gun/projectile/automatic/m2411/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/deagle
name = "desert eagle"
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
name = "\improper Desert Eagle pistol"
desc = "A robust .50 AE handgun."
icon_state = "deagle"
force = 14.0
mag_type = "/obj/item/ammo_box/magazine/m50"
isHandgun()
return 1
can_suppress = 0
/obj/item/weapon/gun/projectile/automatic/deagle/update_icon()
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
/obj/item/weapon/gun/projectile/automatic/deagle/gold
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/gold
desc = "A gold plated desert eagle folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/projectile/automatic/deagle/camo
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/camo
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
icon_state = "deaglecamo"
item_state = "deagleg"
@@ -1,6 +1,6 @@
/obj/item/weapon/gun/projectile/revolver
name = "\improper .357 revolver"
desc = "A suspicious revolver. Uses .357 ammo."
name = "revolver"
icon_state = "revolver"
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder"
@@ -65,6 +65,7 @@
user << "[get_ammo(0,0)] of those are live rounds."
/obj/item/weapon/gun/projectile/revolver/detective
name = "\improper .38 Mars Special"
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
name = "revolver"
icon_state = "detective"
@@ -154,8 +155,8 @@
/obj/item/weapon/gun/projectile/revolver/mateba
name = "autorevolver"
desc = "A retro high-powered mateba autorevolver typically used by officers of the New Russia military. Uses .357 ammo." //>10mm hole >.357
name = "\improper Unica 6 auto-revolver"
desc = "A retro high-powered autorevolver typically used by officers of the New Russia military. Uses .357 ammo." //>10mm hole >.357
icon_state = "mateba"
origin_tech = "combat=2;materials=2"
@@ -163,7 +164,7 @@
// You can spin the chamber to randomize the position of the bullet.
/obj/item/weapon/gun/projectile/revolver/russian
name = "Russian Revolver"
name = "\improper Russian Revolver"
desc = "A Russian-made revolver for drinking games. Uses .357 ammo, and has a mechanism that spins the chamber before each trigger pull."
origin_tech = "combat=2;materials=2"
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/rus357"
@@ -104,11 +104,10 @@
///////////////////////
/obj/item/weapon/gun/projectile/shotgun/boltaction
name = "bolt action rifle"
name = "\improper Mosin Nagant rifle"
desc = "This piece of junk looks like something that could have been used 700 years ago."
icon_state = "moistnugget"
item_state = "moistnugget"
icon_override = 'icons/mob/in-hand/guns.dmi'
slot_flags = 0 //no SLOT_BACK sprite, alas
mag_type = "/obj/item/ammo_box/magazine/internal/boltaction"
var/bolt_open = 0
@@ -238,3 +237,39 @@
return
else
sawn_state = SAWN_INTACT
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
name = "\improper MLG-12 'Bulldog' Shotgun"
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
icon_state = "bulldog"
item_state = "bulldog"
w_class = 3.0
origin_tech = "combat=5;materials=4;syndicate=6"
mag_type = "/obj/item/ammo_box/magazine/m12g"
fire_sound = 'sound/weapons/Gunshot4.ogg'
can_suppress = 0
burst_size = 1
fire_delay = 0
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
..()
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
if(magazine)
overlays.Cut()
overlays += "[magazine.icon_state]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/update_icon()
overlays.Cut()
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
..()
empty_alarm()
return
+3
View File
@@ -88,6 +88,9 @@
var/mob/living/L = target
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, agony, blocked, stamina, jitter)
proc/OnFired() //if assigned, allows for code when the projectile gets fired
return 1
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
if(!istype(target) || !istype(user))
return 0
+44 -2
View File
@@ -44,17 +44,59 @@
/obj/item/projectile/temp
name = "freeze beam"
icon_state = "ice_2"
icon_state = "temp_4"
damage = 0
damage_type = BURN
nodamage = 1
flag = "energy"
var/temperature = 300
var/obj/item/weapon/gun/energy/temperature/T = null
OnFired()
T = shot_from
temperature = T.temperature
switch(temperature)
if(501 to INFINITY)
name = "searing beam" //if emagged
icon_state = "temp_8"
if(400 to 500)
name = "burning beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_2
icon_state = "temp_7"
if(360 to 400)
name = "hot beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_1
icon_state = "temp_6"
if(335 to 360)
name = "warm beam" //temp at which players get notified of their high body temp
icon_state = "temp_5"
if(295 to 335)
name = "ambient beam"
icon_state = "temp_4"
if(260 to 295)
name = "cool beam" //temp at which players get notified of their low body temp
icon_state = "temp_3"
if(200 to 260)
name = "cold beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_1
icon_state = "temp_2"
if(120 to 260)
name = "ice beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_2
icon_state = "temp_1"
if(-INFINITY to 120)
name = "freeze beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_3
icon_state = "temp_0"
else
name = "temperature beam"//failsafe
icon_state = "temp_4"
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
if(istype(target, /mob/living))
var/mob/M = target
var/mob/living/M = target
M.bodytemperature = temperature
if(temperature > 500)//emagged
M.adjust_fire_stacks(0.5)
M.on_fire = 1
M.update_icon = 1
playsound(M.loc, 'sound/effects/bamf.ogg', 50, 0)
return 1
/obj/item/projectile/meteor