Skip to content

Commit

Permalink
Merge pull request tgstation#2054 from Cheridan/Nuke
Browse files Browse the repository at this point in the history
Nuke Ops Tweaks: Flamer and Mechas
  • Loading branch information
Aranclanos committed Dec 19, 2013
2 parents a864158 + b68eadf commit 0fdcd42
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 108 deletions.
3 changes: 2 additions & 1 deletion code/game/mecha/combat/gygax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8)
max_temperature = 35000
overload_coeff = 1
operation_req_access = list(access_syndicate)
wreckage = /obj/structure/mecha_wreckage/gygax/dark
max_equip = 4
step_energy_drain = 5

/obj/mecha/combat/gygax/dark/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
ME.attach(src)
Expand Down
10 changes: 6 additions & 4 deletions code/game/mecha/combat/marauder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@

/obj/mecha/combat/marauder/mauler/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
Expand All @@ -56,9 +58,9 @@

/obj/mecha/combat/marauder/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
ME.attach(src)
Expand Down
211 changes: 113 additions & 98 deletions code/game/mecha/equipment/weapons/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,40 @@
var/projectile
var/fire_sound


/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(var/obj/mecha/combat/M as obj)
if(..())
if(istype(M))
return 1
return 0


/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target)
if(!action_checks(target)) return 0
set_ready_state(0)
var/turf/curloc = chassis.loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
playsound(chassis, fire_sound, 50, 1)
var/obj/item/projectile/A = new projectile(curloc)
A.firer = chassis.occupant
A.original = target
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
A.process()
chassis.log_message("Fired from [src.name], targeting [target].")
do_after_cooldown()
return 1

//Base energy weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/energy
name = "general energy weapon"

action(target)
if(!action_checks(target)) return
var/turf/curloc = chassis.loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
set_ready_state(0)
playsound(chassis, fire_sound, 50, 1)
var/obj/item/projectile/A = new projectile(curloc)
A.firer = chassis.occupant
A.original = target
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
chassis.use_power(energy_drain)
A.process()
chassis.log_message("Fired from [src.name], targeting [target].")
do_after_cooldown()
return
/obj/item/mecha_parts/mecha_equipment/weapon/energy/action(atom/target)
..()
chassis.use_power(energy_drain)


/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
Expand Down Expand Up @@ -107,94 +109,108 @@
construction_time = 500
construction_cost = list("metal"=20000,"bananium"=10000)

can_attach(obj/mecha/combat/honker/M as obj)
if(..())
if(istype(M))
return 1
return 0

action(target)
if(!chassis)
return 0
if(energy_drain && chassis.get_charge() < energy_drain)
return 0
if(!equip_ready)
return 0

playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M << "<font color='red' size='7'>HONK</font>"
M.sleeping = 0
M.stuttering += 20
M.ear_deaf += 30
M.Weaken(3)
if(prob(30))
M.Stun(10)
M.Paralyse(4)
else
M.make_jittery(500)
/* //else the mousetraps are useless
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(isobj(H.shoes))
var/thingy = H.shoes
H.drop_from_inventory(H.shoes)
walk_away(thingy,chassis,15,2)
spawn(20)
if(thingy)
walk(thingy,0)
*/
chassis.use_power(energy_drain)
log_message("Honked from [src.name]. HONK!")
var/turf/T = get_turf(src)
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) used a Mecha Honker in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Mecha Honker in ([T.x],[T.y],[T.z])")
do_after_cooldown()
return
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M as obj)
if(..())
if(istype(M))
return 1
return 0

/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target)
if(!action_checks(target)) return 0
set_ready_state(0)
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M << "<font color='red' size='7'>HONK</font>"
M.sleeping = 0
M.stuttering += 20
M.ear_deaf += 30
M.Weaken(3)
if(prob(30))
M.Stun(10)
M.Paralyse(4)
else
M.make_jittery(500)
/* //else the mousetraps are useless
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(isobj(H.shoes))
var/thingy = H.shoes
H.drop_from_inventory(H.shoes)
walk_away(thingy,chassis,15,2)
spawn(20)
if(thingy)
walk(thingy,0)
*/
chassis.use_power(energy_drain)
log_message("Honked from [src.name]. HONK!")
var/turf/T = get_turf(src)
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) used a Mecha Honker in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Mecha Honker in ([T.x],[T.y],[T.z])")
do_after_cooldown()
return


