Merge branch 'master' into upstream-merge-29718

This commit is contained in:
LetterJay
2017-08-29 01:48:22 -05:00
committed by GitHub
1727 changed files with 77012 additions and 88433 deletions
@@ -1,4 +1,4 @@
/obj/item/weapon/am_containment
/obj/item/am_containment
name = "antimatter containment jar"
desc = "Holds antimatter."
icon = 'icons/obj/machines/antimatter.dmi'
@@ -15,7 +15,7 @@
var/stability = 100//TODO: add all the stability things to this so its not very safe if you keep hitting in on things
/obj/item/weapon/am_containment/ex_act(severity, target)
/obj/item/am_containment/ex_act(severity, target)
switch(severity)
if(1)
explosion(get_turf(src), 1, 2, 3, 5)//Should likely be larger but this works fine for now I guess
@@ -33,7 +33,7 @@
//check_stability()
return
/obj/item/weapon/am_containment/proc/usefuel(wanted)
/obj/item/am_containment/proc/usefuel(wanted)
if(fuel < wanted)
wanted = fuel
fuel -= wanted
+6 -7
View File
@@ -11,7 +11,7 @@
var/list/obj/machinery/am_shielding/linked_shielding
var/list/obj/machinery/am_shielding/linked_cores
var/obj/item/weapon/am_containment/fueljar
var/obj/item/am_containment/fueljar
var/update_shield_icons = 0
var/stability = 100
var/exploding = 0
@@ -29,8 +29,8 @@
var/stored_power = 0//Power to deploy per tick
/obj/machinery/power/am_control_unit/New()
..()
/obj/machinery/power/am_control_unit/Initialize()
. = ..()
linked_shielding = list()
linked_cores = list()
@@ -39,8 +39,7 @@
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.control_unit = null
qdel(AMS)
qdel(fueljar)
fueljar = null
QDEL_NULL(fueljar)
return ..()
@@ -158,7 +157,7 @@
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
if(!anchored)
playsound(src.loc, W.usesound, 75, 1)
user.visible_message("[user.name] secures the [src.name] to the floor.", \
@@ -176,7 +175,7 @@
else
to_chat(user, "<span class='warning'>Once bolted and linked to a shielding unit it the [src.name] is unable to be moved!</span>")
else if(istype(W, /obj/item/weapon/am_containment))
else if(istype(W, /obj/item/am_containment))
if(fueljar)
to_chat(user, "<span class='warning'>There is already a [fueljar] inside!</span>")
return
+1 -1
View File
@@ -233,7 +233,7 @@
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
flags = CONDUCT
flags_1 = CONDUCT_1
throwforce = 5
throw_speed = 1
throw_range = 2
+24 -20
View File
@@ -53,7 +53,7 @@
var/lon_range = 1.5
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 // 0=no cell, 1=regular, 2=high-cap (x5) <- old, now it's just 0=no cell, otherwise dictate cellcapacity by changing this value. 1 used to be 1000, 2 was 2500
var/opened = 0 //0=closed, 1=opened, 2=cover removed
@@ -120,8 +120,15 @@
if(auto_name)
name = "\improper [get_area(src)] APC"
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24)
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0
switch(tdir)
if(NORTH)
pixel_y = 23
if(SOUTH)
pixel_y = -23
if(EAST)
pixel_x = 24
if(WEST)
pixel_x = -25
if (building)
area = get_area(src)
opened = 1
@@ -170,7 +177,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)
@@ -356,7 +363,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
if(issilicon(user) && get_dist(src,user)>1)
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/crowbar)) //Using crowbar
if (istype(W, /obj/item/crowbar)) //Using crowbar
if (opened) // a) on open apc
if (has_electronics==1)
if (terminal)
@@ -391,7 +398,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
user.visible_message(\
"[user.name] has removed the power control board from [src.name]!",\
"<span class='notice'>You remove the power control board.</span>")
new /obj/item/weapon/electronics/apc(loc)
new /obj/item/electronics/apc(loc)
return
else if (opened!=2) //cover isn't removed
opened = 0
@@ -410,7 +417,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
update_icon()
return
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, "<span class='warning'>There is a power cell already installed!</span>")
return
@@ -428,7 +435,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
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!
@@ -510,10 +517,10 @@ addtimer(CALLBACK(src, .proc/update), 5)
make_terminal()
terminal.connect_to_network()
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened)
else if (istype(W, /obj/item/wirecutters) && terminal && opened)
terminal.dismantle(user, W)
else if (istype(W, /obj/item/weapon/electronics/apc) && opened)
else if (istype(W, /obj/item/electronics/apc) && opened)
if (has_electronics!=0) // there are already electronicks inside
to_chat(user, "<span class='warning'>You cannot put the board inside, there already is one!</span>")
return
@@ -531,8 +538,8 @@ addtimer(CALLBACK(src, .proc/update), 5)
to_chat(user, "<span class='notice'>You place the power control board inside the frame.</span>")
qdel(W)
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
@@ -593,11 +600,11 @@ addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/obj_break(damage_flag)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
set_broken()
/obj/machinery/power/apc/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
set_broken()
if(opened != 2)
@@ -867,7 +874,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
occupier.loc = src.loc
occupier.death()
occupier.gib()
for(var/obj/item/weapon/pinpointer/P in GLOB.pinpointer_list)
for(var/obj/item/pinpointer/P in GLOB.pinpointer_list)
P.switch_mode_to(TRACK_NUKE_DISK) //Pinpointers go back to tracking the nuke disk
P.nuke_warning = FALSE
@@ -895,7 +902,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
transfer_in_progress = TRUE
user.visible_message("<span class='notice'>[user] slots [card] into [src]...</span>", "<span class='notice'>Transfer process initiated. Sending request for AI approval...</span>")
playsound(src, 'sound/machines/click.ogg', 50, 1)
occupier << sound('sound/misc/notice2.ogg') //To alert the AI that someone's trying to card them if they're tabbed out
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
to_chat(user, "<span class='danger'>AI denied transfer request. Process terminated.</span>")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
@@ -989,9 +996,6 @@ addtimer(CALLBACK(src, .proc/update), 5)
else
main_status = 2
//if(debug)
// world.log << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]"
if(cell && !shorted)
// draw power from cell as before to power the area
var/cellused = min(cell.charge, GLOB.CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
@@ -1243,7 +1247,7 @@ addtimer(CALLBACK(src, .proc/update), 5)
#undef APC_UPDATE_ICON_COOLDOWN
/*Power module, used for APC construction*/
/obj/item/weapon/electronics/apc
/obj/item/electronics/apc
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
+6 -6
View File
@@ -93,7 +93,7 @@ By design, d1 is the smallest direction and d2 is the highest
return ..() // then go ahead and delete the cable
/obj/structure/cable/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
var/turf/T = loc
stored.forceMove(T)
qdel(src)
@@ -119,7 +119,7 @@ By design, d1 is the smallest direction and d2 is the highest
var/turf/T = get_turf(src)
if(T.intact)
return
if(istype(W, /obj/item/weapon/wirecutters))
if(istype(W, /obj/item/wirecutters))
if (shock(user, 50))
return
user.visible_message("[user] cuts the cable.", "<span class='notice'>You cut the cable.</span>")
@@ -135,8 +135,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)
@@ -460,7 +460,7 @@ By design, d1 is the smallest direction and d2 is the highest
// Definitions
////////////////////////////////
GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15)))
GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restraints", /obj/item/restraints/handcuffs/cable, 15)))
/obj/item/stack/cable_coil
name = "cable coil"
@@ -480,7 +480,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10, MAT_GLASS=5)
flags = CONDUCT
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
singular_name = "cable piece"
+50 -50
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/stock_parts/cell
/obj/item/stock_parts/cell
name = "power cell"
desc = "A rechargeable electrochemical power cell."
icon = 'icons/obj/power.dmi'
@@ -21,10 +21,10 @@
var/ratingdesc = TRUE
var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it.
/obj/item/weapon/stock_parts/cell/get_cell()
/obj/item/stock_parts/cell/get_cell()
return src
/obj/item/weapon/stock_parts/cell/New()
/obj/item/stock_parts/cell/New()
..()
START_PROCESSING(SSobj, src)
charge = maxcharge
@@ -32,11 +32,11 @@
desc += " This one has a power rating of [maxcharge], and you should not swallow it."
update_icon()
/obj/item/weapon/stock_parts/cell/Destroy()
/obj/item/stock_parts/cell/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/stock_parts/cell/vv_edit_var(var_name, var_value)
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
switch(var_name)
if("self_recharge")
if(var_value)
@@ -45,13 +45,13 @@
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/weapon/stock_parts/cell/process()
/obj/item/stock_parts/cell/process()
if(self_recharge)
give(chargerate * 0.25)
else
return PROCESS_KILL
/obj/item/weapon/stock_parts/cell/update_icon()
/obj/item/stock_parts/cell/update_icon()
cut_overlays()
if(grown_battery)
add_overlay("grown_wires")
@@ -62,11 +62,11 @@
else
add_overlay("cell-o1")
/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*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
@@ -78,7 +78,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
@@ -88,28 +88,28 @@
charge += power_used
return power_used
/obj/item/weapon/stock_parts/cell/examine(mob/user)
/obj/item/stock_parts/cell/examine(mob/user)
..()
if(rigged)
to_chat(user, "<span class='danger'>This power cell seems to be faulty!</span>")
else
to_chat(user, "The charge meter reads [round(src.percent() )]%.")
/obj/item/weapon/stock_parts/cell/suicide_act(mob/user)
/obj/item/stock_parts/cell/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
/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, "<span class='notice'>You inject the solution into the power cell.</span>")
if(S.reagents.has_reagent("plasma", 5))
rigged = 1
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)
@@ -131,19 +131,19 @@
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 = max(maxcharge/2, chargerate)
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
..()
/obj/item/weapon/stock_parts/cell/ex_act(severity, target)
/obj/item/stock_parts/cell/ex_act(severity, target)
..()
if(!QDELETED(src))
switch(severity)
@@ -155,53 +155,53 @@
corrupt()
/obj/item/weapon/stock_parts/cell/blob_act(obj/structure/blob/B)
/obj/item/stock_parts/cell/blob_act(obj/structure/blob/B)
ex_act(EXPLODE_DEVASTATE)
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
/obj/item/stock_parts/cell/proc/get_electrocute_damage()
if(charge >= 1000)
return Clamp(round(charge/10000), 10, 90) + rand(-5,5)
else
return 0
/* Cell variants*/
/obj/item/weapon/stock_parts/cell/crap
/obj/item/stock_parts/cell/crap
name = "\improper Nanotrasen brand rechargeable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
maxcharge = 500
materials = list(MAT_GLASS=40)
rating = 2
/obj/item/weapon/stock_parts/cell/crap/empty/New()
/obj/item/stock_parts/cell/crap/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/secborg
/obj/item/stock_parts/cell/secborg
name = "security borg rechargeable D battery"
origin_tech = null
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
materials = list(MAT_GLASS=40)
rating = 2.5
/obj/item/weapon/stock_parts/cell/secborg/empty/New()
/obj/item/stock_parts/cell/secborg/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/pulse //200 pulse shots
/obj/item/stock_parts/cell/pulse //200 pulse shots
name = "pulse rifle power cell"
maxcharge = 40000
rating = 3
chargerate = 1500
/obj/item/weapon/stock_parts/cell/pulse/carbine //25 pulse shots
/obj/item/stock_parts/cell/pulse/carbine //25 pulse shots
name = "pulse carbine power cell"
maxcharge = 5000
/obj/item/weapon/stock_parts/cell/pulse/pistol //10 pulse shots
/obj/item/stock_parts/cell/pulse/pistol //10 pulse shots
name = "pulse pistol power cell"
maxcharge = 2000
/obj/item/weapon/stock_parts/cell/high
/obj/item/stock_parts/cell/high
name = "high-capacity power cell"
origin_tech = "powerstorage=2"
icon_state = "hcell"
@@ -210,18 +210,18 @@
rating = 3
chargerate = 1500
/obj/item/weapon/stock_parts/cell/high/plus
/obj/item/stock_parts/cell/high/plus
name = "high-capacity power cell+"
desc = "Where did these come from?"
icon_state = "h+cell"
maxcharge = 15000
chargerate = 2250
/obj/item/weapon/stock_parts/cell/high/empty/New()
/obj/item/stock_parts/cell/high/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/super
/obj/item/stock_parts/cell/super
name = "super-capacity power cell"
origin_tech = "powerstorage=3;materials=3"
icon_state = "scell"
@@ -230,11 +230,11 @@
rating = 4
chargerate = 2000
/obj/item/weapon/stock_parts/cell/super/empty/New()
/obj/item/stock_parts/cell/super/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/hyper
/obj/item/stock_parts/cell/hyper
name = "hyper-capacity power cell"
origin_tech = "powerstorage=4;engineering=4;materials=4"
icon_state = "hpcell"
@@ -243,11 +243,11 @@
rating = 5
chargerate = 3000
/obj/item/weapon/stock_parts/cell/hyper/empty/New()
/obj/item/stock_parts/cell/hyper/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/bluespace
/obj/item/stock_parts/cell/bluespace
name = "bluespace power cell"
desc = "A rechargeable transdimensional power cell."
origin_tech = "powerstorage=5;bluespace=4;materials=4;engineering=4"
@@ -257,11 +257,11 @@
rating = 6
chargerate = 4000
/obj/item/weapon/stock_parts/cell/bluespace/empty/New()
/obj/item/stock_parts/cell/bluespace/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/infinite
/obj/item/stock_parts/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = "powerstorage=7"
@@ -270,10 +270,10 @@
rating = 6
chargerate = 30000
/obj/item/weapon/stock_parts/cell/infinite/use()
/obj/item/stock_parts/cell/infinite/use()
return 1
/obj/item/weapon/stock_parts/cell/infinite/abductor
/obj/item/stock_parts/cell/infinite/abductor
name = "void core"
desc = "An alien power cell that produces energy seemingly out of nowhere."
icon = 'icons/obj/abductor.dmi'
@@ -283,11 +283,11 @@
rating = 12
ratingdesc = FALSE
/obj/item/weapon/stock_parts/cell/infinite/abductor/update_icon()
/obj/item/stock_parts/cell/infinite/abductor/update_icon()
return
/obj/item/weapon/stock_parts/cell/potato
/obj/item/stock_parts/cell/potato
name = "potato battery"
desc = "A rechargeable starch based power cell."
icon = 'icons/obj/hydroponics/harvest.dmi'
@@ -299,7 +299,7 @@
rating = 1
grown_battery = TRUE //it has the overlays for wires
/obj/item/weapon/stock_parts/cell/high/slime
/obj/item/stock_parts/cell/high/slime
name = "charged slime core"
desc = "A yellow slime core infused with plasma, it crackles with power."
origin_tech = "powerstorage=5;biotech=4"
@@ -308,31 +308,31 @@
materials = list()
self_recharge = 1 // Infused slime cores self-recharge, over time
/obj/item/weapon/stock_parts/cell/emproof
/obj/item/stock_parts/cell/emproof
name = "\improper EMP-proof cell"
desc = "An EMP-proof cell."
maxcharge = 500
rating = 2
/obj/item/weapon/stock_parts/cell/emproof/empty/New()
/obj/item/stock_parts/cell/emproof/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/emproof/emp_act(severity)
/obj/item/stock_parts/cell/emproof/emp_act(severity)
return
/obj/item/weapon/stock_parts/cell/emproof/corrupt()
/obj/item/stock_parts/cell/emproof/corrupt()
return
/obj/item/weapon/stock_parts/cell/beam_rifle
/obj/item/stock_parts/cell/beam_rifle
name = "beam rifle capacitor"
desc = "A high powered capacitor that can provide huge amounts of energy in an instant"
maxcharge = 50000
chargerate = 5000 //Extremely energy intensive
rating = 4
/obj/item/weapon/stock_parts/cell/beam_rifle/corrupt()
/obj/item/stock_parts/cell/beam_rifle/corrupt()
return
/obj/item/weapon/stock_parts/cell/beam_rifle/emp_act(severity)
/obj/item/stock_parts/cell/beam_rifle/emp_act(severity)
charge = Clamp((charge-(10000/severity)),0,maxcharge)
+4 -4
View File
@@ -9,7 +9,7 @@
var/state = FLOODLIGHT_NEEDS_WRENCHING
/obj/structure/floodlight_frame/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/wrench) && (state == FLOODLIGHT_NEEDS_WRENCHING))
if(istype(O, /obj/item/wrench) && (state == FLOODLIGHT_NEEDS_WRENCHING))
to_chat(user, "<span class='notice'>You secure the [src].</span>")
anchored = TRUE
state = FLOODLIGHT_NEEDS_WIRES
@@ -22,12 +22,12 @@
desc = "A bare metal frame looking vaguely like a floodlight. Requires securing with a screwdriver."
icon_state = "floodlight_c2"
state = FLOODLIGHT_NEEDS_SECURING
else if(istype(O, /obj/item/weapon/light/tube) && (state == FLOODLIGHT_NEEDS_LIGHTS))
else if(istype(O, /obj/item/light/tube) && (state == FLOODLIGHT_NEEDS_LIGHTS))
if(user.transferItemToLoc(O))
to_chat(user, "<span class='notice'>You put lights in the [src].</span>")
new /obj/machinery/power/floodlight(src.loc)
qdel(src)
else if(istype(O, /obj/item/weapon/screwdriver) && (state == FLOODLIGHT_NEEDS_SECURING))
else if(istype(O, /obj/item/screwdriver) && (state == FLOODLIGHT_NEEDS_SECURING))
to_chat(user, "<span class='notice'>You fasten the wiring and electronics in [src].</span>")
name = "secured [name]"
desc = "A bare metal frame that looks like a floodlight. Requires light tubes."
@@ -82,7 +82,7 @@
to_chat(user, "You set the [src] to [setting_text].")
/obj/machinery/power/floodlight/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/wrench))
if(istype(O, /obj/item/wrench))
default_unfasten_wrench(user, O, time = 20)
change_setting(1)
if(anchored)
+5 -5
View File
@@ -190,15 +190,15 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/attackby(obj/item/I, mob/user, params)
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++
update_icon()
return
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, 'sound/items/welder2.ogg', 50, 1)
@@ -220,7 +220,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
to_chat(user, "<span class='warning'>You need 10 sheets of plasteel!</span>")
return
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()
@@ -401,7 +401,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
// Misc
/obj/item/weapon/paper/guides/jobs/engi/gravity_gen
/obj/item/paper/guides/jobs/engi/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
+30 -30
View File
@@ -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
@@ -65,11 +65,11 @@
if(3)
to_chat(user, "The casing is closed.")
/obj/structure/light_construct/attackby(obj/item/weapon/W, mob/user, params)
/obj/structure/light_construct/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
switch(stage)
if(1)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
playsound(src.loc, W.usesound, 75, 1)
to_chat(usr, "<span class='notice'>You begin deconstructing [src]...</span>")
if (!do_after(usr, 30*W.toolspeed, target = src))
@@ -96,11 +96,11 @@
to_chat(user, "<span class='warning'>You need one length of cable to wire [src]!</span>")
return
if(2)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
to_chat(usr, "<span class='warning'>You have to remove the wires first!</span>")
return
if(istype(W, /obj/item/weapon/wirecutters))
if(istype(W, /obj/item/wirecutters))
stage = 1
switch(fixture_type)
if ("tube")
@@ -113,7 +113,7 @@
playsound(loc, W.usesound, 100, 1)
return
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] closes [src]'s casing.", \
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
playsound(loc, W.usesound, 75, 1)
@@ -134,7 +134,7 @@
/obj/structure/light_construct/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc, sheets_refunded)
qdel(src)
@@ -166,7 +166,7 @@
var/brightness = 8 // luminosity when on, also used in power calculation
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
@@ -181,7 +181,7 @@
fitting = "bulb"
brightness = 4
desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb
light_type = /obj/item/light/bulb
@@ -308,12 +308,12 @@
LR.ReplaceLight(src, user)
// attempt to insert light
else if(istype(W, /obj/item/weapon/light))
else if(istype(W, /obj/item/light))
if(status == LIGHT_OK)
to_chat(user, "<span class='warning'>There is a [fitting] already inserted!</span>")
else
src.add_fingerprint(user)
var/obj/item/weapon/light/L = W
var/obj/item/light/L = W
if(istype(L, light_type))
if(!user.drop_item())
return
@@ -340,14 +340,14 @@
// 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.", \
"<span class='notice'>You open [src]'s casing.</span>", "<span class='italics'>You hear a noise.</span>")
deconstruct()
else
to_chat(user, "<span class='userdanger'>You stick \the [W] into the light socket!</span>")
if(has_power() && (W.flags & CONDUCT))
if(has_power() && (W.flags_1 & CONDUCT_1))
do_sparks(3, TRUE, src)
if (prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0), TRUE)
@@ -355,7 +355,7 @@
return ..()
/obj/machinery/light/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
var/obj/structure/light_construct/newlight = null
var/cur_stage = 2
if(!disassembled)
@@ -383,7 +383,7 @@
/obj/machinery/light/attacked_by(obj/item/I, mob/living/user)
..()
if(status == LIGHT_BROKEN || status == LIGHT_EMPTY)
if(on && (I.flags & CONDUCT))
if(on && (I.flags_1 & CONDUCT_1))
if(prob(12))
electrocute_mob(user, get_area(src), src, 0.3, TRUE)
@@ -478,7 +478,7 @@
drop_light_tube(user)
/obj/machinery/light/proc/drop_light_tube(mob/user)
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 = brightness
@@ -505,7 +505,7 @@
to_chat(user, "<span class='notice'>You telekinetically remove the light [fitting].</span>")
// create a light tube/bulb item and put it in the user's hand
var/obj/item/weapon/light/L = drop_light_tube()
var/obj/item/light/L = drop_light_tube()
L.attack_tk(user)
@@ -562,7 +562,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
@@ -574,7 +574,7 @@
var/rigged = 0 // true if rigged to explode
var/brightness = 2 //how much light it gives off
/obj/item/weapon/light/tube
/obj/item/light/tube
name = "light tube"
desc = "A replacement light tube."
icon_state = "ltube"
@@ -582,7 +582,7 @@
item_state = "c_tube"
brightness = 8
/obj/item/weapon/light/bulb
/obj/item/light/bulb
name = "light bulb"
desc = "A replacement light bulb."
icon_state = "lbulb"
@@ -590,13 +590,13 @@
item_state = "contvapour"
brightness = 4
/obj/item/weapon/light/throw_impact(atom/hit_atom)
/obj/item/light/throw_impact(atom/hit_atom)
if(!..()) //not caught by a mob
shatter()
// 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
@@ -609,17 +609,17 @@
desc = "A broken [name]."
/obj/item/weapon/light/New()
/obj/item/light/New()
..()
update()
// attack bulb/tube with object
// if a syringe, can inject plasma to make it explode
/obj/item/weapon/light/attackby(obj/item/I, mob/user, params)
/obj/item/light/attackby(obj/item/I, 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, "<span class='notice'>You inject the solution into \the [src].</span>")
@@ -632,15 +632,15 @@
..()
return
/obj/item/weapon/light/attack(mob/living/M, mob/living/user, def_zone)
/obj/item/light/attack(mob/living/M, mob/living/user, def_zone)
..()
shatter()
/obj/item/weapon/light/attack_obj(obj/O, mob/living/user)
/obj/item/light/attack_obj(obj/O, mob/living/user)
..()
shatter()
/obj/item/weapon/light/proc/shatter()
/obj/item/light/proc/shatter()
if(status == LIGHT_OK || status == LIGHT_BURNED)
src.visible_message("<span class='danger'>[name] shatters.</span>","<span class='italics'>You hear a small glass object shatter.</span>")
status = LIGHT_BROKEN
@@ -656,5 +656,5 @@
icon_state = "floor1"
brightness = 4
layer = 2.5
light_type = /obj/item/weapon/light/bulb
light_type = /obj/item/light/bulb
fitting = "bulb"
+3 -3
View File
@@ -7,7 +7,7 @@
use_power = ACTIVE_POWER_USE
idle_power_usage = 20
active_power_usage = 100
circuit = /obj/item/weapon/circuitboard/computer/powermonitor
circuit = /obj/item/circuitboard/computer/powermonitor
var/obj/structure/cable/attached
@@ -16,8 +16,8 @@
var/record_interval = 50
var/next_record = 0
/obj/machinery/computer/monitor/New()
..()
/obj/machinery/computer/monitor/Initialize()
. = ..()
search()
history["supply"] = list()
history["demand"] = list()
+10 -32
View File
@@ -54,11 +54,11 @@
/obj/machinery/power/port_gen/pacman
name = "\improper P.A.C.M.A.N.-type portable generator"
circuit = /obj/item/circuitboard/machine/pacman
var/sheets = 0
var/max_sheets = 100
var/sheet_name = ""
var/sheet_path = /obj/item/stack/sheet/mineral/plasma
var/board_path = /obj/item/weapon/circuitboard/machine/pacman
var/sheet_left = 0 // How much is left of the sheet
var/time_per_sheet = 260
var/current_heat = 0
@@ -68,34 +68,12 @@
if(anchored)
connect_to_network()
/obj/machinery/power/port_gen/pacman/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new board_path(null)
B.apply_default_parts(src)
/obj/machinery/power/port_gen/pacman/Initialize()
. = ..()
var/obj/sheet = new sheet_path(null)
sheet_name = sheet.name
/obj/item/weapon/circuitboard/machine/pacman
name = "PACMAN-type Generator (Machine Board)"
build_path = /obj/machinery/power/port_gen/pacman
origin_tech = "programming=2;powerstorage=3;plasmatech=3;engineering=3"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/stack/cable_coil = 2,
/obj/item/weapon/stock_parts/capacitor = 1)
/obj/item/weapon/circuitboard/machine/pacman/super
name = "SUPERPACMAN-type Generator (Machine Board)"
build_path = /obj/machinery/power/port_gen/pacman/super
origin_tech = "programming=3;powerstorage=4;engineering=4"
/obj/item/weapon/circuitboard/machine/pacman/mrs
name = "MRSPACMAN-type Generator (Machine Board)"
build_path = "/obj/machinery/power/port_gen/pacman/mrs"
origin_tech = "programming=3;powerstorage=4;engineering=4;plasmatech=4"
/obj/machinery/power/port_gen/pacman/Destroy()
DropFuel()
return ..()
@@ -103,10 +81,10 @@
/obj/machinery/power/port_gen/pacman/RefreshParts()
var/temp_rating = 0
var/consumption_coeff = 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/capacitor))
else if(istype(SP, /obj/item/stock_parts/capacitor))
temp_rating += SP.rating
else
consumption_coeff += SP.rating
@@ -190,7 +168,7 @@
if(exchange_parts(user, O))
return
if(istype(O, /obj/item/weapon/wrench))
if(istype(O, /obj/item/wrench))
if(!anchored && !isinspace())
connect_to_network()
@@ -203,7 +181,7 @@
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
return
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)
@@ -294,10 +272,10 @@
name = "\improper S.U.P.E.R.P.A.C.M.A.N.-type portable generator"
icon_state = "portgen1_0"
base_icon = "portgen1"
circuit = /obj/item/circuitboard/machine/pacman/super
sheet_path = /obj/item/stack/sheet/mineral/uranium
power_gen = 15000
time_per_sheet = 85
board_path = /obj/item/weapon/circuitboard/machine/pacman/super
/obj/machinery/power/port_gen/pacman/super/overheat()
explosion(src.loc, 3, 3, 3, -1)
@@ -306,10 +284,10 @@
name = "\improper M.R.S.P.A.C.M.A.N.-type portable generator"
base_icon = "portgen2"
icon_state = "portgen2_0"
circuit = /obj/item/circuitboard/machine/pacman/mrs
sheet_path = /obj/item/stack/sheet/mineral/diamond
power_gen = 40000
time_per_sheet = 80
board_path = /obj/item/weapon/circuitboard/machine/pacman/mrs
/obj/machinery/power/port_gen/pacman/mrs/overheat()
explosion(src.loc, 4, 4, 4, -1)
+4 -5
View File
@@ -113,7 +113,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, params)
/obj/machinery/power/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
var/turf/T = user.loc
@@ -216,7 +216,6 @@
//remove the old powernet and replace it with a new one throughout the network.
/proc/propagate_network(obj/O, datum/powernet/PN)
//world.log << "propagating new network"
var/list/worklist = list()
var/list/found_machines = list()
var/index = 1
@@ -300,11 +299,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
@@ -341,7 +340,7 @@
else if (istype(power_source, /datum/powernet))
var/drained_power = drained_energy/GLOB.CELLRATE //convert from "joules" to "watts"
PN.load+=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
+5 -43
View File
@@ -9,6 +9,7 @@
density = TRUE
anchored = TRUE
use_power = NO_POWER_USE
circuit = /obj/item/circuitboard/machine/rtg
// You can buckle someone to RTG, then open its panel. Fun stuff.
can_buckle = TRUE
@@ -16,23 +17,9 @@
buckle_requires_restraints = TRUE
var/power_gen = 1000 // Enough to power a single APC. 4000 output with T4 capacitor.
var/board_path = /obj/item/weapon/circuitboard/machine/rtg
var/irradiate = TRUE // RTGs irradiate surroundings, but only when panel is open.
/obj/machinery/power/rtg/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new board_path(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/rtg
name = "RTG (Machine Board)"
build_path = /obj/machinery/power/rtg
origin_tech = "programming=2;materials=4;powerstorage=3;engineering=2"
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/stack/sheet/mineral/uranium = 10) // We have no Pu-238, and this is the closest thing to it.
/obj/machinery/power/rtg/Initialize()
. = ..()
connect_to_network()
@@ -45,7 +32,7 @@
/obj/machinery/power/rtg/RefreshParts()
var/part_level = 0
for(var/obj/item/weapon/stock_parts/SP in component_parts)
for(var/obj/item/stock_parts/SP in component_parts)
part_level += SP.rating
power_gen = initial(power_gen) * part_level
@@ -68,20 +55,7 @@
/obj/machinery/power/rtg/advanced
desc = "An advanced RTG capable of moderating isotope decay, increasing power output but reducing lifetime. It uses plasma-fueled radiation collectors to increase output even further."
power_gen = 1250 // 2500 on T1, 10000 on T4.
board_path = /obj/item/weapon/circuitboard/machine/rtg/advanced
/obj/item/weapon/circuitboard/machine/rtg/advanced
name = "Advanced RTG (Machine Board)"
build_path = /obj/machinery/power/rtg/advanced
origin_tech = "programming=3;materials=5;powerstorage=4;engineering=3;plasmatech=3"
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/stack/sheet/mineral/uranium = 10,
/obj/item/stack/sheet/mineral/plasma = 5)
circuit = /obj/item/circuitboard/machine/rtg/advanced
// Void Core, power source for Abductor ships and bases.
// Provides a lot of power, but tends to explode when mistreated.
@@ -91,25 +65,13 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "core"
desc = "An alien power source that produces energy seemingly out of nowhere."
board_path = /obj/item/weapon/circuitboard/machine/abductor/core
circuit = /obj/item/circuitboard/machine/abductor/core
power_gen = 20000 // 280 000 at T1, 400 000 at T4. Starts at T4.
irradiate = FALSE // Green energy!
can_buckle = FALSE
pixel_y = 7
var/going_kaboom = FALSE // Is it about to explode?
/obj/item/weapon/circuitboard/machine/abductor/core
name = "alien board (Void Core)"
build_path = /obj/machinery/power/rtg/abductor
origin_tech = "programming=5;abductor=5;powerstorage=8;engineering=8"
req_components = list(
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/cell/infinite/abductor = 1)
def_components = list(
/obj/item/weapon/stock_parts/capacitor = /obj/item/weapon/stock_parts/capacitor/quadratic,
/obj/item/weapon/stock_parts/micro_laser = /obj/item/weapon/stock_parts/micro_laser/quadultra)
/obj/machinery/power/rtg/abductor/proc/overload()
if(going_kaboom)
return
+9 -9
View File
@@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
// use_power = NO_POWER_USE
max_integrity = 350
integrity_failure = 80
var/obj/item/weapon/tank/internals/plasma/loaded_tank = null
var/obj/item/tank/internals/plasma/loaded_tank = null
var/last_power = 0
var/active = 0
var/locked = FALSE
@@ -21,8 +21,8 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/anchored
anchored = TRUE
/obj/machinery/power/rad_collector/New()
..()
/obj/machinery/power/rad_collector/Initialize()
. = ..()
GLOB.rad_collectors += src
/obj/machinery/power/rad_collector/Destroy()
@@ -66,7 +66,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
return FAILED_UNFASTEN
return ..()
/obj/machinery/power/rad_collector/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
/obj/machinery/power/rad_collector/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
if(anchored)
@@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
return TRUE
else if(istype(W, /obj/item/device/analyzer) && loaded_tank)
atmosanalyzer_scan(loaded_tank.air_contents, user)
else if(istype(W, /obj/item/weapon/tank/internals/plasma))
else if(istype(W, /obj/item/tank/internals/plasma))
if(!anchored)
to_chat(user, "<span class='warning'>The [src] needs to be secured to the floor first!</span>")
return TRUE
@@ -92,7 +92,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
loaded_tank = W
W.forceMove(src)
update_icons()
else if(istype(W, /obj/item/weapon/crowbar))
else if(istype(W, /obj/item/crowbar))
if(loaded_tank)
if(locked)
to_chat(user, "<span class='warning'>The controls are locked!</span>")
@@ -102,7 +102,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
else
to_chat(user, "<span class='warning'>There isn't a tank loaded!</span>")
return TRUE
else if(istype(W, /obj/item/weapon/wrench))
else if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
return TRUE
else if(W.GetID())
@@ -120,13 +120,13 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
eject()
stat |= BROKEN
/obj/machinery/power/rad_collector/proc/eject()
locked = FALSE
var/obj/item/weapon/tank/internals/plasma/Z = src.loaded_tank
var/obj/item/tank/internals/plasma/Z = src.loaded_tank
if (!Z)
return
Z.loc = get_turf(src)
+29 -40
View File
@@ -3,20 +3,17 @@
desc = "A heavy-duty industrial laser, often used in containment fields and power generation.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon = 'icons/obj/singularity.dmi'
icon_state = "emitter"
var/icon_state_on = "emitter_+a"
anchored = FALSE
density = TRUE
req_access = list(ACCESS_ENGINE_EQUIP)
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
var/atom/target = null
circuit = /obj/item/circuitboard/machine/emitter
use_power = NO_POWER_USE
idle_power_usage = 10
active_power_usage = 300
var/icon_state_on = "emitter_+a"
var/active = 0
var/powered = 0
var/fire_delay = 100
@@ -33,6 +30,11 @@
var/datum/effect_system/spark_spread/sparks
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
var/atom/target
/obj/machinery/power/emitter/anchored
anchored = TRUE
@@ -46,34 +48,30 @@
state = 2
use_power = FALSE
/obj/machinery/power/emitter/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/emitter(null)
B.apply_default_parts(src)
/obj/machinery/power/emitter/Initialize()
. = ..()
RefreshParts()
wires = new /datum/wires/emitter(src)
if(state == 2 && anchored)
connect_to_network()
/obj/item/weapon/circuitboard/machine/emitter
name = "Emitter (Machine Board)"
build_path = /obj/machinery/power/emitter
origin_tech = "programming=3;powerstorage=4;engineering=4"
req_components = list(
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
sparks = new
sparks.attach(src)
sparks.set_up(5, TRUE, src)
/obj/machinery/power/emitter/RefreshParts()
var/max_firedelay = 120
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
@@ -100,15 +98,6 @@
else
rotate()
/obj/machinery/power/emitter/Initialize()
. = ..()
if(state == 2 && anchored)
connect_to_network()
sparks = new
sparks.attach(src)
sparks.set_up(5, TRUE, src)
/obj/machinery/power/emitter/Destroy()
if(SSticker.IsRoundInProgress())
var/turf/T = get_turf(src)
@@ -276,7 +265,7 @@
return FAILED_UNFASTEN
return ..()
/obj/machinery/power/emitter/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
/obj/machinery/power/emitter/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
if(anchored)
@@ -285,15 +274,15 @@
state = EM_UNSECURED
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
if(active)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return
default_unfasten_wrench(user, W, 0)
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 \the [src] off first.")
return
@@ -379,7 +368,7 @@
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
manual = FALSE
for(var/obj/item/I in buckled_mob.held_items)
if(istype(I, /obj/item/weapon/turret_control))
if(istype(I, /obj/item/turret_control))
qdel(I)
if(istype(buckled_mob))
buckled_mob.pixel_x = 0
@@ -430,7 +419,7 @@
desc = "The emitter will only fire on your command and at your designated target"
button_icon_state = "mech_zoom_on"
for(var/obj/item/I in U.held_items)
if(istype(I, /obj/item/weapon/turret_control))
if(istype(I, /obj/item/turret_control))
qdel(I)
UpdateButtonIcon()
return
@@ -444,23 +433,23 @@
var/obj/item/I = V
if(istype(I))
if(U.dropItemToGround(I))
var/obj/item/weapon/turret_control/TC = new /obj/item/weapon/turret_control()
var/obj/item/turret_control/TC = new /obj/item/turret_control()
U.put_in_hands(TC)
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
var/obj/item/weapon/turret_control/TC = new /obj/item/weapon/turret_control()
var/obj/item/turret_control/TC = new /obj/item/turret_control()
U.put_in_hands(TC)
UpdateButtonIcon()
/obj/item/weapon/turret_control
/obj/item/turret_control
name = "turret controls"
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | NODROP
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF | NOBLUDGEON
flags_1 = ABSTRACT_1 | NODROP_1
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF | NOBLUDGEON_1
var/delay = 0
/obj/item/weapon/turret_control/afterattack(atom/targeted_atom, mob/user)
/obj/item/turret_control/afterattack(atom/targeted_atom, mob/user)
..()
var/obj/machinery/power/emitter/E = user.buckled
E.setDir(get_dir(E,targeted_atom))
@@ -0,0 +1,12 @@
diff a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm (rejected hunks)
@@ -445,8 +445,8 @@
name = "turret controls"
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
- flags = ABSTRACT | NODROP
- resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF | NOBLUDGEON
+ flags_1 = ABSTRACT_1 | NODROP_1
+ resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF | NOBLUDGEON_1
var/delay = 0
/obj/item/turret_control/afterattack(atom/targeted_atom, mob/user)
@@ -49,8 +49,8 @@ field_generator power level display
add_overlay("+p[power_level]")
/obj/machinery/field/generator/New()
..()
/obj/machinery/field/generator/Initialize()
. = ..()
fields = list()
connected_gens = list()
@@ -83,7 +83,7 @@ field_generator power level display
return FAILED_UNFASTEN
return ..()
/obj/machinery/field/generator/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
/obj/machinery/field/generator/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
if(anchored)
@@ -95,11 +95,11 @@ 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))
default_unfasten_wrench(user, W, 0)
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>")
@@ -128,7 +128,7 @@ field_generator power level display
return ..()
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M)
if(M.environment_smash >= 3 && active == FG_OFFLINE && state != FG_UNSECURED)
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
state = FG_UNSECURED
anchored = FALSE
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
+1 -1
View File
@@ -23,7 +23,7 @@
..()
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
else
return ..()
+1 -1
View File
@@ -71,7 +71,7 @@
sleep(1150)
if(resolved == FALSE)
resolved = TRUE
world << sound('sound/machines/alarm.ogg')
sound_to_playing_players('sound/machines/alarm.ogg')
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper), 120)
addtimer(CALLBACK(GLOBAL_PROC, .proc/ending_helper), 220)
@@ -97,7 +97,7 @@
switch(construction_state)
if(PA_CONSTRUCTION_UNSECURED)
if(istype(W, /obj/item/weapon/wrench) && !isinspace())
if(istype(W, /obj/item/wrench) && !isinspace())
playsound(loc, W.usesound, 75, 1)
anchored = TRUE
user.visible_message("[user.name] secures the [name] to the floor.", \
@@ -105,7 +105,7 @@
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
if(PA_CONSTRUCTION_UNWIRED)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
playsound(loc, W.usesound, 75, 1)
anchored = FALSE
user.visible_message("[user.name] detaches the [name] from the floor.", \
@@ -120,18 +120,18 @@
construction_state = PA_CONSTRUCTION_PANEL_OPEN
did_something = TRUE
if(PA_CONSTRUCTION_PANEL_OPEN)
if(istype(W, /obj/item/weapon/wirecutters))//TODO:Shock user if its on?
if(istype(W, /obj/item/wirecutters))//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [name].", \
"You remove some wires.")
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
else if(istype(W, /obj/item/weapon/screwdriver))
else if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] closes the [name]'s access panel.", \
"You close the access panel.")
construction_state = PA_CONSTRUCTION_COMPLETE
did_something = TRUE
if(PA_CONSTRUCTION_COMPLETE)
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] opens the [name]'s access panel.", \
"You open the access panel.")
construction_state = PA_CONSTRUCTION_PANEL_OPEN
@@ -147,7 +147,7 @@
/obj/structure/particle_accelerator/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
@@ -19,10 +19,10 @@
var/powered = 0
mouse_opacity = 2
/obj/machinery/particle_accelerator/control_box/New()
/obj/machinery/particle_accelerator/control_box/Initialize()
. = ..()
wires = new /datum/wires/particle_accelerator/control_box(src)
connected_parts = list()
..()
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
@@ -31,8 +31,7 @@
var/obj/structure/particle_accelerator/part = CP
part.master = null
connected_parts.Cut()
qdel(wires)
wires = null
QDEL_NULL(wires)
return ..()
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user)
@@ -270,7 +269,7 @@
switch(construction_state)
if(PA_CONSTRUCTION_UNSECURED)
if(istype(W, /obj/item/weapon/wrench) && !isinspace())
if(istype(W, /obj/item/wrench) && !isinspace())
playsound(loc, W.usesound, 75, 1)
anchored = TRUE
user.visible_message("[user.name] secures the [name] to the floor.", \
@@ -278,7 +277,7 @@
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
if(PA_CONSTRUCTION_UNWIRED)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/wrench))
playsound(loc, W.usesound, 75, 1)
anchored = FALSE
user.visible_message("[user.name] detaches the [name] from the floor.", \
@@ -293,18 +292,18 @@
construction_state = PA_CONSTRUCTION_PANEL_OPEN
did_something = TRUE
if(PA_CONSTRUCTION_PANEL_OPEN)
if(istype(W, /obj/item/weapon/wirecutters))//TODO:Shock user if its on?
if(istype(W, /obj/item/wirecutters))//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [name].", \
"You remove some wires.")
construction_state = PA_CONSTRUCTION_UNWIRED
did_something = TRUE
else if(istype(W, /obj/item/weapon/screwdriver))
else if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] closes the [name]'s access panel.", \
"You close the access panel.")
construction_state = PA_CONSTRUCTION_COMPLETE
did_something = TRUE
if(PA_CONSTRUCTION_COMPLETE)
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] opens the [name]'s access panel.", \
"You open the access panel.")
construction_state = PA_CONSTRUCTION_PANEL_OPEN
@@ -0,0 +1,10 @@
diff a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm (rejected hunks)
@@ -17,7 +17,7 @@
var/active = 0
var/strength = 0
var/powered = 0
- mouse_opacity = 2
+ mouse_opacity = MOUSE_OPACITY_OPAQUE
/obj/machinery/particle_accelerator/control_box/Initialize()
. = ..()
@@ -26,7 +26,7 @@
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
var/last_warning
var/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
dangerous_possession = TRUE
/obj/singularity/Initialize(mapload, starting_energy = 50)
@@ -72,7 +72,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
+15 -29
View File
@@ -21,6 +21,7 @@
density = TRUE
anchored = TRUE
use_power = NO_POWER_USE
circuit = /obj/item/circuitboard/machine/smes
var/capacity = 5e6 // maximum charge
var/charge = 0 // actual charge
@@ -43,46 +44,31 @@
if(!terminal)
to_chat(user, "<span class='warning'>This SMES has no power terminal!</span>")
/obj/machinery/power/smes/New()
/obj/machinery/power/smes/Initialize()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/smes(null)
B.apply_default_parts(src)
spawn(5)
dir_loop:
for(var/d in GLOB.cardinals)
var/turf/T = get_step(src, d)
for(var/obj/machinery/power/terminal/term in T)
if(term && term.dir == turn(d, 180))
terminal = term
break dir_loop
dir_loop:
for(var/d in GLOB.cardinals)
var/turf/T = get_step(src, d)
for(var/obj/machinery/power/terminal/term in T)
if(term && term.dir == turn(d, 180))
terminal = term
break dir_loop
if(!terminal)
stat |= BROKEN
return
terminal.master = src
update_icon()
return
/obj/item/weapon/circuitboard/machine/smes
name = "SMES (Machine Board)"
build_path = /obj/machinery/power/smes
origin_tech = "programming=3;powerstorage=3;engineering=3"
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/cell = 5,
/obj/item/weapon/stock_parts/capacitor = 1)
def_components = list(/obj/item/weapon/stock_parts/cell = /obj/item/weapon/stock_parts/cell/high/empty)
/obj/machinery/power/smes/RefreshParts()
var/IO = 0
var/MC = 0
var/C
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 = initial(input_level_max) * IO
output_level_max = initial(output_level_max) * IO
for(var/obj/item/weapon/stock_parts/cell/PC in component_parts)
for(var/obj/item/stock_parts/cell/PC in component_parts)
MC += PC.maxcharge
C += PC.charge
capacity = MC / (15000) * 1e6
@@ -163,7 +149,7 @@
return
//disassembling the terminal
if(istype(I, /obj/item/weapon/wirecutters) && terminal && panel_open)
if(istype(I, /obj/item/wirecutters) && terminal && panel_open)
terminal.dismantle(user, I)
return
@@ -174,12 +160,12 @@
log_game("[src] has been deconstructed by [key_name(user)]")
investigate_log("SMES deconstructed by [key_name(user)]", INVESTIGATE_SINGULO)
return
else if(panel_open && istype(I, /obj/item/weapon/crowbar))
else if(panel_open && istype(I, /obj/item/crowbar))
return
return ..()
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/weapon/crowbar/C)
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
if(istype(C) && terminal)
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")
return FALSE
@@ -187,7 +173,7 @@
return ..()
/obj/machinery/power/smes/on_deconstruction()
for(var/obj/item/weapon/stock_parts/cell/cell in component_parts)
for(var/obj/item/stock_parts/cell/cell in component_parts)
cell.charge = (charge / capacity) * cell.maxcharge
/obj/machinery/power/smes/Destroy()
+20 -20
View File
@@ -56,8 +56,8 @@
obj_integrity = max_integrity
update_icon()
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/crowbar))
/obj/machinery/power/solar/attackby(obj/item/W, mob/user, params)
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))
@@ -79,14 +79,14 @@
/obj/machinery/power/solar/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
stat |= BROKEN
unset_control()
update_icon()
/obj/machinery/power/solar/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
if(disassembled)
var/obj/item/solar_assembly/S = locate() in src
if(S)
@@ -94,8 +94,8 @@
S.give_glass(stat & BROKEN)
else
playsound(src, "shatter", 70, 1)
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)
@@ -198,16 +198,16 @@
// Give back the glass type we were supplied with
/obj/item/solar_assembly/proc/give_glass(device_broken)
if(device_broken)
new /obj/item/weapon/shard(loc)
new /obj/item/weapon/shard(loc)
new /obj/item/shard(loc)
new /obj/item/shard(loc)
else if(glass_type)
var/obj/item/stack/sheet/S = new glass_type(loc)
S.amount = 2
glass_type = null
/obj/item/solar_assembly/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && isturf(loc))
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && isturf(loc))
if(isinspace())
to_chat(user, "<span class='warning'>You can't secure [src] here.</span>")
return
@@ -239,7 +239,7 @@
return 1
if(!tracker)
if(istype(W, /obj/item/weapon/electronics/tracker))
if(istype(W, /obj/item/electronics/tracker))
if(!user.drop_item())
return
tracker = 1
@@ -247,8 +247,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/electronics/tracker(src.loc)
if(istype(W, /obj/item/crowbar))
new /obj/item/electronics/tracker(src.loc)
tracker = 0
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>")
return 1
@@ -410,14 +410,14 @@
. = TRUE
/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/frame/computer/A = new /obj/structure/frame/computer( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/computer/solar_control/M = new /obj/item/weapon/circuitboard/computer/solar_control( A )
new /obj/item/shard( src.loc )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
@@ -428,7 +428,7 @@
else
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
var/obj/item/weapon/circuitboard/computer/solar_control/M = new /obj/item/weapon/circuitboard/computer/solar_control( A )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
@@ -436,7 +436,7 @@
A.icon_state = "4"
A.anchored = TRUE
qdel(src)
else if(user.a_intent != INTENT_HARM && !(I.flags & NOBLUDGEON))
else if(user.a_intent != INTENT_HARM && !(I.flags_1 & NOBLUDGEON_1))
src.attack_hand(user)
else
return ..()
@@ -452,7 +452,7 @@
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/machinery/power/solar_control/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
stat |= BROKEN
update_icon()
@@ -495,6 +495,6 @@
// MISC
//
/obj/item/weapon/paper/guides/jobs/engi/solars
/obj/item/paper/guides/jobs/engi/solars
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>"
+17 -5
View File
@@ -55,6 +55,8 @@
#define SUPERMATTER_DANGER_PERCENT 50
#define SUPERMATTER_WARNING_PERCENT 100
GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
/obj/machinery/power/supermatter_shard
name = "supermatter shard"
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure."
@@ -131,6 +133,7 @@
var/produces_gas = TRUE
var/obj/effect/countdown/supermatter/countdown
var/is_main_engine = FALSE
/obj/machinery/power/supermatter_shard/Initialize()
. = ..()
@@ -143,7 +146,8 @@
radio.listening = 0
radio.recalculateChannels()
investigate_log("has been created.", INVESTIGATE_SUPERMATTER)
if(is_main_engine)
GLOB.main_supermatter_engine = src
/obj/machinery/power/supermatter_shard/Destroy()
investigate_log("has been destroyed.", INVESTIGATE_SUPERMATTER)
@@ -151,6 +155,8 @@
QDEL_NULL(radio)
GLOB.poi_list -= src
QDEL_NULL(countdown)
if(is_main_engine && GLOB.main_supermatter_engine == src)
GLOB.main_supermatter_engine = null
. = ..()
/obj/machinery/power/supermatter_shard/examine(mob/user)
@@ -219,7 +225,7 @@
var/turf/T = get_turf(src)
for(var/mob/M in GLOB.mob_list)
if(M.z == z)
M << 'sound/magic/charge.ogg'
SEND_SOUND(M, 'sound/magic/charge.ogg')
to_chat(M, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
if(combined_gas > MOLE_PENALTY_THRESHOLD)
investigate_log("has collapsed into a singularity.", INVESTIGATE_SUPERMATTER)
@@ -457,7 +463,7 @@
visible_message("<span class='userdanger'>[src] is consumed by the singularity!</span>")
for(var/mob/M in GLOB.mob_list)
if(M.z == z)
M << 'sound/effects/supermatter.ogg' //everyone goan know bout this
SEND_SOUND(M, 'sound/effects/supermatter.ogg') //everyone goan know bout this
to_chat(M, "<span class='boldannounce'>A horrible screeching fills your ears, and a wave of dread washes over you...</span>")
qdel(src)
return gain
@@ -524,9 +530,9 @@
R.receive_pulse(power * (1 + power_transmission_bonus)/10 * freon_transmit_modifier)
/obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params)
if(!istype(W) || (W.flags & ABSTRACT) || !istype(user))
if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
return
if(istype(W, /obj/item/weapon/scalpel/supermatter))
if(istype(W, /obj/item/scalpel/supermatter))
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [W]...</span>")
if(do_after(user, 60 * W.toolspeed, TRUE, src))
@@ -584,6 +590,9 @@
else
L.show_message("<span class='italics'>You hear an unearthly ringing and notice your skin is covered in fresh radiation burns.</span>", 2)
/obj/machinery/power/supermatter_shard/engine
is_main_engine = TRUE
// When you wanna make a supermatter shard for the dramatic effect, but
// don't want it exploding suddenly
/obj/machinery/power/supermatter_shard/hugbox
@@ -599,6 +608,9 @@
gasefficency = 0.15
explosion_power = 35
/obj/machinery/power/supermatter_shard/crystal/engine
is_main_engine = TRUE
/obj/machinery/power/supermatter_shard/proc/supermatter_pull(turf/center, pull_range = 10)
playsound(src.loc, 'sound/weapons/marauder.ogg', 100, 1, extrarange = 7)
for(var/atom/P in orange(pull_range,center))
@@ -0,0 +1,10 @@
diff a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm (rejected hunks)
@@ -524,7 +524,7 @@
R.receive_pulse(power * (1 + power_transmission_bonus)/10 * freon_transmit_modifier)
/obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params)
- if(!istype(W) || (W.flags & ABSTRACT) || !istype(user))
+ if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
return
if(istype(W, /obj/item/scalpel/supermatter))
playsound(src, W.usesound, 100, 1)
+7 -6
View File
@@ -13,15 +13,16 @@
layer = WIRE_TERMINAL_LAYER //a bit above wires
/obj/machinery/power/terminal/New()
..()
var/turf/T = src.loc
if(level==1) hide(T.intact)
return
/obj/machinery/power/terminal/Initialize()
. = ..()
var/turf/T = get_turf(src)
if(level == 1)
hide(T.intact)
/obj/machinery/power/terminal/Destroy()
if(master)
master.disconnect_terminal()
master = null
return ..()
/obj/machinery/power/terminal/hide(i)
@@ -70,7 +71,7 @@
/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/weapon/wirecutters))
if(istype(W, /obj/item/wirecutters))
dismantle(user, W)
else
return ..()
+8 -23
View File
@@ -11,32 +11,26 @@
buckle_lying = FALSE
buckle_requires_restraints = TRUE
circuit = /obj/item/circuitboard/machine/tesla_coil
var/power_loss = 2
var/input_power_multiplier = 1
var/zap_cooldown = 100
var/last_zap = 0
/obj/machinery/power/tesla_coil/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/tesla_coil(null)
B.apply_default_parts(src)
/obj/machinery/power/tesla_coil/Initialize()
. = ..()
wires = new /datum/wires/tesla_coil(src)
/obj/item/weapon/circuitboard/machine/tesla_coil
name = "Tesla Coil (Machine Board)"
build_path = /obj/machinery/power/tesla_coil
origin_tech = "programming=3;magnets=3;powerstorage=3"
req_components = list(/obj/item/weapon/stock_parts/capacitor = 1)
/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
/obj/machinery/power/tesla_coil/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
/obj/machinery/power/tesla_coil/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
if(panel_open)
@@ -109,18 +103,9 @@
buckle_lying = FALSE
buckle_requires_restraints = TRUE
/obj/machinery/power/grounding_rod/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/grounding_rod(null)
B.apply_default_parts(src)
circuit = /obj/item/circuitboard/machine/grounding_rod
/obj/item/weapon/circuitboard/machine/grounding_rod
name = "Grounding Rod (Machine Board)"
build_path = /obj/machinery/power/grounding_rod
origin_tech = "programming=3;powerstorage=3;magnets=3;plasmatech=2"
req_components = list(/obj/item/weapon/stock_parts/capacitor = 1)
/obj/machinery/power/grounding_rod/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20)
/obj/machinery/power/grounding_rod/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
if(panel_open)
+22 -21
View File
@@ -1,24 +1,6 @@
#define TESLA_DEFAULT_POWER 1738260
#define TESLA_MINI_POWER 869130
GLOBAL_LIST_INIT(blacklisted_tesla_types, typecacheof(list(/obj/machinery/atmospherics,
/obj/machinery/power/emitter,
/obj/machinery/field/generator,
/mob/living/simple_animal,
/obj/machinery/particle_accelerator/control_box,
/obj/structure/particle_accelerator/fuel_chamber,
/obj/structure/particle_accelerator/particle_emitter/center,
/obj/structure/particle_accelerator/particle_emitter/left,
/obj/structure/particle_accelerator/particle_emitter/right,
/obj/structure/particle_accelerator/power_box,
/obj/structure/particle_accelerator/end_cap,
/obj/machinery/field/containment,
/obj/structure/disposalpipe,
/obj/structure/sign,
/obj/machinery/gateway,
/obj/structure/lattice,
/obj/structure/grille,
/obj/machinery/the_singularitygen/tesla)))
/obj/singularity/energy_ball
name = "energy ball"
desc = "An energy ball."
@@ -183,8 +165,27 @@ GLOBAL_LIST_INIT(blacklisted_tesla_types, typecacheof(list(/obj/machinery/atmosp
var/obj/machinery/closest_machine
var/obj/structure/closest_structure
var/obj/structure/blob/closest_blob
var/static/things_to_shock = typecacheof(list(/obj/machinery, /mob/living, /obj/structure))
var/static/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
/obj/machinery/power/emitter,
/obj/machinery/field/generator,
/mob/living/simple_animal,
/obj/machinery/particle_accelerator/control_box,
/obj/structure/particle_accelerator/fuel_chamber,
/obj/structure/particle_accelerator/particle_emitter/center,
/obj/structure/particle_accelerator/particle_emitter/left,
/obj/structure/particle_accelerator/particle_emitter/right,
/obj/structure/particle_accelerator/power_box,
/obj/structure/particle_accelerator/end_cap,
/obj/machinery/field/containment,
/obj/structure/disposalpipe,
/obj/structure/sign,
/obj/machinery/gateway,
/obj/structure/lattice,
/obj/structure/grille,
/obj/machinery/the_singularitygen/tesla))
for(var/A in oview(source, zap_range+2))
for(var/A in typecache_filter_multi_list_exclusion(oview(source, zap_range+2), things_to_shock, blacklisted_tesla_types))
if(istype(A, /obj/machinery/power/tesla_coil))
var/dist = get_dist(source, A)
var/obj/machinery/power/tesla_coil/C = A
@@ -207,13 +208,13 @@ GLOBAL_LIST_INIT(blacklisted_tesla_types, typecacheof(list(/obj/machinery/atmosp
closest_atom = A
closest_dist = dist
else if(closest_grounding_rod || is_type_in_typecache(A, GLOB.blacklisted_tesla_types))
else if(closest_grounding_rod)
continue
else if(isliving(A))
var/dist = get_dist(source, A)
var/mob/living/L = A
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !HAS_SECONDARY_FLAG(L, TESLA_IGNORE))
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !(L.flags_2 & TESLA_IGNORE_2))
closest_mob = L
closest_atom = A
closest_dist = dist
+9 -9
View File
@@ -18,8 +18,8 @@
var/sun_angle = 0 // sun angle as set by sun datum
var/obj/machinery/power/solar_control/control = null
/obj/machinery/power/tracker/New(var/turf/loc, var/obj/item/solar_assembly/S)
..(loc)
/obj/machinery/power/tracker/Initialize(mapload, obj/item/solar_assembly/S)
. = ..()
Make(S)
connect_to_network()
@@ -60,9 +60,9 @@
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
control.currentdir = angle
/obj/machinery/power/tracker/attackby(obj/item/weapon/W, mob/user, params)
/obj/machinery/power/tracker/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 tracker.", "<span class='notice'>You begin to take the glass off the solar tracker...</span>")
if(do_after(user, 50*W.toolspeed, target = src))
@@ -73,13 +73,13 @@
return ..()
/obj/machinery/power/tracker/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
stat |= BROKEN
unset_control()
/obj/machinery/power/solar/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(flags_1 & NODECONSTRUCT_1))
if(disassembled)
var/obj/item/solar_assembly/S = locate() in src
if(S)
@@ -87,11 +87,11 @@
S.give_glass(stat & BROKEN)
else
playsound(src, "shatter", 70, 1)
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)
// Tracker Electronic
/obj/item/weapon/electronics/tracker
/obj/item/electronics/tracker
name = "tracker electronics"
+10 -34
View File
@@ -31,6 +31,7 @@
density = TRUE
resistance_flags = FIRE_PROOF
CanAtmosPass = ATMOS_PASS_DENSITY
circuit = /obj/item/circuitboard/machine/power_compressor
var/obj/machinery/power/turbine/turbine
var/datum/gas_mixture/gas_contained
var/turf/inturf
@@ -51,6 +52,7 @@
density = TRUE
resistance_flags = FIRE_PROOF
CanAtmosPass = ATMOS_PASS_DENSITY
circuit = /obj/item/circuitboard/machine/power_turbine
var/opened = 0
var/obj/machinery/power/compressor/compressor
var/turf/outturf
@@ -62,31 +64,18 @@
desc = "A computer to remotely control a gas turbine."
icon_screen = "turbinecomp"
icon_keyboard = "tech_key"
circuit = /obj/item/weapon/circuitboard/computer/turbine_computer
circuit = /obj/item/circuitboard/computer/turbine_computer
var/obj/machinery/power/compressor/compressor
var/id = 0
// the inlet stage of the gas turbine electricity generator
/obj/machinery/power/compressor/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/power_compressor(null)
B.apply_default_parts(src)
// The inlet of the compressor is the direction it faces
/obj/machinery/power/compressor/Initialize()
. = ..()
// The inlet of the compressor is the direction it faces
gas_contained = new
inturf = get_step(src, dir)
/obj/item/weapon/circuitboard/machine/power_compressor
name = "Power Compressor (Machine Board)"
build_path = /obj/machinery/power/compressor
origin_tech = "programming=4;powerstorage=4;engineering=4"
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/manipulator = 6)
/obj/machinery/power/compressor/Initialize()
. = ..()
locate_machinery()
if(!turbine)
stat |= BROKEN
@@ -110,7 +99,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
@@ -186,30 +175,17 @@
#define TURBGENQ 100000
#define TURBGENG 0.5
/obj/machinery/power/turbine/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/power_turbine(null)
B.apply_default_parts(src)
// The outlet is pointed at the direction of the turbine component
outturf = get_step(src, dir)
/obj/item/weapon/circuitboard/machine/power_turbine
name = "Power Turbine (Machine Board)"
build_path = /obj/machinery/power/turbine
origin_tech = "programming=4;powerstorage=4;engineering=4"
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/capacitor = 6)
/obj/machinery/power/turbine/Initialize()
. = ..()
// The outlet is pointed at the direction of the turbine component
outturf = get_step(src, dir)
locate_machinery()
if(!compressor)
stat |= BROKEN
/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