mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 13:12:22 +00:00
TGMC Ammo HUD Port
Ports over TGMC's Ammo HUD and all relevant code, adapted to work for Polaris's guns. This took me several days, but hey, I learned a bunch. <: Time to port Aim Mode + Mentorhelp. :3c - All guns now have an ammo HUD sprite. If one lacks one, it will be ??? or blank, at which point, make an issue report, as all guns should be working by now. - Guns will display how many rounds they have left until ammunition runs dry. - Ammo will only count the casings that CURRENTLY have a projectile in them. This is slightly unrealistic, yes, but it is better and more intuitive for the player. This also enables guns like the revolver to work, given they recycle casings. - Up to 4 ammo HUDs can be displayed at once, but given we lack TGMC's attachments and guncode, you'll only ever usually see 2. TBD on porting over TGMC guncode. <: - Ammunition for multiple guns has different colors in the HUD based on what you currently have loaded. - If you're looking at this later on to add new things. DON'T USE _FLASH IN THE HUD_STATE_EMPTY. THE _FLASH IS ADDED ON BY CODE. - Grenades have a hud_state, pending us ever porting over a grenade launcher. Rockets ALSO have a hud_state. Example of Laser/Energy Weapons: https://i.imgur.com/MGvqGxh.mp4 Captain's Gun: https://i.imgur.com/Wd0SS3C.gif Full Test of all weapons: https://streamable.com/usp4dy Upstream port of https://github.com/CHOMPStation2/CHOMPStation2/pull/4033
This commit is contained in:
@@ -103,6 +103,12 @@
|
|||||||
#define ui_alien_fire "EAST-1:28,NORTH-3:25"
|
#define ui_alien_fire "EAST-1:28,NORTH-3:25"
|
||||||
#define ui_alien_oxygen "EAST-1:28,NORTH-4:25"
|
#define ui_alien_oxygen "EAST-1:28,NORTH-4:25"
|
||||||
|
|
||||||
|
// Goes above HUD, mid-right
|
||||||
|
#define ui_ammo_hud1 "EAST-1:28,CENTER+1:25"
|
||||||
|
#define ui_ammo_hud2 "EAST-1:28,CENTER+2:27"
|
||||||
|
#define ui_ammo_hud3 "EAST-1:28,CENTER+3:29"
|
||||||
|
#define ui_ammo_hud4 "EAST-1:28,CENTER+4:31"
|
||||||
|
|
||||||
//Middle right (status indicators)
|
//Middle right (status indicators)
|
||||||
#define ui_temp "EAST-1:28,CENTER-2:13"
|
#define ui_temp "EAST-1:28,CENTER-2:13"
|
||||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#define MAX_AMMO_HUD_POSSIBLE 4 // Cap the amount of HUDs at 4.
|
||||||
/*
|
/*
|
||||||
The global hud:
|
The global hud:
|
||||||
Uses the same visual objects for all players.
|
Uses the same visual objects for all players.
|
||||||
@@ -182,6 +183,9 @@ var/list/global_huds = list(
|
|||||||
var/icon/ui_style
|
var/icon/ui_style
|
||||||
var/ui_color
|
var/ui_color
|
||||||
var/ui_alpha
|
var/ui_alpha
|
||||||
|
|
||||||
|
// TGMC Ammo HUD Port
|
||||||
|
var/list/obj/screen/ammo_hud_list = list()
|
||||||
|
|
||||||
var/list/minihuds = list()
|
var/list/minihuds = list()
|
||||||
|
|
||||||
@@ -210,6 +214,7 @@ var/list/global_huds = list(
|
|||||||
other = null
|
other = null
|
||||||
hotkeybuttons = null
|
hotkeybuttons = null
|
||||||
// item_action_list = null // ?
|
// item_action_list = null // ?
|
||||||
|
QDEL_LIST(ammo_hud_list)
|
||||||
mymob = null
|
mymob = null
|
||||||
|
|
||||||
/datum/hud/proc/hidden_inventory_update()
|
/datum/hud/proc/hidden_inventory_update()
|
||||||
@@ -446,4 +451,37 @@ var/list/global_huds = list(
|
|||||||
client.screen += client.void
|
client.screen += client.void
|
||||||
|
|
||||||
/mob/new_player/add_click_catcher()
|
/mob/new_player/add_click_catcher()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/* TGMC Ammo HUD Port
|
||||||
|
* These procs call to screen_objects.dm's respective procs.
|
||||||
|
* All these do is manage the amount of huds on screen and set the HUD.
|
||||||
|
*/
|
||||||
|
///Add an ammo hud to the user informing of the ammo count of G
|
||||||
|
/datum/hud/proc/add_ammo_hud(mob/living/user, obj/item/weapon/gun/G)
|
||||||
|
if(length(ammo_hud_list) >= MAX_AMMO_HUD_POSSIBLE)
|
||||||
|
return
|
||||||
|
var/obj/screen/ammo/ammo_hud = new
|
||||||
|
ammo_hud_list[G] = ammo_hud
|
||||||
|
ammo_hud.screen_loc = ammo_hud.ammo_screen_loc_list[length(ammo_hud_list)]
|
||||||
|
ammo_hud.add_hud(user, G)
|
||||||
|
ammo_hud.update_hud(user, G)
|
||||||
|
|
||||||
|
///Remove the ammo hud related to the gun G from the user
|
||||||
|
/datum/hud/proc/remove_ammo_hud(mob/living/user, obj/item/weapon/gun/G)
|
||||||
|
var/obj/screen/ammo/ammo_hud = ammo_hud_list[G]
|
||||||
|
if(isnull(ammo_hud))
|
||||||
|
return
|
||||||
|
ammo_hud.remove_hud(user, G)
|
||||||
|
qdel(ammo_hud)
|
||||||
|
ammo_hud_list -= G
|
||||||
|
var/i = 1
|
||||||
|
for(var/key in ammo_hud_list)
|
||||||
|
ammo_hud = ammo_hud_list[key]
|
||||||
|
ammo_hud.screen_loc = ammo_hud.ammo_screen_loc_list[i]
|
||||||
|
i++
|
||||||
|
|
||||||
|
///Update the ammo hud related to the gun G
|
||||||
|
/datum/hud/proc/update_ammo_hud(mob/living/user, obj/item/weapon/gun/G)
|
||||||
|
var/obj/screen/ammo/ammo_hud = ammo_hud_list[G]
|
||||||
|
ammo_hud?.update_hud(user, G)
|
||||||
@@ -833,3 +833,80 @@
|
|||||||
icon_state = null
|
icon_state = null
|
||||||
plane = PLANE_HOLOMAP_ICONS
|
plane = PLANE_HOLOMAP_ICONS
|
||||||
appearance_flags = KEEP_TOGETHER
|
appearance_flags = KEEP_TOGETHER
|
||||||
|
|
||||||
|
// Begin TGMC Ammo HUD Port
|
||||||
|
/obj/screen/ammo
|
||||||
|
name = "ammo"
|
||||||
|
icon = 'icons/mob/screen_ammo.dmi'
|
||||||
|
icon_state = "ammo"
|
||||||
|
screen_loc = ui_ammo_hud1
|
||||||
|
var/warned = FALSE
|
||||||
|
var/static/list/ammo_screen_loc_list = list(ui_ammo_hud1, ui_ammo_hud2, ui_ammo_hud3 ,ui_ammo_hud4)
|
||||||
|
|
||||||
|
/obj/screen/ammo/proc/add_hud(var/mob/living/user, var/obj/item/weapon/gun/G)
|
||||||
|
|
||||||
|
if(!user?.client)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!G)
|
||||||
|
CRASH("/obj/screen/ammo/proc/add_hud() has been called from [src] without the required param of G")
|
||||||
|
|
||||||
|
if(!G.has_ammo_counter())
|
||||||
|
return
|
||||||
|
|
||||||
|
user.client.screen += src
|
||||||
|
|
||||||
|
/obj/screen/ammo/proc/remove_hud(var/mob/living/user)
|
||||||
|
user?.client?.screen -= src
|
||||||
|
|
||||||
|
/obj/screen/ammo/proc/update_hud(var/mob/living/user, var/obj/item/weapon/gun/G)
|
||||||
|
if(!user?.client?.screen.Find(src))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!G || !istype(G) || !G.has_ammo_counter() || !G.get_ammo_type() || isnull(G.get_ammo_count()))
|
||||||
|
remove_hud()
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/ammo_type = G.get_ammo_type()
|
||||||
|
var/rounds = G.get_ammo_count()
|
||||||
|
|
||||||
|
var/hud_state = ammo_type[1]
|
||||||
|
var/hud_state_empty = ammo_type[2]
|
||||||
|
|
||||||
|
overlays.Cut()
|
||||||
|
|
||||||
|
var/empty = image('icons/mob/screen_ammo.dmi', src, "[hud_state_empty]")
|
||||||
|
|
||||||
|
if(rounds == 0)
|
||||||
|
if(warned)
|
||||||
|
overlays += empty
|
||||||
|
else
|
||||||
|
warned = TRUE
|
||||||
|
var/obj/screen/ammo/F = new /obj/screen/ammo(src)
|
||||||
|
F.icon_state = "frame"
|
||||||
|
user.client.screen += F
|
||||||
|
flick("[hud_state_empty]_flash", F)
|
||||||
|
spawn(20)
|
||||||
|
user.client.screen -= F
|
||||||
|
qdel(F)
|
||||||
|
overlays += empty
|
||||||
|
else
|
||||||
|
warned = FALSE
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "[hud_state]")
|
||||||
|
|
||||||
|
rounds = num2text(rounds)
|
||||||
|
//Handle the amount of rounds
|
||||||
|
switch(length(rounds))
|
||||||
|
if(1)
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "o[rounds[1]]")
|
||||||
|
if(2)
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "o[rounds[2]]")
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "t[rounds[1]]")
|
||||||
|
if(3)
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "o[rounds[3]]")
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "t[rounds[2]]")
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "h[rounds[1]]")
|
||||||
|
else //"0" is still length 1 so this means it's over 999
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "o9")
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "t9")
|
||||||
|
overlays += image('icons/mob/screen_ammo.dmi', src, "h9")
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
//The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern
|
//The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern
|
||||||
var/spread_range = 7
|
var/spread_range = 7
|
||||||
loadable = null
|
loadable = null
|
||||||
|
hud_state = "grenade_frag" // TGMC Ammo HUD Port
|
||||||
|
|
||||||
/obj/item/weapon/grenade/explosive/detonate()
|
/obj/item/weapon/grenade/explosive/detonate()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
var/det_time = 50
|
var/det_time = 50
|
||||||
var/loadable = TRUE
|
var/loadable = TRUE
|
||||||
var/arm_sound = 'sound/weapons/armbomb.ogg'
|
var/arm_sound = 'sound/weapons/armbomb.ogg'
|
||||||
|
var/hud_state = "grenade_he" // TGMC Ammo HUD Port
|
||||||
|
var/hud_state_empty = "grenade_empty" // TGMC Ammo HUD Port
|
||||||
|
|
||||||
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
|
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
|
||||||
if((CLUMSY in user.mutations) && prob(50))
|
if((CLUMSY in user.mutations) && prob(50))
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
det_time = 20
|
det_time = 20
|
||||||
item_state = "flashbang"
|
item_state = "flashbang"
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
|
hud_state = "grenade_smoke"
|
||||||
var/datum/effect_system/smoke_spread/bad/smoke
|
var/datum/effect_system/smoke_spread/bad/smoke
|
||||||
var/smoke_color
|
var/smoke_color
|
||||||
var/smoke_strength = 8
|
var/smoke_strength = 8
|
||||||
|
|||||||
@@ -53,6 +53,12 @@
|
|||||||
if(self_recharge)
|
if(self_recharge)
|
||||||
if(world.time >= last_use + charge_delay)
|
if(world.time >= last_use + charge_delay)
|
||||||
give(charge_amount)
|
give(charge_amount)
|
||||||
|
// TGMC Ammo HUD - Update the HUD every time we're called to recharge.
|
||||||
|
if(istype(loc, /obj/item/weapon/gun/energy)) // Are we in a gun currently?
|
||||||
|
var/obj/item/weapon/gun/energy/gun = loc
|
||||||
|
var/mob/living/user = gun.loc
|
||||||
|
if(istype(user))
|
||||||
|
user?.hud_used.update_ammo_hud(user, gun) // Update the HUD
|
||||||
else
|
else
|
||||||
return PROCESS_KILL
|
return PROCESS_KILL
|
||||||
|
|
||||||
|
|||||||
@@ -401,6 +401,8 @@
|
|||||||
|
|
||||||
if(muzzle_flash)
|
if(muzzle_flash)
|
||||||
set_light(0)
|
set_light(0)
|
||||||
|
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
|
|
||||||
// Similar to the above proc, but does not require a user, which is ideal for things like turrets.
|
// Similar to the above proc, but does not require a user, which is ideal for things like turrets.
|
||||||
/obj/item/weapon/gun/proc/Fire_userless(atom/target)
|
/obj/item/weapon/gun/proc/Fire_userless(atom/target)
|
||||||
@@ -493,6 +495,7 @@
|
|||||||
/obj/item/weapon/gun/proc/handle_click_empty(mob/user)
|
/obj/item/weapon/gun/proc/handle_click_empty(mob/user)
|
||||||
if (user)
|
if (user)
|
||||||
user.visible_message("*click click*", "<span class='danger'>*click*</span>")
|
user.visible_message("*click click*", "<span class='danger'>*click*</span>")
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
else
|
else
|
||||||
src.visible_message("*click click*")
|
src.visible_message("*click click*")
|
||||||
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
|
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
|
||||||
@@ -724,8 +727,35 @@
|
|||||||
var/datum/firemode/new_mode = firemodes[sel_mode]
|
var/datum/firemode/new_mode = firemodes[sel_mode]
|
||||||
new_mode.apply_to(src)
|
new_mode.apply_to(src)
|
||||||
to_chat(user, "<span class='notice'>\The [src] is now set to [new_mode.name].</span>")
|
to_chat(user, "<span class='notice'>\The [src] is now set to [new_mode.name].</span>")
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
|
|
||||||
return new_mode
|
return new_mode
|
||||||
|
|
||||||
/obj/item/weapon/gun/attack_self(mob/user)
|
/obj/item/weapon/gun/attack_self(mob/user)
|
||||||
switch_firemodes(user)
|
switch_firemodes(user)
|
||||||
|
|
||||||
|
/* TGMC Ammo HUD Port Begin */
|
||||||
|
/obj/item/weapon/gun
|
||||||
|
var/hud_enabled = TRUE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/proc/has_ammo_counter()
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/proc/get_ammo_type()
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/proc/get_ammo_count()
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/equipped(mob/living/user, slot) // When a gun is equipped to your hands, we'll add the HUD to the user. Pending porting over TGMC guncode where wielding is far more sensible.
|
||||||
|
if(slot == slot_l_hand || slot == slot_r_hand)
|
||||||
|
user.hud_used.add_ammo_hud(user, src)
|
||||||
|
else
|
||||||
|
user.hud_used.remove_ammo_hud(user, src)
|
||||||
|
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/dropped(mob/living/user) // Ditto as above, we remove the HUD. Pending porting TGMC code to clean up this fucking nightmare of spaghetti.
|
||||||
|
user.hud_used.remove_ammo_hud(user, src)
|
||||||
|
|
||||||
|
..()
|
||||||
@@ -90,6 +90,9 @@
|
|||||||
|
|
||||||
power_supply.give(rechargeamt) //... to recharge 1/5th the battery
|
power_supply.give(rechargeamt) //... to recharge 1/5th the battery
|
||||||
update_icon()
|
update_icon()
|
||||||
|
var/mob/living/M = loc // TGMC Ammo HUD
|
||||||
|
if(istype(M)) // TGMC Ammo HUD
|
||||||
|
M?.hud_used.update_ammo_hud(M, src) // TGMC Ammo HUD
|
||||||
else
|
else
|
||||||
charge_tick = 0
|
charge_tick = 0
|
||||||
return 1
|
return 1
|
||||||
@@ -109,6 +112,9 @@
|
|||||||
if(!power_supply) return null
|
if(!power_supply) return null
|
||||||
if(!ispath(projectile_type)) return null
|
if(!ispath(projectile_type)) return null
|
||||||
if(!power_supply.checked_use(charge_cost)) return null
|
if(!power_supply.checked_use(charge_cost)) return null
|
||||||
|
var/mob/living/M = loc // TGMC Ammo HUD
|
||||||
|
if(istype(M)) // TGMC Ammo HUD
|
||||||
|
M?.hud_used.update_ammo_hud(M, src)
|
||||||
return new projectile_type(src)
|
return new projectile_type(src)
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/proc/load_ammo(var/obj/item/C, mob/user)
|
/obj/item/weapon/gun/energy/proc/load_ammo(var/obj/item/C, mob/user)
|
||||||
@@ -130,6 +136,7 @@
|
|||||||
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
|
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
|
||||||
update_icon()
|
update_icon()
|
||||||
update_held_icon()
|
update_held_icon()
|
||||||
|
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>This cell is not fitted for [src].</span>")
|
to_chat(user, "<span class='notice'>This cell is not fitted for [src].</span>")
|
||||||
return
|
return
|
||||||
@@ -146,6 +153,7 @@
|
|||||||
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
||||||
update_icon()
|
update_icon()
|
||||||
update_held_icon()
|
update_held_icon()
|
||||||
|
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>[src] does not have a power cell.</span>")
|
to_chat(user, "<span class='notice'>[src] does not have a power cell.</span>")
|
||||||
|
|
||||||
@@ -231,4 +239,21 @@
|
|||||||
|
|
||||||
results += ..()
|
results += ..()
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
// TGMC AMMO HUD
|
||||||
|
/obj/item/weapon/gun/energy/has_ammo_counter()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/get_ammo_type()
|
||||||
|
if(!projectile_type)
|
||||||
|
return list("unknown", "unknown")
|
||||||
|
else
|
||||||
|
var/obj/item/projectile/P = projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/get_ammo_count()
|
||||||
|
if(!power_supply)
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return FLOOR(power_supply.charge / max(charge_cost, 1), 1)
|
||||||
@@ -54,6 +54,10 @@
|
|||||||
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
|
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
|
||||||
if(handle_casings != HOLD_CASINGS)
|
if(handle_casings != HOLD_CASINGS)
|
||||||
ammo_magazine.stored_ammo -= chambered
|
ammo_magazine.stored_ammo -= chambered
|
||||||
|
|
||||||
|
var/mob/living/M = loc
|
||||||
|
if(istype(M))
|
||||||
|
M?.hud_used.update_ammo_hud(M, src)
|
||||||
|
|
||||||
if (chambered)
|
if (chambered)
|
||||||
return chambered.BB
|
return chambered.BB
|
||||||
@@ -98,6 +102,10 @@
|
|||||||
|
|
||||||
if(handle_casings != HOLD_CASINGS)
|
if(handle_casings != HOLD_CASINGS)
|
||||||
chambered = null
|
chambered = null
|
||||||
|
|
||||||
|
var/mob/living/M = loc
|
||||||
|
if(istype(M))
|
||||||
|
M?.hud_used.update_ammo_hud(M, src)
|
||||||
|
|
||||||
|
|
||||||
//Attempts to load A into src, depending on the type of thing being loaded and the load_method
|
//Attempts to load A into src, depending on the type of thing being loaded and the load_method
|
||||||
@@ -117,6 +125,7 @@
|
|||||||
AM.loc = src
|
AM.loc = src
|
||||||
ammo_magazine = AM
|
ammo_magazine = AM
|
||||||
user.visible_message("[user] inserts [AM] into [src].", "<span class='notice'>You insert [AM] into [src].</span>")
|
user.visible_message("[user] inserts [AM] into [src].", "<span class='notice'>You insert [AM] into [src].</span>")
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
|
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
|
||||||
if(SPEEDLOADER)
|
if(SPEEDLOADER)
|
||||||
if(loaded.len >= max_shells)
|
if(loaded.len >= max_shells)
|
||||||
@@ -131,8 +140,10 @@
|
|||||||
loaded += C
|
loaded += C
|
||||||
AM.stored_ammo -= C //should probably go inside an ammo_magazine proc, but I guess less proc calls this way...
|
AM.stored_ammo -= C //should probably go inside an ammo_magazine proc, but I guess less proc calls this way...
|
||||||
count++
|
count++
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
if(count)
|
if(count)
|
||||||
user.visible_message("[user] reloads [src].", "<span class='notice'>You load [count] round\s into [src].</span>")
|
user.visible_message("[user] reloads [src].", "<span class='notice'>You load [count] round\s into [src].</span>")
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
||||||
AM.update_icon()
|
AM.update_icon()
|
||||||
else if(istype(A, /obj/item/ammo_casing))
|
else if(istype(A, /obj/item/ammo_casing))
|
||||||
@@ -168,6 +179,7 @@
|
|||||||
sleep(1 SECOND)
|
sleep(1 SECOND)
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
|
|
||||||
//attempts to unload src. If allow_dump is set to 0, the speedloader unloading method will be disabled
|
//attempts to unload src. If allow_dump is set to 0, the speedloader unloading method will be disabled
|
||||||
/obj/item/weapon/gun/projectile/proc/unload_ammo(mob/user, var/allow_dump=1)
|
/obj/item/weapon/gun/projectile/proc/unload_ammo(mob/user, var/allow_dump=1)
|
||||||
@@ -177,6 +189,7 @@
|
|||||||
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
||||||
ammo_magazine.update_icon()
|
ammo_magazine.update_icon()
|
||||||
ammo_magazine = null
|
ammo_magazine = null
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
else if(loaded.len)
|
else if(loaded.len)
|
||||||
//presumably, if it can be speed-loaded, it can be speed-unloaded.
|
//presumably, if it can be speed-loaded, it can be speed-unloaded.
|
||||||
if(allow_dump && (load_method & SPEEDLOADER))
|
if(allow_dump && (load_method & SPEEDLOADER))
|
||||||
@@ -195,9 +208,11 @@
|
|||||||
user.put_in_hands(C)
|
user.put_in_hands(C)
|
||||||
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
|
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
|
||||||
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='warning'>[src] is empty.</span>")
|
to_chat(user, "<span class='warning'>[src] is empty.</span>")
|
||||||
update_icon()
|
update_icon()
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
@@ -228,6 +243,7 @@
|
|||||||
ammo_magazine.update_icon()
|
ammo_magazine.update_icon()
|
||||||
ammo_magazine = null
|
ammo_magazine = null
|
||||||
update_icon() //make sure to do this after unsetting ammo_magazine
|
update_icon() //make sure to do this after unsetting ammo_magazine
|
||||||
|
user.hud_used.update_ammo_hud(user, src)
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/examine(mob/user)
|
/obj/item/weapon/gun/projectile/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -256,3 +272,72 @@
|
|||||||
|
|
||||||
unload_ammo(usr)
|
unload_ammo(usr)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// TGMC Ammo HUD Insertion
|
||||||
|
/obj/item/weapon/gun/projectile/has_ammo_counter()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/projectile/get_ammo_type()
|
||||||
|
if(load_method & MAGAZINE)
|
||||||
|
if(chambered) // Do we have an ammo casing chambered
|
||||||
|
var/obj/item/ammo_casing/A = chambered
|
||||||
|
var/obj/item/projectile/P = A.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
else if(ammo_magazine && ammo_magazine.stored_ammo.len) // Do we have a mag, and have ammo in the mag, but nothing chambered?
|
||||||
|
var/obj/item/ammo_casing/A = ammo_magazine.stored_ammo[1]
|
||||||
|
var/obj/item/projectile/P = A.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
else if(src.projectile_type) // Else, we're entirely empty, and irregardless of the mag we have loaded (as it's empty, or it would've passed the length check above), return the DEFAULT projectile_type on the gun, if set.
|
||||||
|
var/obj/item/projectile/P = src.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
else
|
||||||
|
return list("unknown", "unknown") // Safety, this shouldn't happen, but just in case
|
||||||
|
else if(load_method & (SINGLE_CASING|SPEEDLOADER)) // Do we load with single casings OR speedloaders?
|
||||||
|
if(chambered) // Do we have an ammo casing loaded in the chamber? All casings still have a projectile_type var.
|
||||||
|
var/obj/item/ammo_casing/A = chambered
|
||||||
|
var/obj/item/projectile/P = A.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty)) // Return the casing's projectile_type ammo hud state
|
||||||
|
else if(loaded.len) // Else, is the gun loaded, but no ammo casings in chamber currently?
|
||||||
|
var/obj/item/ammo_casing/A = loaded[1]
|
||||||
|
var/obj/item/projectile/P = A.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty)) // Return the ammunition loaded in the gun's hud_state
|
||||||
|
else if(src.projectile_type) // Else, we're entirely empty, and have nothing loaded in the gun, and nothing in the chamber. Return the DEFAULT projectile_type on the gun, if set.
|
||||||
|
var/obj/item/projectile/P = src.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
else
|
||||||
|
return list("unknown", "unknown") // Safety, this shouldn't happen, but just in case
|
||||||
|
else if(src.projectile_type) // Failsafe if we somehow don't pass the above. Return the DEFAULT projectile_type on the gun, if set.
|
||||||
|
var/obj/item/projectile/P = src.projectile_type
|
||||||
|
return list(initial(P.hud_state), initial(P.hud_state_empty))
|
||||||
|
else // Failsafe if we somehow fail all three methods
|
||||||
|
return list("unknown", "unknown")
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/projectile/get_ammo_count()
|
||||||
|
if(ammo_magazine) // Do we have a magazine loaded?
|
||||||
|
var/shots_left
|
||||||
|
if(chambered && chambered.BB) // Do we have a bullet in the currently-chambered casing, if any?
|
||||||
|
shots_left++
|
||||||
|
for(var/obj/item/ammo_casing/bullet in ammo_magazine.stored_ammo)
|
||||||
|
if(bullet.BB)
|
||||||
|
shots_left++
|
||||||
|
|
||||||
|
if(shots_left > 0)
|
||||||
|
return shots_left
|
||||||
|
else
|
||||||
|
return 0 // No ammo left or failsafe.
|
||||||
|
else if(loaded) // Do we use internal ammunition
|
||||||
|
var/shots_left
|
||||||
|
if(chambered && chambered.BB) // Do we have a bullet in the currently-chambered casing, if any?
|
||||||
|
shots_left++
|
||||||
|
for(var/obj/item/ammo_casing/bullet in loaded)
|
||||||
|
if(bullet.BB) // Only increment how many shots we have left if we're loaded.
|
||||||
|
shots_left++
|
||||||
|
|
||||||
|
if(shots_left > 0)
|
||||||
|
return shots_left
|
||||||
|
else
|
||||||
|
return 0 // No ammo left or failsafe.
|
||||||
|
else if(chambered) // If we don't have a magazine or internal ammunition loaded, but we have a casing in chamber, return the amount.
|
||||||
|
return chambered.BB ? 1 : 0
|
||||||
|
else // Failsafe, or completely unloaded
|
||||||
|
return 0
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Shotgun
|
||||||
|
*/
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/shotgun/pump
|
/obj/item/weapon/gun/projectile/shotgun/pump
|
||||||
name = "shotgun"
|
name = "shotgun"
|
||||||
desc = "The mass-produced MarsTech Meteor 29 shotgun is a favourite of police and security forces on many worlds. Uses 12g rounds."
|
desc = "The mass-produced MarsTech Meteor 29 shotgun is a favourite of police and security forces on many worlds. Uses 12g rounds."
|
||||||
@@ -39,12 +43,14 @@
|
|||||||
else
|
else
|
||||||
chambered.loc = get_turf(src) // Eject casing
|
chambered.loc = get_turf(src) // Eject casing
|
||||||
chambered = null
|
chambered = null
|
||||||
|
M.hud_used.update_ammo_hud(M, src) // TGMC Ammo HUD Port
|
||||||
|
|
||||||
// Load next shell
|
// Load next shell
|
||||||
if(loaded.len)
|
if(loaded.len)
|
||||||
var/obj/item/ammo_casing/AC = loaded[1] // load next casing.
|
var/obj/item/ammo_casing/AC = loaded[1] // load next casing.
|
||||||
loaded -= AC // Remove casing from loaded list.
|
loaded -= AC // Remove casing from loaded list.
|
||||||
chambered = AC
|
chambered = AC
|
||||||
|
M.hud_used.update_ammo_hud(M, src) // TGMC Ammo HUD Port
|
||||||
|
|
||||||
if(pump_animation) // This affects all bolt action and shotguns.
|
if(pump_animation) // This affects all bolt action and shotguns.
|
||||||
flick("[pump_animation]", src) // This plays any pumping
|
flick("[pump_animation]", src) // This plays any pumping
|
||||||
@@ -125,6 +131,7 @@
|
|||||||
burst = 2
|
burst = 2
|
||||||
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
|
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
|
||||||
Fire_userless(user)
|
Fire_userless(user)
|
||||||
|
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD Port
|
||||||
burst = burstsetting
|
burst = burstsetting
|
||||||
return
|
return
|
||||||
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
|
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
|
||||||
|
|||||||
@@ -135,6 +135,10 @@
|
|||||||
var/impact_effect_type = null
|
var/impact_effect_type = null
|
||||||
|
|
||||||
var/list/impacted_mobs = list()
|
var/list/impacted_mobs = list()
|
||||||
|
|
||||||
|
// TGMC Ammo HUD Port
|
||||||
|
var/hud_state = "unknown" // What HUD state we use when we have ammunition.
|
||||||
|
var/hud_state_empty = "unknown" // The empty state. DON'T USE _FLASH IN THE NAME OF THE EMPTY STATE STRING, THAT IS ADDED BY THE CODE.
|
||||||
|
|
||||||
/obj/item/projectile/proc/Range()
|
/obj/item/projectile/proc/Range()
|
||||||
range--
|
range--
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
tracer_type = /obj/effect/projectile/tracer/laser
|
tracer_type = /obj/effect/projectile/tracer/laser
|
||||||
impact_type = /obj/effect/projectile/impact/laser
|
impact_type = /obj/effect/projectile/impact/laser
|
||||||
|
|
||||||
|
hud_state = "laser"
|
||||||
|
hud_state_empty = "battery_empty"
|
||||||
|
|
||||||
/obj/item/projectile/beam/practice
|
/obj/item/projectile/beam/practice
|
||||||
name = "laser"
|
name = "laser"
|
||||||
icon_state = "laser"
|
icon_state = "laser"
|
||||||
@@ -31,23 +34,28 @@
|
|||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
check_armour = "laser"
|
check_armour = "laser"
|
||||||
eyeblur = 2
|
eyeblur = 2
|
||||||
|
hud_state = "laser"
|
||||||
|
|
||||||
/obj/item/projectile/beam/weaklaser
|
/obj/item/projectile/beam/weaklaser
|
||||||
name = "weak laser"
|
name = "weak laser"
|
||||||
icon_state = "laser"
|
icon_state = "laser"
|
||||||
damage = 15
|
damage = 15
|
||||||
|
hud_state = "laser"
|
||||||
|
|
||||||
/obj/item/projectile/beam/smalllaser
|
/obj/item/projectile/beam/smalllaser
|
||||||
damage = 25
|
damage = 25
|
||||||
|
hud_state = "laser"
|
||||||
|
|
||||||
/obj/item/projectile/beam/burstlaser
|
/obj/item/projectile/beam/burstlaser
|
||||||
damage = 30
|
damage = 30
|
||||||
armor_penetration = 10
|
armor_penetration = 10
|
||||||
|
hud_state = "laser"
|
||||||
|
|
||||||
|
|
||||||
/obj/item/projectile/beam/midlaser
|
/obj/item/projectile/beam/midlaser
|
||||||
damage = 40
|
damage = 40
|
||||||
armor_penetration = 10
|
armor_penetration = 10
|
||||||
|
hud_state = "laser"
|
||||||
|
|
||||||
/obj/item/projectile/beam/mininglaser
|
/obj/item/projectile/beam/mininglaser
|
||||||
name = "pulsating laser"
|
name = "pulsating laser"
|
||||||
@@ -74,6 +82,7 @@
|
|||||||
muzzle_type = /obj/effect/projectile/muzzle/laser_heavy
|
muzzle_type = /obj/effect/projectile/muzzle/laser_heavy
|
||||||
tracer_type = /obj/effect/projectile/tracer/laser_heavy
|
tracer_type = /obj/effect/projectile/tracer/laser_heavy
|
||||||
impact_type = /obj/effect/projectile/impact/laser_heavy
|
impact_type = /obj/effect/projectile/impact/laser_heavy
|
||||||
|
hud_state = "laser_overcharge"
|
||||||
|
|
||||||
/obj/item/projectile/beam/heavylaser/fakeemitter
|
/obj/item/projectile/beam/heavylaser/fakeemitter
|
||||||
name = "emitter beam"
|
name = "emitter beam"
|
||||||
@@ -81,6 +90,7 @@
|
|||||||
fire_sound = 'sound/weapons/emitter.ogg'
|
fire_sound = 'sound/weapons/emitter.ogg'
|
||||||
light_color = "#00CC33"
|
light_color = "#00CC33"
|
||||||
excavation_amount = 140 // 2 shots to dig a standard rock turf. Superior due to being a mounted tool beam, to make it actually viable.
|
excavation_amount = 140 // 2 shots to dig a standard rock turf. Superior due to being a mounted tool beam, to make it actually viable.
|
||||||
|
hud_state = "laser_overcharge"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/emitter
|
muzzle_type = /obj/effect/projectile/muzzle/emitter
|
||||||
tracer_type = /obj/effect/projectile/tracer/emitter
|
tracer_type = /obj/effect/projectile/tracer/emitter
|
||||||
@@ -90,6 +100,7 @@
|
|||||||
damage = 80
|
damage = 80
|
||||||
armor_penetration = 50
|
armor_penetration = 50
|
||||||
light_color = "#FF0D00"
|
light_color = "#FF0D00"
|
||||||
|
hud_state = "laser_overcharge"
|
||||||
|
|
||||||
/obj/item/projectile/beam/xray
|
/obj/item/projectile/beam/xray
|
||||||
name = "xray beam"
|
name = "xray beam"
|
||||||
@@ -98,6 +109,7 @@
|
|||||||
damage = 25
|
damage = 25
|
||||||
armor_penetration = 50
|
armor_penetration = 50
|
||||||
light_color = "#00CC33"
|
light_color = "#00CC33"
|
||||||
|
hud_state = "laser_sniper"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/xray
|
muzzle_type = /obj/effect/projectile/muzzle/xray
|
||||||
tracer_type = /obj/effect/projectile/tracer/xray
|
tracer_type = /obj/effect/projectile/tracer/xray
|
||||||
@@ -111,6 +123,7 @@
|
|||||||
armor_penetration = 90
|
armor_penetration = 90
|
||||||
irradiate = 20
|
irradiate = 20
|
||||||
light_color = "#00CC33"
|
light_color = "#00CC33"
|
||||||
|
hud_state = "laser_sniper"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/xray
|
muzzle_type = /obj/effect/projectile/muzzle/xray
|
||||||
tracer_type = /obj/effect/projectile/tracer/xray
|
tracer_type = /obj/effect/projectile/tracer/xray
|
||||||
@@ -122,6 +135,7 @@
|
|||||||
fire_sound = 'sound/weapons/eluger.ogg'
|
fire_sound = 'sound/weapons/eluger.ogg'
|
||||||
damage = 40
|
damage = 40
|
||||||
light_color = "#00C6FF"
|
light_color = "#00C6FF"
|
||||||
|
hud_state = "laser_disabler"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/laser_omni
|
muzzle_type = /obj/effect/projectile/muzzle/laser_omni
|
||||||
tracer_type = /obj/effect/projectile/tracer/laser_omni
|
tracer_type = /obj/effect/projectile/tracer/laser_omni
|
||||||
@@ -134,6 +148,7 @@
|
|||||||
damage = 100 //Badmin toy, don't care
|
damage = 100 //Badmin toy, don't care
|
||||||
armor_penetration = 100
|
armor_penetration = 100
|
||||||
light_color = "#0066FF"
|
light_color = "#0066FF"
|
||||||
|
hud_state = "pulse"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/laser_pulse
|
muzzle_type = /obj/effect/projectile/muzzle/laser_pulse
|
||||||
tracer_type = /obj/effect/projectile/tracer/laser_pulse
|
tracer_type = /obj/effect/projectile/tracer/laser_pulse
|
||||||
@@ -151,6 +166,7 @@
|
|||||||
damage = 0 // The actual damage is computed in /code/modules/power/singularity/emitter.dm
|
damage = 0 // The actual damage is computed in /code/modules/power/singularity/emitter.dm
|
||||||
light_color = "#00CC33"
|
light_color = "#00CC33"
|
||||||
excavation_amount = 70 // 3 shots to mine a turf
|
excavation_amount = 70 // 3 shots to mine a turf
|
||||||
|
hud_state = "laser_overcharge"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/emitter
|
muzzle_type = /obj/effect/projectile/muzzle/emitter
|
||||||
tracer_type = /obj/effect/projectile/tracer/emitter
|
tracer_type = /obj/effect/projectile/tracer/emitter
|
||||||
@@ -164,13 +180,14 @@
|
|||||||
no_attack_log = 1
|
no_attack_log = 1
|
||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
check_armour = "laser"
|
check_armour = "laser"
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
/obj/item/projectile/beam/lasertag/blue
|
/obj/item/projectile/beam/lasertag/blue
|
||||||
icon_state = "bluelaser"
|
icon_state = "bluelaser"
|
||||||
light_color = "#0066FF"
|
light_color = "#0066FF"
|
||||||
|
hud_state = "monkey"
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/laser_blue
|
muzzle_type = /obj/effect/projectile/muzzle/laser_blue
|
||||||
tracer_type = /obj/effect/projectile/tracer/laser_blue
|
tracer_type = /obj/effect/projectile/tracer/laser_blue
|
||||||
impact_type = /obj/effect/projectile/impact/laser_blue
|
impact_type = /obj/effect/projectile/impact/laser_blue
|
||||||
@@ -185,6 +202,7 @@
|
|||||||
/obj/item/projectile/beam/lasertag/red
|
/obj/item/projectile/beam/lasertag/red
|
||||||
icon_state = "laser"
|
icon_state = "laser"
|
||||||
light_color = "#FF0D00"
|
light_color = "#FF0D00"
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
/obj/item/projectile/beam/lasertag/red/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/beam/lasertag/red/on_hit(var/atom/target, var/blocked = 0)
|
||||||
if(ishuman(target))
|
if(ishuman(target))
|
||||||
@@ -196,6 +214,7 @@
|
|||||||
/obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
|
/obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
|
||||||
icon_state = "omnilaser"
|
icon_state = "omnilaser"
|
||||||
light_color = "#00C6FF"
|
light_color = "#00C6FF"
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/laser_omni
|
muzzle_type = /obj/effect/projectile/muzzle/laser_omni
|
||||||
tracer_type = /obj/effect/projectile/tracer/laser_omni
|
tracer_type = /obj/effect/projectile/tracer/laser_omni
|
||||||
@@ -215,6 +234,7 @@
|
|||||||
damage = 50
|
damage = 50
|
||||||
armor_penetration = 10
|
armor_penetration = 10
|
||||||
light_color = "#00CC33"
|
light_color = "#00CC33"
|
||||||
|
hud_state = "laser_sniper"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/xray
|
muzzle_type = /obj/effect/projectile/muzzle/xray
|
||||||
tracer_type = /obj/effect/projectile/tracer/xray
|
tracer_type = /obj/effect/projectile/tracer/xray
|
||||||
@@ -231,12 +251,15 @@
|
|||||||
light_color = "#FFFFFF"
|
light_color = "#FFFFFF"
|
||||||
hitsound = 'sound/weapons/zapbang.ogg'
|
hitsound = 'sound/weapons/zapbang.ogg'
|
||||||
|
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||||
tracer_type = /obj/effect/projectile/tracer/stun
|
tracer_type = /obj/effect/projectile/tracer/stun
|
||||||
impact_type = /obj/effect/projectile/impact/stun
|
impact_type = /obj/effect/projectile/impact/stun
|
||||||
|
|
||||||
|
hud_state = "taser" // TGMC Ammo HUD port
|
||||||
|
|
||||||
/obj/item/projectile/beam/stun/weak
|
/obj/item/projectile/beam/stun/weak
|
||||||
name = "weak stun beam"
|
name = "weak stun beam"
|
||||||
icon_state = "stun"
|
icon_state = "stun"
|
||||||
@@ -277,6 +300,7 @@
|
|||||||
agony = 15
|
agony = 15
|
||||||
eyeblur = 2
|
eyeblur = 2
|
||||||
hitsound = 'sound/weapons/zapbang.ogg'
|
hitsound = 'sound/weapons/zapbang.ogg'
|
||||||
|
hud_state = "taser"
|
||||||
|
|
||||||
/obj/item/projectile/beam/shock/weak
|
/obj/item/projectile/beam/shock/weak
|
||||||
damage = 5
|
damage = 5
|
||||||
@@ -294,7 +318,7 @@
|
|||||||
damage_type = ELECTROCUTE //You should be safe inside a voidsuit
|
damage_type = ELECTROCUTE //You should be safe inside a voidsuit
|
||||||
sharp = FALSE //"Wide" spectrum beam
|
sharp = FALSE //"Wide" spectrum beam
|
||||||
light_color = COLOR_GOLD
|
light_color = COLOR_GOLD
|
||||||
|
hud_state = "monkey"
|
||||||
excavation_amount = 200 // Good at shooting rocks
|
excavation_amount = 200 // Good at shooting rocks
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/pointdefense
|
muzzle_type = /obj/effect/projectile/muzzle/pointdefense
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||||
excavation_amount = 20
|
excavation_amount = 20
|
||||||
var/mob_passthrough_check = 0
|
var/mob_passthrough_check = 0
|
||||||
|
hud_state = "pistol_lightap"
|
||||||
|
hud_state_empty = "pistol_empty" // Just in case we somehow have no hud_state_empty defined
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/bullet
|
muzzle_type = /obj/effect/projectile/muzzle/bullet
|
||||||
|
|
||||||
@@ -96,30 +98,38 @@
|
|||||||
/obj/item/projectile/bullet/pistol // 9mm pistols and most SMGs. Sacrifice power for capacity.
|
/obj/item/projectile/bullet/pistol // 9mm pistols and most SMGs. Sacrifice power for capacity.
|
||||||
fire_sound = 'sound/weapons/gunshot2.ogg'
|
fire_sound = 'sound/weapons/gunshot2.ogg'
|
||||||
damage = 20
|
damage = 20
|
||||||
|
hud_state = "pistol"
|
||||||
|
hud_state_empty = "pistol_empty"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/ap
|
/obj/item/projectile/bullet/pistol/ap
|
||||||
damage = 15
|
damage = 15
|
||||||
armor_penetration = 30
|
armor_penetration = 30
|
||||||
|
hud_state = "pistol_light_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/hp
|
/obj/item/projectile/bullet/pistol/hp
|
||||||
damage = 25
|
damage = 25
|
||||||
armor_penetration = -50
|
armor_penetration = -50
|
||||||
|
hud_state = "pistol_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/medium // .45 (and maybe .40 if it ever gets added) caliber security pistols. Balance between capacity and power.
|
/obj/item/projectile/bullet/pistol/medium // .45 (and maybe .40 if it ever gets added) caliber security pistols. Balance between capacity and power.
|
||||||
fire_sound = 'sound/weapons/gunshot3.ogg' // Snappier sound.
|
fire_sound = 'sound/weapons/gunshot3.ogg' // Snappier sound.
|
||||||
damage = 25
|
damage = 25
|
||||||
|
hud_state = "pistol"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/medium/ap
|
/obj/item/projectile/bullet/pistol/medium/ap
|
||||||
damage = 20
|
damage = 20
|
||||||
armor_penetration = 15
|
armor_penetration = 15
|
||||||
|
hud_state = "pistol_light_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/medium/hp
|
/obj/item/projectile/bullet/pistol/medium/hp
|
||||||
damage = 30
|
damage = 30
|
||||||
armor_penetration = -50
|
armor_penetration = -50
|
||||||
|
hud_state = "pistol_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/strong // .357 and .44 caliber stuff. High power pistols like the Mateba or Desert Eagle. Sacrifice capacity for power.
|
/obj/item/projectile/bullet/pistol/strong // .357 and .44 caliber stuff. High power pistols like the Mateba or Desert Eagle. Sacrifice capacity for power.
|
||||||
fire_sound = 'sound/weapons/gunshot4.ogg'
|
fire_sound = 'sound/weapons/gunshot4.ogg'
|
||||||
damage = 60
|
damage = 60
|
||||||
|
hud_state = "pistol_heavy"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/rubber/strong // "Rubber" bullets for high power pistols.
|
/obj/item/projectile/bullet/pistol/rubber/strong // "Rubber" bullets for high power pistols.
|
||||||
fire_sound = 'sound/weapons/gunshot3.ogg' // Rubber shots have less powder, but these still have more punch than normal rubber shot.
|
fire_sound = 'sound/weapons/gunshot3.ogg' // Rubber shots have less powder, but these still have more punch than normal rubber shot.
|
||||||
@@ -128,6 +138,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = 0
|
||||||
check_armour = "melee"
|
check_armour = "melee"
|
||||||
|
hud_state = "pistol_special"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/rubber // "Rubber" bullets for all other pistols.
|
/obj/item/projectile/bullet/pistol/rubber // "Rubber" bullets for all other pistols.
|
||||||
name = "rubber bullet"
|
name = "rubber bullet"
|
||||||
@@ -136,6 +147,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = 0
|
||||||
check_armour = "melee"
|
check_armour = "melee"
|
||||||
|
hud_state = "pistol_special"
|
||||||
fire_sound ='sound/weapons/Gunshot_pathetic.ogg' // Rubber shots have less powder in the casing.
|
fire_sound ='sound/weapons/Gunshot_pathetic.ogg' // Rubber shots have less powder in the casing.
|
||||||
|
|
||||||
/* shotgun projectiles */
|
/* shotgun projectiles */
|
||||||
@@ -145,6 +157,8 @@
|
|||||||
fire_sound = 'sound/weapons/Gunshot_shotgun.ogg'
|
fire_sound = 'sound/weapons/Gunshot_shotgun.ogg'
|
||||||
damage = 50
|
damage = 50
|
||||||
armor_penetration = 20
|
armor_penetration = 20
|
||||||
|
hud_state = "shotgun_slug"
|
||||||
|
hud_state_empty = "shotgun_empty"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
|
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
|
||||||
name = "beanbag"
|
name = "beanbag"
|
||||||
@@ -153,6 +167,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = 0
|
||||||
check_armour = "melee"
|
check_armour = "melee"
|
||||||
|
hud_state = "shotgun_beanbag"
|
||||||
|
|
||||||
//Should do about 80 damage at 1 tile distance (adjacent), and 50 damage at 3 tiles distance.
|
//Should do about 80 damage at 1 tile distance (adjacent), and 50 damage at 3 tiles distance.
|
||||||
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
|
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
|
||||||
@@ -163,12 +178,14 @@
|
|||||||
pellets = 6
|
pellets = 6
|
||||||
range_step = 1
|
range_step = 1
|
||||||
spread_step = 10
|
spread_step = 10
|
||||||
|
hud_state = "shotgun_buckshot"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pellet/shotgun/flak
|
/obj/item/projectile/bullet/pellet/shotgun/flak
|
||||||
damage = 2 //The main weapon using these fires four at a time, usually with different destinations. Usually.
|
damage = 2 //The main weapon using these fires four at a time, usually with different destinations. Usually.
|
||||||
range_step = 2
|
range_step = 2
|
||||||
spread_step = 30
|
spread_step = 30
|
||||||
armor_penetration = 10
|
armor_penetration = 10
|
||||||
|
hud_state = "shotgun_flechette"
|
||||||
|
|
||||||
//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits. //Not currently used
|
//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits. //Not currently used
|
||||||
/obj/item/projectile/bullet/shotgun/ion
|
/obj/item/projectile/bullet/shotgun/ion
|
||||||
@@ -178,6 +195,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = 0
|
||||||
check_armour = "melee"
|
check_armour = "melee"
|
||||||
|
hud_state = "shotgun_ion"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -193,46 +211,57 @@
|
|||||||
fire_sound = 'sound/weapons/Gunshot_generic_rifle.ogg'
|
fire_sound = 'sound/weapons/Gunshot_generic_rifle.ogg'
|
||||||
armor_penetration = 15
|
armor_penetration = 15
|
||||||
penetrating = 1
|
penetrating = 1
|
||||||
|
hud_state = "rifle"
|
||||||
|
hud_state_empty = "rifle_empty"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a762
|
/obj/item/projectile/bullet/rifle/a762
|
||||||
fire_sound = 'sound/weapons/Gunshot_heavy.ogg'
|
fire_sound = 'sound/weapons/Gunshot_heavy.ogg'
|
||||||
damage = 35
|
damage = 35
|
||||||
|
hud_state = "rifle_heavy"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a762/sniper // Hitscan specifically for sniper ammo; to be implimented at a later date, probably for the SVD. -Ace
|
/obj/item/projectile/bullet/rifle/a762/sniper // Hitscan specifically for sniper ammo; to be implimented at a later date, probably for the SVD. -Ace
|
||||||
fire_sound = 'sound/weapons/Gunshot_sniper.ogg'
|
fire_sound = 'sound/weapons/Gunshot_sniper.ogg'
|
||||||
hitscan = 1 //so the ammo isn't useless as a sniper weapon
|
hitscan = 1 //so the ammo isn't useless as a sniper weapon
|
||||||
|
hud_state = "hivelo"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a762/ap
|
/obj/item/projectile/bullet/rifle/a762/ap
|
||||||
damage = 30
|
damage = 30
|
||||||
armor_penetration = 50 // At 30 or more armor, this will do more damage than standard rounds.
|
armor_penetration = 50 // At 30 or more armor, this will do more damage than standard rounds.
|
||||||
|
hud_state = "rifle_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a762/hp
|
/obj/item/projectile/bullet/rifle/a762/hp
|
||||||
damage = 40
|
damage = 40
|
||||||
armor_penetration = -50
|
armor_penetration = -50
|
||||||
penetrating = 0
|
penetrating = 0
|
||||||
|
hud_state = "hivelo_iff"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a762/hunter // Optimized for killing simple animals and not people, because Balance(tm)
|
/obj/item/projectile/bullet/rifle/a762/hunter // Optimized for killing simple animals and not people, because Balance(tm)
|
||||||
damage = 20
|
damage = 20
|
||||||
SA_bonus_damage = 50 // 70 total on animals.
|
SA_bonus_damage = 50 // 70 total on animals.
|
||||||
SA_vulnerability = SA_ANIMAL
|
SA_vulnerability = SA_ANIMAL
|
||||||
|
hud_state = "rifle_heavy"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a545
|
/obj/item/projectile/bullet/rifle/a545
|
||||||
fire_sound = 'sound/weapons/Gunshot_light.ogg'
|
fire_sound = 'sound/weapons/Gunshot_light.ogg'
|
||||||
damage = 25
|
damage = 25
|
||||||
|
hud_state = "rifle"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a545/ap
|
/obj/item/projectile/bullet/rifle/a545/ap
|
||||||
damage = 20
|
damage = 20
|
||||||
armor_penetration = 50 // At 40 or more armor, this will do more damage than standard rounds.
|
armor_penetration = 50 // At 40 or more armor, this will do more damage than standard rounds.
|
||||||
|
hud_state = "rifle_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a545/hp
|
/obj/item/projectile/bullet/rifle/a545/hp
|
||||||
damage = 35
|
damage = 35
|
||||||
armor_penetration = -50
|
armor_penetration = -50
|
||||||
penetrating = 0
|
penetrating = 0
|
||||||
|
hud_state = "hivelo_iff"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a545/hunter
|
/obj/item/projectile/bullet/rifle/a545/hunter
|
||||||
damage = 15
|
damage = 15
|
||||||
SA_bonus_damage = 35 // 50 total on animals.
|
SA_bonus_damage = 35 // 50 total on animals.
|
||||||
SA_vulnerability = SA_ANIMAL
|
SA_vulnerability = SA_ANIMAL
|
||||||
|
hud_state = "rifle_heavy"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a145 // 14.5<EFBFBD>114mm is bigger than a .50 BMG round.
|
/obj/item/projectile/bullet/rifle/a145 // 14.5<EFBFBD>114mm is bigger than a .50 BMG round.
|
||||||
fire_sound = 'sound/weapons/Gunshot_cannon.ogg' // This is literally an anti-tank rifle caliber. It better sound like a fucking cannon.
|
fire_sound = 'sound/weapons/Gunshot_cannon.ogg' // This is literally an anti-tank rifle caliber. It better sound like a fucking cannon.
|
||||||
@@ -242,6 +271,7 @@
|
|||||||
penetrating = 5
|
penetrating = 5
|
||||||
armor_penetration = 80
|
armor_penetration = 80
|
||||||
hitscan = 1 //so the PTR isn't useless as a sniper weapon
|
hitscan = 1 //so the PTR isn't useless as a sniper weapon
|
||||||
|
hud_state = "sniper"
|
||||||
|
|
||||||
icon_state = "bullet_alt"
|
icon_state = "bullet_alt"
|
||||||
tracer_type = /obj/effect/projectile/tracer/cannon
|
tracer_type = /obj/effect/projectile/tracer/cannon
|
||||||
@@ -252,10 +282,12 @@
|
|||||||
weaken = 0
|
weaken = 0
|
||||||
penetrating = 15
|
penetrating = 15
|
||||||
armor_penetration = 90
|
armor_penetration = 90
|
||||||
|
hud_state = "sniper_flak"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/rifle/a44rifle
|
/obj/item/projectile/bullet/rifle/a44rifle
|
||||||
fire_sound = 'sound/weapons/gunshot4.ogg'
|
fire_sound = 'sound/weapons/gunshot4.ogg'
|
||||||
damage = 50
|
damage = 50
|
||||||
|
hud_state = "revolver"
|
||||||
|
|
||||||
/* Mech rounds */
|
/* Mech rounds */
|
||||||
|
|
||||||
@@ -274,18 +306,21 @@
|
|||||||
name = "co bullet"
|
name = "co bullet"
|
||||||
damage = 20
|
damage = 20
|
||||||
damage_type = OXY
|
damage_type = OXY
|
||||||
|
hud_state = "pistol_tranq"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/cyanideround
|
/obj/item/projectile/bullet/cyanideround
|
||||||
name = "poison bullet"
|
name = "poison bullet"
|
||||||
damage = 40
|
damage = 40
|
||||||
damage_type = TOX
|
damage_type = TOX
|
||||||
|
hud_state = "pistol_tranq"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/burstbullet
|
/obj/item/projectile/bullet/burstbullet
|
||||||
name = "exploding bullet"
|
name = "exploding bullet"
|
||||||
fire_sound = 'sound/effects/Explosion1.ogg'
|
fire_sound = 'sound/effects/Explosion1.ogg'
|
||||||
damage = 20
|
damage = 20
|
||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
edge = 1
|
edge = TRUE
|
||||||
|
hud_state = "pistol_fire"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/burstbullet/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/bullet/burstbullet/on_hit(var/atom/target, var/blocked = 0)
|
||||||
if(isturf(target))
|
if(isturf(target))
|
||||||
@@ -301,6 +336,7 @@
|
|||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
incendiary = 0.5
|
incendiary = 0.5
|
||||||
flammability = 2
|
flammability = 2
|
||||||
|
hud_state = "pistol_fire"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/incendiary/flamethrower
|
/obj/item/projectile/bullet/incendiary/flamethrower
|
||||||
name = "ball of fire"
|
name = "ball of fire"
|
||||||
@@ -313,12 +349,14 @@
|
|||||||
agony = 30
|
agony = 30
|
||||||
range = 4
|
range = 4
|
||||||
vacuum_traversal = 0
|
vacuum_traversal = 0
|
||||||
|
hud_state = "flame"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/incendiary/flamethrower/large
|
/obj/item/projectile/bullet/incendiary/flamethrower/large
|
||||||
damage = 5
|
damage = 5
|
||||||
incendiary = 3
|
incendiary = 3
|
||||||
flammability = 2
|
flammability = 2
|
||||||
range = 6
|
range = 6
|
||||||
|
hud_state = "flame"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/incendiary/flamethrower/tiny
|
/obj/item/projectile/bullet/incendiary/flamethrower/tiny
|
||||||
damage = 2
|
damage = 2
|
||||||
@@ -328,11 +366,13 @@
|
|||||||
modifier_duration = 20 SECONDS
|
modifier_duration = 20 SECONDS
|
||||||
range = 6
|
range = 6
|
||||||
agony = 0
|
agony = 0
|
||||||
|
hud_state = "flame"
|
||||||
|
|
||||||
/* Practice rounds and blanks */
|
/* Practice rounds and blanks */
|
||||||
|
|
||||||
/obj/item/projectile/bullet/practice
|
/obj/item/projectile/bullet/practice
|
||||||
damage = 5
|
damage = 5
|
||||||
|
hud_state = "smg_light"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pistol/cap // Just the primer, such as a cap gun.
|
/obj/item/projectile/bullet/pistol/cap // Just the primer, such as a cap gun.
|
||||||
name = "cap"
|
name = "cap"
|
||||||
@@ -341,7 +381,8 @@
|
|||||||
damage = 0
|
damage = 0
|
||||||
nodamage = 1
|
nodamage = 1
|
||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = FALSE
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -356,7 +397,8 @@
|
|||||||
damage = 0
|
damage = 0
|
||||||
nodamage = 1
|
nodamage = 1
|
||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = 0
|
sharp = FALSE
|
||||||
|
hud_state = "smg_light"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/blank/cap/process()
|
/obj/item/projectile/bullet/blank/cap/process()
|
||||||
loc = null
|
loc = null
|
||||||
@@ -370,6 +412,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
sharp = FALSE
|
sharp = FALSE
|
||||||
silenced = TRUE
|
silenced = TRUE
|
||||||
|
hud_state = "pistol_light"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/pellet/shotgun/bb // Shotgun
|
/obj/item/projectile/bullet/pellet/shotgun/bb // Shotgun
|
||||||
name = "BB"
|
name = "BB"
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||||
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
||||||
hitsound = 'sound/weapons/zapbang.ogg'
|
hitsound = 'sound/weapons/zapbang.ogg'
|
||||||
|
hud_state = "plasma"
|
||||||
|
hud_state_empty = "battery_empty"
|
||||||
|
|
||||||
var/flash_strength = 10
|
var/flash_strength = 10
|
||||||
|
|
||||||
@@ -22,6 +24,7 @@
|
|||||||
var/flash_range = 0
|
var/flash_range = 0
|
||||||
var/brightness = 7
|
var/brightness = 7
|
||||||
var/light_colour = "#ffffff"
|
var/light_colour = "#ffffff"
|
||||||
|
hud_state = "grenade_dummy"
|
||||||
|
|
||||||
/obj/item/projectile/energy/flash/on_impact(var/atom/A)
|
/obj/item/projectile/energy/flash/on_impact(var/atom/A)
|
||||||
var/turf/T = flash_range? src.loc : get_turf(A)
|
var/turf/T = flash_range? src.loc : get_turf(A)
|
||||||
@@ -59,6 +62,7 @@
|
|||||||
flash_range = 1
|
flash_range = 1
|
||||||
brightness = 15
|
brightness = 15
|
||||||
flash_strength = 20
|
flash_strength = 20
|
||||||
|
hud_state = "grenade_dummy"
|
||||||
|
|
||||||
/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A)
|
/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A)
|
||||||
light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030")
|
light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030")
|
||||||
@@ -77,15 +81,18 @@
|
|||||||
light_range = 2
|
light_range = 2
|
||||||
light_power = 0.5
|
light_power = 0.5
|
||||||
light_color = "#FFFFFF"
|
light_color = "#FFFFFF"
|
||||||
|
hud_state = "taser"
|
||||||
//Damage will be handled on the MOB side, to prevent window shattering.
|
//Damage will be handled on the MOB side, to prevent window shattering.
|
||||||
|
|
||||||
/obj/item/projectile/energy/electrode/strong
|
/obj/item/projectile/energy/electrode/strong
|
||||||
agony = 55
|
agony = 55
|
||||||
|
hud_state = "taser"
|
||||||
|
|
||||||
/obj/item/projectile/energy/electrode/stunshot
|
/obj/item/projectile/energy/electrode/stunshot
|
||||||
name = "stunshot"
|
name = "stunshot"
|
||||||
damage = 5
|
damage = 5
|
||||||
agony = 80
|
agony = 80
|
||||||
|
hud_state = "taser"
|
||||||
|
|
||||||
/obj/item/projectile/energy/declone
|
/obj/item/projectile/energy/declone
|
||||||
name = "declone"
|
name = "declone"
|
||||||
@@ -100,6 +107,7 @@
|
|||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
hud_state = "plasma_pistol"
|
||||||
|
|
||||||
/obj/item/projectile/energy/excavate
|
/obj/item/projectile/energy/excavate
|
||||||
name = "kinetic blast"
|
name = "kinetic blast"
|
||||||
@@ -113,6 +121,7 @@
|
|||||||
|
|
||||||
vacuum_traversal = 0
|
vacuum_traversal = 0
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
hud_state = "plasma_blast"
|
||||||
|
|
||||||
/obj/item/projectile/energy/dart
|
/obj/item/projectile/energy/dart
|
||||||
name = "dart"
|
name = "dart"
|
||||||
@@ -121,6 +130,7 @@
|
|||||||
damage_type = TOX
|
damage_type = TOX
|
||||||
agony = 120
|
agony = 120
|
||||||
check_armour = "energy"
|
check_armour = "energy"
|
||||||
|
hud_state = "pistol_tranq"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -131,10 +141,12 @@
|
|||||||
damage_type = TOX
|
damage_type = TOX
|
||||||
agony = 40
|
agony = 40
|
||||||
stutter = 10
|
stutter = 10
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/energy/bolt/large
|
/obj/item/projectile/energy/bolt/large
|
||||||
name = "largebolt"
|
name = "largebolt"
|
||||||
damage = 20
|
damage = 20
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/energy/acid //Slightly up-gunned (Read: The thing does agony and checks bio resist) variant of the simple alien mob's projectile, for queens and sentinels.
|
/obj/item/projectile/energy/acid //Slightly up-gunned (Read: The thing does agony and checks bio resist) variant of the simple alien mob's projectile, for queens and sentinels.
|
||||||
name = "acidic spit"
|
name = "acidic spit"
|
||||||
@@ -155,6 +167,7 @@
|
|||||||
agony = 80
|
agony = 80
|
||||||
check_armour = "bio"
|
check_armour = "bio"
|
||||||
armor_penetration = 25 // It's acid-based
|
armor_penetration = 25 // It's acid-based
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -164,6 +177,7 @@
|
|||||||
damage = 20
|
damage = 20
|
||||||
damage_type = BIOACID
|
damage_type = BIOACID
|
||||||
agony = 20
|
agony = 20
|
||||||
|
hud_state = "electrothermal"
|
||||||
check_armour = "bio"
|
check_armour = "bio"
|
||||||
armor_penetration = 25 // It's acid-based
|
armor_penetration = 25 // It's acid-based
|
||||||
|
|
||||||
@@ -193,6 +207,7 @@
|
|||||||
light_power = 0.5
|
light_power = 0.5
|
||||||
light_color = "#33CC00"
|
light_color = "#33CC00"
|
||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
hud_state = "plasma_rifle"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -206,6 +221,7 @@
|
|||||||
agony = 55
|
agony = 55
|
||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
vacuum_traversal = 0 //Projectile disappears in empty space
|
vacuum_traversal = 0 //Projectile disappears in empty space
|
||||||
|
hud_state = "plasma_rifle_blast"
|
||||||
|
|
||||||
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
|
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
|
||||||
|
|
||||||
@@ -250,6 +266,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/pulse
|
muzzle_type = /obj/effect/projectile/muzzle/pulse
|
||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
hud_state = "plasma_sphere"
|
||||||
|
|
||||||
/obj/item/projectile/energy/phase
|
/obj/item/projectile/energy/phase
|
||||||
name = "phase wave"
|
name = "phase wave"
|
||||||
@@ -258,17 +275,20 @@
|
|||||||
range = 6
|
range = 6
|
||||||
damage = 5
|
damage = 5
|
||||||
SA_bonus_damage = 45 // 50 total on animals
|
SA_bonus_damage = 45 // 50 total on animals
|
||||||
SA_vulnerability = SA_ANIMAL
|
hud_state = "laser_heat"
|
||||||
|
|
||||||
/obj/item/projectile/energy/phase/light
|
/obj/item/projectile/energy/phase/light
|
||||||
range = 4
|
range = 4
|
||||||
SA_bonus_damage = 35 // 40 total on animals
|
SA_bonus_damage = 35 // 40 total on animals
|
||||||
|
hud_state = "laser_heat"
|
||||||
|
|
||||||
/obj/item/projectile/energy/phase/heavy
|
/obj/item/projectile/energy/phase/heavy
|
||||||
range = 8
|
range = 8
|
||||||
SA_bonus_damage = 55 // 60 total on animals
|
SA_bonus_damage = 55 // 60 total on animals
|
||||||
|
hud_state = "laser_heat"
|
||||||
|
|
||||||
/obj/item/projectile/energy/phase/heavy/cannon
|
/obj/item/projectile/energy/phase/heavy/cannon
|
||||||
range = 10
|
range = 10
|
||||||
damage = 15
|
damage = 15
|
||||||
SA_bonus_damage = 60 // 75 total on animals
|
SA_bonus_damage = 60 // 75 total on animals
|
||||||
|
hud_state = "laser_heat"
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
icon_state = "missile"
|
icon_state = "missile"
|
||||||
damage = 30 //Meaty whack. *Chuckles*
|
damage = 30 //Meaty whack. *Chuckles*
|
||||||
does_spin = 0
|
does_spin = 0
|
||||||
|
hud_state = "rocket_he"
|
||||||
|
hud_state_empty = "rocket_empty"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/srmrocket/on_hit(atom/target, blocked=0)
|
/obj/item/projectile/bullet/srmrocket/on_hit(atom/target, blocked=0)
|
||||||
if(!isliving(target)) //if the target isn't alive, so is a wall or something
|
if(!isliving(target)) //if the target isn't alive, so is a wall or something
|
||||||
@@ -24,6 +26,7 @@
|
|||||||
|
|
||||||
/obj/item/projectile/bullet/srmrocket/weak //Used in the jury rigged one.
|
/obj/item/projectile/bullet/srmrocket/weak //Used in the jury rigged one.
|
||||||
damage = 10
|
damage = 10
|
||||||
|
hud_state = "rocket_he"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/srmrocket/weak/on_hit(atom/target, blocked=0)
|
/obj/item/projectile/bullet/srmrocket/weak/on_hit(atom/target, blocked=0)
|
||||||
explosion(target, 0, 0, 2, 4)//No need to have a question.
|
explosion(target, 0, 0, 2, 4)//No need to have a question.
|
||||||
|
|||||||
@@ -8,12 +8,14 @@
|
|||||||
weaken = 1
|
weaken = 1
|
||||||
penetrating = 5
|
penetrating = 5
|
||||||
armor_penetration = 70
|
armor_penetration = 70
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/slug
|
/obj/item/projectile/bullet/magnetic/slug
|
||||||
name = "slug"
|
name = "slug"
|
||||||
icon_state = "gauss_silenced"
|
icon_state = "gauss_silenced"
|
||||||
damage = 75
|
damage = 75
|
||||||
armor_penetration = 90
|
armor_penetration = 90
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/flechette
|
/obj/item/projectile/bullet/magnetic/flechette
|
||||||
name = "flechette"
|
name = "flechette"
|
||||||
@@ -21,6 +23,7 @@
|
|||||||
fire_sound = 'sound/weapons/rapidslice.ogg'
|
fire_sound = 'sound/weapons/rapidslice.ogg'
|
||||||
damage = 20
|
damage = 20
|
||||||
armor_penetration = 100
|
armor_penetration = 100
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/flechette/small
|
/obj/item/projectile/bullet/magnetic/flechette/small
|
||||||
name = "small flechette"
|
name = "small flechette"
|
||||||
@@ -28,12 +31,14 @@
|
|||||||
fire_sound = 'sound/weapons/rapidslice.ogg'
|
fire_sound = 'sound/weapons/rapidslice.ogg'
|
||||||
damage = 12
|
damage = 12
|
||||||
armor_penetration = 100
|
armor_penetration = 100
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/flechette/hunting
|
/obj/item/projectile/bullet/magnetic/flechette/hunting
|
||||||
name = "shredder slug"
|
name = "shredder slug"
|
||||||
armor_penetration = 30
|
armor_penetration = 30
|
||||||
SA_bonus_damage = 40
|
SA_bonus_damage = 40
|
||||||
SA_vulnerability = SA_ANIMAL
|
SA_vulnerability = SA_ANIMAL
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/heated
|
/obj/item/projectile/bullet/magnetic/heated
|
||||||
name = "slug"
|
name = "slug"
|
||||||
@@ -45,6 +50,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
armor_penetration = 40
|
armor_penetration = 40
|
||||||
penetrating = 1
|
penetrating = 1
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/heated/weak
|
/obj/item/projectile/bullet/magnetic/heated/weak
|
||||||
icon_state = "gauss_silenced"
|
icon_state = "gauss_silenced"
|
||||||
@@ -53,6 +59,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
armor_penetration = 30
|
armor_penetration = 30
|
||||||
penetrating = 0
|
penetrating = 0
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/fuelrod
|
/obj/item/projectile/bullet/magnetic/fuelrod
|
||||||
name = "fuel rod"
|
name = "fuel rod"
|
||||||
@@ -67,6 +74,7 @@
|
|||||||
embed_chance = 0
|
embed_chance = 0
|
||||||
armor_penetration = 40
|
armor_penetration = 40
|
||||||
range = 20
|
range = 20
|
||||||
|
hud_state = "rocket_he"
|
||||||
|
|
||||||
var/searing = 0 //Does this fuelrod ignore shields?
|
var/searing = 0 //Does this fuelrod ignore shields?
|
||||||
var/detonate_travel = 0 //Will this fuelrod explode when it reaches maximum distance?
|
var/detonate_travel = 0 //Will this fuelrod explode when it reaches maximum distance?
|
||||||
@@ -113,6 +121,7 @@
|
|||||||
flammability = -1
|
flammability = -1
|
||||||
armor_penetration = 50
|
armor_penetration = 50
|
||||||
penetrating = 3
|
penetrating = 3
|
||||||
|
hud_state = "rocket_ap"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/fuelrod/phoron
|
/obj/item/projectile/bullet/magnetic/fuelrod/phoron
|
||||||
name = "blazing fuel rod"
|
name = "blazing fuel rod"
|
||||||
@@ -124,6 +133,7 @@
|
|||||||
penetrating = 5
|
penetrating = 5
|
||||||
irradiate = 20
|
irradiate = 20
|
||||||
detonate_mob = 1
|
detonate_mob = 1
|
||||||
|
hud_state = "rocket_fire"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter
|
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter
|
||||||
name = "painfully incandescent fuel rod"
|
name = "painfully incandescent fuel rod"
|
||||||
@@ -140,6 +150,7 @@
|
|||||||
detonate_travel = 1
|
detonate_travel = 1
|
||||||
detonate_mob = 1
|
detonate_mob = 1
|
||||||
energetic_impact = 1
|
energetic_impact = 1
|
||||||
|
hud_state = "rocket_thermobaric"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
|
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
|
||||||
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
|
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
|
||||||
@@ -160,6 +171,7 @@
|
|||||||
check_armour = "melee"
|
check_armour = "melee"
|
||||||
irradiate = 20
|
irradiate = 20
|
||||||
range = 6
|
range = 6
|
||||||
|
hud_state = "plasma_rifle_blast"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/magnetic/bore/Initialize(loc, range_mod) // i'm gonna be real honest i dunno how this works but it does
|
/obj/item/projectile/bullet/magnetic/bore/Initialize(loc, range_mod) // i'm gonna be real honest i dunno how this works but it does
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
light_range = 2
|
light_range = 2
|
||||||
light_power = 0.5
|
light_power = 0.5
|
||||||
light_color = "#55AAFF"
|
light_color = "#55AAFF"
|
||||||
|
hud_state = "plasma_blast"
|
||||||
|
hud_state_empty = "battery_empty"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
|
||||||
@@ -41,8 +43,9 @@
|
|||||||
icon_state= "bolter"
|
icon_state= "bolter"
|
||||||
damage = 50
|
damage = 50
|
||||||
check_armour = "bullet"
|
check_armour = "bullet"
|
||||||
sharp = 1
|
sharp = TRUE
|
||||||
edge = 1
|
edge = TRUE
|
||||||
|
hud_state = "rocket_fire"
|
||||||
|
|
||||||
/obj/item/projectile/bullet/gyro/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/bullet/gyro/on_hit(var/atom/target, var/blocked = 0)
|
||||||
explosion(target, -1, 0, 2)
|
explosion(target, -1, 0, 2)
|
||||||
@@ -62,6 +65,7 @@
|
|||||||
light_power = 0.5
|
light_power = 0.5
|
||||||
light_color = "#55AAFF"
|
light_color = "#55AAFF"
|
||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
hud_state = "water"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -93,6 +97,7 @@
|
|||||||
/obj/item/projectile/temp/hot
|
/obj/item/projectile/temp/hot
|
||||||
name = "heat beam"
|
name = "heat beam"
|
||||||
target_temperature = 1000
|
target_temperature = 1000
|
||||||
|
hud_state = "flame"
|
||||||
|
|
||||||
combustion = TRUE
|
combustion = TRUE
|
||||||
|
|
||||||
@@ -104,6 +109,7 @@
|
|||||||
damage_type = BRUTE
|
damage_type = BRUTE
|
||||||
nodamage = 1
|
nodamage = 1
|
||||||
check_armour = "bullet"
|
check_armour = "bullet"
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
/obj/item/projectile/meteor/Bump(atom/A as mob|obj|turf|area)
|
/obj/item/projectile/meteor/Bump(atom/A as mob|obj|turf|area)
|
||||||
if(A == firer)
|
if(A == firer)
|
||||||
@@ -140,6 +146,7 @@
|
|||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/energy/floramut/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/energy/floramut/on_hit(var/atom/target, var/blocked = 0)
|
||||||
var/mob/living/M = target
|
var/mob/living/M = target
|
||||||
@@ -182,6 +189,7 @@
|
|||||||
nodamage = 1
|
nodamage = 1
|
||||||
check_armour = "energy"
|
check_armour = "energy"
|
||||||
var/decl/plantgene/gene = null
|
var/decl/plantgene/gene = null
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/energy/florayield
|
/obj/item/projectile/energy/florayield
|
||||||
name = "beta somatoray"
|
name = "beta somatoray"
|
||||||
@@ -195,6 +203,7 @@
|
|||||||
light_power = 0.5
|
light_power = 0.5
|
||||||
light_color = "#FFFFFF"
|
light_color = "#FFFFFF"
|
||||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/energy/florayield/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/energy/florayield/on_hit(var/atom/target, var/blocked = 0)
|
||||||
var/mob/living/M = target
|
var/mob/living/M = target
|
||||||
@@ -212,6 +221,7 @@
|
|||||||
name = "flayer ray"
|
name = "flayer ray"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
hud_state = "electrothermal"
|
||||||
|
|
||||||
/obj/item/projectile/beam/mindflayer/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/beam/mindflayer/on_hit(var/atom/target, var/blocked = 0)
|
||||||
if(ishuman(target))
|
if(ishuman(target))
|
||||||
@@ -227,6 +237,7 @@
|
|||||||
nodamage = 1
|
nodamage = 1
|
||||||
damage_type = HALLOSS
|
damage_type = HALLOSS
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/bullet
|
muzzle_type = /obj/effect/projectile/muzzle/bullet
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
/obj/item/projectile/bola
|
/obj/item/projectile/bola
|
||||||
name = "bola"
|
name = "bola"
|
||||||
@@ -235,6 +246,7 @@
|
|||||||
embed_chance = 0 //Nada.
|
embed_chance = 0 //Nada.
|
||||||
damage_type = HALLOSS
|
damage_type = HALLOSS
|
||||||
muzzle_type = null
|
muzzle_type = null
|
||||||
|
hud_state = "monkey"
|
||||||
|
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
@@ -254,7 +266,7 @@
|
|||||||
embed_chance = 0 //Nada.
|
embed_chance = 0 //Nada.
|
||||||
damage_type = BRUTE
|
damage_type = BRUTE
|
||||||
muzzle_type = null
|
muzzle_type = null
|
||||||
|
hud_state = "monkey"
|
||||||
combustion = FALSE
|
combustion = FALSE
|
||||||
|
|
||||||
/obj/item/projectile/webball/on_hit(var/atom/target, var/blocked = 0)
|
/obj/item/projectile/webball/on_hit(var/atom/target, var/blocked = 0)
|
||||||
@@ -276,6 +288,7 @@
|
|||||||
light_range = 4
|
light_range = 4
|
||||||
light_power = 3
|
light_power = 3
|
||||||
light_color = "#3300ff"
|
light_color = "#3300ff"
|
||||||
|
hud_state = "alloy_spike"
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/tungsten
|
muzzle_type = /obj/effect/projectile/muzzle/tungsten
|
||||||
tracer_type = /obj/effect/projectile/tracer/tungsten
|
tracer_type = /obj/effect/projectile/tracer/tungsten
|
||||||
|
|||||||
BIN
icons/mob/screen_ammo.dmi
Normal file
BIN
icons/mob/screen_ammo.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Reference in New Issue
Block a user