Merge pull request #6475 from R1f72r/Phoronboreupgrade

Allows you to upgrade Phoron Bore with manipulators
This commit is contained in:
Atermonera
2019-10-08 00:21:35 -08:00
committed by VirgoBot
parent 8dca70f9ab
commit 93bbae11e7
2 changed files with 26 additions and 1 deletions

View File

@@ -86,7 +86,17 @@
user.visible_message("<span class='notice'>\The [user] slots \the [cell] into \the [src].</span>")
update_icon()
return
if(thing.is_crowbar())
if(!manipulator)
to_chat(user, "<span class='warning'>\The [src] has no manipulator installed.</span>")
return
manipulator.forceMove(get_turf(src))
user.put_in_hands(manipulator)
user.visible_message("<span class='notice'>\The [user] levers \the [manipulator] from \the [src].</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
manipulator = null
update_icon()
return
if(thing.is_screwdriver())
if(!capacitor)
to_chat(user, "<span class='warning'>\The [src] has no capacitor installed.</span>")
@@ -112,6 +122,20 @@
update_icon()
return
if(istype(thing, /obj/item/weapon/stock_parts/manipulator))
if(manipulator)
to_chat(user, "<span class='warning'>\The [src] already has \a [manipulator] installed.</span>")
return
manipulator = thing
user.drop_from_inventory(manipulator)
manipulator.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10,1)
mat_cost = initial(mat_cost) % (2*manipulator.rating)
user.visible_message("<span class='notice'>\The [user] slots \the [manipulator] into \the [src].</span>")
update_icon()
return
if(istype(thing, load_type))
loading = TRUE
var/obj/item/stack/material/M = thing

View File

@@ -10,6 +10,7 @@
var/obj/item/weapon/cell/cell // Currently installed powercell.
var/obj/item/weapon/stock_parts/capacitor/capacitor // Installed capacitor. Higher rating == faster charge between shots.
var/obj/item/weapon/stock_parts/manipulator/manipulator // Installed manipulator. Mostly for Phoron Bore, higher rating == less mats consumed upon firing
var/removable_components = TRUE // Whether or not the gun can be dismantled.
var/gun_unreliable = 15 // Percentage chance of detonating in your hands.