//Base ballistic weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
name = "general ballisic weapon"
fire_sound = 'sound/weapons/Gunshot.ogg'
var/projectiles
var/projectile_energy_cost

action_checks(atom/target)
if(..())
if(projectiles > 0)
return 1
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(target)
if(!..())
return 0

get_equip_info()
return "[..()]\[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"

proc/rearm()
if(projectiles < initial(projectiles))
var/projectiles_to_add = initial(projectiles) - projectiles
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
projectiles++
projectiles_to_add--
chassis.use_power(projectile_energy_cost)
if(projectiles <= 0)
return 0
if(!equip_ready)
return 0
return 1

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
return "[..()]\[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/proc/rearm()
if(projectiles < initial(projectiles))
var/projectiles_to_add = initial(projectiles) - projectiles
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
projectiles++
projectiles_to_add--
chassis.use_power(projectile_energy_cost)
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
log_message("Rearmed [src.name].")
return

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
..()
if (href_list["rearm"])
src.rearm()
return

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(atom/target)
if(..())
src.projectiles--
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
log_message("Rearmed [src.name].")
return

Topic(href, href_list)
..()
if (href_list["rearm"])
src.rearm()
return

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
name = "\improper FNX-66 Carbine"
icon_state = "mecha_carbine"
equip_cooldown = 5
projectile = /obj/item/projectile/bullet/incendiary
projectiles = 24
projectile_energy_cost = 15


/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
name = "\improper LBX AC 10 \"Scattershot\""
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/midbullet
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 40
projectile_energy_cost = 25
var/projectiles_per_shot = 4
Expand Down Expand Up @@ -236,7 +252,6 @@
icon_state = "mecha_uac2"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/weakbullet
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 300
projectile_energy_cost = 20
var/projectiles_per_shot = 3
Expand Down Expand Up @@ -279,7 +294,7 @@
name = "\improper SRM-8 missile rack"
icon_state = "mecha_missilerack"
projectile = /obj/item/missile
fire_sound = 'sound/effects/bang.ogg'
fire_sound = 'sound/weapons/grenadelaunch.ogg'
projectiles = 8
projectile_energy_cost = 1000
equip_cooldown = 60
Expand Down Expand Up @@ -320,7 +335,7 @@
name = "\improper SGL-6 grenade launcher"
icon_state = "mecha_grenadelnchr"
projectile = /obj/item/weapon/grenade/flashbang
fire_sound = 'sound/effects/bang.ogg'
fire_sound = 'sound/weapons/grenadelaunch.ogg'
projectiles = 6
missile_speed = 1.5
projectile_energy_cost = 800
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/flamethrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,5 @@

/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/plasma(src)
ptank = new /obj/item/weapon/tank/plasma/full(src)
update_icon()
11 changes: 8 additions & 3 deletions code/game/objects/items/weapons/tanks/tank_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
/obj/item/weapon/tank/anesthetic/New()
..()

src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD

var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
trace_gas.moles = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD

src.air_contents.trace_gases += trace_gas
return
Expand Down Expand Up @@ -98,7 +98,7 @@
/obj/item/weapon/tank/plasma/New()
..()

src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return

/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
Expand All @@ -113,6 +113,11 @@
src.loc = F
return

/obj/item/weapon/tank/plasma/full/New()
..()
src.air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return

/*
* Emergency Oxygen
*/
Expand Down
14 changes: 13 additions & 1 deletion code/modules/projectiles/projectile/bullets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
stun = 5
weaken = 5


/obj/item/projectile/bullet/midbullet2
damage = 25

Expand All @@ -26,7 +27,6 @@
damage = 30



/obj/item/projectile/bullet/suffocationbullet//How does this even work?
name = "co bullet"
damage = 20
Expand All @@ -51,10 +51,22 @@
weaken = 10
stutter = 10


/obj/item/projectile/bullet/a762
damage = 25


/obj/item/projectile/bullet/incendiary
name = "incendiary bullet"
damage = 20

/obj/item/projectile/bullet/incendiary/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(1)
M.IgniteMob()


/obj/item/projectile/bullet/dart
name = "dart"
icon_state = "cbbolt"
Expand Down
Binary file modified icons/mecha/mecha_equipment.dmi
Binary file not shown.
Binary file added sound/weapons/grenadelaunch.ogg
Binary file not shown.

0 comments on commit 0fdcd42

Please sign in to comment.