Removes Weapons (#7415)

* Adds icon and hitsound where needed.

* Moves alt_attack to /obj/item and deletes weapons.dm

* Replaced /obj/item/weapon with /obj/item

* Fixes merge issues.

* Fix merge issues.
This commit is contained in:
Werner
2019-11-16 18:36:13 +01:00
committed by GitHub
parent 128ca2235b
commit af16a489a6
1123 changed files with 27193 additions and 27175 deletions
@@ -11,9 +11,9 @@
var/max_complexity = IC_COMPLEXITY_BASE
var/opened = 0
var/can_anchor = FALSE // If true, wrenching it will anchor it.
var/obj/item/weapon/cell/device/battery // Internal cell which most circuits need to work.
var/obj/item/cell/device/battery // Internal cell which most circuits need to work.
var/detail_color = COLOR_ASSEMBLY_BLACK
var/obj/item/weapon/card/id/access_card
var/obj/item/card/id/access_card
/obj/item/device/electronic_assembly/implant
name = "electronic implant"
@@ -22,14 +22,14 @@
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
var/obj/item/weapon/implant/integrated_circuit/implant = null
var/obj/item/implant/integrated_circuit/implant = null
/obj/item/device/electronic_assembly/Initialize(mapload, printed = FALSE)
. = ..()
if (!printed)
battery = new(src)
START_PROCESSING(SSelectronics, src)
access_card = new /obj/item/weapon/card/id(src)
access_card = new /obj/item/card/id(src)
/obj/item/device/electronic_assembly/Destroy()
QDEL_NULL(battery)
@@ -270,7 +270,7 @@
to_chat(user, "<span class='warning'>\The [src] isn't open, so you can't fiddle with the internal components. \
Try using a crowbar.</span>")
else if(istype(I, /obj/item/weapon/cell/device))
else if(istype(I, /obj/item/cell/device))
if(!opened)
to_chat(user, "<span class='warning'>\The [src] isn't open, so you can't put anything inside. Try using a crowbar.</span>")
for(var/obj/item/integrated_circuit/input/S in contents)
@@ -283,7 +283,7 @@
S.attackby_react(I,user,user.a_intent)
return FALSE
var/obj/item/weapon/cell/device/cell = I
var/obj/item/cell/device/cell = I
user.drop_from_inventory(cell,src)
battery = cell
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
@@ -39,7 +39,7 @@
interact(user)
return TRUE
if(istype(O,/obj/item/weapon/disk/integrated_circuit/upgrade/advanced))
if(istype(O,/obj/item/disk/integrated_circuit/upgrade/advanced))
if(upgraded)
to_chat(user, "<span class='warning'>\The [src] already has this upgrade. </span>")
return TRUE
@@ -48,7 +48,7 @@
interact(user)
return TRUE
if(istype(O,/obj/item/weapon/disk/integrated_circuit/upgrade/clone))
if(istype(O,/obj/item/disk/integrated_circuit/upgrade/clone))
if(can_clone)
to_chat(user, "<span class='warning'>\The [src] already has this upgrade. </span>")
return TRUE
@@ -151,7 +151,7 @@
return FALSE
// FUKKEN UPGRADE DISKS
/obj/item/weapon/disk/integrated_circuit/upgrade
/obj/item/disk/integrated_circuit/upgrade
name = "integrated circuit printer upgrade disk"
desc = "Install this into your integrated circuit printer to enhance it."
icon = 'icons/obj/assemblies/electronic_tools.dmi'
@@ -160,12 +160,12 @@
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 4)
/obj/item/weapon/disk/integrated_circuit/upgrade/advanced
/obj/item/disk/integrated_circuit/upgrade/advanced
name = "integrated circuit printer upgrade disk - advanced designs"
desc = "Install this into your integrated circuit printer to enhance it. This one adds new, advanced designs to the printer."
// To be implemented later.
/obj/item/weapon/disk/integrated_circuit/upgrade/clone
/obj/item/disk/integrated_circuit/upgrade/clone
name = "integrated circuit printer upgrade disk - circuit cloner"
desc = "Install this into your integrated circuit printer to enhance it. This one allows the printer to duplicate assemblies."
icon_state = "upgrade_disk_clone"
@@ -280,7 +280,7 @@
detail_color = color_list[color_choice]
update_icon()
/obj/item/weapon/storage/bag/circuits
/obj/item/storage/bag/circuits
name = "circuit kit"
desc = "This kit is essential for any circuitry projects."
icon = 'icons/obj/assemblies/electronic_tools.dmi'
@@ -289,50 +289,50 @@
display_contents_with_number = 0
can_hold = list(
/obj/item/integrated_circuit,
/obj/item/weapon/storage/bag/circuits/mini,
/obj/item/storage/bag/circuits/mini,
/obj/item/device/electronic_assembly,
/obj/item/device/integrated_electronics,
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/crowbar,
/obj/item/screwdriver,
/obj/item/device/multitool
)
/obj/item/weapon/storage/bag/circuits/basic/fill()
new /obj/item/weapon/storage/bag/circuits/mini/arithmetic(src)
new /obj/item/weapon/storage/bag/circuits/mini/trig(src)
new /obj/item/weapon/storage/bag/circuits/mini/input(src)
new /obj/item/weapon/storage/bag/circuits/mini/output(src)
new /obj/item/weapon/storage/bag/circuits/mini/memory(src)
new /obj/item/weapon/storage/bag/circuits/mini/logic(src)
new /obj/item/weapon/storage/bag/circuits/mini/time(src)
new /obj/item/weapon/storage/bag/circuits/mini/reagents(src)
new /obj/item/weapon/storage/bag/circuits/mini/transfer(src)
new /obj/item/weapon/storage/bag/circuits/mini/converter(src)
new /obj/item/weapon/storage/bag/circuits/mini/power(src)
/obj/item/storage/bag/circuits/basic/fill()
new /obj/item/storage/bag/circuits/mini/arithmetic(src)
new /obj/item/storage/bag/circuits/mini/trig(src)
new /obj/item/storage/bag/circuits/mini/input(src)
new /obj/item/storage/bag/circuits/mini/output(src)
new /obj/item/storage/bag/circuits/mini/memory(src)
new /obj/item/storage/bag/circuits/mini/logic(src)
new /obj/item/storage/bag/circuits/mini/time(src)
new /obj/item/storage/bag/circuits/mini/reagents(src)
new /obj/item/storage/bag/circuits/mini/transfer(src)
new /obj/item/storage/bag/circuits/mini/converter(src)
new /obj/item/storage/bag/circuits/mini/power(src)
new /obj/item/device/electronic_assembly(src)
new /obj/item/device/assembly/electronic_assembly(src)
new /obj/item/device/assembly/electronic_assembly(src)
new /obj/item/device/multitool(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/screwdriver(src)
new /obj/item/crowbar(src)
make_exact_fit()
/obj/item/weapon/storage/bag/circuits/all/fill()
/obj/item/storage/bag/circuits/all/fill()
..()
new /obj/item/weapon/storage/bag/circuits/mini/arithmetic/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/trig/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/input/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/output/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/memory/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/logic/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/smart/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/manipulation/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/time/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/reagents/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/transfer/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/converter/all(src)
new /obj/item/weapon/storage/bag/circuits/mini/power/all(src)
new /obj/item/storage/bag/circuits/mini/arithmetic/all(src)
new /obj/item/storage/bag/circuits/mini/trig/all(src)
new /obj/item/storage/bag/circuits/mini/input/all(src)
new /obj/item/storage/bag/circuits/mini/output/all(src)
new /obj/item/storage/bag/circuits/mini/memory/all(src)
new /obj/item/storage/bag/circuits/mini/logic/all(src)
new /obj/item/storage/bag/circuits/mini/smart/all(src)
new /obj/item/storage/bag/circuits/mini/manipulation/all(src)
new /obj/item/storage/bag/circuits/mini/time/all(src)
new /obj/item/storage/bag/circuits/mini/reagents/all(src)
new /obj/item/storage/bag/circuits/mini/transfer/all(src)
new /obj/item/storage/bag/circuits/mini/converter/all(src)
new /obj/item/storage/bag/circuits/mini/power/all(src)
new /obj/item/device/electronic_assembly(src)
new /obj/item/device/electronic_assembly/medium(src)
@@ -340,10 +340,10 @@
new /obj/item/device/electronic_assembly/drone(src)
new /obj/item/device/integrated_electronics/wirer(src)
new /obj/item/device/integrated_electronics/debugger(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/crowbar(src)
make_exact_fit()
/obj/item/weapon/storage/bag/circuits/mini
/obj/item/storage/bag/circuits/mini
name = "circuit box"
desc = "Used to partition categories of circuits, for a neater workspace."
w_class = 2
@@ -352,7 +352,7 @@
var/spawn_flags_to_use = IC_SPAWN_DEFAULT
var/list/spawn_types = list()
/obj/item/weapon/storage/bag/circuits/mini/fill()
/obj/item/storage/bag/circuits/mini/fill()
spawn_types = typecacheof(spawn_types)
for (var/thing in typecache_filter_list(SSelectronics.all_integrated_circuits, spawn_types))
var/obj/item/integrated_circuit/IC = thing
@@ -362,7 +362,7 @@
make_exact_fit()
/obj/item/weapon/storage/bag/circuits/mini/arithmetic
/obj/item/storage/bag/circuits/mini/arithmetic
name = "arithmetic circuit box"
desc = "Warning: Contains math."
icon_state = "box_arithmetic"
@@ -370,10 +370,10 @@
/obj/item/integrated_circuit/arithmetic
)
/obj/item/weapon/storage/bag/circuits/mini/arithmetic/all // Don't believe this will ever be needed.
/obj/item/storage/bag/circuits/mini/arithmetic/all // Don't believe this will ever be needed.
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/trig
/obj/item/storage/bag/circuits/mini/trig
name = "trig circuit box"
desc = "Danger: Contains more math."
icon_state = "box_trig"
@@ -381,10 +381,10 @@
/obj/item/integrated_circuit/trig
)
/obj/item/weapon/storage/bag/circuits/mini/trig/all // Ditto
/obj/item/storage/bag/circuits/mini/trig/all // Ditto
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/input
/obj/item/storage/bag/circuits/mini/input
name = "input circuit box"
desc = "Tell these circuits everything you know."
icon_state = "box_input"
@@ -392,10 +392,10 @@
/obj/item/integrated_circuit/input
)
/obj/item/weapon/storage/bag/circuits/mini/input/all
/obj/item/storage/bag/circuits/mini/input/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/output
/obj/item/storage/bag/circuits/mini/output
name = "output circuit box"
desc = "Circuits to interface with the world beyond itself."
icon_state = "box_output"
@@ -403,10 +403,10 @@
/obj/item/integrated_circuit/output
)
/obj/item/weapon/storage/bag/circuits/mini/output/all
/obj/item/storage/bag/circuits/mini/output/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/memory
/obj/item/storage/bag/circuits/mini/memory
name = "memory circuit box"
desc = "Machines can be quite forgetful without these."
icon_state = "box_memory"
@@ -414,10 +414,10 @@
/obj/item/integrated_circuit/memory
)
/obj/item/weapon/storage/bag/circuits/mini/memory/all
/obj/item/storage/bag/circuits/mini/memory/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/logic
/obj/item/storage/bag/circuits/mini/logic
name = "logic circuit box"
desc = "May or may not be Turing complete."
icon_state = "box_logic"
@@ -425,10 +425,10 @@
/obj/item/integrated_circuit/logic
)
/obj/item/weapon/storage/bag/circuits/mini/logic/all
/obj/item/storage/bag/circuits/mini/logic/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/time
/obj/item/storage/bag/circuits/mini/time
name = "time circuit box"
desc = "No time machine parts, sadly."
icon_state = "box_time"
@@ -436,10 +436,10 @@
/obj/item/integrated_circuit/time
)
/obj/item/weapon/storage/bag/circuits/mini/time/all
/obj/item/storage/bag/circuits/mini/time/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/reagents
/obj/item/storage/bag/circuits/mini/reagents
name = "reagent circuit box"
desc = "Unlike most electronics, these circuits are supposed to come in contact with liquids."
icon_state = "box_reagents"
@@ -447,10 +447,10 @@
/obj/item/integrated_circuit/reagent
)
/obj/item/weapon/storage/bag/circuits/mini/reagents/all
/obj/item/storage/bag/circuits/mini/reagents/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/transfer
/obj/item/storage/bag/circuits/mini/transfer
name = "transfer circuit box"
desc = "Useful for moving data representing something arbitrary to another arbitrary virtual place."
icon_state = "box_transfer"
@@ -458,10 +458,10 @@
/obj/item/integrated_circuit/transfer
)
/obj/item/weapon/storage/bag/circuits/mini/transfer/all
/obj/item/storage/bag/circuits/mini/transfer/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/converter
/obj/item/storage/bag/circuits/mini/converter
name = "converter circuit box"
desc = "Transform one piece of data to another type of data with these."
icon_state = "box_converter"
@@ -469,10 +469,10 @@
/obj/item/integrated_circuit/converter
)
/obj/item/weapon/storage/bag/circuits/mini/converter/all
/obj/item/storage/bag/circuits/mini/converter/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/smart
/obj/item/storage/bag/circuits/mini/smart
name = "smart box"
desc = "Sentience not included."
icon_state = "box_ai"
@@ -480,10 +480,10 @@
/obj/item/integrated_circuit/smart
)
/obj/item/weapon/storage/bag/circuits/mini/smart/all
/obj/item/storage/bag/circuits/mini/smart/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/manipulation
/obj/item/storage/bag/circuits/mini/manipulation
name = "manipulation box"
desc = "Make your machines actually useful with these."
icon_state = "box_manipulation"
@@ -491,10 +491,10 @@
/obj/item/integrated_circuit/manipulation
)
/obj/item/weapon/storage/bag/circuits/mini/manipulation/all
/obj/item/storage/bag/circuits/mini/manipulation/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/power
/obj/item/storage/bag/circuits/mini/power
name = "power circuit box"
desc = "Electronics generally require electricity."
icon_state = "box_power"
@@ -503,5 +503,5 @@
/obj/item/integrated_circuit/power
)
/obj/item/weapon/storage/bag/circuits/mini/power/all
/obj/item/storage/bag/circuits/mini/power/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
@@ -502,7 +502,7 @@
return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
if(istype(A, /obj/item/weapon/storage))
if(istype(A, /obj/item/storage))
return FALSE
set_pin_data(IC_OUTPUT, 1, A)
@@ -592,11 +592,11 @@
if(AM)
var/obj/item/weapon/cell/cell = null
if(istype(AM, /obj/item/weapon/cell)) // Is this already a cell?
var/obj/item/cell/cell = null
if(istype(AM, /obj/item/cell)) // Is this already a cell?
cell = AM
else // If not, maybe there's a cell inside it?
for(var/obj/item/weapon/cell/C in AM.contents)
for(var/obj/item/cell/C in AM.contents)
if(C) // Find one cell to charge.
cell = C
break
@@ -915,7 +915,7 @@
return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
if(istype(A, /obj/item/weapon/storage))
if(istype(A, /obj/item/storage))
return FALSE
set_pin_data(IC_OUTPUT, 1, A)
push_data()
@@ -970,7 +970,7 @@
)
/obj/item/integrated_circuit/input/card_reader/attackby_react(obj/item/I, mob/living/user, intent)
var/obj/item/weapon/card/id/card = I.GetID()
var/obj/item/card/id/card = I.GetID()
var/list/access = I.GetAccess()
if(!access)
return
@@ -54,7 +54,7 @@
capacity = 10
size = 8
power_draw_per_use = 3
allowed_types = list(/obj/item/weapon/paper)
allowed_types = list(/obj/item/paper)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_MATERIALS = 2)
@@ -65,6 +65,6 @@
It has a bracket to hold the beaker in place and a lid to prevent spillage. \
There is an extraction tube built into the lid"
capacity = 1
allowed_types = list(/obj/item/weapon/reagent_containers/glass/beaker)
allowed_types = list(/obj/item/reagent_containers/glass/beaker)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_BIO = 2, TECH_MATERIALS = 2)
@@ -19,7 +19,7 @@
activators = list(
"fire" = IC_PINTYPE_PULSE_IN
)
var/obj/item/weapon/gun/installed_gun
var/obj/item/gun/installed_gun
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 4)
power_draw_per_use = 50 // The targeting mechanism uses this. The actual gun uses its own cell for firing if it's an energy weapon.
@@ -29,8 +29,8 @@
. = ..()
/obj/item/integrated_circuit/manipulation/weapon_firing/attackby(var/obj/O, var/mob/user)
if(istype(O, /obj/item/weapon/gun))
var/obj/item/weapon/gun/gun = O
if(istype(O, /obj/item/gun))
var/obj/item/gun/gun = O
if(installed_gun)
to_chat(user, "<span class='warning'>There's already a weapon installed.</span>")
return
@@ -123,7 +123,7 @@
activators = list("prime grenade" = IC_PINTYPE_PULSE_IN)
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 4)
var/obj/item/weapon/grenade/attached_grenade
var/obj/item/grenade/attached_grenade
var/pre_attached_grenade_type
/obj/item/integrated_circuit/manipulation/grenade/Initialize()
@@ -138,7 +138,7 @@
detach_grenade()
. = ..()
/obj/item/integrated_circuit/manipulation/grenade/attackby(var/obj/item/weapon/grenade/G, var/mob/user)
/obj/item/integrated_circuit/manipulation/grenade/attackby(var/obj/item/grenade/G, var/mob/user)
if(istype(G))
if(attached_grenade)
to_chat(user, "<span class='warning'>There is already a grenade attached!</span>")
@@ -167,7 +167,7 @@
log_and_message_admins("activated a grenade assembly. Last touches: Assembly: [holder.fingerprintslast] Circuit: [fingerprintslast] Grenade: [attached_grenade.fingerprintslast]")
// These procs do not relocate the grenade, that's the callers responsibility
/obj/item/integrated_circuit/manipulation/grenade/proc/attach_grenade(var/obj/item/weapon/grenade/G)
/obj/item/integrated_circuit/manipulation/grenade/proc/attach_grenade(var/obj/item/grenade/G)
attached_grenade = G
destroyed_event.register(attached_grenade, src, .proc/detach_grenade)
size += G.w_class
@@ -182,7 +182,7 @@
desc = initial(desc)
/obj/item/integrated_circuit/manipulation/grenade/frag
pre_attached_grenade_type = /obj/item/weapon/grenade/frag
pre_attached_grenade_type = /obj/item/grenade/frag
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 10)
spawn_flags = null // Used for world initializing, see the #defines above.
@@ -372,7 +372,7 @@
/obj/item/integrated_circuit/output/printer/do_work()
var/obj/item/integrated_circuit/insert_slot/paper_tray/paper_source = get_pin_data_as_type(IC_INPUT, 2, /obj/item/)
var/obj/item/weapon/paper/paper_sheet = null
var/obj/item/paper/paper_sheet = null
var/eject = get_pin_data(IC_INPUT, 3)
var/datum/integrated_io/info = inputs[1]
var/using_tray = istype(paper_source)
@@ -382,7 +382,7 @@
stuff_to_print = info.data
if(using_tray)
paper_sheet = paper_source.get_item(FALSE)
if(istype(paper_source, /obj/item/weapon/paper))
if(istype(paper_source, /obj/item/paper))
paper_sheet = paper_source
if(paper_sheet)
stuff_to_print = paper_sheet.info + stuff_to_print
@@ -40,11 +40,11 @@
var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
if(AM && assembly)
var/obj/item/weapon/cell/cell = null
if(istype(AM, /obj/item/weapon/cell)) // Is this already a cell?
var/obj/item/cell/cell = null
if(istype(AM, /obj/item/cell)) // Is this already a cell?
cell = AM
else // If not, maybe there's a cell inside it?
for(var/obj/item/weapon/cell/C in AM.contents)
for(var/obj/item/cell/C in AM.contents)
if(C) // Find one cell to charge.
cell = C
break