Merge remote-tracking branch 'citadel/master' into mobility_flags
This commit is contained in:
@@ -267,7 +267,6 @@
|
||||
fire_delay = 0
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
actions_types = list()
|
||||
pb_knockback = 2
|
||||
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
@@ -273,7 +273,6 @@
|
||||
"Maple" = "dshotgun-l",
|
||||
"Rosewood" = "dshotgun-p"
|
||||
)
|
||||
pb_knockback = 3 // it's a super shotgun!
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
pb_knockback = 2
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
item_flags = NONE
|
||||
casing_ejector = FALSE
|
||||
can_suppress = FALSE
|
||||
pb_knockback = 0
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
|
||||
..()
|
||||
|
||||
@@ -1,236 +1,236 @@
|
||||
/obj/item/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
|
||||
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/stock_parts/cell
|
||||
var/modifystate = 0
|
||||
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
|
||||
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
|
||||
var/can_charge = 1 //Can it be charged in a recharger?
|
||||
var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_icon()?
|
||||
var/charge_sections = 4
|
||||
ammo_x_offset = 2
|
||||
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
|
||||
var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon
|
||||
var/selfcharge = EGUN_NO_SELFCHARGE // EGUN_SELFCHARGE if true, EGUN_SELFCHARGE_BORG drains the cyborg's cell to recharge its own
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = FALSE //whether the gun drains the cyborg user's cell instead, not to be confused with EGUN_SELFCHARGE_BORG
|
||||
var/dead_cell = FALSE //set to true so the gun is given an empty cell
|
||||
|
||||
/obj/item/gun/energy/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_CONTENTS))
|
||||
cell.use(round(cell.charge / severity))
|
||||
chambered = null //we empty the chamber
|
||||
recharge_newshot() //and try to charge a new shot
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/gun/energy/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
else
|
||||
cell = new(src)
|
||||
if(!dead_cell)
|
||||
cell.give(cell.maxcharge)
|
||||
update_ammo_types()
|
||||
recharge_newshot(TRUE)
|
||||
if(selfcharge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/proc/update_ammo_types()
|
||||
var/obj/item/ammo_casing/energy/shot
|
||||
for (var/i = 1, i <= ammo_type.len, i++)
|
||||
var/shottype = ammo_type[i]
|
||||
shot = new shottype(src)
|
||||
ammo_type[i] = shot
|
||||
shot = ammo_type[select]
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process()
|
||||
if(selfcharge && cell?.charge < cell.maxcharge)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
return
|
||||
charge_tick = 0
|
||||
if(selfcharge == EGUN_SELFCHARGE_BORG)
|
||||
var/atom/owner = loc
|
||||
if(istype(owner, /obj/item/robot_module))
|
||||
owner = owner.loc
|
||||
if(!iscyborg(owner))
|
||||
return
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
if(!R.cell?.use(100))
|
||||
return
|
||||
cell.give(100)
|
||||
if(!chambered) //if empty chamber we try to charge a new shot
|
||||
recharge_newshot(TRUE)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/attack_self(mob/living/user as mob)
|
||||
if(ammo_type.len > 1)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return !QDELETED(cell) ? (cell.charge >= shot.e_cost) : FALSE
|
||||
|
||||
/obj/item/gun/energy/recharge_newshot(no_cyborg_drain)
|
||||
if (!ammo_type || !cell)
|
||||
return
|
||||
if(use_cyborg_cell && !no_cyborg_drain)
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||
cell.give(shot.e_cost) //... to recharge the shot
|
||||
if(!chambered)
|
||||
var/obj/item/ammo_casing/energy/AC = ammo_type[select]
|
||||
if(cell.charge >= AC.e_cost) //if there's enough power in the cell cell...
|
||||
chambered = AC //...prepare a new shot based on the current ammo type selected
|
||||
if(!chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/energy/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
var/obj/item/ammo_casing/energy/shot = chambered
|
||||
cell.use(shot.e_cost)//... drain the cell cell
|
||||
chambered = null //either way, released the prepared shot
|
||||
recharge_newshot() //try to charge a new shot
|
||||
|
||||
/obj/item/gun/energy/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(!chambered && can_shoot())
|
||||
process_chamber() // If the gun was drained and then recharged, load a new shot.
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process_burst(mob/living/user, atom/target, message = TRUE, params = null, zone_override="", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0)
|
||||
if(!chambered && can_shoot())
|
||||
process_chamber() // Ditto.
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/proc/select_fire(mob/living/user)
|
||||
select++
|
||||
if (select > ammo_type.len)
|
||||
select = 1
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
if (shot.select_name)
|
||||
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
|
||||
chambered = null
|
||||
recharge_newshot(TRUE)
|
||||
update_icon(TRUE)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/update_icon(force_update)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
..()
|
||||
if(!automatic_charge_overlays)
|
||||
return
|
||||
var/ratio = can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
|
||||
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
|
||||
// TG issues #5361 & #47908
|
||||
if(ratio == old_ratio && !force_update)
|
||||
return
|
||||
old_ratio = ratio
|
||||
cut_overlays()
|
||||
var/iconState = "[icon_state]_charge"
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
add_overlay("[icon_state]_[shot.select_name]")
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
itemState += "[shot.select_name]"
|
||||
if(ratio == 0)
|
||||
add_overlay("[icon_state]_empty")
|
||||
else
|
||||
if(!shaded_charge)
|
||||
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
|
||||
for(var/i = ratio, i >= 1, i--)
|
||||
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
|
||||
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
|
||||
add_overlay(charge_overlay)
|
||||
else
|
||||
add_overlay("[icon_state]_charge[ratio]")
|
||||
if(itemState)
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/gun/energy/suicide_act(mob/living/user)
|
||||
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
user.visible_message("<span class='suicide'>[user] melts [user.p_their()] face off with [src]!</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
cell.use(shot.e_cost)
|
||||
update_icon()
|
||||
return(FIRELOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(src, "gun_dry_fire", 30, 1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("selfcharge")
|
||||
if(var_value)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/gun/energy/ignition_effect(atom/A, mob/living/user)
|
||||
if(!can_shoot() || !ammo_type[select])
|
||||
shoot_with_empty_chamber()
|
||||
. = ""
|
||||
else
|
||||
var/obj/item/ammo_casing/energy/E = ammo_type[select]
|
||||
var/obj/item/projectile/energy/BB = E.BB
|
||||
if(!BB)
|
||||
. = ""
|
||||
else if(BB.nodamage || !BB.damage || BB.damage_type == STAMINA)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but it doesn't do anything. Dumbass.</span>")
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
. = ""
|
||||
else if(BB.damage_type != BURN)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but only succeeds in utterly destroying it. Dumbass.</span>")
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
qdel(A)
|
||||
. = ""
|
||||
else
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
. = "<span class='danger'>[user] casually lights their [A.name] with [src]. Damn.</span>"
|
||||
/obj/item/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
|
||||
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/stock_parts/cell
|
||||
var/modifystate = 0
|
||||
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
|
||||
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
|
||||
var/can_charge = 1 //Can it be charged in a recharger?
|
||||
var/automatic_charge_overlays = TRUE //Do we handle overlays with base update_icon()?
|
||||
var/charge_sections = 4
|
||||
ammo_x_offset = 2
|
||||
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
|
||||
var/old_ratio = 0 // stores the gun's previous ammo "ratio" to see if it needs an updated icon
|
||||
var/selfcharge = EGUN_NO_SELFCHARGE // EGUN_SELFCHARGE if true, EGUN_SELFCHARGE_BORG drains the cyborg's cell to recharge its own
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = FALSE //whether the gun drains the cyborg user's cell instead, not to be confused with EGUN_SELFCHARGE_BORG
|
||||
var/dead_cell = FALSE //set to true so the gun is given an empty cell
|
||||
|
||||
/obj/item/gun/energy/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_CONTENTS))
|
||||
cell.use(round(cell.charge / severity))
|
||||
chambered = null //we empty the chamber
|
||||
recharge_newshot() //and try to charge a new shot
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/gun/energy/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
else
|
||||
cell = new(src)
|
||||
if(!dead_cell)
|
||||
cell.give(cell.maxcharge)
|
||||
update_ammo_types()
|
||||
recharge_newshot(TRUE)
|
||||
if(selfcharge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/proc/update_ammo_types()
|
||||
var/obj/item/ammo_casing/energy/shot
|
||||
for (var/i = 1, i <= ammo_type.len, i++)
|
||||
var/shottype = ammo_type[i]
|
||||
shot = new shottype(src)
|
||||
ammo_type[i] = shot
|
||||
shot = ammo_type[select]
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process()
|
||||
if(selfcharge && cell?.charge < cell.maxcharge)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
return
|
||||
charge_tick = 0
|
||||
if(selfcharge == EGUN_SELFCHARGE_BORG)
|
||||
var/atom/owner = loc
|
||||
if(istype(owner, /obj/item/robot_module))
|
||||
owner = owner.loc
|
||||
if(!iscyborg(owner))
|
||||
return
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
if(!R.cell?.use(100))
|
||||
return
|
||||
cell.give(100)
|
||||
if(!chambered) //if empty chamber we try to charge a new shot
|
||||
recharge_newshot(TRUE)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/attack_self(mob/living/user as mob)
|
||||
if(ammo_type.len > 1)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return !QDELETED(cell) ? (cell.charge >= shot.e_cost) : FALSE
|
||||
|
||||
/obj/item/gun/energy/recharge_newshot(no_cyborg_drain)
|
||||
if (!ammo_type || !cell)
|
||||
return
|
||||
if(use_cyborg_cell && !no_cyborg_drain)
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||
cell.give(shot.e_cost) //... to recharge the shot
|
||||
if(!chambered)
|
||||
var/obj/item/ammo_casing/energy/AC = ammo_type[select]
|
||||
if(cell.charge >= AC.e_cost) //if there's enough power in the cell cell...
|
||||
chambered = AC //...prepare a new shot based on the current ammo type selected
|
||||
if(!chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/energy/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
var/obj/item/ammo_casing/energy/shot = chambered
|
||||
cell.use(shot.e_cost)//... drain the cell cell
|
||||
chambered = null //either way, released the prepared shot
|
||||
recharge_newshot() //try to charge a new shot
|
||||
|
||||
/obj/item/gun/energy/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(!chambered && can_shoot())
|
||||
process_chamber() // If the gun was drained and then recharged, load a new shot.
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process_burst(mob/living/user, atom/target, message = TRUE, params = null, zone_override="", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0)
|
||||
if(!chambered && can_shoot())
|
||||
process_chamber() // Ditto.
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/proc/select_fire(mob/living/user)
|
||||
select++
|
||||
if (select > ammo_type.len)
|
||||
select = 1
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
if (shot.select_name)
|
||||
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
|
||||
chambered = null
|
||||
recharge_newshot(TRUE)
|
||||
update_icon(TRUE)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/update_icon(force_update)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
..()
|
||||
if(!automatic_charge_overlays)
|
||||
return
|
||||
var/ratio = can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
|
||||
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
|
||||
// TG issues #5361 & #47908
|
||||
if(ratio == old_ratio && !force_update)
|
||||
return
|
||||
old_ratio = ratio
|
||||
cut_overlays()
|
||||
var/iconState = "[icon_state]_charge"
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
add_overlay("[icon_state]_[shot.select_name]")
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
itemState += "[shot.select_name]"
|
||||
if(ratio == 0)
|
||||
add_overlay("[icon_state]_empty")
|
||||
else
|
||||
if(!shaded_charge)
|
||||
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
|
||||
for(var/i = ratio, i >= 1, i--)
|
||||
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
|
||||
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
|
||||
add_overlay(charge_overlay)
|
||||
else
|
||||
add_overlay("[icon_state]_charge[ratio]")
|
||||
if(itemState)
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/gun/energy/suicide_act(mob/living/user)
|
||||
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
user.visible_message("<span class='suicide'>[user] melts [user.p_their()] face off with [src]!</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
cell.use(shot.e_cost)
|
||||
update_icon()
|
||||
return(FIRELOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(src, "gun_dry_fire", 30, 1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("selfcharge")
|
||||
if(var_value)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/gun/energy/ignition_effect(atom/A, mob/living/user)
|
||||
if(!can_shoot() || !ammo_type[select])
|
||||
shoot_with_empty_chamber()
|
||||
. = ""
|
||||
else
|
||||
var/obj/item/ammo_casing/energy/E = ammo_type[select]
|
||||
var/obj/item/projectile/energy/BB = E.BB
|
||||
if(!BB)
|
||||
. = ""
|
||||
else if(BB.nodamage || !BB.damage || BB.damage_type == STAMINA)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but it doesn't do anything. Dumbass.</span>")
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
. = ""
|
||||
else if(BB.damage_type != BURN)
|
||||
user.visible_message("<span class='danger'>[user] tries to light [user.p_their()] [A.name] with [src], but only succeeds in utterly destroying it. Dumbass.</span>")
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
qdel(A)
|
||||
. = ""
|
||||
else
|
||||
playsound(user, E.fire_sound, 50, 1)
|
||||
playsound(user, BB.hitsound, 50, 1)
|
||||
cell.use(E.e_cost)
|
||||
. = "<span class='danger'>[user] casually lights their [A.name] with [src]. Damn.</span>"
|
||||
|
||||
@@ -112,7 +112,10 @@
|
||||
/obj/item/gun/energy/kinetic_accelerator/cyborg
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
max_mod_capacity = 80
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/minebot
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
@@ -280,7 +283,7 @@
|
||||
. += "<span class='notice'>Occupies <b>[cost]%</b> of mod capacity.</span>"
|
||||
|
||||
/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user))
|
||||
if(istype(A, /obj/item/gun/energy/kinetic_accelerator))
|
||||
install(A, user)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -1,225 +1,225 @@
|
||||
/obj/item/gun/energy/laser
|
||||
name = "laser gun"
|
||||
desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal."
|
||||
icon_state = "laser"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=2000)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/gun/energy/laser/practice
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
clumsy_check = 0
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/gun/energy/laser/retro
|
||||
name ="retro laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/laser/retro/old
|
||||
name ="laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/laser/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
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
|
||||
ammo_x_offset = 3
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/gun/energy/laser/carbine
|
||||
name = "laser carbine"
|
||||
desc = "A ruggedized laser carbine featuring much higher capacity and improved handling when compared to a normal laser gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
icon_state = "lasernew"
|
||||
item_state = "laser"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
cell_type = /obj/item/stock_parts/cell/lascarbine
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/gun/energy/laser/carbine/nopin
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/laser/captain/scattershot
|
||||
name = "scatter shot laser rifle"
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg
|
||||
can_charge = FALSE
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "laser_cyborg"
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 3
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg/mean
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/scatter
|
||||
name = "scatter laser gun"
|
||||
desc = "A laser gun equipped with a refraction kit that spreads bolts."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/gun/energy/laser/scatter/shotty
|
||||
name = "energy shotgun"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "cshotgun"
|
||||
item_state = "shotgun"
|
||||
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
|
||||
shaded_charge = 0
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
|
||||
|
||||
///Laser Cannon
|
||||
|
||||
/obj/item/gun/energy/lasercannon
|
||||
name = "accelerator laser cannon"
|
||||
desc = "An advanced laser cannon that does more damage the farther away the target is."
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/accelerator
|
||||
projectile_type = /obj/item/projectile/beam/laser/accelerator
|
||||
select_name = "accelerator"
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/projectile/beam/laser/accelerator
|
||||
name = "accelerator laser"
|
||||
icon_state = "scatterlaser"
|
||||
range = 255
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/beam/laser/accelerator/Range()
|
||||
..()
|
||||
damage += 7
|
||||
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
|
||||
|
||||
/obj/item/gun/energy/xray
|
||||
name = "\improper X-ray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated X-ray blasts that pass through multiple soft targets and heavier materials."
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/gun/energy/laser/bluetag
|
||||
name = "laser tag gun"
|
||||
icon_state = "bluetag"
|
||||
desc = "A retro laser gun modified to fire harmless blue beams of light. Sound effects included!"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
|
||||
item_flags = NONE
|
||||
clumsy_check = FALSE
|
||||
pin = /obj/item/firing_pin/tag/blue
|
||||
ammo_x_offset = 2
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/bluetag/hitscan
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag/hitscan)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag
|
||||
name = "laser tag gun"
|
||||
icon_state = "redtag"
|
||||
desc = "A retro laser gun modified to fire harmless beams red of light. Sound effects included!"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
|
||||
item_flags = NONE
|
||||
clumsy_check = FALSE
|
||||
pin = /obj/item/firing_pin/tag/red
|
||||
ammo_x_offset = 2
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain
|
||||
name = "\improper holy lasrifle"
|
||||
desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests."
|
||||
icon_state = "LaserAK"
|
||||
item_state = null
|
||||
force = 14
|
||||
pin = /obj/item/firing_pin/holy
|
||||
icon = 'modular_citadel/icons/obj/guns/VGguns.dmi'
|
||||
ammo_x_offset = 4
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy)
|
||||
lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi'
|
||||
righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi'
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
return
|
||||
|
||||
if(semicd)
|
||||
return
|
||||
|
||||
if(user == target)
|
||||
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
|
||||
|
||||
semicd = TRUE
|
||||
|
||||
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
|
||||
if(user)
|
||||
if(user == target)
|
||||
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
|
||||
else if(target && target.Adjacent(user))
|
||||
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
|
||||
semicd = FALSE
|
||||
return
|
||||
|
||||
semicd = FALSE
|
||||
|
||||
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
|
||||
|
||||
playsound('sound/weapons/dink.ogg', 30, 1)
|
||||
|
||||
if((iscultist(target)) || (is_servant_of_ratvar(target)))
|
||||
chambered.BB.damage *= 1500
|
||||
|
||||
else if(chambered && chambered.BB)
|
||||
chambered.BB.damage *= 5
|
||||
|
||||
process_fire(target, user, TRUE, params)
|
||||
/obj/item/gun/energy/laser
|
||||
name = "laser gun"
|
||||
desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal."
|
||||
icon_state = "laser"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=2000)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/gun/energy/laser/practice
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
clumsy_check = 0
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/gun/energy/laser/retro
|
||||
name ="retro laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/laser/retro/old
|
||||
name ="laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/laser/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
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
|
||||
ammo_x_offset = 3
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/gun/energy/laser/carbine
|
||||
name = "laser carbine"
|
||||
desc = "A ruggedized laser carbine featuring much higher capacity and improved handling when compared to a normal laser gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
icon_state = "lasernew"
|
||||
item_state = "laser"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
cell_type = /obj/item/stock_parts/cell/lascarbine
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/gun/energy/laser/carbine/nopin
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/laser/captain/scattershot
|
||||
name = "scatter shot laser rifle"
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg
|
||||
can_charge = FALSE
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "laser_cyborg"
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 3
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg/mean
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/scatter
|
||||
name = "scatter laser gun"
|
||||
desc = "A laser gun equipped with a refraction kit that spreads bolts."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/gun/energy/laser/scatter/shotty
|
||||
name = "energy shotgun"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "cshotgun"
|
||||
item_state = "shotgun"
|
||||
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
|
||||
shaded_charge = 0
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
|
||||
|
||||
///Laser Cannon
|
||||
|
||||
/obj/item/gun/energy/lasercannon
|
||||
name = "accelerator laser cannon"
|
||||
desc = "An advanced laser cannon that does more damage the farther away the target is."
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/accelerator
|
||||
projectile_type = /obj/item/projectile/beam/laser/accelerator
|
||||
select_name = "accelerator"
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/projectile/beam/laser/accelerator
|
||||
name = "accelerator laser"
|
||||
icon_state = "scatterlaser"
|
||||
range = 255
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/beam/laser/accelerator/Range()
|
||||
..()
|
||||
damage += 7
|
||||
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
|
||||
|
||||
/obj/item/gun/energy/xray
|
||||
name = "\improper X-ray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated X-ray blasts that pass through multiple soft targets and heavier materials."
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/gun/energy/laser/bluetag
|
||||
name = "laser tag gun"
|
||||
icon_state = "bluetag"
|
||||
desc = "A retro laser gun modified to fire harmless blue beams of light. Sound effects included!"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
|
||||
item_flags = NONE
|
||||
clumsy_check = FALSE
|
||||
pin = /obj/item/firing_pin/tag/blue
|
||||
ammo_x_offset = 2
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/bluetag/hitscan
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag/hitscan)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag
|
||||
name = "laser tag gun"
|
||||
icon_state = "redtag"
|
||||
desc = "A retro laser gun modified to fire harmless beams red of light. Sound effects included!"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
|
||||
item_flags = NONE
|
||||
clumsy_check = FALSE
|
||||
pin = /obj/item/firing_pin/tag/red
|
||||
ammo_x_offset = 2
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain
|
||||
name = "\improper holy lasrifle"
|
||||
desc = "A lasrifle from the old Imperium. This one seems to be blessed by techpriests."
|
||||
icon_state = "LaserAK"
|
||||
item_state = null
|
||||
force = 14
|
||||
pin = /obj/item/firing_pin/holy
|
||||
icon = 'modular_citadel/icons/obj/guns/VGguns.dmi'
|
||||
ammo_x_offset = 4
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan/holy)
|
||||
lefthand_file = 'modular_citadel/icons/mob/citadel/guns_lefthand.dmi'
|
||||
righthand_file = 'modular_citadel/icons/mob/citadel/guns_righthand.dmi'
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/hitscan/chaplain/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
return
|
||||
|
||||
if(semicd)
|
||||
return
|
||||
|
||||
if(user == target)
|
||||
target.visible_message("<span class='warning'>[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>You stick [src] in your mouth, ready to pull the trigger...</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
|
||||
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
|
||||
|
||||
semicd = TRUE
|
||||
|
||||
if(!bypass_timer && (!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
|
||||
if(user)
|
||||
if(user == target)
|
||||
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
|
||||
else if(target && target.Adjacent(user))
|
||||
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
|
||||
semicd = FALSE
|
||||
return
|
||||
|
||||
semicd = FALSE
|
||||
|
||||
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
|
||||
|
||||
playsound('sound/weapons/dink.ogg', 30, 1)
|
||||
|
||||
if((iscultist(target)) || (is_servant_of_ratvar(target)))
|
||||
chambered.BB.damage *= 1500
|
||||
|
||||
else if(chambered && chambered.BB)
|
||||
chambered.BB.damage *= 5
|
||||
|
||||
process_fire(target, user, TRUE, params)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/obj/item/gun/energy/e_gun/advtaser/mounted
|
||||
name = "mounted taser"
|
||||
desc = "An arm mounted dual-mode weapon that fires electrodes and disabler shots."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
item_state = "armcannonstun4"
|
||||
force = 5
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
can_flashlight = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
|
||||
|
||||
/obj/item/gun/energy/laser/mounted
|
||||
name = "mounted laser"
|
||||
desc = "An arm mounted cannon that fires lethal lasers."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "laser"
|
||||
item_state = "armcannonlase"
|
||||
force = 5
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
/obj/item/gun/energy/e_gun/advtaser/mounted
|
||||
name = "mounted taser"
|
||||
desc = "An arm mounted dual-mode weapon that fires electrodes and disabler shots."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
item_state = "armcannonstun4"
|
||||
force = 5
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
can_flashlight = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
|
||||
|
||||
/obj/item/gun/energy/laser/mounted
|
||||
name = "mounted laser"
|
||||
desc = "An arm mounted cannon that fires lethal lasers."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "laser"
|
||||
item_state = "armcannonlase"
|
||||
force = 5
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
/obj/item/gun/energy/pulse
|
||||
name = "pulse rifle"
|
||||
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
|
||||
icon_state = "pulse"
|
||||
item_state = null
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
modifystate = TRUE
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse"
|
||||
|
||||
/obj/item/gun/energy/pulse/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/pulse/prize
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
/obj/item/gun/energy/pulse/prize/Initialize()
|
||||
. = ..()
|
||||
GLOB.poi_list += src
|
||||
var/turf/T = get_turf(src)
|
||||
var/msg = "A pulse rifle prize has been created at [ADMIN_VERBOSEJMP(T)]"
|
||||
|
||||
message_admins(msg)
|
||||
log_game(msg)
|
||||
|
||||
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
|
||||
|
||||
/obj/item/gun/energy/pulse/prize/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/energy/pulse/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/carbine
|
||||
name = "pulse carbine"
|
||||
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol
|
||||
name = "pulse pistol"
|
||||
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty energy rifle built for pure destruction."
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
|
||||
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol/m1911
|
||||
name = "\improper M1911-P"
|
||||
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
|
||||
icon_state = "m1911"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
/obj/item/gun/energy/pulse
|
||||
name = "pulse rifle"
|
||||
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
|
||||
icon_state = "pulse"
|
||||
item_state = null
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
modifystate = TRUE
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse"
|
||||
|
||||
/obj/item/gun/energy/pulse/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/pulse/prize
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
/obj/item/gun/energy/pulse/prize/Initialize()
|
||||
. = ..()
|
||||
GLOB.poi_list += src
|
||||
var/turf/T = get_turf(src)
|
||||
var/msg = "A pulse rifle prize has been created at [ADMIN_VERBOSEJMP(T)]"
|
||||
|
||||
message_admins(msg)
|
||||
log_game(msg)
|
||||
|
||||
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
|
||||
|
||||
/obj/item/gun/energy/pulse/prize/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/energy/pulse/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/carbine
|
||||
name = "pulse carbine"
|
||||
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol
|
||||
name = "pulse pistol"
|
||||
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol/loyalpin
|
||||
pin = /obj/item/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty energy rifle built for pure destruction."
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
|
||||
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
|
||||
|
||||
/obj/item/gun/energy/pulse/pistol/m1911
|
||||
name = "\improper M1911-P"
|
||||
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
|
||||
icon_state = "m1911"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
|
||||
@@ -1,325 +1,325 @@
|
||||
/obj/item/gun/energy/ionrifle
|
||||
name = "ion rifle"
|
||||
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
|
||||
icon_state = "ionrifle"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
can_flashlight = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||
ammo_x_offset = 3
|
||||
flight_x_offset = 17
|
||||
flight_y_offset = 9
|
||||
|
||||
/obj/item/gun/energy/ionrifle/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/ionrifle/carbine
|
||||
name = "ion carbine"
|
||||
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
|
||||
icon_state = "ioncarbine"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
pin = null
|
||||
ammo_x_offset = 2
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 11
|
||||
|
||||
/obj/item/gun/energy/decloner
|
||||
name = "biological demolecularisor"
|
||||
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
||||
icon_state = "decloner"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||
pin = null
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/gun/energy/decloner/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
|
||||
add_overlay("decloner_spin")
|
||||
|
||||
/obj/item/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
icon_state = "flora"
|
||||
item_state = "gun"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
|
||||
modifystate = 1
|
||||
ammo_x_offset = 1
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/meteorgun
|
||||
name = "meteor gun"
|
||||
desc = "For the love of god, make sure you're aiming this the right way!"
|
||||
icon_state = "meteor_gun"
|
||||
item_state = "c20r"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
|
||||
cell_type = "/obj/item/stock_parts/cell/potato"
|
||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/meteorgun/pen
|
||||
name = "meteor pen"
|
||||
desc = "The pen is mightier than the sword."
|
||||
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 = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/gun/energy/mindflayer
|
||||
name = "\improper Mind Flayer"
|
||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow
|
||||
name = "mini energy crossbow"
|
||||
desc = "A weapon favored by syndicate stealth specialists."
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=2000)
|
||||
suppressed = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
||||
weapon_weight = WEAPON_LIGHT
|
||||
obj_flags = 0
|
||||
overheat_time = 20
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
can_flashlight = 0
|
||||
max_mod_capacity = 0
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween
|
||||
name = "candy corn crossbow"
|
||||
desc = "A weapon favored by Syndicate trick-or-treaters."
|
||||
icon_state = "crossbow_halloween"
|
||||
item_state = "crossbow"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
|
||||
name = "energy crossbow"
|
||||
desc = "A reverse engineered weapon using syndicate technology."
|
||||
icon_state = "crossbowlarge"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=4000)
|
||||
suppressed = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/plasmacutter
|
||||
name = "plasma cutter"
|
||||
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff."
|
||||
icon_state = "plasmacutter"
|
||||
item_state = "plasmacutter"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
|
||||
flags_1 = CONDUCT_1
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
force = 12
|
||||
sharpness = IS_SHARP
|
||||
can_charge = 0
|
||||
|
||||
heat = 3800
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
. = ..()
|
||||
if(cell)
|
||||
. += "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>"
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
|
||||
I.use(1)
|
||||
cell.give(1000)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else if(istype(I, /obj/item/stack/ore/plasma))
|
||||
I.use(1)
|
||||
cell.give(500)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
// Tool procs, in case plasma cutter is used as welder
|
||||
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
|
||||
if(!QDELETED(cell) && (cell.charge >= amount * 100))
|
||||
return TRUE
|
||||
|
||||
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/use(amount)
|
||||
return cell.use(amount * 100)
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/adv
|
||||
name = "advanced plasma cutter"
|
||||
icon_state = "adv_plasmacutter"
|
||||
force = 15
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector
|
||||
name = "bluespace wormhole projector"
|
||||
desc = "A projector that emits high density quantum-coupled bluespace beams."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
|
||||
item_state = null
|
||||
icon_state = "wormhole_projector"
|
||||
pin = null
|
||||
var/obj/effect/portal/p_blue
|
||||
var/obj/effect/portal/p_orange
|
||||
var/atmos_link = FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "[initial(icon_state)][select]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/update_ammo_types()
|
||||
. = ..()
|
||||
for(var/i in 1 to ammo_type.len)
|
||||
var/obj/item/ammo_casing/energy/wormhole/W = ammo_type[i]
|
||||
if(istype(W))
|
||||
W.gun = src
|
||||
var/obj/item/projectile/beam/wormhole/WH = W.BB
|
||||
if(istype(WH))
|
||||
WH.gun = src
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/process_chamber()
|
||||
..()
|
||||
select_fire()
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
if(P == p_blue)
|
||||
p_blue = null
|
||||
else if(P == p_orange)
|
||||
p_orange = null
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_blue_portal()
|
||||
if(istype(p_blue) && !QDELETED(p_blue))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_orange_portal()
|
||||
if(istype(p_orange) && !QDELETED(p_orange))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/crosslink()
|
||||
if(!has_blue_portal() && !has_orange_portal())
|
||||
return
|
||||
if(!has_blue_portal() && has_orange_portal())
|
||||
p_orange.link_portal(null)
|
||||
return
|
||||
if(!has_orange_portal() && has_blue_portal())
|
||||
p_blue.link_portal(null)
|
||||
return
|
||||
p_orange.link_portal(p_blue)
|
||||
p_blue.link_portal(p_orange)
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(target, src, 300, null, FALSE, null, atmos_link)
|
||||
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
|
||||
qdel(p_orange)
|
||||
p_orange = P
|
||||
P.icon_state = "portal1"
|
||||
else
|
||||
qdel(p_blue)
|
||||
p_blue = P
|
||||
crosslink()
|
||||
|
||||
/* 3d printer 'pseudo guns' for borgs */
|
||||
|
||||
/obj/item/gun/energy/printer
|
||||
name = "cyborg lmg"
|
||||
desc = "A LMG that fires 3D-printed flechettes. They are slowly resupplied using the cyborg's internal power source."
|
||||
icon_state = "l6closed0"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
cell_type = "/obj/item/stock_parts/cell/secborg"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet)
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/gun/energy/printer/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/printer/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
desc = "A gun that changes temperatures."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||
cell_type = "/obj/item/stock_parts/cell/high"
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/temperature/security
|
||||
name = "security temperature gun"
|
||||
desc = "A weapon that can only be used to its full potential by the truly robust."
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
/obj/item/gun/energy/laser/instakill
|
||||
name = "instakill rifle"
|
||||
icon_state = "instagib"
|
||||
item_state = "instagib"
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
|
||||
force = 60
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/red
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
|
||||
icon_state = "instagibred"
|
||||
item_state = "instagibred"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/red)
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/blue
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a blue design."
|
||||
icon_state = "instagibblue"
|
||||
item_state = "instagibblue"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/blue)
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/gravity_gun
|
||||
name = "one-point bluespace-gravitational manipulator"
|
||||
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
|
||||
item_state = "gravity_gun"
|
||||
icon_state = "gravity_gun"
|
||||
pin = null
|
||||
var/power = 4
|
||||
|
||||
/obj/item/gun/energy/gravity_gun/security
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
//Emitter Gun
|
||||
|
||||
/obj/item/gun/energy/emitter
|
||||
name = "Emitter Carbine"
|
||||
desc = "A small emitter fitted into a handgun case, do to size constraints and safety it can only shoot about ten times when fully charged."
|
||||
icon_state = "emitter_carbine"
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
cell_type = /obj/item/stock_parts/cell/super
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
|
||||
|
||||
/obj/item/gun/energy/emitter/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
|
||||
add_overlay("emitter_carbine_empty")
|
||||
else
|
||||
add_overlay("emitter_carbine")
|
||||
/obj/item/gun/energy/ionrifle
|
||||
name = "ion rifle"
|
||||
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
|
||||
icon_state = "ionrifle"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
can_flashlight = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||
ammo_x_offset = 3
|
||||
flight_x_offset = 17
|
||||
flight_y_offset = 9
|
||||
|
||||
/obj/item/gun/energy/ionrifle/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/ionrifle/carbine
|
||||
name = "ion carbine"
|
||||
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
|
||||
icon_state = "ioncarbine"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
pin = null
|
||||
ammo_x_offset = 2
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 11
|
||||
|
||||
/obj/item/gun/energy/decloner
|
||||
name = "biological demolecularisor"
|
||||
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
||||
icon_state = "decloner"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||
pin = null
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/gun/energy/decloner/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
|
||||
add_overlay("decloner_spin")
|
||||
|
||||
/obj/item/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
icon_state = "flora"
|
||||
item_state = "gun"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
|
||||
modifystate = 1
|
||||
ammo_x_offset = 1
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/meteorgun
|
||||
name = "meteor gun"
|
||||
desc = "For the love of god, make sure you're aiming this the right way!"
|
||||
icon_state = "meteor_gun"
|
||||
item_state = "c20r"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
|
||||
cell_type = "/obj/item/stock_parts/cell/potato"
|
||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/meteorgun/pen
|
||||
name = "meteor pen"
|
||||
desc = "The pen is mightier than the sword."
|
||||
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 = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/gun/energy/mindflayer
|
||||
name = "\improper Mind Flayer"
|
||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||
icon_state = "xray"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow
|
||||
name = "mini energy crossbow"
|
||||
desc = "A weapon favored by syndicate stealth specialists."
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=2000)
|
||||
suppressed = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
||||
weapon_weight = WEAPON_LIGHT
|
||||
obj_flags = 0
|
||||
overheat_time = 20
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
can_flashlight = 0
|
||||
max_mod_capacity = 0
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween
|
||||
name = "candy corn crossbow"
|
||||
desc = "A weapon favored by Syndicate trick-or-treaters."
|
||||
icon_state = "crossbow_halloween"
|
||||
item_state = "crossbow"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
|
||||
name = "energy crossbow"
|
||||
desc = "A reverse engineered weapon using syndicate technology."
|
||||
icon_state = "crossbowlarge"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=4000)
|
||||
suppressed = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/plasmacutter
|
||||
name = "plasma cutter"
|
||||
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff."
|
||||
icon_state = "plasmacutter"
|
||||
item_state = "plasmacutter"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
|
||||
flags_1 = CONDUCT_1
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
force = 12
|
||||
sharpness = IS_SHARP
|
||||
can_charge = 0
|
||||
|
||||
heat = 3800
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
. = ..()
|
||||
if(cell)
|
||||
. += "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>"
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
|
||||
I.use(1)
|
||||
cell.give(1000)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else if(istype(I, /obj/item/stack/ore/plasma))
|
||||
I.use(1)
|
||||
cell.give(500)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
// Tool procs, in case plasma cutter is used as welder
|
||||
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
|
||||
if(!QDELETED(cell) && (cell.charge >= amount * 100))
|
||||
return TRUE
|
||||
|
||||
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/use(amount)
|
||||
return cell.use(amount * 100)
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/adv
|
||||
name = "advanced plasma cutter"
|
||||
icon_state = "adv_plasmacutter"
|
||||
force = 15
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector
|
||||
name = "bluespace wormhole projector"
|
||||
desc = "A projector that emits high density quantum-coupled bluespace beams."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
|
||||
item_state = null
|
||||
icon_state = "wormhole_projector"
|
||||
pin = null
|
||||
var/obj/effect/portal/p_blue
|
||||
var/obj/effect/portal/p_orange
|
||||
var/atmos_link = FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "[initial(icon_state)][select]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/update_ammo_types()
|
||||
. = ..()
|
||||
for(var/i in 1 to ammo_type.len)
|
||||
var/obj/item/ammo_casing/energy/wormhole/W = ammo_type[i]
|
||||
if(istype(W))
|
||||
W.gun = src
|
||||
var/obj/item/projectile/beam/wormhole/WH = W.BB
|
||||
if(istype(WH))
|
||||
WH.gun = src
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/process_chamber()
|
||||
..()
|
||||
select_fire()
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
if(P == p_blue)
|
||||
p_blue = null
|
||||
else if(P == p_orange)
|
||||
p_orange = null
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_blue_portal()
|
||||
if(istype(p_blue) && !QDELETED(p_blue))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_orange_portal()
|
||||
if(istype(p_orange) && !QDELETED(p_orange))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/crosslink()
|
||||
if(!has_blue_portal() && !has_orange_portal())
|
||||
return
|
||||
if(!has_blue_portal() && has_orange_portal())
|
||||
p_orange.link_portal(null)
|
||||
return
|
||||
if(!has_orange_portal() && has_blue_portal())
|
||||
p_blue.link_portal(null)
|
||||
return
|
||||
p_orange.link_portal(p_blue)
|
||||
p_blue.link_portal(p_orange)
|
||||
|
||||
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(target, src, 300, null, FALSE, null, atmos_link)
|
||||
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
|
||||
qdel(p_orange)
|
||||
p_orange = P
|
||||
P.icon_state = "portal1"
|
||||
else
|
||||
qdel(p_blue)
|
||||
p_blue = P
|
||||
crosslink()
|
||||
|
||||
/* 3d printer 'pseudo guns' for borgs */
|
||||
|
||||
/obj/item/gun/energy/printer
|
||||
name = "cyborg lmg"
|
||||
desc = "A LMG that fires 3D-printed flechettes. They are slowly resupplied using the cyborg's internal power source."
|
||||
icon_state = "l6closed0"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
cell_type = "/obj/item/stock_parts/cell/secborg"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet)
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/gun/energy/printer/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/printer/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
desc = "A gun that changes temperatures."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||
cell_type = "/obj/item/stock_parts/cell/high"
|
||||
pin = null
|
||||
|
||||
/obj/item/gun/energy/temperature/security
|
||||
name = "security temperature gun"
|
||||
desc = "A weapon that can only be used to its full potential by the truly robust."
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
/obj/item/gun/energy/laser/instakill
|
||||
name = "instakill rifle"
|
||||
icon_state = "instagib"
|
||||
item_state = "instagib"
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
|
||||
force = 60
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/red
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
|
||||
icon_state = "instagibred"
|
||||
item_state = "instagibred"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/red)
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/blue
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a blue design."
|
||||
icon_state = "instagibblue"
|
||||
item_state = "instagibblue"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/blue)
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/gravity_gun
|
||||
name = "one-point bluespace-gravitational manipulator"
|
||||
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
|
||||
item_state = "gravity_gun"
|
||||
icon_state = "gravity_gun"
|
||||
pin = null
|
||||
var/power = 4
|
||||
|
||||
/obj/item/gun/energy/gravity_gun/security
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
//Emitter Gun
|
||||
|
||||
/obj/item/gun/energy/emitter
|
||||
name = "Emitter Carbine"
|
||||
desc = "A small emitter fitted into a handgun case, do to size constraints and safety it can only shoot about ten times when fully charged."
|
||||
icon_state = "emitter_carbine"
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
cell_type = /obj/item/stock_parts/cell/super
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
|
||||
|
||||
/obj/item/gun/energy/emitter/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
|
||||
add_overlay("emitter_carbine_empty")
|
||||
else
|
||||
add_overlay("emitter_carbine")
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
/obj/item/gun/energy/taser
|
||||
name = "taser gun"
|
||||
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
|
||||
icon_state = "taser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/tesla_revolver
|
||||
name = "tesla gun"
|
||||
desc = "An experimental gun based on an experimental engine, it's about as likely to kill its operator as it is the target."
|
||||
icon_state = "tesla"
|
||||
item_state = "tesla"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/tesla_revolver)
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser
|
||||
name = "hybrid taser"
|
||||
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The one contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
can_flashlight = FALSE
|
||||
can_charge = FALSE
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg/mean
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell."
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
can_charge = FALSE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
/obj/item/gun/energy/disabler/cyborg/mean
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell."
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
/obj/item/gun/energy/taser
|
||||
name = "taser gun"
|
||||
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
|
||||
icon_state = "taser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/tesla_revolver
|
||||
name = "tesla gun"
|
||||
desc = "An experimental gun based on an experimental engine, it's about as likely to kill its operator as it is the target."
|
||||
icon_state = "tesla"
|
||||
item_state = "tesla"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/tesla_revolver)
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser
|
||||
name = "hybrid taser"
|
||||
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The one contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
can_flashlight = FALSE
|
||||
can_charge = FALSE
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg/mean
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell."
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
|
||||
/obj/item/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This one contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "taser"
|
||||
can_charge = FALSE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler/secborg)
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
/obj/item/gun/energy/disabler/cyborg/mean
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell."
|
||||
use_cyborg_cell = TRUE
|
||||
selfcharge = EGUN_NO_SELFCHARGE
|
||||
|
||||
@@ -1,91 +1,91 @@
|
||||
/obj/item/gun/magic
|
||||
name = "staff of nothing"
|
||||
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/checks_antimagic = FALSE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
var/charge_tick = 0
|
||||
var/can_charge = 1
|
||||
var/ammo_type
|
||||
var/no_den_usage
|
||||
clumsy_check = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
pin = /obj/item/firing_pin/magic
|
||||
|
||||
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'
|
||||
|
||||
/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
|
||||
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/gun/magic/recharge_newshot()
|
||||
if (charges && chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/magic/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
charges--//... drain a charge
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/gun/magic/Initialize()
|
||||
. = ..()
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
if(can_charge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/gun/magic/process()
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges)
|
||||
return 0
|
||||
charge_tick = 0
|
||||
charges++
|
||||
if(charges == 1)
|
||||
recharge_newshot()
|
||||
return 1
|
||||
|
||||
/obj/item/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
|
||||
/obj/item/gun/magic/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
recharge_newshot()
|
||||
/obj/item/gun/magic
|
||||
name = "staff of nothing"
|
||||
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/checks_antimagic = FALSE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
var/charge_tick = 0
|
||||
var/can_charge = 1
|
||||
var/ammo_type
|
||||
var/no_den_usage
|
||||
clumsy_check = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
pin = /obj/item/firing_pin/magic
|
||||
|
||||
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'
|
||||
|
||||
/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE))
|
||||
to_chat(user, "<span class='warning'>Something is interfering with [src].</span>")
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/gun/magic/recharge_newshot()
|
||||
if (charges && chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/magic/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
charges--//... drain a charge
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/gun/magic/Initialize()
|
||||
. = ..()
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
if(can_charge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/gun/magic/process()
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges)
|
||||
return 0
|
||||
charge_tick = 0
|
||||
charges++
|
||||
if(charges == 1)
|
||||
recharge_newshot()
|
||||
return 1
|
||||
|
||||
/obj/item/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
|
||||
/obj/item/gun/magic/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
recharge_newshot()
|
||||
|
||||
@@ -1,177 +1,177 @@
|
||||
/obj/item/gun/magic/wand
|
||||
name = "wand of nothing"
|
||||
desc = "It's not just a stick, it's a MAGIC stick!"
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
icon_state = "nothingwand"
|
||||
item_state = "wand"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_charge = 0
|
||||
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
|
||||
var/variable_charges = 1
|
||||
|
||||
/obj/item/gun/magic/wand/Initialize()
|
||||
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
|
||||
if(prob(33))
|
||||
max_charges = CEILING(max_charges / 3, 1)
|
||||
else
|
||||
max_charges = CEILING(max_charges / 2, 1)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/magic/wand/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Has [charges] charge\s remaining."
|
||||
|
||||
/obj/item/gun/magic/wand/update_icon()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user)
|
||||
if(!charges)
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
if(target == user)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
zap_self(user)
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DEATH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/death
|
||||
name = "wand of death"
|
||||
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
||||
fire_sound = 'sound/magic/wandodeath.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/death
|
||||
icon_state = "deathwand"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
|
||||
..()
|
||||
to_chat(user, "<span class='warning'>You irradiate yourself with pure energy! \
|
||||
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
|
||||
</span>")
|
||||
user.adjustOxyLoss(500)
|
||||
charges--
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF HEALING
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection
|
||||
name = "wand of healing"
|
||||
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
||||
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||
fire_sound = 'sound/magic/staff_healing.ogg'
|
||||
icon_state = "revivewand"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
..()
|
||||
charges--
|
||||
if(user.anti_magic_check())
|
||||
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
|
||||
return
|
||||
user.revive(full_heal = 1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.regenerate_limbs()
|
||||
C.regenerate_organs()
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/debug //for testing
|
||||
name = "debug wand of healing"
|
||||
max_charges = 500
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF POLYMORPH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/polymorph
|
||||
name = "wand of polymorph"
|
||||
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
||||
ammo_type = /obj/item/ammo_casing/magic/change
|
||||
icon_state = "polywand"
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
|
||||
..() //because the user mob ceases to exists by the time wabbajack fully resolves
|
||||
wabbajack(user)
|
||||
charges--
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF TELEPORTATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/teleport
|
||||
name = "wand of teleportation"
|
||||
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
||||
ammo_type = /obj/item/ammo_casing/magic/teleport
|
||||
fire_sound = 'sound/magic/wand_teleport.ogg'
|
||||
icon_state = "telewand"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DOOR CREATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/door
|
||||
name = "wand of door creation"
|
||||
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
||||
ammo_type = /obj/item/ammo_casing/magic/door
|
||||
icon_state = "doorwand"
|
||||
fire_sound = 'sound/magic/staff_door.ogg'
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF FIREBALL
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/fireball
|
||||
name = "wand of fireball"
|
||||
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
||||
fire_sound = 'sound/magic/fireball.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/fireball
|
||||
icon_state = "firewand"
|
||||
max_charges = 8 //8, 4, 4, 3
|
||||
|
||||
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
/obj/item/gun/magic/wand
|
||||
name = "wand of nothing"
|
||||
desc = "It's not just a stick, it's a MAGIC stick!"
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
icon_state = "nothingwand"
|
||||
item_state = "wand"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_charge = 0
|
||||
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
|
||||
var/variable_charges = 1
|
||||
|
||||
/obj/item/gun/magic/wand/Initialize()
|
||||
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
|
||||
if(prob(33))
|
||||
max_charges = CEILING(max_charges / 3, 1)
|
||||
else
|
||||
max_charges = CEILING(max_charges / 2, 1)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/magic/wand/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Has [charges] charge\s remaining."
|
||||
|
||||
/obj/item/gun/magic/wand/update_icon()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user)
|
||||
if(!charges)
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
if(target == user)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
zap_self(user)
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DEATH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/death
|
||||
name = "wand of death"
|
||||
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
||||
fire_sound = 'sound/magic/wandodeath.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/death
|
||||
icon_state = "deathwand"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
|
||||
..()
|
||||
to_chat(user, "<span class='warning'>You irradiate yourself with pure energy! \
|
||||
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
|
||||
</span>")
|
||||
user.adjustOxyLoss(500)
|
||||
charges--
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF HEALING
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection
|
||||
name = "wand of healing"
|
||||
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
||||
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||
fire_sound = 'sound/magic/staff_healing.ogg'
|
||||
icon_state = "revivewand"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
..()
|
||||
charges--
|
||||
if(user.anti_magic_check())
|
||||
user.visible_message("<span class='warning'>[src] has no effect on [user]!</span>")
|
||||
return
|
||||
user.revive(full_heal = 1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.regenerate_limbs()
|
||||
C.regenerate_organs()
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
|
||||
/obj/item/gun/magic/wand/resurrection/debug //for testing
|
||||
name = "debug wand of healing"
|
||||
max_charges = 500
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF POLYMORPH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/polymorph
|
||||
name = "wand of polymorph"
|
||||
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
||||
ammo_type = /obj/item/ammo_casing/magic/change
|
||||
icon_state = "polywand"
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
|
||||
..() //because the user mob ceases to exists by the time wabbajack fully resolves
|
||||
wabbajack(user)
|
||||
charges--
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF TELEPORTATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/teleport
|
||||
name = "wand of teleportation"
|
||||
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
||||
ammo_type = /obj/item/ammo_casing/magic/teleport
|
||||
fire_sound = 'sound/magic/wand_teleport.ogg'
|
||||
icon_state = "telewand"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF DOOR CREATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/door
|
||||
name = "wand of door creation"
|
||||
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
||||
ammo_type = /obj/item/ammo_casing/magic/door
|
||||
icon_state = "doorwand"
|
||||
fire_sound = 'sound/magic/staff_door.ogg'
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
|
||||
charges--
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
//WAND OF FIREBALL
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/gun/magic/wand/fireball
|
||||
name = "wand of fireball"
|
||||
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
||||
fire_sound = 'sound/magic/fireball.ogg'
|
||||
ammo_type = /obj/item/ammo_casing/magic/fireball
|
||||
icon_state = "firewand"
|
||||
max_charges = 8 //8, 4, 4, 3
|
||||
|
||||
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +1,46 @@
|
||||
//his isn't a subtype of the syringe gun because the syringegun subtype is made to hold syringes
|
||||
//this is meant to hold reagents/obj/item/gun/syringe
|
||||
/obj/item/gun/chem
|
||||
name = "reagent gun"
|
||||
desc = "A Nanotrasen syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents."
|
||||
icon_state = "chemgun"
|
||||
item_state = "chemgun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
force = 4
|
||||
materials = list(MAT_METAL=2000)
|
||||
clumsy_check = FALSE
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
var/time_per_syringe = 250
|
||||
var/syringes_left = 4
|
||||
var/max_syringes = 4
|
||||
var/last_synth = 0
|
||||
|
||||
/obj/item/gun/chem/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/chemgun(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
create_reagents(100, OPENCONTAINER)
|
||||
|
||||
/obj/item/gun/chem/Destroy()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/chem/can_shoot()
|
||||
return syringes_left
|
||||
|
||||
/obj/item/gun/chem/process_chamber()
|
||||
if(chambered && !chambered.BB && syringes_left)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/chem/process()
|
||||
if(syringes_left >= max_syringes)
|
||||
return
|
||||
if(world.time < last_synth+time_per_syringe)
|
||||
return
|
||||
to_chat(loc, "<span class='warning'>You hear a click as [src] synthesizes a new dart.</span>")
|
||||
syringes_left++
|
||||
if(chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
//his isn't a subtype of the syringe gun because the syringegun subtype is made to hold syringes
|
||||
//this is meant to hold reagents/obj/item/gun/syringe
|
||||
/obj/item/gun/chem
|
||||
name = "reagent gun"
|
||||
desc = "A Nanotrasen syringe gun, modified to automatically synthesise chemical darts, and instead hold reagents."
|
||||
icon_state = "chemgun"
|
||||
item_state = "chemgun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
force = 4
|
||||
materials = list(MAT_METAL=2000)
|
||||
clumsy_check = FALSE
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
var/time_per_syringe = 250
|
||||
var/syringes_left = 4
|
||||
var/max_syringes = 4
|
||||
var/last_synth = 0
|
||||
|
||||
/obj/item/gun/chem/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/chemgun(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
create_reagents(100, OPENCONTAINER)
|
||||
|
||||
/obj/item/gun/chem/Destroy()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/chem/can_shoot()
|
||||
return syringes_left
|
||||
|
||||
/obj/item/gun/chem/process_chamber()
|
||||
if(chambered && !chambered.BB && syringes_left)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/chem/process()
|
||||
if(syringes_left >= max_syringes)
|
||||
return
|
||||
if(world.time < last_synth+time_per_syringe)
|
||||
return
|
||||
to_chat(loc, "<span class='warning'>You hear a click as [src] synthesizes a new dart.</span>")
|
||||
syringes_left++
|
||||
if(chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
last_synth = world.time
|
||||
@@ -1,46 +1,46 @@
|
||||
/obj/item/gun/grenadelauncher
|
||||
name = "grenade launcher"
|
||||
desc = "A terrible, terrible thing. It's really awful!"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "riotgun"
|
||||
item_state = "riotgun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
force = 5
|
||||
var/list/grenades = new/list()
|
||||
var/max_grenades = 3
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/obj/item/gun/grenadelauncher/examine(mob/user)
|
||||
. = ..()
|
||||
. += "[grenades.len] / [max_grenades] grenades loaded."
|
||||
|
||||
/obj/item/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
if((istype(I, /obj/item/grenade)))
|
||||
if(grenades.len < max_grenades)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
grenades += I
|
||||
to_chat(user, "<span class='notice'>You put the grenade in the grenade launcher.</span>")
|
||||
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] Grenades.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
|
||||
|
||||
/obj/item/gun/grenadelauncher/can_shoot()
|
||||
return grenades.len
|
||||
|
||||
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
|
||||
"<span class='danger'>You fire the grenade launcher!</span>")
|
||||
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.forceMove(user.loc)
|
||||
F.throw_at(target, 30, 2, user)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] fired a grenade ([F.name]) from a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
|
||||
log_game("[key_name(user)] fired a grenade ([F.name]) with a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
|
||||
F.active = 1
|
||||
F.icon_state = initial(F.icon_state) + "_active"
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
addtimer(CALLBACK(F, /obj/item/grenade.proc/prime), 15)
|
||||
/obj/item/gun/grenadelauncher
|
||||
name = "grenade launcher"
|
||||
desc = "A terrible, terrible thing. It's really awful!"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "riotgun"
|
||||
item_state = "riotgun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
force = 5
|
||||
var/list/grenades = new/list()
|
||||
var/max_grenades = 3
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/obj/item/gun/grenadelauncher/examine(mob/user)
|
||||
. = ..()
|
||||
. += "[grenades.len] / [max_grenades] grenades loaded."
|
||||
|
||||
/obj/item/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
if((istype(I, /obj/item/grenade)))
|
||||
if(grenades.len < max_grenades)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
grenades += I
|
||||
to_chat(user, "<span class='notice'>You put the grenade in the grenade launcher.</span>")
|
||||
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] Grenades.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
|
||||
|
||||
/obj/item/gun/grenadelauncher/can_shoot()
|
||||
return grenades.len
|
||||
|
||||
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
|
||||
"<span class='danger'>You fire the grenade launcher!</span>")
|
||||
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.forceMove(user.loc)
|
||||
F.throw_at(target, 30, 2, user)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] fired a grenade ([F.name]) from a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
|
||||
log_game("[key_name(user)] fired a grenade ([F.name]) with a grenade launcher ([src]) from [AREACOORD(user)] at [target] [AREACOORD(target)].")
|
||||
F.active = 1
|
||||
F.icon_state = initial(F.icon_state) + "_active"
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
addtimer(CALLBACK(F, /obj/item/grenade.proc/prime), 15)
|
||||
|
||||
@@ -1,135 +1,135 @@
|
||||
/obj/item/gun/medbeam
|
||||
name = "Medical Beamgun"
|
||||
desc = "Don't cross the streams!"
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
var/mob/living/current_target
|
||||
var/last_check = 0
|
||||
var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though
|
||||
var/max_range = 8
|
||||
var/active = 0
|
||||
var/datum/beam/current_beam = null
|
||||
var/mounted = 0 //Denotes if this is a handheld or mounted version
|
||||
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/gun/medbeam/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/medbeam/Destroy(mob/user)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
LoseTarget()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/medbeam/dropped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/gun/medbeam/equipped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/gun/medbeam/proc/LoseTarget()
|
||||
if(active)
|
||||
qdel(current_beam)
|
||||
current_beam = null
|
||||
active = 0
|
||||
on_beam_release(current_target)
|
||||
current_target = null
|
||||
|
||||
/obj/item/gun/medbeam/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(isliving(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
if(current_target)
|
||||
LoseTarget()
|
||||
if(!isliving(target))
|
||||
return
|
||||
|
||||
current_target = target
|
||||
active = TRUE
|
||||
current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical)
|
||||
INVOKE_ASYNC(current_beam, /datum/beam.proc/Start)
|
||||
|
||||
SSblackbox.record_feedback("tally", "gun_fired", 1, type)
|
||||
|
||||
/obj/item/gun/medbeam/process()
|
||||
|
||||
var/source = loc
|
||||
if(!mounted && !isliving(source))
|
||||
LoseTarget()
|
||||
return
|
||||
|
||||
if(!current_target)
|
||||
LoseTarget()
|
||||
return
|
||||
|
||||
if(world.time <= last_check+check_delay)
|
||||
return
|
||||
|
||||
last_check = world.time
|
||||
|
||||
if(get_dist(source, current_target)>max_range || !los_check(source, current_target))
|
||||
LoseTarget()
|
||||
if(isliving(source))
|
||||
to_chat(source, "<span class='warning'>You lose control of the beam!</span>")
|
||||
return
|
||||
|
||||
if(current_target)
|
||||
on_beam_tick(current_target)
|
||||
|
||||
/obj/item/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
|
||||
var/turf/user_turf = user.loc
|
||||
if(mounted)
|
||||
user_turf = get_turf(user)
|
||||
else if(!istype(user_turf))
|
||||
return 0
|
||||
var/obj/dummy = new(user_turf)
|
||||
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
|
||||
for(var/turf/turf in getline(user_turf,target))
|
||||
if(mounted && turf == user_turf)
|
||||
continue //Mechs are dense and thus fail the check
|
||||
if(turf.density)
|
||||
qdel(dummy)
|
||||
return 0
|
||||
for(var/atom/movable/AM in turf)
|
||||
if(!AM.CanPass(dummy,turf,1))
|
||||
qdel(dummy)
|
||||
return 0
|
||||
for(var/obj/effect/ebeam/medical/B in turf)// Don't cross the str-beams!
|
||||
if(B.owner.origin != current_beam.origin)
|
||||
explosion(B.loc,0,3,5,8)
|
||||
qdel(dummy)
|
||||
return 0
|
||||
qdel(dummy)
|
||||
return 1
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
|
||||
if(target.health != target.maxHealth)
|
||||
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
|
||||
target.adjustBruteLoss(-4)
|
||||
target.adjustFireLoss(-4)
|
||||
target.adjustToxLoss(-1, forced = TRUE)
|
||||
target.adjustOxyLoss(-1)
|
||||
return
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/effect/ebeam/medical
|
||||
name = "medical beam"
|
||||
|
||||
//////////////////////////////Mech Version///////////////////////////////
|
||||
/obj/item/gun/medbeam/mech
|
||||
mounted = 1
|
||||
|
||||
/obj/item/gun/medbeam/mech/Initialize()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
|
||||
/obj/item/gun/medbeam
|
||||
name = "Medical Beamgun"
|
||||
desc = "Don't cross the streams!"
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
var/mob/living/current_target
|
||||
var/last_check = 0
|
||||
var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though
|
||||
var/max_range = 8
|
||||
var/active = 0
|
||||
var/datum/beam/current_beam = null
|
||||
var/mounted = 0 //Denotes if this is a handheld or mounted version
|
||||
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/gun/medbeam/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/medbeam/Destroy(mob/user)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
LoseTarget()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/medbeam/dropped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/gun/medbeam/equipped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/gun/medbeam/proc/LoseTarget()
|
||||
if(active)
|
||||
qdel(current_beam)
|
||||
current_beam = null
|
||||
active = 0
|
||||
on_beam_release(current_target)
|
||||
current_target = null
|
||||
|
||||
/obj/item/gun/medbeam/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(isliving(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
if(current_target)
|
||||
LoseTarget()
|
||||
if(!isliving(target))
|
||||
return
|
||||
|
||||
current_target = target
|
||||
active = TRUE
|
||||
current_beam = new(user,current_target,time=6000,beam_icon_state="medbeam",btype=/obj/effect/ebeam/medical)
|
||||
INVOKE_ASYNC(current_beam, /datum/beam.proc/Start)
|
||||
|
||||
SSblackbox.record_feedback("tally", "gun_fired", 1, type)
|
||||
|
||||
/obj/item/gun/medbeam/process()
|
||||
|
||||
var/source = loc
|
||||
if(!mounted && !isliving(source))
|
||||
LoseTarget()
|
||||
return
|
||||
|
||||
if(!current_target)
|
||||
LoseTarget()
|
||||
return
|
||||
|
||||
if(world.time <= last_check+check_delay)
|
||||
return
|
||||
|
||||
last_check = world.time
|
||||
|
||||
if(get_dist(source, current_target)>max_range || !los_check(source, current_target))
|
||||
LoseTarget()
|
||||
if(isliving(source))
|
||||
to_chat(source, "<span class='warning'>You lose control of the beam!</span>")
|
||||
return
|
||||
|
||||
if(current_target)
|
||||
on_beam_tick(current_target)
|
||||
|
||||
/obj/item/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
|
||||
var/turf/user_turf = user.loc
|
||||
if(mounted)
|
||||
user_turf = get_turf(user)
|
||||
else if(!istype(user_turf))
|
||||
return 0
|
||||
var/obj/dummy = new(user_turf)
|
||||
dummy.pass_flags |= PASSTABLE|PASSGLASS|PASSGRILLE //Grille/Glass so it can be used through common windows
|
||||
for(var/turf/turf in getline(user_turf,target))
|
||||
if(mounted && turf == user_turf)
|
||||
continue //Mechs are dense and thus fail the check
|
||||
if(turf.density)
|
||||
qdel(dummy)
|
||||
return 0
|
||||
for(var/atom/movable/AM in turf)
|
||||
if(!AM.CanPass(dummy,turf,1))
|
||||
qdel(dummy)
|
||||
return 0
|
||||
for(var/obj/effect/ebeam/medical/B in turf)// Don't cross the str-beams!
|
||||
if(B.owner.origin != current_beam.origin)
|
||||
explosion(B.loc,0,3,5,8)
|
||||
qdel(dummy)
|
||||
return 0
|
||||
qdel(dummy)
|
||||
return 1
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
|
||||
if(target.health != target.maxHealth)
|
||||
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
|
||||
target.adjustBruteLoss(-4)
|
||||
target.adjustFireLoss(-4)
|
||||
target.adjustToxLoss(-1, forced = TRUE)
|
||||
target.adjustOxyLoss(-1)
|
||||
return
|
||||
|
||||
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/effect/ebeam/medical
|
||||
name = "medical beam"
|
||||
|
||||
//////////////////////////////Mech Version///////////////////////////////
|
||||
/obj/item/gun/medbeam/mech
|
||||
mounted = 1
|
||||
|
||||
/obj/item/gun/medbeam/mech/Initialize()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
|
||||
|
||||
@@ -1,167 +1,167 @@
|
||||
/obj/item/gun/syringe
|
||||
name = "syringe gun"
|
||||
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
|
||||
icon_state = "syringegun"
|
||||
item_state = "syringegun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
force = 4
|
||||
materials = list(MAT_METAL=2000)
|
||||
clumsy_check = 0
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
var/list/syringes = list()
|
||||
var/max_syringes = 1
|
||||
|
||||
/obj/item/gun/syringe/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun(src)
|
||||
|
||||
/obj/item/gun/syringe/recharge_newshot()
|
||||
if(!syringes.len)
|
||||
return
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/syringe/can_shoot()
|
||||
return syringes.len
|
||||
|
||||
/obj/item/gun/syringe/process_chamber()
|
||||
if(chambered && !chambered.BB) //we just fired
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/gun/syringe/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
|
||||
|
||||
/obj/item/gun/syringe/attack_self(mob/living/user)
|
||||
if(!syringes.len)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
|
||||
|
||||
if(!S)
|
||||
return 0
|
||||
S.forceMove(user.loc)
|
||||
|
||||
syringes.Remove(S)
|
||||
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
|
||||
syringes += A
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
|
||||
icon_state = "rapidsyringegun"
|
||||
max_syringes = 6
|
||||
|
||||
/obj/item/gun/syringe/syndicate
|
||||
name = "dart pistol"
|
||||
desc = "A small spring-loaded sidearm that functions identically to a syringe gun."
|
||||
icon_state = "syringe_pistol"
|
||||
item_state = "gun" //Smaller inhand
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 2 //Also very weak because it's smaller
|
||||
suppressed = TRUE //Softer fire sound
|
||||
can_unsuppress = FALSE //Permanently silenced
|
||||
|
||||
/obj/item/gun/syringe/dna
|
||||
name = "modified syringe gun"
|
||||
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
|
||||
|
||||
/obj/item/gun/syringe/dna/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/dnainjector(src)
|
||||
|
||||
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/dnainjector))
|
||||
var/obj/item/dnainjector/D = A
|
||||
if(D.used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(D, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
|
||||
syringes += D
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart
|
||||
name = "dart gun"
|
||||
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
|
||||
icon_state = "dartgun"
|
||||
item_state = "dartgun"
|
||||
materials = list(MAT_METAL=2000, MAT_GLASS=500)
|
||||
suppressed = TRUE //Softer fire sound
|
||||
can_unsuppress = FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/Initialize()
|
||||
..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
|
||||
|
||||
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe/dart))
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart
|
||||
name = "Repeating dart gun"
|
||||
icon_state = "rapiddartgun"
|
||||
item_state = "rapiddartgun"
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list)
|
||||
var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list
|
||||
|
||||
if(istype(B, /obj/item/reagent_containers/glass/beaker/large))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 2
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/plastic))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 3
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/meta))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 4
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/bluespace))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 6
|
||||
return
|
||||
else
|
||||
max_syringes = 1
|
||||
desc = "[initial(desc)] It has a [B] strapped to it, but it doesn't seem to be doing anything."
|
||||
..()
|
||||
|
||||
/obj/item/gun/syringe/blowgun
|
||||
name = "blowgun"
|
||||
desc = "Fire syringes at a short distance."
|
||||
icon_state = "blowgun"
|
||||
item_state = "blowgun"
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
visible_message("<span class='danger'>[user] starts aiming with a blowgun!</span>")
|
||||
if(do_after(user, 25, target = src))
|
||||
user.adjustStaminaLoss(20)
|
||||
user.adjustOxyLoss(20)
|
||||
..()
|
||||
/obj/item/gun/syringe
|
||||
name = "syringe gun"
|
||||
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
|
||||
icon_state = "syringegun"
|
||||
item_state = "syringegun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
force = 4
|
||||
materials = list(MAT_METAL=2000)
|
||||
clumsy_check = 0
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
var/list/syringes = list()
|
||||
var/max_syringes = 1
|
||||
|
||||
/obj/item/gun/syringe/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun(src)
|
||||
|
||||
/obj/item/gun/syringe/recharge_newshot()
|
||||
if(!syringes.len)
|
||||
return
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/syringe/can_shoot()
|
||||
return syringes.len
|
||||
|
||||
/obj/item/gun/syringe/process_chamber()
|
||||
if(chambered && !chambered.BB) //we just fired
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/gun/syringe/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
|
||||
|
||||
/obj/item/gun/syringe/attack_self(mob/living/user)
|
||||
if(!syringes.len)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
|
||||
|
||||
if(!S)
|
||||
return 0
|
||||
S.forceMove(user.loc)
|
||||
|
||||
syringes.Remove(S)
|
||||
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
|
||||
syringes += A
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
|
||||
icon_state = "rapidsyringegun"
|
||||
max_syringes = 6
|
||||
|
||||
/obj/item/gun/syringe/syndicate
|
||||
name = "dart pistol"
|
||||
desc = "A small spring-loaded sidearm that functions identically to a syringe gun."
|
||||
icon_state = "syringe_pistol"
|
||||
item_state = "gun" //Smaller inhand
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 2 //Also very weak because it's smaller
|
||||
suppressed = TRUE //Softer fire sound
|
||||
can_unsuppress = FALSE //Permanently silenced
|
||||
|
||||
/obj/item/gun/syringe/dna
|
||||
name = "modified syringe gun"
|
||||
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
|
||||
|
||||
/obj/item/gun/syringe/dna/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/dnainjector(src)
|
||||
|
||||
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/dnainjector))
|
||||
var/obj/item/dnainjector/D = A
|
||||
if(D.used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(D, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
|
||||
syringes += D
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart
|
||||
name = "dart gun"
|
||||
desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach."
|
||||
icon_state = "dartgun"
|
||||
item_state = "dartgun"
|
||||
materials = list(MAT_METAL=2000, MAT_GLASS=500)
|
||||
suppressed = TRUE //Softer fire sound
|
||||
can_unsuppress = FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/Initialize()
|
||||
..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
|
||||
|
||||
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe/dart))
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't put the [A] into \the [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart
|
||||
name = "Repeating dart gun"
|
||||
icon_state = "rapiddartgun"
|
||||
item_state = "rapiddartgun"
|
||||
|
||||
/obj/item/gun/syringe/dart/rapiddart/CheckParts(list/parts_list)
|
||||
var/obj/item/reagent_containers/glass/beaker/B = locate(/obj/item/reagent_containers/glass/beaker) in parts_list
|
||||
|
||||
if(istype(B, /obj/item/reagent_containers/glass/beaker/large))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 2
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/plastic))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 3
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/meta))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 4
|
||||
return
|
||||
else if(istype(B, /obj/item/reagent_containers/glass/beaker/bluespace))
|
||||
desc = "[initial(desc)] A modification of the dart gun's pressure chamber has been perfomed using a [B], extending it's holding size to [max_syringes]."
|
||||
max_syringes = 6
|
||||
return
|
||||
else
|
||||
max_syringes = 1
|
||||
desc = "[initial(desc)] It has a [B] strapped to it, but it doesn't seem to be doing anything."
|
||||
..()
|
||||
|
||||
/obj/item/gun/syringe/blowgun
|
||||
name = "blowgun"
|
||||
desc = "Fire syringes at a short distance."
|
||||
icon_state = "blowgun"
|
||||
item_state = "blowgun"
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
visible_message("<span class='danger'>[user] starts aiming with a blowgun!</span>")
|
||||
if(do_after(user, 25, target = src))
|
||||
user.adjustStaminaLoss(20)
|
||||
user.adjustOxyLoss(20)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user