mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 07:08:55 +01:00
Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into newmalf-merge
This commit is contained in:
@@ -591,7 +591,7 @@
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
if (emagged || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/material/steel(loc)
|
||||
user.visible_message(\
|
||||
"<span class='warning'>[src] has been cut apart by [user.name] with the weldingtool.</span>",\
|
||||
"<span class='notice'>You disassembled the broken APC frame.</span>",\
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
..()
|
||||
updateicon()
|
||||
|
||||
/obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/amount = 0)
|
||||
/obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/power = 0)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
@@ -18,9 +18,9 @@
|
||||
if(charge <= 0)
|
||||
return 0
|
||||
|
||||
var/cell_amt = min((amount * CELLRATE), charge)
|
||||
use(cell_amt)
|
||||
return cell_amt / CELLRATE
|
||||
var/cell_amt = power * CELLRATE
|
||||
|
||||
return use(cell_amt) / CELLRATE
|
||||
|
||||
/obj/item/weapon/cell/proc/updateicon()
|
||||
overlays.Cut()
|
||||
@@ -38,14 +38,25 @@
|
||||
/obj/item/weapon/cell/proc/fully_charged()
|
||||
return (charge == maxcharge)
|
||||
|
||||
// use power from a cell
|
||||
// checks if the power cell is able to provide the specified amount of charge
|
||||
/obj/item/weapon/cell/proc/check_charge(var/amount)
|
||||
return (charge >= amount)
|
||||
|
||||
// use power from a cell, returns the amount actually used
|
||||
/obj/item/weapon/cell/proc/use(var/amount)
|
||||
if(rigged && amount > 0)
|
||||
explode()
|
||||
return 0
|
||||
var/used = min(charge, amount)
|
||||
charge -= used
|
||||
return used
|
||||
|
||||
if(charge < amount) return 0
|
||||
charge = (charge - amount)
|
||||
// Checks if the specified amount can be provided. If it can, it removes the amount
|
||||
// from the cell and returns 1. Otherwise does nothing and returns 0.
|
||||
/obj/item/weapon/cell/proc/checked_use(var/amount)
|
||||
if(!check_charge(amount))
|
||||
return 0
|
||||
use(amount)
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
usr << "You begin deconstructing [src]."
|
||||
if (!do_after(usr, 30))
|
||||
return
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
|
||||
user.visible_message("[user.name] deconstructs [src].", \
|
||||
"You deconstruct [src].", "You hear a noise.")
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||
@@ -271,6 +271,7 @@
|
||||
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
||||
return
|
||||
visible_message("<span class='danger'>[user] smashes the light!</span>")
|
||||
user.do_attack_animation(src)
|
||||
broken()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
desc = "A power generator that runs on solid phoron sheets. Rated for 80 kW max safe output."
|
||||
|
||||
var/sheet_name = "Phoron Sheets"
|
||||
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
|
||||
var/sheet_path = /obj/item/stack/material/phoron
|
||||
var/board_path = "/obj/item/weapon/circuitboard/pacman"
|
||||
|
||||
/*
|
||||
@@ -162,7 +162,7 @@
|
||||
//Removes one stack's worth of material from the generator.
|
||||
/obj/machinery/power/port_gen/pacman/DropFuel()
|
||||
if(sheets)
|
||||
var/obj/item/stack/sheet/S = new sheet_path(loc)
|
||||
var/obj/item/stack/material/S = new sheet_path(loc)
|
||||
var/amount = min(sheets, S.max_amount)
|
||||
S.amount = amount
|
||||
sheets -= amount
|
||||
@@ -403,7 +403,7 @@
|
||||
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
||||
desc = "A power generator that utilizes uranium sheets as fuel. Can run for much longer than the standard PACMAN type generators. Rated for 80 kW max safe output."
|
||||
icon_state = "portgen1"
|
||||
sheet_path = /obj/item/stack/sheet/mineral/uranium
|
||||
sheet_path = /obj/item/stack/material/uranium
|
||||
sheet_name = "Uranium Sheets"
|
||||
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
|
||||
board_path = "/obj/item/weapon/circuitboard/pacman/super"
|
||||
@@ -430,7 +430,7 @@
|
||||
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
|
||||
desc = "An advanced power generator that runs on tritium. Rated for 200 kW maximum safe output!"
|
||||
icon_state = "portgen2"
|
||||
sheet_path = /obj/item/stack/sheet/mineral/tritium
|
||||
sheet_path = /obj/item/stack/material/tritium
|
||||
sheet_name = "Tritium Fuel Sheets"
|
||||
|
||||
//I don't think tritium has any other use, so we might as well make this rewarding for players
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
if (source_area)
|
||||
source_area.use_power(drained_energy/CELLRATE)
|
||||
else if (istype(power_source,/datum/powernet))
|
||||
var/drained_power = drained_energy/CELLRATE //convert from "joules" to "watts"
|
||||
var/drained_power = drained_energy/CELLRATE
|
||||
drained_power = PN.draw_power(drained_power)
|
||||
else if (istype(power_source, /obj/item/weapon/cell))
|
||||
cell.use(drained_energy)
|
||||
|
||||
+10
-10
@@ -50,10 +50,10 @@ var/list/solars_list = list()
|
||||
/obj/machinery/power/solar/proc/Make(var/obj/item/solar_assembly/S)
|
||||
if(!S)
|
||||
S = new /obj/item/solar_assembly(src)
|
||||
S.glass_type = /obj/item/stack/sheet/glass
|
||||
S.glass_type = /obj/item/stack/material/glass
|
||||
S.anchored = 1
|
||||
S.loc = src
|
||||
if(S.glass_type == /obj/item/stack/sheet/glass/reinforced) //if the panel is in reinforced glass
|
||||
if(S.glass_type == /obj/item/stack/material/glass/reinforced) //if the panel is in reinforced glass
|
||||
health *= 2 //this need to be placed here, because panels already on the map don't have an assembly linked to
|
||||
update_icon()
|
||||
|
||||
@@ -91,8 +91,8 @@ var/list/solars_list = list()
|
||||
if(!(stat & BROKEN))
|
||||
broken()
|
||||
else
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/material/shard(src.loc)
|
||||
new /obj/item/weapon/material/shard(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -153,13 +153,13 @@ var/list/solars_list = list()
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(prob(15))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(2.0)
|
||||
if (prob(25))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -231,7 +231,7 @@ var/list/solars_list = list()
|
||||
// Give back the glass type we were supplied with
|
||||
/obj/item/solar_assembly/proc/give_glass()
|
||||
if(glass_type)
|
||||
var/obj/item/stack/sheet/S = new glass_type(src.loc)
|
||||
var/obj/item/stack/material/S = new glass_type(src.loc)
|
||||
S.amount = 2
|
||||
glass_type = null
|
||||
|
||||
@@ -251,8 +251,8 @@ var/list/solars_list = list()
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(istype(W, /obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/S = W
|
||||
if(S.use(2))
|
||||
glass_type = W.type
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
@@ -420,7 +420,7 @@ var/list/solars_list = list()
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/obj/machinery/power/tracker/proc/Make(var/obj/item/solar_assembly/S)
|
||||
if(!S)
|
||||
S = new /obj/item/solar_assembly(src)
|
||||
S.glass_type = /obj/item/stack/sheet/glass
|
||||
S.glass_type = /obj/item/stack/material/glass
|
||||
S.tracker = 1
|
||||
S.anchored = 1
|
||||
S.loc = src
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
Reference in New Issue
Block a user