mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #11772 from Couls/constructable-rechargers
[READY] Constructable Rechargers and machinery tweaks
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 60
|
||||
power_channel = EQUIP
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
|
||||
|
||||
@@ -330,6 +330,14 @@ to destroy them and players will be able to make replacements.
|
||||
name = "circuit board (Freezer)"
|
||||
to_chat(user, "<span class='notice'>You set the board to cooling.</span>")
|
||||
|
||||
/obj/item/circuitboard/recharger
|
||||
name = "circuit board (Recharger)"
|
||||
build_path = /obj/machinery/recharger
|
||||
board_type = "machine"
|
||||
origin_tech = "powerstorage=3;materials=2"
|
||||
frame_desc = "Requires 1 Capacitor"
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/circuitboard/snow_machine
|
||||
name = "circuit board (snow machine)"
|
||||
build_path = /obj/machinery/snow_machine
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
anchored = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 4
|
||||
active_power_usage = 250
|
||||
active_power_usage = 200
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/charging = null
|
||||
var/using_power = FALSE
|
||||
var/list/allowed_devices = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/modular_computer, /obj/item/rcs, /obj/item/bodyanalyzer)
|
||||
@@ -14,6 +15,18 @@
|
||||
var/icon_state_charged = "recharger2"
|
||||
var/icon_state_charging = "recharger1"
|
||||
var/icon_state_idle = "recharger0"
|
||||
var/recharge_coeff = 1
|
||||
|
||||
/obj/machinery/recharger/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/recharger(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/recharger/RefreshParts()
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
recharge_coeff = C.rating
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
||||
if(iswrench(G))
|
||||
@@ -54,8 +67,16 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(anchored && !charging)
|
||||
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
|
||||
return
|
||||
|
||||
if(panel_open && istype(G, /obj/item/crowbar))
|
||||
default_deconstruction_crowbar(G)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/recharger/attack_hand(mob/user)
|
||||
if(issilicon(user))
|
||||
@@ -87,10 +108,11 @@
|
||||
if(istype(charging, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = charging
|
||||
if(E.power_supply.charge < E.power_supply.maxcharge)
|
||||
E.power_supply.give(E.power_supply.chargerate)
|
||||
E.power_supply.give(E.power_supply.chargerate * recharge_coeff)
|
||||
use_power(250)
|
||||
using_power = TRUE
|
||||
|
||||
|
||||
if(istype(charging, /obj/item/melee/baton))
|
||||
var/obj/item/melee/baton/B = charging
|
||||
if(B.bcell)
|
||||
|
||||
@@ -91,6 +91,12 @@
|
||||
if(climber)
|
||||
climber.Weaken(2)
|
||||
climber.visible_message("<span class='warning'>[climber.name] has been knocked off the table", "You've been knocked off the table", "You see [climber.name] get knocked off the table</span>")
|
||||
else if(user.pulling.pass_flags & PASSTABLE)
|
||||
user.Move_Pulled(src)
|
||||
if (user.pulling.loc == loc)
|
||||
user.visible_message("<span class='notice'>[user] places [user.pulling] onto [src].</span>",
|
||||
"<span class='notice'>You place [user.pulling] onto [src].</span>")
|
||||
user.stop_pulling()
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
broken_icon = "mwb"
|
||||
dirty_icon = "mwbloody"
|
||||
open_icon = "mw-o"
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
// see code/modules/food/recipes_microwave.dm for recipes
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "plant DNA manipulator"
|
||||
desc = "An advanced device designed to manipulate plant genetic makeup."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
pass_flags = PASSTABLE
|
||||
icon_state = "dnamod"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
@@ -10,6 +10,7 @@ var/global/list/fax_blacklist = list()
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
pass_flags = PASSTABLE
|
||||
var/fax_network = "Local Fax Network"
|
||||
var/syndie_restricted = FALSE //is it a syndicate base fax restricted from contacting NT assets?
|
||||
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
build_path = /obj/item/circuitboard/thermomachine
|
||||
category = list ("Engineering Machinery")
|
||||
|
||||
/datum/design/recharger
|
||||
name = "Machine Board(Weapon Recharger)"
|
||||
desc = "The circuit board for a weapon recharger"
|
||||
id = "recharger"
|
||||
build_path = /obj/item/circuitboard/recharger
|
||||
materials = list(MAT_GLASS = 1000)
|
||||
build_type = IMPRINTER
|
||||
req_tech = list("powerstorage" = 3, "materials" = 3)
|
||||
category = list("Misc. Machinery")
|
||||
|
||||
/datum/design/smes
|
||||
name = "Machine Board (SMES)"
|
||||
desc = "The circuit board for a SMES."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 80 KiB |
Reference in New Issue
Block a user