mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
fixed kobolds (?) brought in supermatter and cleaned it up a bit
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -214,7 +214,6 @@
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/BirdMan"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"
|
||||
#define FILE_DIR "code/WorkInProgress/carn"
|
||||
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
@@ -638,7 +637,6 @@
|
||||
#include "code\game\objects\structures.dm"
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\effects\aliens.dm"
|
||||
#include "code\game\objects\effects\barsign.dm"
|
||||
#include "code\game\objects\effects\biomass_rift.dm"
|
||||
#include "code\game\objects\effects\bump_teleporter.dm"
|
||||
#include "code\game\objects\effects\effect_system.dm"
|
||||
@@ -1150,6 +1148,7 @@
|
||||
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
||||
#include "code\modules\mob\living\simple_animal\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\kobold.dm"
|
||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\shade.dm"
|
||||
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
||||
@@ -1343,6 +1342,9 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\ZAS\Airflow.dm"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//mostly replaced these with emitter code
|
||||
//they're functionally identical
|
||||
|
||||
/obj/machinery/engine/laser
|
||||
/obj/machinery/computer/laser
|
||||
name = "Zero-point laser"
|
||||
desc = "A super-powerful laser"
|
||||
var/visible = 1
|
||||
var/state = 1.0
|
||||
var/obj/beam/e_beam/first
|
||||
//var/obj/beam/e_beam/first
|
||||
var/power = 500
|
||||
icon = 'engine.dmi'
|
||||
icon_state = "laser"
|
||||
@@ -17,8 +17,8 @@
|
||||
var/phase = 0
|
||||
var/phase_variance = 0
|
||||
|
||||
/obj/machinery/engine/laser/process()
|
||||
if(on)
|
||||
/obj/machinery/computer/laser/process()
|
||||
/*if(on)
|
||||
if(!first)
|
||||
src.first = new /obj/beam/e_beam(src.loc)
|
||||
src.first.master = src
|
||||
@@ -34,14 +34,14 @@
|
||||
src.first.updatebeam()
|
||||
else
|
||||
if(first)
|
||||
del first
|
||||
del first*/
|
||||
|
||||
/obj/machinery/engine/laser/proc/setpower(var/powera)
|
||||
src.power = powera
|
||||
/obj/machinery/computer/laser/proc/setpower(var/powera)
|
||||
/*src.power = powera
|
||||
if(first)
|
||||
first.setpower(src.power)
|
||||
|
||||
first.setpower(src.power)*/
|
||||
|
||||
/*
|
||||
/obj/beam/e_beam
|
||||
name = "Laser beam"
|
||||
icon = 'projectiles.dmi'
|
||||
@@ -128,4 +128,5 @@
|
||||
|
||||
/obj/beam/e_beam/proc/hit()
|
||||
del src
|
||||
return
|
||||
return
|
||||
*/
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/machinery/computer/lasercon
|
||||
New()
|
||||
spawn(1)
|
||||
for(var/obj/machinery/emitter/zero_point_laser/las in world)
|
||||
for(var/obj/machinery/zero_point_emitter/las in world)
|
||||
if(las.id == src.id)
|
||||
lasers += las
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
user << browse(null, "window=laser_control")
|
||||
return
|
||||
var/t = "<TT><B>Laser status monitor</B><HR>"
|
||||
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
t += "Zero Point Laser<br>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.mega_energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
|
||||
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
|
||||
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
|
||||
t += "<hr>"
|
||||
@@ -87,20 +87,20 @@
|
||||
else if( href_list["input"] )
|
||||
var/i = text2num(href_list["input"])
|
||||
var/d = i
|
||||
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
|
||||
var/new_power = laser.mega_energy + d
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
var/new_power = laser.energy + d
|
||||
new_power = max(new_power,0.0001) //lowest possible value
|
||||
new_power = min(new_power,0.01) //highest possible value
|
||||
laser.mega_energy = new_power
|
||||
laser.energy = new_power
|
||||
//
|
||||
src.updateDialog()
|
||||
else if( href_list["online"] )
|
||||
var/obj/machinery/emitter/zero_point_laser/laser = href_list["online"]
|
||||
var/obj/machinery/zero_point_emitter/laser = href_list["online"]
|
||||
laser.active = !laser.active
|
||||
src.updateDialog()
|
||||
else if( href_list["freq"] )
|
||||
var/amt = text2num(href_list["freq"])
|
||||
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
|
||||
for(var/obj/machinery/zero_point_emitter/laser in lasers)
|
||||
var/new_freq = laser.frequency + amt
|
||||
new_freq = max(new_freq,1) //lowest possible value
|
||||
new_freq = min(new_freq,20000) //highest possible value
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
density = 1
|
||||
anchored = 0
|
||||
|
||||
LuminosityRed = 4
|
||||
LuminosityGreen = 6
|
||||
|
||||
var/gasefficency = 0.25
|
||||
|
||||
var/base_icon_state = "darkmatter"
|
||||
@@ -86,13 +83,13 @@
|
||||
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
|
||||
|
||||
if(damage > emergency_point)
|
||||
radioalert("states, \"[emergency_alert]\"","Supermatter Monitor")
|
||||
//radioalert("states, \"[emergency_alert]\"","Supermatter Monitor")
|
||||
lastwarning = world.timeofday
|
||||
else if(damage >= damage_archived) // The damage is still going up
|
||||
radioalert("states, \"[warning_alert]\"","Supermatter Monitor")
|
||||
//radioalert("states, \"[warning_alert]\"","Supermatter Monitor")
|
||||
lastwarning = world.timeofday-150
|
||||
else // Phew, we're safe
|
||||
radioalert("states, \"[safe_alert]\"","Supermatter Monitor")
|
||||
//radioalert("states, \"[safe_alert]\"","Supermatter Monitor")
|
||||
lastwarning = world.timeofday
|
||||
|
||||
if(damage > explosion_point)
|
||||
|
||||
@@ -1,55 +1,236 @@
|
||||
//new supermatter lasers
|
||||
|
||||
/obj/machinery/emitter/zero_point_laser
|
||||
/obj/machinery/zero_point_emitter
|
||||
name = "Zero-point laser"
|
||||
desc = "A super-powerful laser"
|
||||
icon = 'engine.dmi'
|
||||
icon_state = "laser"
|
||||
mega_energy = 0.0001
|
||||
anchored = 0
|
||||
density = 1
|
||||
req_access = list(access_research)
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 300
|
||||
|
||||
var/active = 0
|
||||
var/fire_delay = 100
|
||||
var/last_shot = 0
|
||||
var/shot_number = 0
|
||||
var/state = 0
|
||||
var/locked = 0
|
||||
|
||||
var/energy = 0.0001
|
||||
var/frequency = 1
|
||||
|
||||
var/freq = 50000
|
||||
var/id
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["input"] )
|
||||
var/i = text2num(href_list["input"])
|
||||
var/d = i
|
||||
var/new_power = mega_energy + d
|
||||
new_power = max(new_power,0.0001) //lowest possible value
|
||||
new_power = min(new_power,0.01) //highest possible value
|
||||
mega_energy = new_power
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
else if( href_list["online"] )
|
||||
active = !active
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
else if( href_list["freq"] )
|
||||
var/amt = text2num(href_list["freq"])
|
||||
var/new_freq = frequency + amt
|
||||
new_freq = max(new_freq,1) //lowest possible value
|
||||
new_freq = min(new_freq,20000) //highest possible value
|
||||
frequency = new_freq
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
/obj/machinery/zero_point_emitter/verb/rotate()
|
||||
set name = "Rotate"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
update_icon()
|
||||
if (active && !(stat & (NOPOWER|BROKEN)))
|
||||
icon_state = "laser"//"emitter_+a"
|
||||
if (src.anchored || usr:stat)
|
||||
usr << "It is fastened to the floor!"
|
||||
return 0
|
||||
src.dir = turn(src.dir, 90)
|
||||
return 1
|
||||
|
||||
/obj/machinery/zero_point_emitter/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/zero_point_emitter/update_icon()
|
||||
if (active && !(stat & (NOPOWER|BROKEN)))
|
||||
icon_state = "laser"//"emitter_+a"
|
||||
else
|
||||
icon_state = "laser"//"emitter"
|
||||
|
||||
/obj/machinery/zero_point_emitter/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(state == 2)
|
||||
if(!src.locked)
|
||||
if(src.active==1)
|
||||
src.active = 0
|
||||
user << "You turn off the [src]."
|
||||
src.use_power = 1
|
||||
else
|
||||
src.active = 1
|
||||
user << "You turn on the [src]."
|
||||
src.shot_number = 0
|
||||
src.fire_delay = 100
|
||||
src.use_power = 2
|
||||
update_icon()
|
||||
else
|
||||
icon_state = "laser"//"emitter"
|
||||
user << "\red The controls are locked!"
|
||||
else
|
||||
user << "\red The [src] needs to be firmly secured to the floor first."
|
||||
return 1
|
||||
|
||||
process()
|
||||
var/curstate = active
|
||||
..()
|
||||
if(active != curstate)
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
|
||||
/obj/machinery/zero_point_emitter/emp_act(var/severity)//Emitters are hardened but still might have issues
|
||||
use_power(1000)
|
||||
/* if((severity == 1)&&prob(1)&&prob(1))
|
||||
if(src.active)
|
||||
src.active = 0
|
||||
src.use_power = 1 */
|
||||
return 1
|
||||
|
||||
/obj/machinery/zero_point_emitter/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(src.state != 2)
|
||||
src.active = 0
|
||||
return
|
||||
if(((src.last_shot + src.fire_delay) <= world.time) && (src.active == 1))
|
||||
src.last_shot = world.time
|
||||
if(src.shot_number < 3)
|
||||
src.fire_delay = 2
|
||||
src.shot_number ++
|
||||
else
|
||||
src.fire_delay = rand(20,100)
|
||||
src.shot_number = 0
|
||||
use_power(1000)
|
||||
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
|
||||
playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
A.dir = src.dir
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
A.yo = 20
|
||||
A.xo = 0
|
||||
if(EAST)
|
||||
A.yo = 0
|
||||
A.xo = 20
|
||||
if(WEST)
|
||||
A.yo = 0
|
||||
A.xo = -20
|
||||
else // Any other
|
||||
A.yo = -20
|
||||
A.xo = 0
|
||||
A.process() //TODO: Carn: check this out
|
||||
|
||||
|
||||
/obj/machinery/zero_point_emitter/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(active)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the external reinforcing bolts to the floor.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
"You undo the external reinforcing bolts.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(active)
|
||||
user << "Turn off the [src] first."
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||
if(1)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"You start to weld the [src] to the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"You start to cut the [src] free from the floor.", \
|
||||
"You hear welding")
|
||||
if (do_after(user,20))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
|
||||
if(emagged)
|
||||
user << "\red The lock seems to be broken"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
if(active)
|
||||
src.locked = !src.locked
|
||||
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
else
|
||||
src.locked = 0 //just in case it somehow gets locked
|
||||
user << "\red The controls can only be locked when the [src] is online"
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/zero_point_emitter/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/zero_point_emitter/Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["input"] )
|
||||
var/i = text2num(href_list["input"])
|
||||
var/d = i
|
||||
var/new_power = energy + d
|
||||
new_power = max(new_power,0.0001) //lowest possible value
|
||||
new_power = min(new_power,0.01) //highest possible value
|
||||
energy = new_power
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
else if( href_list["online"] )
|
||||
active = !active
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
else if( href_list["freq"] )
|
||||
var/amt = text2num(href_list["freq"])
|
||||
var/new_freq = frequency + amt
|
||||
new_freq = max(new_freq,1) //lowest possible value
|
||||
new_freq = min(new_freq,20000) //highest possible value
|
||||
frequency = new_freq
|
||||
//
|
||||
for(var/obj/machinery/computer/lasercon/comp in world)
|
||||
if(comp.id == src.id)
|
||||
comp.updateDialog()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
speak_chance = 15
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
|
||||
Reference in New Issue
Block a user