Stunswords! (#5179)

* adds in stunswords

* inhands!

* fixes cell charge text.

* adds in the kit and also fuck admin.txt

* Fixes some formatting

* replaces the placeholder icon with

* i hate everything

* tries to fix the dme. hopefully.

* tries again
This commit is contained in:
cebutris
2018-02-04 23:10:21 -05:00
committed by Poojawa
parent 91345fddc1
commit 44908503bf
6 changed files with 34 additions and 2 deletions
+2 -2
View File
@@ -63,9 +63,9 @@
/obj/item/melee/baton/examine(mob/user)
..()
if(cell)
to_chat(user, "<span class='notice'>The baton is [round(cell.percent())]% charged.</span>")
to_chat(user, "<span class='notice'>\The [src] is [round(cell.percent())]% charged.</span>")
else
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
to_chat(user, "<span class='warning'>\The [src] does not have a power source installed.</span>")
/obj/item/melee/baton/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
@@ -0,0 +1,31 @@
/obj/item/melee/baton/stunsword
name = "stunsword"
desc = "not actually sharp, this sword is functionally identical to a stunbaton"
icon = 'modular_citadel/icons/obj/stunsword.dmi'
icon_state = "stunsword"
item_state = "sword"
lefthand_file = 'modular_citadel/icons/mob/inhands/stunsword_left.dmi'
righthand_file = 'modular_citadel/icons/mob/inhands/stunsword_right.dmi'
/obj/item/device/ssword_kit
name = "stunsword kit"
desc = "a modkit for making a stunbaton into a stunsword"
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_donksoft"
var/product = /obj/item/melee/baton/stunsword //what it makes
var/list/fromitem = list(/obj/item/melee/baton, /obj/item/melee/baton/loaded) //what it needs
afterattack(obj/O, mob/user as mob)
if(istype(O, product))
to_chat(user,"<span class='warning'>[O] is already modified!")
else if(O.type in fromitem) //makes sure O is the right thing
var/obj/item/melee/baton/B = O
if(!B.cell) //checks for a powercell in the baton. If there isn't one, continue. If there is, warn the user to take it out
new product(usr.loc) //spawns the product
user.visible_message("<span class='warning'>[user] modifies [O]!","<span class='warning'>You modify the [O]!")
qdel(O) //Gets rid of the baton
qdel(src) //gets rid of the kit
else
to_chat(user,"<span class='warning'>Remove the powercell first!</span>") //We make this check because the stunsword starts without a battery.
else
to_chat(user, "<span class='warning'> You can't modify [O] with this kit!</span>")
Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+1
View File
@@ -2512,6 +2512,7 @@
#include "modular_citadel\code\game\machinery\Sleeper.dm"
#include "modular_citadel\code\game\objects\ids.dm"
#include "modular_citadel\code\game\objects\items\handcuffs.dm"
#include "modular_citadel\code\game\objects\items\stunsword.dm"
#include "modular_citadel\code\game\objects\items\devices\aicard.dm"
#include "modular_citadel\code\game\objects\items\devices\PDA\PDA.dm"
#include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm"