mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Removes All Weapons
This commit is contained in:
+19
-19
@@ -52,7 +52,7 @@
|
||||
var/spooky=0
|
||||
var/area/area
|
||||
var/areastring = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/start_charge = 90 // initial cell charge %
|
||||
var/cell_type = 2500
|
||||
var/opened = 0 //0=closed, 1=opened, 2=cover removed
|
||||
@@ -121,7 +121,7 @@
|
||||
/obj/machinery/power/apc/noalarm
|
||||
report_power_alarm = 0
|
||||
|
||||
/obj/item/weapon/apc_electronics
|
||||
/obj/item/apc_electronics
|
||||
name = "power control module"
|
||||
desc = "Heavy-duty switching circuits for power control."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
@@ -199,7 +199,7 @@
|
||||
has_electronics = 2 //installed and secured
|
||||
// is starting with a power cell installed, create it and set its charge level
|
||||
if(cell_type)
|
||||
src.cell = new/obj/item/weapon/stock_parts/cell(src)
|
||||
src.cell = new/obj/item/stock_parts/cell(src)
|
||||
cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively)
|
||||
cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value)
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
if(istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
if(istype(W, /obj/item/weapon/crowbar) && opened)
|
||||
if(istype(W, /obj/item/crowbar) && opened)
|
||||
if(has_electronics==1)
|
||||
if(terminal)
|
||||
to_chat(user, "<span class='warning'>Disconnect wires first.</span>")
|
||||
@@ -449,18 +449,18 @@
|
||||
user.visible_message(\
|
||||
"<span class='warning'>[user.name] has removed the power control board from [src.name]!</span>",\
|
||||
"<span class='notice'>You remove the power control board.</span>")
|
||||
new /obj/item/weapon/apc_electronics(loc)
|
||||
new /obj/item/apc_electronics(loc)
|
||||
else if(opened!=2) //cover isn't removed
|
||||
opened = 0
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && !((stat & BROKEN) || malfhack) )
|
||||
else if(istype(W, /obj/item/crowbar) && !((stat & BROKEN) || malfhack) )
|
||||
if(coverlocked && !(stat & MAINT))
|
||||
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened.</span>")
|
||||
return
|
||||
else
|
||||
opened = 1
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
else if(istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
if(cell)
|
||||
to_chat(user, "There is a power cell already installed.")
|
||||
return
|
||||
@@ -477,7 +477,7 @@
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
chargecount = 0
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/screwdriver)) // haxing
|
||||
else if(istype(W, /obj/item/screwdriver)) // haxing
|
||||
if(opened)
|
||||
if(cell)
|
||||
to_chat(user, "<span class='warning'>Close the APC first.</span>")//Less hints more mystery!
|
||||
@@ -505,7 +505,7 @@
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"].")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged)
|
||||
to_chat(user, "The interface is broken.")
|
||||
else if(opened)
|
||||
@@ -546,7 +546,7 @@
|
||||
"You add cables to the APC frame.")
|
||||
make_terminal()
|
||||
terminal.connect_to_network()
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
|
||||
else if(istype(W, /obj/item/wirecutters) && terminal && opened && has_electronics!=2)
|
||||
if(src.loc:intact)
|
||||
to_chat(user, "<span class='warning'>You must remove the floor plating in front of the APC first.</span>")
|
||||
return
|
||||
@@ -562,7 +562,7 @@
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
to_chat(user, "<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
|
||||
qdel(terminal) // qdel
|
||||
else if(istype(W, /obj/item/weapon/apc_electronics) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
to_chat(user, "You trying to insert the power control board into the frame...")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
@@ -571,11 +571,11 @@
|
||||
locked = 0
|
||||
to_chat(user, "<span class='notice'>You place the power control board inside the frame.</span>")
|
||||
qdel(W) // qdel
|
||||
else if(istype(W, /obj/item/weapon/apc_electronics) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||
else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||
to_chat(user, "<span class='warning'>You cannot put the board inside, the frame is damaged.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
else if(istype(W, /obj/item/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.get_fuel() < 3)
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
|
||||
return
|
||||
@@ -629,7 +629,7 @@
|
||||
&& !opened \
|
||||
&& ( \
|
||||
(W.force >= 5 && W.w_class >= WEIGHT_CLASS_NORMAL) \
|
||||
|| istype(W,/obj/item/weapon/crowbar) \
|
||||
|| istype(W,/obj/item/crowbar) \
|
||||
) \
|
||||
&& prob(20) )
|
||||
opened = 2
|
||||
@@ -642,7 +642,7 @@
|
||||
return src.attack_hand(user)
|
||||
if(!opened && wiresexposed && \
|
||||
(istype(W, /obj/item/device/multitool) || \
|
||||
istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/assembly/signaler)))
|
||||
istype(W, /obj/item/wirecutters) || istype(W, /obj/item/device/assembly/signaler)))
|
||||
return src.attack_hand(user)
|
||||
if(W.flags & NOBLUDGEON)
|
||||
return
|
||||
@@ -1037,7 +1037,7 @@
|
||||
occupier.verbs += /mob/living/silicon/ai/proc/corereturn
|
||||
occupier.cancel_camera()
|
||||
if((seclevel2num(get_security_level()) == SEC_LEVEL_DELTA) && malf.nuking)
|
||||
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
|
||||
for(var/obj/item/pinpointer/point in pinpointer_list)
|
||||
point.the_disk = src //the pinpointer will detect the shunted AI
|
||||
|
||||
/obj/machinery/power/apc/proc/malfvacate(forced)
|
||||
@@ -1050,7 +1050,7 @@
|
||||
occupier.parent.cancel_camera()
|
||||
qdel(occupier)
|
||||
if(seclevel2num(get_security_level()) == SEC_LEVEL_DELTA)
|
||||
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
|
||||
for(var/obj/item/pinpointer/point in pinpointer_list)
|
||||
for(var/mob/living/silicon/ai/A in ai_list)
|
||||
if((A.stat != DEAD) && A.nuking)
|
||||
point.the_disk = A //The pinpointer tracks the AI back into its core.
|
||||
@@ -1060,7 +1060,7 @@
|
||||
occupier.loc = loc
|
||||
occupier.death()
|
||||
occupier.gib()
|
||||
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
|
||||
for(var/obj/item/pinpointer/point in pinpointer_list)
|
||||
point.the_disk = null //Pinpointers go back to tracking the nuke disk
|
||||
|
||||
/obj/machinery/power/apc/proc/ion_act()
|
||||
|
||||
@@ -124,7 +124,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(T.intact)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
///// Z-Level Stuff
|
||||
/* if(src.d1 == 12 || src.d2 == 12)
|
||||
to_chat(user, "<span class='warning'>You must cut this cable from above.</span>")
|
||||
@@ -168,8 +168,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
coil.cable_join(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/twohanded/rcl))
|
||||
var/obj/item/weapon/twohanded/rcl/R = W
|
||||
else if(istype(W, /obj/item/twohanded/rcl))
|
||||
var/obj/item/twohanded/rcl/R = W
|
||||
if(R.loaded)
|
||||
R.loaded.cable_join(src, user)
|
||||
R.is_empty(user)
|
||||
@@ -468,7 +468,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
////////////////////////////////
|
||||
|
||||
var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
new /datum/stack_recipe/cable_restraints("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15),
|
||||
new /datum/stack_recipe/cable_restraints("cable restraints", /obj/item/restraints/handcuffs/cable, 15),
|
||||
)
|
||||
|
||||
/obj/item/stack/cable_coil
|
||||
@@ -584,7 +584,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(T.intact)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
to_chat(usr, "<span class='notice'>These cables are too tough to be cut with those [W.name].</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
|
||||
+14
-14
@@ -1,11 +1,11 @@
|
||||
// the power cell
|
||||
// charge from 0 to 100%
|
||||
// fits in APC to provide backup power
|
||||
/obj/item/weapon/stock_parts/cell/proc/percent() // return % charge of cell
|
||||
/obj/item/stock_parts/cell/proc/percent() // return % charge of cell
|
||||
return 100.0*charge/maxcharge
|
||||
|
||||
// use power from a cell
|
||||
/obj/item/weapon/stock_parts/cell/proc/use(amount)
|
||||
/obj/item/stock_parts/cell/proc/use(amount)
|
||||
if(rigged && amount > 0)
|
||||
explode()
|
||||
return 0
|
||||
@@ -15,7 +15,7 @@
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
/obj/item/weapon/stock_parts/cell/proc/give(amount)
|
||||
/obj/item/stock_parts/cell/proc/give(amount)
|
||||
if(rigged && amount > 0)
|
||||
explode()
|
||||
return 0
|
||||
@@ -25,21 +25,21 @@
|
||||
charge += power_used
|
||||
return power_used
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/examine(mob/user)
|
||||
/obj/item/stock_parts/cell/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
if(maxcharge <= 2500)
|
||||
to_chat(user, "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%.")
|
||||
else
|
||||
to_chat(user, "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%.")
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/attack_self(mob/user as mob)
|
||||
/obj/item/stock_parts/cell/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user, params)
|
||||
/obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = W
|
||||
if(istype(W, /obj/item/reagent_containers/syringe))
|
||||
var/obj/item/reagent_containers/syringe/S = W
|
||||
|
||||
to_chat(user, "You inject the solution into the power cell.")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
S.reagents.clear_reagents()
|
||||
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/explode()
|
||||
/obj/item/stock_parts/cell/proc/explode()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
/*
|
||||
* 1000-cell explosion(T, -1, 0, 1, 1)
|
||||
@@ -79,13 +79,13 @@
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/corrupt()
|
||||
/obj/item/stock_parts/cell/proc/corrupt()
|
||||
charge /= 2
|
||||
maxcharge /= 2
|
||||
if(prob(10))
|
||||
rigged = 1 //broken batterys are dangerous
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/emp_act(severity)
|
||||
/obj/item/stock_parts/cell/emp_act(severity)
|
||||
charge -= 1000 / severity
|
||||
if(charge < 0)
|
||||
charge = 0
|
||||
@@ -93,7 +93,7 @@
|
||||
reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/ex_act(severity)
|
||||
/obj/item/stock_parts/cell/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -113,10 +113,10 @@
|
||||
corrupt()
|
||||
return
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/blob_act()
|
||||
/obj/item/stock_parts/cell/blob_act()
|
||||
ex_act(1)
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
|
||||
/obj/item/stock_parts/cell/proc/get_electrocute_damage()
|
||||
switch(charge)
|
||||
/* if(9000 to INFINITY)
|
||||
return min(rand(90,150),rand(90,150))
|
||||
|
||||
@@ -158,8 +158,8 @@
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
/obj/machinery/power/generator/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = !anchored
|
||||
if(!anchored)
|
||||
disconnect()
|
||||
|
||||
@@ -186,13 +186,13 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
var/old_broken_state = broken_state
|
||||
switch(broken_state)
|
||||
if(GRAV_NEEDS_SCREWDRIVER)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
to_chat(user, "<span class='notice'>You secure the screws of the framework.</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
broken_state++
|
||||
if(GRAV_NEEDS_WELDING)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(1, user))
|
||||
to_chat(user, "<span class='notice'>You mend the damaged framework.</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
@@ -208,7 +208,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need 10 sheets of plasteel.</span>")
|
||||
if(GRAV_NEEDS_WRENCH)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
if(istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You secure the plating to the framework.</span>")
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
set_fix()
|
||||
@@ -404,7 +404,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
|
||||
// Misc
|
||||
|
||||
/obj/item/weapon/paper/gravity_gen
|
||||
/obj/item/paper/gravity_gen
|
||||
name = "paper- 'Generate your own gravity!'"
|
||||
info = {"<h1>Gravity Generator Instructions For Dummies</h1>
|
||||
<p>Surprisingly, gravity isn't that hard to make! All you have to do is inject deadly radioactive minerals into a ball of
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// The lighting system
|
||||
//
|
||||
// consists of light fixtures (/obj/machinery/light) and light tube/bulb items (/obj/item/weapon/light)
|
||||
// consists of light fixtures (/obj/machinery/light) and light tube/bulb items (/obj/item/light)
|
||||
|
||||
|
||||
// status values shared between lighting fixtures and items
|
||||
@@ -37,9 +37,9 @@
|
||||
if(3)
|
||||
to_chat(usr, "The casing is closed.")
|
||||
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
|
||||
/obj/machinery/light_construct/attackby(obj/item/W as obj, mob/living/user as mob, params)
|
||||
src.add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(src.stage == 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
to_chat(usr, "You begin deconstructing [src].")
|
||||
@@ -58,7 +58,7 @@
|
||||
to_chat(usr, "You have to unscrew the case first.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(src.stage != 2) return
|
||||
src.stage = 1
|
||||
switch(fixture_type)
|
||||
@@ -87,7 +87,7 @@
|
||||
"You add wires to [src].")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(src.stage == 2)
|
||||
switch(fixture_type)
|
||||
if("tube")
|
||||
@@ -145,7 +145,7 @@
|
||||
var/brightness_color = "#FFFFFF"
|
||||
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
||||
var/flickering = 0
|
||||
var/light_type = /obj/item/weapon/light/tube // the type of light item
|
||||
var/light_type = /obj/item/light/tube // the type of light item
|
||||
var/fitting = "tube"
|
||||
var/switchcount = 0 // count of number of times switched on/off
|
||||
// this is used to calc the probability the light burns out
|
||||
@@ -170,12 +170,12 @@
|
||||
brightness_color = "#a0a080"
|
||||
nightshift_light_range = 4
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
light_type = /obj/item/light/bulb
|
||||
|
||||
/obj/machinery/light/spot
|
||||
name = "spotlight"
|
||||
fitting = "large tube"
|
||||
light_type = /obj/item/weapon/light/tube/large
|
||||
light_type = /obj/item/light/tube/large
|
||||
brightness_range = 12
|
||||
brightness_power = 4
|
||||
|
||||
@@ -307,13 +307,13 @@
|
||||
return
|
||||
|
||||
// attempt to insert light
|
||||
if(istype(W, /obj/item/weapon/light))
|
||||
if(istype(W, /obj/item/light))
|
||||
if(status != LIGHT_EMPTY)
|
||||
to_chat(user, "There is a [fitting] already inserted.")
|
||||
return
|
||||
else
|
||||
src.add_fingerprint(user)
|
||||
var/obj/item/weapon/light/L = W
|
||||
var/obj/item/light/L = W
|
||||
if(istype(L, light_type))
|
||||
status = L.status
|
||||
to_chat(user, "You insert the [L.name].")
|
||||
@@ -363,7 +363,7 @@
|
||||
|
||||
// attempt to stick weapon into light socket
|
||||
else if(status == LIGHT_EMPTY)
|
||||
if(istype(W, /obj/item/weapon/screwdriver)) //If it's a screwdriver open it.
|
||||
if(istype(W, /obj/item/screwdriver)) //If it's a screwdriver open it.
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] opens [src]'s casing.", \
|
||||
"You open [src]'s casing.", "You hear a noise.")
|
||||
@@ -484,7 +484,7 @@
|
||||
|
||||
|
||||
// create a light tube/bulb item and put it in the user's hand
|
||||
var/obj/item/weapon/light/L = new light_type()
|
||||
var/obj/item/light/L = new light_type()
|
||||
L.status = status
|
||||
L.rigged = rigged
|
||||
L.brightness_range = brightness_range
|
||||
@@ -513,7 +513,7 @@
|
||||
|
||||
to_chat(user, "You telekinetically remove the light [fitting].")
|
||||
// create a light tube/bulb item and put it in the user's hand
|
||||
var/obj/item/weapon/light/L = new light_type()
|
||||
var/obj/item/light/L = new light_type()
|
||||
L.status = status
|
||||
L.rigged = rigged
|
||||
L.brightness_range = brightness_range
|
||||
@@ -608,7 +608,7 @@
|
||||
// can be tube or bulb subtypes
|
||||
// will fit into empty /obj/machinery/light of the corresponding type
|
||||
|
||||
/obj/item/weapon/light
|
||||
/obj/item/light
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
force = 2
|
||||
throwforce = 5
|
||||
@@ -622,7 +622,7 @@
|
||||
var/brightness_power = 1
|
||||
var/brightness_color = null
|
||||
|
||||
/obj/item/weapon/light/tube
|
||||
/obj/item/light/tube
|
||||
name = "light tube"
|
||||
desc = "A replacement light tube."
|
||||
icon_state = "ltube"
|
||||
@@ -630,13 +630,13 @@
|
||||
item_state = "c_tube"
|
||||
brightness_range = 8
|
||||
|
||||
/obj/item/weapon/light/tube/large
|
||||
/obj/item/light/tube/large
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
name = "large light tube"
|
||||
brightness_range = 15
|
||||
brightness_power = 2
|
||||
|
||||
/obj/item/weapon/light/bulb
|
||||
/obj/item/light/bulb
|
||||
name = "light bulb"
|
||||
desc = "A replacement light bulb."
|
||||
icon_state = "lbulb"
|
||||
@@ -645,11 +645,11 @@
|
||||
brightness_range = 5
|
||||
brightness_color = "#a0a080"
|
||||
|
||||
/obj/item/weapon/light/throw_impact(atom/hit_atom)
|
||||
/obj/item/light/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
shatter()
|
||||
|
||||
/obj/item/weapon/light/bulb/fire
|
||||
/obj/item/light/bulb/fire
|
||||
name = "fire bulb"
|
||||
desc = "A replacement fire bulb."
|
||||
icon_state = "fbulb"
|
||||
@@ -659,7 +659,7 @@
|
||||
|
||||
// update the icon state and description of the light
|
||||
|
||||
/obj/item/weapon/light/proc/update()
|
||||
/obj/item/light/proc/update()
|
||||
switch(status)
|
||||
if(LIGHT_OK)
|
||||
icon_state = base_state
|
||||
@@ -672,7 +672,7 @@
|
||||
desc = "A broken [name]."
|
||||
|
||||
|
||||
/obj/item/weapon/light/New()
|
||||
/obj/item/light/New()
|
||||
..()
|
||||
switch(name)
|
||||
if("light tube")
|
||||
@@ -684,10 +684,10 @@
|
||||
|
||||
// attack bulb/tube with object
|
||||
// if a syringe, can inject plasma to make it explode
|
||||
/obj/item/weapon/light/attackby(var/obj/item/I, var/mob/user, params)
|
||||
/obj/item/light/attackby(var/obj/item/I, var/mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = I
|
||||
if(istype(I, /obj/item/reagent_containers/syringe))
|
||||
var/obj/item/reagent_containers/syringe/S = I
|
||||
|
||||
to_chat(user, "You inject the solution into the [src].")
|
||||
|
||||
@@ -707,7 +707,7 @@
|
||||
// shatter light, unless it was an attempt to put it in a light socket
|
||||
// now only shatter if the intent was harm
|
||||
|
||||
/obj/item/weapon/light/afterattack(atom/target, mob/user, proximity)
|
||||
/obj/item/light/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target, /obj/machinery/light))
|
||||
return
|
||||
@@ -716,7 +716,7 @@
|
||||
|
||||
shatter()
|
||||
|
||||
/obj/item/weapon/light/proc/shatter()
|
||||
/obj/item/light/proc/shatter()
|
||||
if(status == LIGHT_OK || status == LIGHT_BURNED)
|
||||
src.visible_message("<span class='warning'>[name] shatters.</span>","<span class='warning'>You hear a small glass object shatter.</span>")
|
||||
status = LIGHT_BROKEN
|
||||
@@ -725,7 +725,7 @@
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
update()
|
||||
|
||||
/obj/item/weapon/light/suicide_act(mob/living/carbon/human/user)
|
||||
/obj/item/light/suicide_act(mob/living/carbon/human/user)
|
||||
user.visible_message("<span class=suicide>[user] touches \the [src], burning their hands off!</span>", "<span class=suicide>You touch \the [src], burning your hands off!</span>")
|
||||
|
||||
for(var/oname in list("l_hand", "r_hand"))
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
var/sheet_name = "Plasma Sheets"
|
||||
var/sheet_path = /obj/item/stack/sheet/mineral/plasma
|
||||
var/board_path = /obj/item/weapon/circuitboard/pacman
|
||||
var/board_path = /obj/item/circuitboard/pacman
|
||||
|
||||
/*
|
||||
These values were chosen so that the generator can run safely up to 80 kW
|
||||
@@ -120,22 +120,22 @@
|
||||
/obj/machinery/power/port_gen/pacman/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
component_parts += new board_path(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new board_path(null)
|
||||
RefreshParts()
|
||||
|
||||
@@ -145,10 +145,10 @@
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/RefreshParts()
|
||||
var/temp_rating = 0
|
||||
for(var/obj/item/weapon/stock_parts/SP in component_parts)
|
||||
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
|
||||
for(var/obj/item/stock_parts/SP in component_parts)
|
||||
if(istype(SP, /obj/item/stock_parts/matter_bin))
|
||||
max_sheets = SP.rating * SP.rating * 50
|
||||
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
|
||||
else if(istype(SP, /obj/item/stock_parts/micro_laser) || istype(SP, /obj/item/stock_parts/capacitor))
|
||||
temp_rating += SP.rating
|
||||
|
||||
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
|
||||
@@ -283,7 +283,7 @@
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
else if(!active)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
if(istype(O, /obj/item/wrench))
|
||||
|
||||
if(!anchored)
|
||||
connect_to_network()
|
||||
@@ -295,17 +295,17 @@
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
else if(istype(O, /obj/item/screwdriver))
|
||||
panel_open = !panel_open
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>You open the access panel.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You close the access panel.</span>")
|
||||
else if(istype(O, /obj/item/weapon/storage/part_replacer) && panel_open)
|
||||
else if(istype(O, /obj/item/storage/part_replacer) && panel_open)
|
||||
exchange_parts(user, O)
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/crowbar) && panel_open)
|
||||
else if(istype(O, /obj/item/crowbar) && panel_open)
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
|
||||
@@ -391,16 +391,16 @@
|
||||
sheet_path = /obj/item/stack/sheet/mineral/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
|
||||
board_path = /obj/item/circuitboard/pacman/super
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new board_path(null)
|
||||
RefreshParts()
|
||||
|
||||
@@ -438,16 +438,16 @@
|
||||
time_per_sheet = 576
|
||||
max_temperature = 800
|
||||
temperature_gain = 90
|
||||
board_path = /obj/item/weapon/circuitboard/pacman/mrs
|
||||
board_path = /obj/item/circuitboard/pacman/mrs
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/mrs/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new board_path(null)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
// attach a wire to a power machine - leads from the turf you are standing on
|
||||
//almost never called, overwritten by all power machines but terminal and generator
|
||||
/obj/machinery/power/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/machinery/power/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
|
||||
@@ -337,11 +337,11 @@
|
||||
power_source = Cable.powernet
|
||||
|
||||
var/datum/powernet/PN
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
|
||||
if(istype(power_source,/datum/powernet))
|
||||
PN = power_source
|
||||
else if(istype(power_source,/obj/item/weapon/stock_parts/cell))
|
||||
else if(istype(power_source,/obj/item/stock_parts/cell))
|
||||
cell = power_source
|
||||
else if(istype(power_source,/obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/apc = power_source
|
||||
@@ -376,6 +376,6 @@
|
||||
else if(istype(power_source,/datum/powernet))
|
||||
var/drained_power = drained_energy/CELLRATE //convert from "joules" to "watts"
|
||||
drained_power = PN.draw_power(drained_power)
|
||||
else if(istype(power_source, /obj/item/weapon/stock_parts/cell))
|
||||
else if(istype(power_source, /obj/item/stock_parts/cell))
|
||||
cell.use(drained_energy)
|
||||
return drained_energy
|
||||
|
||||
@@ -9,7 +9,7 @@ var/global/list/rad_collectors = list()
|
||||
density = 1
|
||||
req_access = list(access_engine_equip)
|
||||
// use_power = 0
|
||||
var/obj/item/weapon/tank/plasma/P = null
|
||||
var/obj/item/tank/plasma/P = null
|
||||
var/last_power = 0
|
||||
var/active = 0
|
||||
var/locked = 0
|
||||
@@ -53,7 +53,7 @@ var/global/list/rad_collectors = list()
|
||||
return 1
|
||||
else if(istype(W, /obj/item/device/analyzer) && P)
|
||||
atmosanalyzer_scan(P.air_contents, user)
|
||||
else if(istype(W, /obj/item/weapon/tank/plasma))
|
||||
else if(istype(W, /obj/item/tank/plasma))
|
||||
if(!src.anchored)
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be secured to the floor first.</span>")
|
||||
return 1
|
||||
@@ -64,11 +64,11 @@ var/global/list/rad_collectors = list()
|
||||
src.P = W
|
||||
W.loc = src
|
||||
update_icons()
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
if(P && !src.locked)
|
||||
eject()
|
||||
return 1
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
if(P)
|
||||
to_chat(user, "<span class='notice'>Remove the plasma tank first.</span>")
|
||||
return 1
|
||||
@@ -81,7 +81,7 @@ var/global/list/rad_collectors = list()
|
||||
connect_to_network()
|
||||
else
|
||||
disconnect_from_network()
|
||||
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
|
||||
if(src.allowed(user))
|
||||
if(active)
|
||||
src.locked = !src.locked
|
||||
@@ -106,7 +106,7 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/eject()
|
||||
locked = 0
|
||||
var/obj/item/weapon/tank/plasma/Z = src.P
|
||||
var/obj/item/tank/plasma/Z = src.P
|
||||
if(!Z)
|
||||
return
|
||||
Z.loc = get_turf(src)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
/obj/machinery/power/emitter/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/emitter(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/circuitboard/emitter(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/emitter/RefreshParts()
|
||||
@@ -38,14 +38,14 @@
|
||||
var/firedelay = 120
|
||||
var/min_firedelay = 24
|
||||
var/power_usage = 350
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts)
|
||||
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
|
||||
max_firedelay -= 20 * L.rating
|
||||
min_firedelay -= 4 * L.rating
|
||||
firedelay -= 20 * L.rating
|
||||
maximum_fire_delay = max_firedelay
|
||||
minimum_fire_delay = min_firedelay
|
||||
fire_delay = firedelay
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
power_usage -= 50 * M.rating
|
||||
active_power_usage = power_usage
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
update_multitool_menu(user)
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(active)
|
||||
to_chat(user, "Turn off the [src] first.")
|
||||
return
|
||||
@@ -253,8 +253,8 @@
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be unwelded from the floor.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(active)
|
||||
to_chat(user, "Turn off the [src] first.")
|
||||
return
|
||||
@@ -289,7 +289,7 @@
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>The lock seems to be broken</span>")
|
||||
return
|
||||
|
||||
@@ -80,7 +80,7 @@ field_generator power level display
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be off!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
switch(state)
|
||||
if(FG_UNSECURED)
|
||||
if(isinspace()) return
|
||||
@@ -100,8 +100,8 @@ field_generator power level display
|
||||
if(FG_WELDED)
|
||||
to_chat(user, "<span class='warning'>The [name] needs to be unwelded from the floor!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
switch(state)
|
||||
if(FG_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>The [name] needs to be wrenched to the floor!</span>")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(src) qdel(src)
|
||||
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/singularity/attack_animal(mob/user)
|
||||
consume(user)
|
||||
|
||||
/obj/singularity/attackby(obj/item/weapon/W, mob/user, params)
|
||||
/obj/singularity/attackby(obj/item/W, mob/user, params)
|
||||
consume(user)
|
||||
return 1
|
||||
|
||||
|
||||
+17
-17
@@ -43,13 +43,13 @@
|
||||
/obj/machinery/power/smes/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
@@ -76,24 +76,24 @@
|
||||
/obj/machinery/power/smes/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/hyper(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/smes/RefreshParts()
|
||||
var/IO = 0
|
||||
var/C = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/CP in component_parts)
|
||||
for(var/obj/item/stock_parts/capacitor/CP in component_parts)
|
||||
IO += CP.rating
|
||||
input_level_max = 200000 * IO
|
||||
output_level_max = 200000 * IO
|
||||
for(var/obj/item/weapon/stock_parts/cell/PC in component_parts)
|
||||
for(var/obj/item/stock_parts/cell/PC in component_parts)
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
return
|
||||
|
||||
//disassembling the terminal
|
||||
if(istype(I, /obj/item/weapon/wirecutters) && terminal && panel_open)
|
||||
if(istype(I, /obj/item/wirecutters) && terminal && panel_open)
|
||||
var/turf/T = get_turf(terminal)
|
||||
if(T.intact) //is the floor plating removed ?
|
||||
to_chat(user, "<span class='alert'>You must first expose the power terminal!</span>")
|
||||
|
||||
+17
-17
@@ -55,9 +55,9 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user, params)
|
||||
/obj/machinery/power/solar/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user.visible_message("[user] begins to take the glass off the solar panel.", "<span class='notice'>You begin to take the glass off the solar panel...</span>")
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
@@ -87,8 +87,8 @@
|
||||
if(!(stat & BROKEN))
|
||||
broken()
|
||||
else
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/shard(src.loc)
|
||||
new /obj/item/shard(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -150,10 +150,10 @@
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50) && broken())
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/shard(src.loc)
|
||||
if(3)
|
||||
if(prob(25) && broken())
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/shard(src.loc)
|
||||
|
||||
/obj/machinery/power/solar/blob_act()
|
||||
if(prob(75))
|
||||
@@ -221,16 +221,16 @@
|
||||
glass_type = null
|
||||
|
||||
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/W, var/mob/user, params)
|
||||
|
||||
if(!anchored && isturf(loc))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = 1
|
||||
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
return 1
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = 0
|
||||
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
@@ -252,7 +252,7 @@
|
||||
return 1
|
||||
|
||||
if(!tracker)
|
||||
if(istype(W, /obj/item/weapon/tracker_electronics))
|
||||
if(istype(W, /obj/item/tracker_electronics))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
tracker = 1
|
||||
@@ -260,8 +260,8 @@
|
||||
user.visible_message("[user] inserts the electronics into the solar assembly.", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
|
||||
return 1
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/weapon/tracker_electronics(src.loc)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /obj/item/tracker_electronics(src.loc)
|
||||
tracker = 0
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
|
||||
@@ -412,14 +412,14 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20 * I.toolspeed, target = src))
|
||||
if(src.stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
new /obj/item/shard( src.loc )
|
||||
var/obj/item/circuitboard/solar_control/M = new /obj/item/circuitboard/solar_control( A )
|
||||
for(var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
@@ -430,7 +430,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
var/obj/item/circuitboard/solar_control/M = new /obj/item/circuitboard/solar_control( A )
|
||||
for(var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
@@ -534,6 +534,6 @@
|
||||
// MISC
|
||||
//
|
||||
|
||||
/obj/item/weapon/paper/solar
|
||||
/obj/item/paper/solar
|
||||
name = "paper- 'Going green! Setup your own solar array instructions.'"
|
||||
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/obj/item/weapon/shard/supermatter
|
||||
/obj/item/shard/supermatter
|
||||
name = "supermatter shard"
|
||||
desc = "A shard of supermatter. Incredibly dangerous, though not large enough to go critical."
|
||||
force = 10.0
|
||||
@@ -12,7 +12,7 @@
|
||||
light_color = "#8A8A00"
|
||||
var/brightness = 2
|
||||
|
||||
/obj/item/weapon/shard/supermatter/New()
|
||||
/obj/item/shard/supermatter/New()
|
||||
src.icon_state = "supermatter" + pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("supermattersmall")
|
||||
@@ -28,20 +28,20 @@
|
||||
|
||||
set_light(brightness)
|
||||
|
||||
/obj/item/weapon/shard/supermatter/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if( istype( W, /obj/item/weapon/tongs ))
|
||||
var/obj/item/weapon/tongs/T = W
|
||||
/obj/item/shard/supermatter/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if( istype( W, /obj/item/tongs ))
|
||||
var/obj/item/tongs/T = W
|
||||
T.pick_up( src )
|
||||
T.icon_state = "tongs_supermatter"
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shard/supermatter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/shard/supermatter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/supermatter/Crossed(AM as mob|obj)
|
||||
/obj/item/shard/supermatter/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
to_chat(M, "<span class='danger'>You step on \the [src]!</span>")
|
||||
@@ -64,7 +64,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/shard/supermatter/attack_hand(var/mob/user)
|
||||
/obj/item/shard/supermatter/attack_hand(var/mob/user)
|
||||
if(!istype(user,/mob/living/carbon/human/nucleation))
|
||||
to_chat(user, pick( "<span class='warning'>You think twice before touching that without protection.</span>",)
|
||||
"<span class='warning'>You don't want to touch that without some protection.</span>",
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tongs
|
||||
/obj/item/tongs
|
||||
name = "tongs"
|
||||
desc = "Tungsten-alloy tongs used for handling dangerous materials."
|
||||
force = 7.0
|
||||
@@ -89,12 +89,12 @@
|
||||
flags = CONDUCT
|
||||
var/obj/item/held = null // The item currently being held
|
||||
|
||||
/obj/item/weapon/tongs/proc/pick_up( var/obj/item/I )
|
||||
/obj/item/tongs/proc/pick_up( var/obj/item/I )
|
||||
held = I
|
||||
I.loc = src
|
||||
playsound(loc, 'sound/effects/tong_pickup.ogg', 50, 1, -1)
|
||||
|
||||
/obj/item/weapon/tongs/attack_self(var/mob/user as mob)
|
||||
/obj/item/tongs/attack_self(var/mob/user as mob)
|
||||
if( held )
|
||||
var/turf/T = get_turf(user.loc)
|
||||
held.loc = T
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
/obj/machinery/power/tesla_coil/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/tesla_coil(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/circuitboard/tesla_coil(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
wires = new(src)
|
||||
RefreshParts()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/obj/machinery/power/tesla_coil/RefreshParts()
|
||||
var/power_multiplier = 0
|
||||
zap_cooldown = 100
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
power_multiplier += C.rating
|
||||
zap_cooldown -= (C.rating * 20)
|
||||
input_power_multiplier = power_multiplier
|
||||
@@ -92,8 +92,8 @@
|
||||
/obj/machinery/power/grounding_rod/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/grounding_rod(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/circuitboard/grounding_rod(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/grounding_rod/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
|
||||
control.cdir = angle
|
||||
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar tracker.</span>")
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
// Tracker Electronic
|
||||
|
||||
/obj/item/weapon/tracker_electronics
|
||||
/obj/item/tracker_electronics
|
||||
|
||||
name = "tracker electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
desc = "A computer to remotely control a gas turbine"
|
||||
icon_screen = "turbinecomp"
|
||||
icon_keyboard = "tech_key"
|
||||
circuit = /obj/item/weapon/circuitboard/turbine_computer
|
||||
circuit = /obj/item/circuitboard/turbine_computer
|
||||
var/obj/machinery/power/compressor/compressor
|
||||
var/id = 0
|
||||
|
||||
@@ -67,13 +67,13 @@
|
||||
/obj/machinery/power/compressor/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/power_compressor(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/circuitboard/power_compressor(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
// The inlet of the compressor is the direction it faces
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/obj/machinery/power/compressor/RefreshParts()
|
||||
var/E = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = E / 6
|
||||
|
||||
@@ -188,13 +188,13 @@
|
||||
/obj/machinery/power/turbine/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/power_turbine(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/circuitboard/power_turbine(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 5)
|
||||
RefreshParts()
|
||||
// The outlet is pointed at the direction of the turbine component
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
/obj/machinery/power/turbine/RefreshParts()
|
||||
var/P = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
P += C.rating
|
||||
productivity = P / 6
|
||||
|
||||
|
||||
Reference in New Issue
Block a user