mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 23:16:21 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-02-01
# Conflicts: # .travis.yml # code/_away_mission_tests.dm # code/modules/admin/verbs/mapping.dm # code/modules/mob/living/carbon/human/update_icons.dm # html/changelogs/.all_changelog.yml # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-6.dmm # nano/images/nanomap_z1.png # nano/images/nanomap_z10.png # nano/images/nanomap_z2.png # nano/images/nanomap_z3.png # nano/images/nanomap_z5.png # nano/images/nanomap_z6.png
This commit is contained in:
@@ -18,6 +18,8 @@ var/list/fusion_cores = list()
|
||||
active_power_usage = 500 //multiplied by field strength
|
||||
anchored = 0
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_core
|
||||
|
||||
var/obj/effect/fusion_em_field/owned_field
|
||||
var/field_strength = 1//0.01
|
||||
var/id_tag
|
||||
@@ -27,8 +29,12 @@ var/list/fusion_cores = list()
|
||||
|
||||
/obj/machinery/power/fusion_core/initialize()
|
||||
. = ..()
|
||||
connect_to_network()
|
||||
fusion_cores += src
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/power/fusion_core/mapped/initialize()
|
||||
. = ..()
|
||||
connect_to_network()
|
||||
|
||||
/obj/machinery/power/fusion_core/Destroy()
|
||||
for(var/obj/machinery/computer/fusion_core_control/FCC in machines)
|
||||
@@ -47,6 +53,7 @@ var/list/fusion_cores = list()
|
||||
owned_field.radiation_scale()
|
||||
owned_field.temp_dump()
|
||||
owned_field.temp_color()
|
||||
|
||||
/obj/machinery/power/fusion_core/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -106,23 +113,20 @@ var/list/fusion_cores = list()
|
||||
to_chat(user,"<span class='warning'>Shut \the [src] off first!</span>")
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
if(ismultitool(W))
|
||||
var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
else if(iswrench(W))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the [src.name] to the floor.", \
|
||||
"You hear a ratchet")
|
||||
else
|
||||
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
|
||||
"You unsecure the [src.name] from the floor.", \
|
||||
"You hear a ratchet")
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
anchored = 1
|
||||
layer = 4
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_fuel_compressor
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/initialize()
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/MouseDrop_T(var/atom/movable/target, var/mob/user)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return
|
||||
@@ -34,6 +40,14 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/attackby(var/obj/item/thing, var/mob/user)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, thing))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, thing))
|
||||
return
|
||||
if(default_part_replacement(user, thing))
|
||||
return
|
||||
|
||||
if(istype(thing, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = thing
|
||||
var/material/mat = M.get_material()
|
||||
|
||||
@@ -11,15 +11,17 @@ var/list/fuel_injectors = list()
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_injector
|
||||
|
||||
var/fuel_usage = 0.0001
|
||||
var/id_tag
|
||||
var/injecting = 0
|
||||
var/obj/item/weapon/fuel_assembly/cur_assembly
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/New()
|
||||
..()
|
||||
/obj/machinery/fusion_fuel_injector/initialize()
|
||||
. = ..()
|
||||
fuel_injectors += src
|
||||
tag = null
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/Destroy()
|
||||
if(cur_assembly)
|
||||
@@ -66,17 +68,18 @@ var/list/fuel_injectors = list()
|
||||
cur_assembly = W
|
||||
return
|
||||
|
||||
if(iswrench(W))
|
||||
if(iswrench(W) || isscrewdriver(W) || iscrowbar(W) || istype(W, /obj/item/weapon/storage/part_replacer))
|
||||
if(injecting)
|
||||
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
user.visible_message("\The [user] secures \the [src] to the floor.")
|
||||
else
|
||||
user.visible_message("\The [user] unsecures \the [src] from the floor.")
|
||||
return
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -122,7 +125,6 @@ var/list/fuel_injectors = list()
|
||||
var/obj/effect/accelerated_particle/A = new/obj/effect/accelerated_particle(get_turf(src), dir)
|
||||
A.particle_type = reagent
|
||||
A.additional_particles = numparticles - 1
|
||||
A.move(1)
|
||||
if(cur_assembly)
|
||||
cur_assembly.rod_quantities[reagent] -= amount
|
||||
amount_left += cur_assembly.rod_quantities[reagent]
|
||||
@@ -150,4 +152,4 @@ var/list/fuel_injectors = list()
|
||||
if (usr.incapacitated() || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
src.dir = turn(src.dir, 90)
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
return 0
|
||||
|
||||
/obj/effect/fusion_particle_catcher/CanPass(var/atom/movable/mover, var/turf/target, var/height=0, var/air_group=0)
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
return 0
|
||||
if(istype(mover, /obj/effect/accelerated_particle))
|
||||
return 0
|
||||
if(istype(mover, /obj/effect/accelerated_particle) || istype(mover, /obj/item/projectile/beam))
|
||||
return !density
|
||||
return 1
|
||||
|
||||
@@ -9,6 +9,8 @@ var/list/gyrotrons = list()
|
||||
use_power = 1
|
||||
active_power_usage = 50000
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/gyrotron
|
||||
|
||||
var/id_tag
|
||||
var/rate = 3
|
||||
var/mega_energy = 1
|
||||
@@ -21,6 +23,7 @@ var/list/gyrotrons = list()
|
||||
/obj/machinery/power/emitter/gyrotron/initialize()
|
||||
gyrotrons += src
|
||||
active_power_usage = mega_energy * 50000
|
||||
default_apply_parts()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/emitter/gyrotron/Destroy()
|
||||
@@ -54,4 +57,12 @@ var/list/gyrotrons = list()
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Accelerated Particles"
|
||||
desc = "Small things moving very fast."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon_state = "particle"//Need a new icon for this
|
||||
icon_state = "particle1"//Need a new icon for this
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/movement_range = 10
|
||||
@@ -19,22 +19,25 @@
|
||||
var/movetotarget = 1
|
||||
|
||||
/obj/effect/accelerated_particle/weak
|
||||
icon_state = "particle0"
|
||||
movement_range = 8
|
||||
energy = 5
|
||||
|
||||
/obj/effect/accelerated_particle/strong
|
||||
icon_state = "particle2"
|
||||
movement_range = 15
|
||||
energy = 15
|
||||
|
||||
/obj/effect/accelerated_particle/powerful
|
||||
icon_state = "particle3"
|
||||
movement_range = 25
|
||||
energy = 50
|
||||
|
||||
/obj/effect/accelerated_particle/New(loc, dir = 2)
|
||||
src.loc = loc
|
||||
src.set_dir(dir)
|
||||
if(movement_range > 20)
|
||||
movement_range = 20
|
||||
spawn(0)
|
||||
move(1)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/Bump(atom/A)
|
||||
@@ -58,18 +61,15 @@
|
||||
PC.parent.plasma_temperature += mega_energy
|
||||
PC.parent.energy += energy
|
||||
loc = null
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/Bumped(atom/A)
|
||||
if(ismob(A))
|
||||
Bump(A)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/accelerated_particle/singularity_act()
|
||||
return
|
||||
@@ -79,7 +79,6 @@
|
||||
M.apply_effect((radiation*3),IRRADIATE,0)
|
||||
M.updatehealth()
|
||||
//M << "<font color='red'>You feel odd.</font>"
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/proc/move(var/lag)
|
||||
|
||||
@@ -3,8 +3,4 @@
|
||||
desc_holder = "This is where the Alpha particles are accelerated to <b><i>radical speeds</i></b>."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon_state = "fuel_chamber"
|
||||
reference = "fuel_chamber"
|
||||
|
||||
/obj/structure/particle_accelerator/fuel_chamber/update_icon()
|
||||
..()
|
||||
return
|
||||
reference = "fuel_chamber"
|
||||
@@ -56,11 +56,10 @@
|
||||
active = 0
|
||||
connected_parts = list()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/update_icon()
|
||||
if(active)
|
||||
icon_state = "[reference]p1"
|
||||
icon_state = "[reference]p[strength]"
|
||||
else
|
||||
if(use_power)
|
||||
if(assembled)
|
||||
@@ -77,7 +76,6 @@
|
||||
icon_state = "[reference]w"
|
||||
else
|
||||
icon_state = "[reference]c"
|
||||
return
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/Topic(href, href_list)
|
||||
..()
|
||||
@@ -94,9 +92,9 @@
|
||||
|
||||
if(href_list["togglep"])
|
||||
if(!wires.IsIndexCut(PARTICLE_TOGGLE_WIRE))
|
||||
src.toggle_power()
|
||||
toggle_power()
|
||||
else if(href_list["scan"])
|
||||
src.part_scan()
|
||||
part_scan()
|
||||
|
||||
else if(href_list["strengthup"])
|
||||
if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
|
||||
@@ -106,9 +104,8 @@
|
||||
if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE))
|
||||
remove_strength()
|
||||
|
||||
src.updateDialog()
|
||||
src.update_icon()
|
||||
return
|
||||
updateDialog()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/strength_change()
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
@@ -144,7 +141,6 @@
|
||||
update_use_power(0)
|
||||
else if(!stat && construction_state == 3)
|
||||
update_use_power(1)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/process()
|
||||
@@ -152,13 +148,12 @@
|
||||
//a part is missing!
|
||||
if( length(connected_parts) < 6 )
|
||||
investigate_log("lost a connected part; It <font color='red'>powered down</font>.","singulo")
|
||||
src.toggle_power()
|
||||
toggle_power()
|
||||
return
|
||||
//emit some particles
|
||||
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)
|
||||
if(PE)
|
||||
PE.emit_particle(src.strength)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/part_scan()
|
||||
@@ -211,11 +206,11 @@
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/toggle_power()
|
||||
src.active = !src.active
|
||||
active = !active
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr ? usr.key : "outside forces"]","singulo")
|
||||
message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned [active ?"ON":"OFF"] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
if(src.active)
|
||||
if(active)
|
||||
update_use_power(2)
|
||||
for(var/obj/structure/particle_accelerator/part in connected_parts)
|
||||
part.strength = src.strength
|
||||
|
||||
@@ -20,20 +20,16 @@
|
||||
icon_state = "emitter_right"
|
||||
reference = "emitter_right"
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/update_icon()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(var/delay)
|
||||
if(delay && delay >= 0)
|
||||
src.fire_delay = delay
|
||||
fire_delay = delay
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/emit_particle(var/strength = 0)
|
||||
if((src.last_shot + src.fire_delay) <= world.time)
|
||||
src.last_shot = world.time
|
||||
if((last_shot + fire_delay) <= world.time)
|
||||
last_shot = world.time
|
||||
var/obj/effect/accelerated_particle/A = null
|
||||
var/turf/T = get_step(src,dir)
|
||||
switch(strength)
|
||||
@@ -43,6 +39,8 @@
|
||||
A = new/obj/effect/accelerated_particle(T, dir)
|
||||
if(2)
|
||||
A = new/obj/effect/accelerated_particle/strong(T, dir)
|
||||
if(3)
|
||||
A = new/obj/effect/accelerated_particle/powerful(T, dir)
|
||||
if(A)
|
||||
A.set_dir(src.dir)
|
||||
return 1
|
||||
|
||||
@@ -3,8 +3,4 @@
|
||||
desc_holder = "This uses electromagnetic waves to focus the Alpha-Particles."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon_state = "power_box"
|
||||
reference = "power_box"
|
||||
|
||||
/obj/structure/particle_accelerator/power_box/update_icon()
|
||||
..()
|
||||
return
|
||||
reference = "power_box"
|
||||
@@ -1,6 +1,6 @@
|
||||
// BUILDABLE SMES(Superconducting Magnetic Energy Storage) UNIT
|
||||
//
|
||||
// Last Change 1.1.2015 by Atlantis - Happy New Year!
|
||||
// Last Change 1.26.2018 by Neerti. Also signing this is dumb.
|
||||
//
|
||||
// This is subtype of SMES that should be normally used. It can be constructed, deconstructed and hacked.
|
||||
// It also supports RCON System which allows you to operate it remotely, if properly set.
|
||||
@@ -55,8 +55,10 @@
|
||||
component_parts += new /obj/item/weapon/smes_coil(src)
|
||||
recalc_coils()
|
||||
|
||||
|
||||
|
||||
// Pre-installed and pre-charged SMES hidden from the station, for use in submaps.
|
||||
/obj/machinery/power/smes/buildable/point_of_interest/New()
|
||||
..(1)
|
||||
charge = 1e6 // Should be enough for an individual POI.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user