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

View File

@@ -22,12 +22,12 @@
/obj/structure/bookcase/Initialize()
. = ..()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/book))
if(istype(I, /obj/item/book))
I.forceMove(src)
update_icon()
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/book))
if(istype(O, /obj/item/book))
user.drop_from_inventory(O,src)
update_icon()
else if(O.ispen())
@@ -46,7 +46,7 @@
if(do_after(user,25))
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/weapon/book/b in contents)
for(var/obj/item/book/b in contents)
b.forceMove((get_turf(src)))
qdel(src)
@@ -55,7 +55,7 @@
/obj/structure/bookcase/attack_hand(var/mob/user as mob)
if(contents.len)
var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
if(choice)
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
return
@@ -69,19 +69,19 @@
/obj/structure/bookcase/ex_act(severity)
switch(severity)
if(1.0)
for(var/obj/item/weapon/book/b in contents)
for(var/obj/item/book/b in contents)
qdel(b)
qdel(src)
return
if(2.0)
for(var/obj/item/weapon/book/b in contents)
for(var/obj/item/book/b in contents)
if (prob(50)) b.forceMove(get_turf(src))
else qdel(b)
qdel(src)
return
if(3.0)
if (prob(50))
for(var/obj/item/weapon/book/b in contents)
for(var/obj/item/book/b in contents)
b.forceMove(get_turf(src))
qdel(src)
return
@@ -124,7 +124,7 @@
var/author = query_books.item[1]
var/title = query_books.item[2]
var/content = query_books.item[3]
var/obj/item/weapon/book/B = new(src)
var/obj/item/book/B = new(src)
B.name = "Book: [title]"
B.title = title
B.author = author
@@ -153,10 +153,10 @@
New()
..()
new /obj/item/weapon/book/manual/medical_cloning(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/book/manual/medical_cloning(src)
new /obj/item/book/manual/medical_diagnostics_manual(src)
new /obj/item/book/manual/medical_diagnostics_manual(src)
new /obj/item/book/manual/medical_diagnostics_manual(src)
update_icon()
@@ -165,13 +165,13 @@
New()
..()
new /obj/item/weapon/book/manual/wiki/engineering_construction(src)
new /obj/item/weapon/book/manual/engineering_particle_accelerator(src)
new /obj/item/weapon/book/manual/wiki/engineering_hacking(src)
new /obj/item/weapon/book/manual/wiki/engineering_guide(src)
new /obj/item/weapon/book/manual/atmospipes(src)
new /obj/item/weapon/book/manual/engineering_singularity_safety(src)
new /obj/item/weapon/book/manual/evaguide(src)
new /obj/item/book/manual/wiki/engineering_construction(src)
new /obj/item/book/manual/engineering_particle_accelerator(src)
new /obj/item/book/manual/wiki/engineering_hacking(src)
new /obj/item/book/manual/wiki/engineering_guide(src)
new /obj/item/book/manual/atmospipes(src)
new /obj/item/book/manual/engineering_singularity_safety(src)
new /obj/item/book/manual/evaguide(src)
update_icon()
/obj/structure/bookcase/manuals/research_and_development
@@ -179,14 +179,14 @@
New()
..()
new /obj/item/weapon/book/manual/research_and_development(src)
new /obj/item/book/manual/research_and_development(src)
update_icon()
/*
* Book
*/
/obj/item/weapon/book
/obj/item/book
name = "book"
icon = 'icons/obj/library.dmi'
icon_state ="book"
@@ -203,7 +203,7 @@
var/obj/item/store //What's in the book?
drop_sound = 'sound/bureaucracy/bookclose.ogg'
/obj/item/weapon/book/attack_self(var/mob/user as mob)
/obj/item/book/attack_self(var/mob/user as mob)
if(carved)
if(store)
to_chat(user, "<span class='notice'>[store] falls out of [title]!</span>")
@@ -221,7 +221,7 @@
else
to_chat(user, "This book is completely blank!")
/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/book/attackby(obj/item/W as obj, mob/user as mob)
if(carved)
if(!store)
if(W.w_class < 3)
@@ -265,8 +265,8 @@
src.author = newauthor
else
return
else if(istype(W, /obj/item/weapon/barcodescanner))
var/obj/item/weapon/barcodescanner/scanner = W
else if(istype(W, /obj/item/barcodescanner))
var/obj/item/barcodescanner/scanner = W
if(!scanner.computer)
to_chat(user, "[W]'s screen flashes: 'No associated computer found!'")
else
@@ -288,25 +288,25 @@
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'")
if(3)
scanner.book = src
for(var/obj/item/weapon/book in scanner.computer.inventory)
for(var/obj/item/book in scanner.computer.inventory)
if(book == src)
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'")
return
scanner.computer.inventory.Add(src)
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
else if(istype(W, /obj/item/weapon/material/knife) || W.iswirecutter())
else if(istype(W, /obj/item/material/knife) || W.iswirecutter())
if(carved) return
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
if(do_after(user, 30/W.toolspeed))
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
playsound(loc, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
new /obj/item/weapon/shreddedp(get_turf(src))
new /obj/item/shreddedp(get_turf(src))
carved = 1
return
else
..()
/obj/item/weapon/book/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
/obj/item/book/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
if(target_zone == "eyes")
user.visible_message("<span class='notice'>You open up the book and show it to [M]. </span>", \
"<span class='notice'> [user] opens up a book and shows it to [M]. </span>")
@@ -317,7 +317,7 @@
/*
* Barcode Scanner
*/
/obj/item/weapon/barcodescanner
/obj/item/barcodescanner
name = "barcode scanner"
icon = 'icons/obj/library.dmi'
icon_state ="scanner"
@@ -325,7 +325,7 @@
throw_range = 5
w_class = 2.0
var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book // Currently scanned book
var/obj/item/book/book // Currently scanned book
var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
attack_self(mob/user as mob)