Merge remote-tracking branch 'citadel/master' into combat_rework_experimental

This commit is contained in:
silicons
2020-09-19 15:56:13 -07:00
1781 changed files with 68073 additions and 31311 deletions
@@ -18,13 +18,15 @@
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/update_icon()
..()
/obj/item/gun/ballistic/automatic/update_overlays()
. = ..()
if(automatic_burst_overlay)
if(!select)
add_overlay("[initial(icon_state)]semi")
. += ("[initial(icon_state)]semi")
if(select == 1)
add_overlay("[initial(icon_state)]burst")
. += "[initial(icon_state)]burst"
/obj/item/gun/ballistic/automatic/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
@@ -115,8 +117,7 @@
. = ..()
empty_alarm()
/obj/item/gun/ballistic/automatic/c20r/update_icon()
..()
/obj/item/gun/ballistic/automatic/c20r/update_icon_state()
icon_state = "c20r[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/wt550
@@ -141,9 +142,8 @@
. = ..()
spread = 0
/obj/item/gun/ballistic/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[CEILING(( (get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
/obj/item/gun/ballistic/automatic/wt550/update_icon_state()
icon_state = "wt550[magazine ? "-[CEILING(((get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
/obj/item/gun/ballistic/automatic/mini_uzi
name = "\improper Type U3 Uzi"
@@ -160,6 +160,7 @@
mag_type = /obj/item/ammo_box/magazine/m556
fire_sound = 'sound/weapons/gunshot_smg.ogg'
can_suppress = FALSE
automatic_burst_overlay = FALSE
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
burst_shot_delay = 2
@@ -191,18 +192,19 @@
underbarrel.attackby(A, user, params)
else
..()
/obj/item/gun/ballistic/automatic/m90/update_icon()
..()
cut_overlays()
/obj/item/gun/ballistic/automatic/m90/update_overlays()
. = ..()
switch(select)
if(0)
add_overlay("[initial(icon_state)]semi")
. += "[initial(icon_state)]semi"
if(1)
add_overlay("[initial(icon_state)]burst")
. += "[initial(icon_state)]burst"
if(2)
add_overlay("[initial(icon_state)]gren")
. += "[initial(icon_state)]gren"
/obj/item/gun/ballistic/automatic/m90/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
return
/obj/item/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
switch(select)
@@ -257,6 +259,7 @@
weapon_weight = WEAPON_MEDIUM
mag_type = /obj/item/ammo_box/magazine/m12g
fire_sound = 'sound/weapons/gunshot.ogg'
automatic_burst_overlay = FALSE
can_suppress = FALSE
burst_size = 1
pin = /obj/item/firing_pin/implant/pindicate
@@ -269,10 +272,13 @@
. = ..()
update_icon()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon()
cut_overlays()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon_state()
return
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_overlays()
. = ..()
if(magazine)
add_overlay("[magazine.icon_state]")
. += "[magazine.icon_state]"
icon_state = "bulldog[chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
@@ -298,6 +304,7 @@
burst_shot_delay = 1
spread = 7
pin = /obj/item/firing_pin/implant/pindicate
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin
@@ -316,7 +323,7 @@
playsound(user, 'sound/weapons/sawclose.ogg', 60, 1)
update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon_state()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
@@ -369,9 +376,10 @@
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
zoom_out_amt = 13
slot_flags = ITEM_SLOT_BACK
automatic_burst_overlay = FALSE
actions_types = list()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon_state()
if(magazine)
icon_state = "sniper-mag"
else
@@ -397,9 +405,10 @@
can_suppress = TRUE
w_class = WEIGHT_CLASS_HUGE
slot_flags = ITEM_SLOT_BACK
automatic_burst_overlay = FALSE
actions_types = list()
/obj/item/gun/ballistic/automatic/surplus/update_icon()
/obj/item/gun/ballistic/automatic/surplus/update_icon_state()
if(magazine)
icon_state = "surplus"
else
@@ -413,6 +422,7 @@
icon_state = "oldrifle"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/recharge
automatic_burst_overlay = FALSE
fire_delay = 2
can_suppress = FALSE
burst_size = 1
@@ -420,7 +430,5 @@
fire_sound = 'sound/weapons/laser.ogg'
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/laser/update_icon()
..()
/obj/item/gun/ballistic/automatic/laser/update_icon_state()
icon_state = "oldrifle[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
return
@@ -42,8 +42,7 @@
actions_types = list()
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/gyropistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/gyropistol/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
/obj/item/gun/ballistic/automatic/speargun
@@ -54,6 +53,7 @@
w_class = WEIGHT_CLASS_BULKY
force = 10
can_suppress = FALSE
automatic_burst_overlay = FALSE
mag_type = /obj/item/ammo_box/magazine/internal/speargun
fire_sound = 'sound/weapons/grenadelaunch.ogg'
burst_size = 1
@@ -62,8 +62,9 @@
actions_types = list()
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/speargun/update_icon()
return
/obj/item/gun/ballistic/automatic/speargun/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/ballistic/automatic/speargun/attack_self()
return
@@ -137,7 +138,7 @@
chamber_round()
update_icon()
/obj/item/gun/ballistic/rocketlauncher/update_icon()
/obj/item/gun/ballistic/rocketlauncher/update_icon_state()
icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]"
/obj/item/gun/ballistic/rocketlauncher/suicide_act(mob/living/user)
@@ -51,11 +51,6 @@
cell.use(shot.energy_cost)
. = ..()
/obj/item/gun/ballistic/automatic/magrifle/emp_act(severity)
. = ..()
if(!(. & EMP_PROTECT_CONTENTS))
cell.use(round(cell.charge / severity))
/obj/item/gun/ballistic/automatic/magrifle/get_cell()
return cell
@@ -75,8 +70,7 @@
recoil = 2
weapon_weight = WEAPON_HEAVY
/obj/item/gun/ballistic/automatic/magrifle/hyperburst/update_icon()
..()
/obj/item/gun/ballistic/automatic/magrifle/hyperburst/update_icon_state()
icon_state = "hyperburst[magazine ? "-[get_ammo()]" : ""][chambered ? "" : "-e"]"
///magpistol///
@@ -92,12 +86,14 @@
fire_delay = 2
inaccuracy_modifier = 0.25
cell_type = /obj/item/stock_parts/cell/magnetic/pistol
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_icon()
..()
cut_overlays()
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_overlays()
. = ..()
if(magazine)
add_overlay("magpistol-magazine")
. += "magpistol-magazine"
/obj/item/gun/ballistic/automatic/magrifle/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/magrifle/pistol/nopin
@@ -8,12 +8,12 @@
burst_size = 1
fire_delay = 0
actions_types = list()
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/no_mag
spawnwithmagazine = FALSE
/obj/item/gun/ballistic/automatic/pistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/pistol/suppressed/Initialize(mapload)
@@ -28,6 +28,7 @@
icon = 'modular_citadel/icons/obj/guns/cit_guns.dmi'
icon_state = "cde"
can_unsuppress = TRUE
automatic_burst_overlay = FALSE
obj_flags = UNIQUE_RENAME
unique_reskin = list("Default" = "cde",
"N-99" = "n99",
@@ -38,20 +39,18 @@
"PX4 Storm" = "px4"
)
/obj/item/gun/ballistic/automatic/pistol/modular/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/modular/update_icon_state()
if(current_skin)
icon_state = "[unique_reskin[current_skin]][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
else
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/pistol/modular/update_overlays()
. = ..()
if(magazine && suppressed)
cut_overlays()
add_overlay("[unique_reskin[current_skin]]-magazine-sup") //Yes, this means the default iconstate can't have a magazine overlay
. += "[unique_reskin[current_skin]]-magazine-sup" //Yes, this means the default iconstate can't have a magazine overlay
else if (magazine)
cut_overlays()
add_overlay("[unique_reskin[current_skin]]-magazine")
else
cut_overlays()
. += "[unique_reskin[current_skin]]-magazine"
/obj/item/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"
@@ -77,14 +76,14 @@
force = 14
mag_type = /obj/item/ammo_box/magazine/m50
can_suppress = FALSE
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/deagle/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/deagle/update_overlays()
. = ..()
if(magazine)
cut_overlays()
add_overlay("deagle_magazine")
else
cut_overlays()
. += "deagle_magazine"
/obj/item/gun/ballistic/automatic/pistol/deagle/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/pistol/deagle/gold
@@ -142,14 +141,14 @@
actions_types = list()
fire_sound = 'sound/weapons/blastcannon.ogg'
spread = 20 //damn thing has no rifling.
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/antitank/update_icon()
..()
/obj/item/gun/ballistic/automatic/pistol/antitank/update_overlays()
. = ..()
if(magazine)
cut_overlays()
add_overlay("atp-mag")
else
cut_overlays()
. += "atp-mag"
/obj/item/gun/ballistic/automatic/pistol/antitank/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/pistol/antitank/syndicate
@@ -84,6 +84,11 @@
. = ..()
. += "[get_ammo(0,0)] of those are live rounds."
/obj/item/gun/ballistic/revolver/syndicate
unique_reskin = list("Default" = "revolver",
"Silver" = "russianrevolver",
"Robust" = "revolvercit")
/obj/item/gun/ballistic/revolver/detective
name = "\improper .38 Mars Special"
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
@@ -343,10 +348,10 @@
else
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_icon()
..()
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_overlays()
. = ..()
if(slung)
icon_state += "sling"
. += "[icon_state]sling"
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawoff(mob/user)
. = ..()
@@ -486,4 +491,4 @@
for(var/i = 0, i < ratio, i++)
var/mutable_appearance/charge_bar = mutable_appearance(icon, "[initial(icon_state)]_charge", color = batt_color)
charge_bar.pixel_x = i
. += charge_bar
. += charge_bar
@@ -163,10 +163,10 @@
else
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
/obj/item/gun/ballistic/shotgun/boltaction/improvised/update_icon()
..()
/obj/item/gun/ballistic/shotgun/boltaction/improvised/update_overlays()
. = ..()
if(slung)
icon_state += "sling"
. += "[icon_state]sling"
/obj/item/gun/ballistic/shotgun/boltaction/enchanted
name = "enchanted bolt action rifle"
@@ -271,7 +271,7 @@
spread = 2
update_icon()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon_state()
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
//Dual Feed Shotgun
@@ -27,9 +27,9 @@
burst_size = 1
fire_delay = 0
actions_types = list()
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/toy/pistol/update_icon()
..()
/obj/item/gun/ballistic/automatic/toy/pistol/update_icon_state()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/ballistic/automatic/toy/pistol/riot
+38 -28
View File
@@ -29,7 +29,6 @@
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
@@ -64,10 +63,20 @@
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/gun/energy/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/gun/energy/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/handle_atom_del(atom/A)
if(A == cell)
cell = null
update_icon()
return ..()
/obj/item/gun/energy/examine(mob/user)
. = ..()
if(!right_click_overridden)
@@ -226,46 +235,47 @@
#undef DECREMENT_OR_WRAP
#undef IS_VALID_INDEX
/obj/item/gun/energy/update_icon(force_update)
if(QDELETED(src))
/obj/item/gun/energy/update_icon_state()
if(initial(item_state))
return
..()
var/ratio = get_charge_ratio()
var/new_item_state = ""
new_item_state = initial(icon_state)
if(modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
new_item_state += "[shot.select_name]"
new_item_state += "[ratio]"
item_state = new_item_state
/obj/item/gun/energy/update_overlays()
. = ..()
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
var/overlay_icon_state = "[icon_state]_charge"
var/ratio = get_charge_ratio()
if (modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
add_overlay("[icon_state]_[shot.select_name]")
iconState += "_[shot.select_name]"
if(itemState)
itemState += "[shot.select_name]"
. += "[icon_state]_[shot.select_name]"
overlay_icon_state += "_[shot.select_name]"
if(ratio == 0)
add_overlay("[icon_state]_empty")
. += "[icon_state]_empty"
else
if(!shaded_charge)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state)
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)
. += new /mutable_appearance(charge_overlay)
else
add_overlay("[icon_state]_charge[ratio]")
if(itemState)
itemState += "[ratio]"
item_state = itemState
if(ismob(loc)) //forces inhands to update
var/mob/M = loc
M.update_inv_hands()
. += "[icon_state]_charge[ratio]"
///Used by update_icon_state() and update_overlays()
/obj/item/gun/energy/proc/get_charge_ratio()
return 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 its power cell is removed.
/obj/item/gun/energy/suicide_act(mob/living/user)
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
@@ -207,12 +207,11 @@
to_chat(user,"<span class='notice'>You switch [src] setting to [setting] mode.</span>")
update_icon()
/obj/item/gun/energy/dueling/update_icon(force_update)
/obj/item/gun/energy/dueling/update_overlays(force_update)
. = ..()
if(setting_overlay)
cut_overlay(setting_overlay)
setting_overlay.icon_state = setting_iconstate()
add_overlay(setting_overlay)
. += setting_overlay
/obj/item/gun/energy/dueling/Destroy()
if(duel)
@@ -363,8 +362,7 @@
STR.max_items = 2
STR.can_hold = typecacheof(/obj/item/gun/energy/dueling)
/obj/item/storage/lockbox/dueling/update_icon()
cut_overlays()
/obj/item/storage/lockbox/dueling/update_icon_state()
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
if(locked)
icon_state = "medalbox+l"
@@ -19,17 +19,13 @@
cell_type = /obj/item/stock_parts/cell{charge = 600; maxcharge = 600}
ammo_x_offset = 2
charge_sections = 3
gunlight_state = "mini-light"
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
/obj/item/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/flashlight/seclite(src)
return ..()
/obj/item/gun/energy/e_gun/mini/update_icon()
..()
if(gun_light && gun_light.on)
add_overlay("mini-light")
/obj/item/gun/energy/e_gun/stun
name = "tactical energy gun"
desc = "Military issue energy gun, is able to fire stun rounds."
@@ -138,15 +134,15 @@
return
fail_chance = min(fail_chance + round(15/severity), 100)
/obj/item/gun/energy/e_gun/nuclear/update_icon()
..()
/obj/item/gun/energy/e_gun/nuclear/update_overlays()
. = ..()
if(crit_fail)
add_overlay("[icon_state]_fail_3")
. += "[icon_state]_fail_3"
else
switch(fail_tick)
if(0)
add_overlay("[icon_state]_fail_0")
. += "[icon_state]_fail_0"
if(1 to 150)
add_overlay("[icon_state]_fail_1")
. += "[icon_state]_fail_1"
if(151 to INFINITY)
add_overlay("[icon_state]_fail_2")
. += "[icon_state]_fail_2"
@@ -46,13 +46,6 @@
range = 4
log_override = TRUE
/obj/item/gun/energy/kinetic_accelerator/premiumka/update_icon()
..()
if(!can_shoot())
add_overlay("[icon_state]_empty")
else
cut_overlays()
/obj/item/gun/energy/kinetic_accelerator/getinaccuracy(mob/living/user, bonus_spread, stamloss)
var/old_fire_delay = fire_delay //It's pretty irrelevant tbh but whatever.
fire_delay = overheat_time
@@ -186,12 +179,10 @@
update_icon()
overheat = FALSE
/obj/item/gun/energy/kinetic_accelerator/update_icon()
..()
/obj/item/gun/energy/kinetic_accelerator/update_overlays()
. = ..()
if(!can_shoot())
add_overlay("[icon_state]_empty")
else
cut_overlays()
. += "[icon_state]_empty"
//Casing
/obj/item/ammo_casing/energy/kinetic
+14 -14
View File
@@ -34,11 +34,11 @@
pin = null
ammo_x_offset = 1
/obj/item/gun/energy/decloner/update_icon()
/obj/item/gun/energy/decloner/update_overlays()
..()
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("decloner_spin")
. += "decloner_spin"
/obj/item/gun/energy/floragun
name = "floral somatoray"
@@ -125,7 +125,7 @@
flags_1 = CONDUCT_1
attack_verb = list("attacked", "slashed", "cut", "sliced")
force = 12
sharpness = IS_SHARP
sharpness = SHARP_EDGED
inaccuracy_modifier = 0.25
can_charge = 0
@@ -134,9 +134,10 @@
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()
/obj/item/gun/energy/plasmacutter/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/plasmacutter/examine(mob/user)
. = ..()
@@ -166,9 +167,6 @@
/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"
@@ -183,11 +181,12 @@
icon_state = "wormhole_projector"
pin = null
inaccuracy_modifier = 0.25
automatic_charge_overlays = FALSE
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
/obj/item/gun/energy/wormhole_projector/update_icon()
/obj/item/gun/energy/wormhole_projector/update_icon_state()
icon_state = "[initial(icon_state)][current_firemode_index]"
item_state = icon_state
@@ -256,8 +255,9 @@
can_charge = 0
use_cyborg_cell = 1
/obj/item/gun/energy/printer/update_icon()
return
/obj/item/gun/energy/printer/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/printer/emp_act()
return
@@ -321,14 +321,14 @@
inaccuracy_modifier = 0.25
cell_type = /obj/item/stock_parts/cell/super
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
automatic_charge_overlays = FALSE
/obj/item/gun/energy/emitter/update_icon()
..()
/obj/item/gun/energy/emitter/update_icon_state()
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
if(!QDELETED(cell) && (cell.charge > shot.e_cost))
add_overlay("emitter_carbine_empty")
icon_state = "emitter_carbine_empty"
else
add_overlay("emitter_carbine")
icon_state = "emitter_carbine"
//the pickle ray
/obj/item/gun/energy/pickle_gun
@@ -0,0 +1,66 @@
/obj/item/gun/magic/wand/book
name = "blank spellbook"
desc = "It's not just a book, it's a SPELL book!"
ammo_type = /obj/item/ammo_casing/magic
icon = 'icons/obj/library.dmi'
icon_state = "book"
w_class = WEIGHT_CLASS_NORMAL
charges = 10 //We start with max pages
max_charges = 10
variable_charges = FALSE
/obj/item/gun/magic/wand/book/zap_self(mob/living/user)
to_chat(user, "The book has [charges] pages\s remaining.</span>")
/obj/item/gun/magic/wand/book/attackby(obj/item/S, mob/living/user, params)
if(!istype(S, /obj/item/paper))
return ..()
if(charges < max_charges)
charges++
recharge_newshot()
to_chat(user, "You add a new page to [src].</span>")
qdel(S)
update_icon()
process()
else
to_chat(user, "The [src] has no more room for pages!</span>")
//////////////////////
//Spell Book - SPARK//
//////////////////////
/obj/item/gun/magic/wand/book/spark
name = "Spell Book of Spark"
desc = "A spell book that fires burn pages to set the target ablaze!"
ammo_type = /obj/item/ammo_casing/magic/book/spark
icon_state = "spellbook_spark"
//////////////////////
//Spell Book - PAGE///
//////////////////////
/obj/item/gun/magic/wand/book/page
name = "Spell Book of Throw"
desc = "A spell book that throws pages at its target!"
ammo_type = /obj/item/ammo_casing/magic/book
icon_state = "spellbook_page"
//////////////////////
//Spell Book - SHOCK//
//////////////////////
/obj/item/gun/magic/wand/book/shock
name = "Spell Book of Shock"
desc = "A spell book that uses its pages to capture energy in the air and send it in a bolt at its target!"
ammo_type = /obj/item/ammo_casing/magic/book/shock
icon_state = "spellbook_shock"
////////////////////////
//Spell Book - HEALING//
////////////////////////
/obj/item/gun/magic/wand/book/healing
name = "Spell Book of Mending"
desc = "A spell book that uses its pages to heal and repair the target! The back of the book lists what it works on, and it seems to only be of flesh and of metal beings..."
ammo_type = /obj/item/ammo_casing/magic/book/heal
icon_state = "spellbook_healing"
+1 -1
View File
@@ -83,7 +83,7 @@
force = 20
armour_penetration = 75
block_chance = 50
sharpness = IS_SHARP
sharpness = SHARP_EDGED
max_charges = 4
/obj/item/gun/magic/staff/spellblade/Initialize()
@@ -35,6 +35,7 @@
slowdown = 1
item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND | NEEDS_PERMIT
pin = null
automatic_charge_overlays = FALSE
var/aiming = FALSE
var/aiming_time = 14
var/aiming_time_fire_threshold = 5
@@ -152,13 +153,13 @@
current_zoom_x = 0
current_zoom_y = 0
/obj/item/gun/energy/beam_rifle/update_icon()
cut_overlays()
/obj/item/gun/energy/beam_rifle/update_overlays()
. = ..()
var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1]
if(!QDELETED(cell) && (cell.charge > primary_ammo.e_cost))
add_overlay(charged_overlay)
. += charged_overlay
else
add_overlay(drained_overlay)
. += drained_overlay
/obj/item/gun/energy/beam_rifle/attack_self(mob/user)
if(!structure_piercing)
@@ -41,18 +41,16 @@
user.put_in_hands(bomb)
user.visible_message("<span class='warning'>[user] detaches [bomb] from [src].</span>")
bomb = null
name = initial(name)
desc = initial(desc)
update_icon()
return ..()
/obj/item/gun/blastcannon/update_icon()
/obj/item/gun/blastcannon/update_icon_state()
if(bomb)
icon_state = icon_state_loaded
name = "blast cannon"
desc = "A makeshift device used to concentrate a bomb's blast energy to a narrow wave."
else
icon_state = initial(icon_state)
name = initial(name)
desc = initial(desc)
/obj/item/gun/blastcannon/attackby(obj/O, mob/user)
if(istype(O, /obj/item/transfer_valve))
@@ -65,6 +63,8 @@
return FALSE
user.visible_message("<span class='warning'>[user] attaches [T] to [src]!</span>")
bomb = T
name = "blast cannon"
desc = "A makeshift device used to concentrate a bomb's blast energy to a narrow wave."
update_icon()
return TRUE
return ..()