Merge pull request #11832 from Hatterhat/pad-booster

mechaport gaming
This commit is contained in:
Casey
2021-11-18 00:59:45 -05:00
committed by Chompstation Bot
parent e6f330182b
commit e773ca01c9
5 changed files with 50 additions and 2 deletions

View File

@@ -21,6 +21,8 @@
#define isstorage(A) istype(A, /obj/item/weapon/storage)
#define ismecha(A) istype(A, /obj/mecha)
//---------------
//#define isarea(D) istype(D, /area) //Built in

View File

@@ -158,7 +158,8 @@
/obj/item/stack/nanopaste,
/obj/item/weapon/cell, //this is a bigger belt, might as well make it hold bigger cells too
/obj/item/weapon/pipe_dispenser, //bigger belt for bigger tools
/obj/item/weapon/rcd //see above
/obj/item/weapon/rcd, //see above
/obj/item/device/quantum_pad_booster
)

View File

@@ -59,6 +59,15 @@
build_path = /obj/item/weapon/pipe_dispenser
sort_string = "NAAAD"
/datum/design/item/tool/qpad_booster
name = "Quantum Pad Particle Booster"
desc = "A deceptively simple interface for increasing the mass of objects a quantum pad is capable of teleporting, at the cost of increased power draw."
id = "qpad_booster"
req_tech = list(TECH_ENGINEERING = 7, TECH_MATERIAL = 7, TECH_BLUESPACE = 6)
materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_GOLD = 2000, MAT_VERDANTIUM = 1000)
build_path = /obj/item/device/quantum_pad_booster
sort_string = "NAAAF"
// Other devices
/datum/design/item/engineering/AssembleDesignName()

View File

@@ -13,6 +13,7 @@
var/last_teleport //to handle the cooldown
var/teleporting = 0 //if it's in the process of teleporting
var/power_efficiency = 1
var/boosted = 0 // do we teleport mecha?
var/obj/machinery/power/quantumpad/linked_pad
//mapping
@@ -32,6 +33,18 @@
mapped_quantum_pads -= map_pad_id
return ..()
/obj/machinery/power/quantumpad/examine(mob/user)
. = ..()
. += "<span class='notice'>It is [linked_pad ? "currently" : "not"] linked to another pad.</span>"
if(world.time < last_teleport + teleport_cooldown)
. += "<span class='warning'>[src] is recharging power. A timer on the side reads <b>[round((last_teleport + teleport_cooldown - world.time)/10)]</b> seconds.</span>"
if(boosted)
. += SPAN_NOTICE("There appears to be a booster haphazardly jammed into the side of [src]. That looks unsafe.")
if(!panel_open)
. += "<span class='notice'>The panel is <i>screwed</i> in, obstructing the linking device.</span>"
else
. += "<span class='notice'>The <i>linking</i> device is now able to be <i>scanned</i> with a multitool.</span>"
/obj/machinery/power/quantumpad/RefreshParts()
var/E = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
@@ -65,6 +78,14 @@
update_icon()
return 1
if(istype(I, /obj/item/device/quantum_pad_booster))
var/obj/item/device/quantum_pad_booster/booster = I
visible_message("[user] violently jams [booster] into the side of [src]. [src] beeps, quietly.", \
"You hear the sound of a device being improperly installed in sensitive machinery, then subsequent beeping.", runemessage = "beep!")
playsound(src, 'sound/items/rped.ogg', 25, 1)
boosted = TRUE
qdel(I)
if(default_part_replacement(user, I))
return
@@ -216,6 +237,8 @@
// Otherwise we'll need a powernet
var/power_to_use = 10000 / power_efficiency
if(boosted)
power_to_use * 5
if(draw_power(power_to_use) != power_to_use)
return FALSE
return TRUE
@@ -223,7 +246,10 @@
/obj/machinery/power/quantumpad/proc/transport_objects(turf/destination)
for(var/atom/movable/ROI in get_turf(src))
// if is anchored, don't let through
if(ROI.anchored)
if(ROI.anchored && !ismecha(ROI))
if(ismecha(ROI))
if(boosted)
continue
if(isliving(ROI))
var/mob/living/L = ROI
if(L.buckled)
@@ -265,3 +291,13 @@
to_chat(user, "<span class='warning'>You feel yourself pulled in different directions, before ending up not far from where you started.</span>")
flick("qpad-beam-out", src)
transport_objects(get_turf(dest))
/obj/item/device/quantum_pad_booster
icon = 'icons/obj/device_vr.dmi'
name = "quantum pad particle booster"
desc = "A deceptively simple interface for increasing the mass of objects a quantum pad is capable of teleporting, at the cost of increased power draw."
description_info = "The three prongs at the base of the tool are not, in fact, for show."
force = 9
sharp = TRUE
item_state = "analyzer"
icon_state = "hacktool"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB