mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into backup
Conflicts: code/modules/clothing/spacesuits/rig/rig.dm code/modules/clothing/spacesuits/rig/rig_pieces.dm
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..()) return 1
|
||||
|
||||
if(href_list["toggle_valve"])
|
||||
unlocked = !unlocked
|
||||
|
||||
@@ -190,7 +190,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..()) return 1
|
||||
|
||||
if(href_list["power"])
|
||||
use_power = !use_power
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/Topic(href, href_list)
|
||||
if(..()) return
|
||||
if(..()) return 1
|
||||
switch(href_list["command"])
|
||||
if("power")
|
||||
if(!configuring)
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/Topic(href, href_list)
|
||||
if(..()) return
|
||||
if(..()) return 1
|
||||
|
||||
switch(href_list["command"])
|
||||
if("power")
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/Topic(href, href_list) // -- TLE
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["filterset"])
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..()) return 1
|
||||
if(href_list["power"])
|
||||
use_power = !use_power
|
||||
if(href_list["set_press"])
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["toggleStatus"])
|
||||
use_power = !use_power
|
||||
update_icon()
|
||||
@@ -107,7 +109,6 @@
|
||||
set_power_level(new_setting)
|
||||
|
||||
add_fingerprint(usr)
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/process()
|
||||
..()
|
||||
|
||||
@@ -113,6 +113,8 @@
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["toggleStatus"])
|
||||
use_power = !use_power
|
||||
update_icon()
|
||||
@@ -127,7 +129,6 @@
|
||||
set_power_level(new_setting)
|
||||
|
||||
add_fingerprint(usr)
|
||||
return 1
|
||||
|
||||
//upgrading parts
|
||||
/obj/machinery/atmospherics/unary/heater/RefreshParts()
|
||||
|
||||
@@ -49,9 +49,12 @@ rcd light flash thingy on matter drain
|
||||
set category = "Malfunction"
|
||||
set name = "Upgrade Turrets"
|
||||
usr.verbs -= /client/proc/upgrade_turrets
|
||||
for(var/obj/machinery/turret/turret in player_list)
|
||||
turret.health += 30
|
||||
turret.shot_delay = 20
|
||||
for(var/obj/machinery/porta_turret/turret in machines)
|
||||
var/turf/T = get_turf(turret)
|
||||
if(T.z in config.station_levels)
|
||||
// Increase health by 37.5% of original max, decrease delays between shots to 66%
|
||||
turret.health += initial(turret.health) * 3 / 8
|
||||
turret.shot_delay = initial(turret.shot_delay) * 2 / 3
|
||||
|
||||
/datum/AI_Module/large/disable_rcd
|
||||
module_name = "RCD disable"
|
||||
|
||||
@@ -563,7 +563,7 @@ datum
|
||||
|
||||
|
||||
captainslaser
|
||||
steal_target = /obj/item/weapon/gun/energy/laser/captain
|
||||
steal_target = /obj/item/weapon/gun/energy/captain
|
||||
explanation_text = "Steal the captain's antique laser gun."
|
||||
weight = 20
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ datum/objective/steal
|
||||
var/target_name
|
||||
|
||||
var/global/possible_items[] = list(
|
||||
"the captain's antique laser gun" = /obj/item/weapon/gun/energy/laser/captain,
|
||||
"the captain's antique laser gun" = /obj/item/weapon/gun/energy/captain,
|
||||
"a hand teleporter" = /obj/item/weapon/hand_tele,
|
||||
"an RCD" = /obj/item/weapon/rcd,
|
||||
"a jetpack" = /obj/item/weapon/tank/jetpack,
|
||||
|
||||
@@ -302,6 +302,7 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
|
||||
|
||||
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict. // yeah but without SOME sort of Topic check any dick can mess with them via exploits as he pleases -walter0o
|
||||
//First comment might be outdated.
|
||||
if (!istype(src.loc, /turf))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
var/alarm_on = 0
|
||||
var/busy = 0
|
||||
|
||||
var/on_open_network = 0
|
||||
|
||||
/obj/machinery/camera/New()
|
||||
wires = new(src)
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
|
||||
invalidateCameraCache()
|
||||
|
||||
/* // Use this to look for cameras that have the same c_tag.
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
var/list/tempnetwork = C.network&src.network
|
||||
@@ -56,18 +56,18 @@
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
if(!isEmpProof())
|
||||
if(prob(100/severity))
|
||||
invalidateCameraCache()
|
||||
stat |= EMPED
|
||||
SetLuminosity(0)
|
||||
kick_viewers()
|
||||
triggerCameraAlarm(10 * severity)
|
||||
triggerCameraAlarm(30 / severity)
|
||||
update_icon()
|
||||
update_coverage()
|
||||
|
||||
spawn(900)
|
||||
stat &= ~EMPED
|
||||
cancelCameraAlarm()
|
||||
update_icon()
|
||||
invalidateCameraCache()
|
||||
update_coverage()
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
|
||||
@@ -114,7 +114,7 @@
|
||||
destroy()
|
||||
|
||||
/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob)
|
||||
invalidateCameraCache()
|
||||
update_coverage()
|
||||
// DECONSTRUCTION
|
||||
if(isscrewdriver(W))
|
||||
//user << "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>"
|
||||
@@ -195,7 +195,7 @@
|
||||
//legacy support, if choice is != 1 then just kick viewers without changing status
|
||||
kick_viewers()
|
||||
else
|
||||
invalidateCameraCache()
|
||||
update_coverage()
|
||||
set_status( !src.status )
|
||||
if (!(src.status))
|
||||
visible_message("\red [user] has deactivated [src]!")
|
||||
@@ -215,11 +215,11 @@
|
||||
|
||||
//Used when someone breaks a camera
|
||||
/obj/machinery/camera/proc/destroy()
|
||||
invalidateCameraCache()
|
||||
stat |= BROKEN
|
||||
kick_viewers()
|
||||
triggerCameraAlarm()
|
||||
update_icon()
|
||||
update_coverage()
|
||||
|
||||
//sparks
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
@@ -349,6 +349,51 @@
|
||||
user.set_machine(src)
|
||||
wires.Interact(user)
|
||||
|
||||
/obj/machinery/camera/proc/add_network(var/network_name)
|
||||
add_networks(list(network_name))
|
||||
|
||||
/obj/machinery/camera/proc/remove_network(var/network_name)
|
||||
remove_networks(list(network_name))
|
||||
|
||||
/obj/machinery/camera/proc/add_networks(var/list/networks)
|
||||
var/network_added
|
||||
network_added = 0
|
||||
for(var/network_name in networks)
|
||||
if(!(network_name in src.network))
|
||||
network += network_name
|
||||
network_added = 1
|
||||
|
||||
if(network_added)
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/proc/remove_networks(var/list/networks)
|
||||
var/network_removed
|
||||
network_removed = 0
|
||||
for(var/network_name in networks)
|
||||
if(network_name in src.network)
|
||||
network -= network_name
|
||||
network_removed = 1
|
||||
|
||||
if(network_removed)
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/proc/replace_networks(var/list/networks)
|
||||
if(networks.len != network.len)
|
||||
network = networks
|
||||
update_coverage(1)
|
||||
return
|
||||
|
||||
for(var/new_network in networks)
|
||||
if(!(new_network in network))
|
||||
network = networks
|
||||
update_coverage(1)
|
||||
return
|
||||
|
||||
/obj/machinery/camera/proc/clear_all_networks()
|
||||
if(network.len)
|
||||
network.Cut()
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/proc/nano_structure()
|
||||
var/cam[0]
|
||||
cam["name"] = sanitize(c_tag)
|
||||
@@ -358,3 +403,17 @@
|
||||
cam["y"] = y
|
||||
cam["z"] = z
|
||||
return cam
|
||||
|
||||
/obj/machinery/camera/proc/update_coverage(var/network_change = 0)
|
||||
if(network_change)
|
||||
var/list/open_networks = difflist(network, restricted_camera_networks)
|
||||
// Add or remove camera from the camera net as necessary
|
||||
if(on_open_network && !open_networks.len)
|
||||
cameranet.removeCamera(src)
|
||||
else if(!on_open_network && open_networks.len)
|
||||
on_open_network = 1
|
||||
cameranet.addCamera(src)
|
||||
else
|
||||
cameranet.updateVisibility(src, 0)
|
||||
|
||||
invalidateCameraCache()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if(isscrewdriver(W))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
@@ -99,10 +99,7 @@
|
||||
|
||||
C.auto_turn()
|
||||
|
||||
C.network = uniquelist(tempnetwork)
|
||||
tempnetwork = difflist(C.network,restricted_camera_networks)
|
||||
if(!tempnetwork.len)//Camera isn't on any open network - remove its chunk from AI visibility.
|
||||
cameranet.removeCamera(C)
|
||||
C.replace_networks(uniquelist(tempnetwork))
|
||||
|
||||
C.c_tag = input
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/obj/item/toy/prize/odysseus = 1,
|
||||
/obj/item/toy/prize/phazon = 1,
|
||||
/obj/item/toy/waterflower = 1,
|
||||
/obj/item/toy/figure = 1,
|
||||
/obj/random/action_figure = 1,
|
||||
/obj/random/plushie = 1,
|
||||
/obj/item/toy/cultsword = 1
|
||||
)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
onclose(user, "lockdown")
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(..()) return 1
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=lockdown")
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/machinery/computer/med_data/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if (!( data_core.general.Find(src.active1) ))
|
||||
src.active1 = null
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
/obj/machinery/computer/pod/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
if(href_list["power"])
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
// iconholder = 1
|
||||
// eprojectile = /obj/item/projectile/beam
|
||||
|
||||
if(/obj/item/weapon/gun/energy/laser/retro)
|
||||
if(/obj/item/weapon/gun/energy/retro)
|
||||
iconholder = 1
|
||||
|
||||
// if(/obj/item/weapon/gun/energy/laser/retro/sc_retro)
|
||||
// if(/obj/item/weapon/gun/energy/retro/sc_retro)
|
||||
// iconholder = 1
|
||||
|
||||
if(/obj/item/weapon/gun/energy/laser/captain)
|
||||
if(/obj/item/weapon/gun/energy/captain)
|
||||
iconholder = 1
|
||||
|
||||
if(/obj/item/weapon/gun/energy/lasercannon)
|
||||
|
||||
@@ -140,7 +140,6 @@
|
||||
..()
|
||||
name = "DV-136ZB #[rand(1000,9999)]"
|
||||
c_tag = name
|
||||
cameranet.removeCamera(src) // Sorry, no AI spying.
|
||||
|
||||
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
|
||||
return 1
|
||||
|
||||
@@ -20,26 +20,14 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says")
|
||||
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null)
|
||||
if(recording)
|
||||
//var/ending = copytext(msg, length(msg))
|
||||
timestamp+= timerecorded
|
||||
/*
|
||||
if(M.stuttering)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
return
|
||||
if(M.getBrainLoss() >= 60)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
return
|
||||
if(ending == "?")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
return
|
||||
else if(ending == "!")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
return
|
||||
*/
|
||||
timestamp += timerecorded
|
||||
|
||||
if(speaking)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [speaking.format_message_plain(msg, verb)]"
|
||||
else
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [verb], \"[msg]\""
|
||||
return
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
R.icon_state = "[R.ckey]-Standard"
|
||||
del(R.module)
|
||||
R.module = null
|
||||
R.camera.network.Remove(list("Engineering","Medical","MINE"))
|
||||
R.camera.remove_networks(list("Engineering","Medical","MINE"))
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.updateicon()
|
||||
|
||||
@@ -210,6 +210,50 @@
|
||||
prob(3);/obj/item/ammo_magazine/mc9mmt/rubber)
|
||||
|
||||
|
||||
/obj/random/action_figure
|
||||
name = "random action figure"
|
||||
desc = "This is a random action figure."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "assistant"
|
||||
item_to_spawn()
|
||||
return pick(/obj/item/toy/figure/cmo,\
|
||||
/obj/item/toy/figure/assistant,\
|
||||
/obj/item/toy/figure/atmos,\
|
||||
/obj/item/toy/figure/bartender,\
|
||||
/obj/item/toy/figure/borg,\
|
||||
/obj/item/toy/figure/gardener,\
|
||||
/obj/item/toy/figure/captain,\
|
||||
/obj/item/toy/figure/cargotech,\
|
||||
/obj/item/toy/figure/ce,\
|
||||
/obj/item/toy/figure/chaplain,\
|
||||
/obj/item/toy/figure/chef,\
|
||||
/obj/item/toy/figure/chemist,\
|
||||
/obj/item/toy/figure/clown,\
|
||||
/obj/item/toy/figure/corgi,\
|
||||
/obj/item/toy/figure/detective,\
|
||||
/obj/item/toy/figure/dsquad,\
|
||||
/obj/item/toy/figure/engineer,\
|
||||
/obj/item/toy/figure/geneticist,\
|
||||
/obj/item/toy/figure/hop,\
|
||||
/obj/item/toy/figure/hos,\
|
||||
/obj/item/toy/figure/qm,\
|
||||
/obj/item/toy/figure/janitor,\
|
||||
/obj/item/toy/figure/agent,\
|
||||
/obj/item/toy/figure/librarian,\
|
||||
/obj/item/toy/figure/md,\
|
||||
/obj/item/toy/figure/mime,\
|
||||
/obj/item/toy/figure/miner,\
|
||||
/obj/item/toy/figure/ninja,\
|
||||
/obj/item/toy/figure/wizard,\
|
||||
/obj/item/toy/figure/rd,\
|
||||
/obj/item/toy/figure/roboticist,\
|
||||
/obj/item/toy/figure/scientist,\
|
||||
/obj/item/toy/figure/syndie,\
|
||||
/obj/item/toy/figure/secofficer,\
|
||||
/obj/item/toy/figure/warden,\
|
||||
/obj/item/toy/figure/psychologist,\
|
||||
/obj/item/toy/figure/paramedic,\
|
||||
/obj/item/toy/figure/ert)
|
||||
|
||||
|
||||
/obj/random/plushie
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
if (2)
|
||||
@@ -39,14 +39,14 @@
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -10,7 +10,7 @@ var/global/list/med_hud_users = list() // List of all entities using
|
||||
var/global/list/sec_hud_users = list() // List of all entities using a security HUD.
|
||||
|
||||
// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them.
|
||||
var/list/restricted_camera_networks = list("thunder","ERT","NUKE")
|
||||
var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
|
||||
|
||||
var/global/list/global_mutations = list() // List of hidden mutation things.
|
||||
var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called manually after an event.
|
||||
|
||||
@@ -186,6 +186,7 @@ var/global/floorIsLava = 0
|
||||
var/f = 1
|
||||
for(var/k in all_languages)
|
||||
var/datum/language/L = all_languages[k]
|
||||
if(!(L.flags & INNATE))
|
||||
if(!f) body += " | "
|
||||
else f = 0
|
||||
if(L in M.languages)
|
||||
|
||||
@@ -64,10 +64,9 @@
|
||||
/datum/alarm_handler/proc/on_alarm_change(var/datum/alarm/alarm, var/was_raised)
|
||||
for(var/obj/machinery/camera/C in alarm.cameras())
|
||||
if(was_raised)
|
||||
C.network.Add(category)
|
||||
invalidateCameraCache()
|
||||
C.add_network(category)
|
||||
else
|
||||
C.network.Remove(category)
|
||||
C.remove_network(category)
|
||||
notify_listeners(alarm, was_raised)
|
||||
|
||||
/datum/alarm_handler/proc/get_alarm_severity_for_origin(var/atom/origin)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(..()) return 1
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(..()) return 1
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=prox")
|
||||
onclose(usr, "prox")
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(..()) return 1
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=radio")
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(..()) return 1
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=timer")
|
||||
onclose(usr, "timer")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//They can be healed with plastic or metal sheeting.
|
||||
|
||||
/datum/breach
|
||||
var/class = 0 // Size. Lower is smaller.
|
||||
var/class = 0 // Size. Lower is smaller. Uses floating point values!
|
||||
var/descriptor // 'gaping hole' etc.
|
||||
var/damtype = BURN // Punctured or melted
|
||||
var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance.
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
var/can_breach = 1 // Set to 0 to disregard all breaching.
|
||||
var/list/breaches = list() // Breach datum container.
|
||||
var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%.
|
||||
var/breach_threshold = 3 // Min damage before a breach is possible.
|
||||
var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%. 0.2 -> 50 brute/burn damage to cause 10 breach damage
|
||||
var/breach_threshold = 3 // Min damage before a breach is possible. Damage is subtracted by this amount, it determines the "hardness" of the suit.
|
||||
var/damage = 0 // Current total damage
|
||||
var/brute_damage = 0 // Specifically brute damage.
|
||||
var/burn_damage = 0 // Specifically burn damage.
|
||||
@@ -44,7 +44,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
/datum/breach/proc/update_descriptor()
|
||||
|
||||
//Sanity...
|
||||
class = max(1,min(class,5))
|
||||
class = between(1, round(class), 5)
|
||||
//Apply the correct descriptor.
|
||||
if(damtype == BURN)
|
||||
descriptor = breach_burn_descriptors[class]
|
||||
@@ -86,7 +86,10 @@ var/global/list/breach_burn_descriptors = list(
|
||||
|
||||
/obj/item/clothing/suit/space/proc/create_breaches(var/damtype, var/amount)
|
||||
|
||||
if(!can_breach || !amount)
|
||||
amount -= src.breach_threshold
|
||||
amount *= src.resilience
|
||||
|
||||
if(!can_breach || amount <= 0)
|
||||
return
|
||||
|
||||
if(!breaches)
|
||||
@@ -98,14 +101,14 @@ var/global/list/breach_burn_descriptors = list(
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T) return
|
||||
|
||||
amount = amount * src.resilience
|
||||
|
||||
//Increase existing breaches.
|
||||
for(var/datum/breach/existing in breaches)
|
||||
|
||||
if(existing.damtype != damtype)
|
||||
continue
|
||||
|
||||
//keep in mind that 10 breach damage == full pressure loss.
|
||||
//a breach can have at most 5 breach damage
|
||||
if (existing.class < 5)
|
||||
var/needs = 5 - existing.class
|
||||
if(amount < needs)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
//With 0.05 resiliance, will reach 10 breach damage after 18 laser carbine blasts. Completely immune to smg hits.
|
||||
//will reach 10 breach damage after 18 laser carbine blasts, or 7 revolver hits. Completely immune to smg hits.
|
||||
breach_threshold = 28
|
||||
resilience = 0.05
|
||||
can_breach = 1
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
icon_action_button = "[icon_state]"
|
||||
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = camera_networks
|
||||
cameranet.removeCamera(camera)
|
||||
camera.replace_networks(camera_networks)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
return 1
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) voidsuits.
|
||||
//With 0.2 resiliance, will reach 10 breach damage after 3 laser carbine blasts or 8 smg hits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
onclose(user,"fscanner")
|
||||
|
||||
/obj/machinery/computer/forensic_scanning/Topic(href,href_list)
|
||||
if(..()) return 1
|
||||
switch(href_list["operation"])
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
|
||||
@@ -342,7 +342,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
/obj/item/weapon/storage/toolbox/syndicate, /obj/item/weapon/aiModule,\
|
||||
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/plastique,\
|
||||
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/captain,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
|
||||
@@ -106,7 +106,7 @@ var/global/list/holodeck_programs = list(
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if(href_list["change_stack"])
|
||||
var/choice = input("What would you like to set the stack amount to?") as null|anything in list(1,5,10,20,50)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/item/weapon/moneybag/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["remove"])
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
/datum/language/proc/format_message(message, verb)
|
||||
return "[verb], <span class='message'><span class='[colour]'>\"[capitalize(message)]\"</span></span>"
|
||||
|
||||
/datum/language/proc/format_message_plain(message, verb)
|
||||
return "[verb], \"[capitalize(message)]\""
|
||||
|
||||
/datum/language/proc/format_message_radio(message, verb)
|
||||
return "[verb], <span class='[colour]'>\"[capitalize(message)]\"</span>"
|
||||
|
||||
@@ -121,11 +124,14 @@
|
||||
name = "Noise"
|
||||
desc = "Noises"
|
||||
key = ""
|
||||
flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG
|
||||
flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG|NO_STUTTER
|
||||
|
||||
/datum/language/noise/format_message(message, verb)
|
||||
return "<span class='message'><span class='[colour]'>[message]</span></span>"
|
||||
|
||||
/datum/language/noise/format_message_plain(message, verb)
|
||||
return message
|
||||
|
||||
/datum/language/noise/format_message_radio(message, verb)
|
||||
return "<span class='[colour]'>[message]</span>"
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
else
|
||||
message = copytext(message,3)
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if(speaking)
|
||||
@@ -62,6 +64,7 @@
|
||||
message = trim(message)
|
||||
|
||||
if(speech_problem_flag)
|
||||
if(!speaking || !(speaking.flags & NO_STUTTER))
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
|
||||
@@ -120,6 +120,8 @@ var/datum/cameranet/cameranet = new()
|
||||
for(var/y = y1; y <= y2; y += 16)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z)
|
||||
// Only add actual cameras to the list of cameras
|
||||
if(istype(c, /obj/machinery/camera))
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
else
|
||||
changed = 1
|
||||
|
||||
// The actual updating. It gathers the visible turfs from cameras and puts them into the appropiate lists.
|
||||
// The actual updating. It gathers the visible turfs from cameras and puts them into the appropriate lists.
|
||||
|
||||
/datum/camerachunk/proc/update()
|
||||
|
||||
@@ -76,14 +76,14 @@
|
||||
var/obj/machinery/camera/c = camera
|
||||
|
||||
if(!c)
|
||||
continue
|
||||
cameras -= c
|
||||
|
||||
if(!c.can_use())
|
||||
continue
|
||||
|
||||
var/turf/point = locate(src.x + 8, src.y + 8, src.z)
|
||||
if(get_dist(point, c) > 24)
|
||||
continue
|
||||
cameras -= c
|
||||
|
||||
for(var/turf/t in c.can_see())
|
||||
newVisibleTurfs[t] = t
|
||||
@@ -143,14 +143,8 @@
|
||||
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
|
||||
turfs[t] = t
|
||||
|
||||
for(var/camera in cameras)
|
||||
var/obj/machinery/camera/c = camera
|
||||
if(!c)
|
||||
continue
|
||||
|
||||
if(!c.can_use())
|
||||
continue
|
||||
|
||||
// At this point we only have functional cameras
|
||||
for(var/obj/machinery/camera/c in cameras)
|
||||
for(var/turf/t in c.can_see())
|
||||
visibleTurfs[t] = t
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
|
||||
/obj/machinery/camera/deactivate(user as mob, var/choice = 1)
|
||||
..(user, choice)
|
||||
invalidateCameraCache()
|
||||
if(src.can_use())
|
||||
cameranet.addCamera(src)
|
||||
else
|
||||
@@ -98,16 +99,11 @@
|
||||
cameranet.cameras_unsorted = 1
|
||||
else
|
||||
dd_insertObjectList(cameranet.cameras, src)
|
||||
|
||||
var/list/open_networks = difflist(network,restricted_camera_networks) //...but if all of camera's networks are restricted, it only works for specific camera consoles.
|
||||
if(open_networks.len) //If there is at least one open network, chunk is available for AI usage.
|
||||
cameranet.addCamera(src)
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/Del()
|
||||
cameranet.cameras -= src
|
||||
var/list/open_networks = difflist(network,restricted_camera_networks)
|
||||
if(open_networks.len)
|
||||
cameranet.removeCamera(src)
|
||||
clear_all_networks()
|
||||
..()
|
||||
|
||||
#undef BORG_CAMERA_BUFFER
|
||||
@@ -31,7 +31,7 @@
|
||||
add_language("Drone Talk", 1)
|
||||
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
camera.add_network("Engineering")
|
||||
|
||||
//They are unable to be upgraded, so let's give them a bit of a better battery.
|
||||
cell.maxcharge = 10000
|
||||
@@ -287,5 +287,7 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/drone/add_robot_verbs()
|
||||
src.verbs |= robot_verbs_subsystems
|
||||
|
||||
/mob/living/silicon/robot/drone/remove_robot_verbs()
|
||||
src.verbs -= robot_verbs_subsystems
|
||||
|
||||
@@ -125,7 +125,7 @@ var/list/robot_verbs_default = list(
|
||||
if(!scrambledcodes && !camera)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
camera.network = list("SS13","Robots")
|
||||
camera.replace_networks(list("SS13","Robots"))
|
||||
if(wires.IsIndexCut(BORG_WIRE_CAMERA))
|
||||
camera.status = 0
|
||||
|
||||
@@ -275,7 +275,7 @@ var/list/robot_verbs_default = list(
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
module.channels = list("Supply" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("MINE")
|
||||
camera.add_network("MINE")
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
module_sprites["Advanced Droid"] = "droid-miner"
|
||||
module_sprites["Treadhead"] = "Miner"
|
||||
@@ -285,7 +285,7 @@ var/list/robot_verbs_default = list(
|
||||
module = new /obj/item/weapon/robot_module/crisis(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
camera.add_network("Medical")
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
@@ -296,7 +296,7 @@ var/list/robot_verbs_default = list(
|
||||
module = new /obj/item/weapon/robot_module/surgeon(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
camera.add_network("Medical")
|
||||
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
@@ -318,7 +318,7 @@ var/list/robot_verbs_default = list(
|
||||
module = new /obj/item/weapon/robot_module/engineering(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
camera.add_network("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
@@ -329,7 +329,7 @@ var/list/robot_verbs_default = list(
|
||||
module = new /obj/item/weapon/robot_module/construction(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
camera.add_network("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
@@ -1142,8 +1142,7 @@ var/list/robot_verbs_default = list(
|
||||
scrambledcodes = 1
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(src.camera)
|
||||
src.camera.network = list()
|
||||
cameranet.removeCamera(src.camera)
|
||||
src.camera.clear_all_networks()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/ResetSecurityCodes()
|
||||
|
||||
@@ -323,11 +323,13 @@
|
||||
if(next_alarm_notice && (world.time > next_alarm_notice))
|
||||
next_alarm_notice = 0
|
||||
|
||||
var/alarm_raised = 0
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == 1)
|
||||
alarm_raised = 1
|
||||
if(!reported)
|
||||
reported = 1
|
||||
src << "<span class='warning'>--- [AH.category] Detected ---</span>"
|
||||
@@ -343,6 +345,9 @@
|
||||
src << "<span class='notice'>--- [AH.category] Cleared ---</span>"
|
||||
src << "\The [A.alarm_name()]."
|
||||
|
||||
if(alarm_raised)
|
||||
src << "<A HREF=?src=\ref[src];showalerts=1>\[Show Alerts\]</A>"
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
alarms.Cut()
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = "Spiderbot-[real_name]"
|
||||
camera.network = list("SS13")
|
||||
camera.replace_networks(list("SS13"))
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -22,10 +22,11 @@ proc/toggle_move_stars(zlevel, direction)
|
||||
|
||||
if (moving_levels["zlevel"] != gen_dir)
|
||||
moving_levels["zlevel"] = gen_dir
|
||||
for(var/turf/space/S in world)
|
||||
if(S.z == zlevel)
|
||||
for(var/x = 1 to world.maxx)
|
||||
for(var/y = 1 to world.maxy)
|
||||
spawn(0)
|
||||
var/turf/T = S
|
||||
var/turf/space/T = locate(x,y,zlevel)
|
||||
if (T)
|
||||
if(!gen_dir)
|
||||
T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]"
|
||||
else
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/machinery/computer/engines/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if(href_list["state"])
|
||||
state = href_list["state"]
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/obj/machinery/computer/helm/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if (!linked)
|
||||
return
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle_control/explore/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
/obj/effect/map/ship/proc/decelerate()
|
||||
if(!is_still() && can_burn())
|
||||
if (speed[1])
|
||||
adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),speed[1]), 0)
|
||||
adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),abs(speed[1])), 0)
|
||||
if (speed[2])
|
||||
adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),speed[2]))
|
||||
adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),abs(speed[2])))
|
||||
last_burn = world.time
|
||||
|
||||
/obj/effect/map/ship/proc/accelerate(direction)
|
||||
|
||||
@@ -1148,44 +1148,9 @@
|
||||
|
||||
|
||||
// Set channels depending on how much charge we have left
|
||||
|
||||
// Allow the APC to operate as normal if the cell can charge
|
||||
if(charging && longtermpower < 10)
|
||||
longtermpower += 1
|
||||
else if(longtermpower > -10)
|
||||
longtermpower -= 2
|
||||
|
||||
if((cell.percent() > 30) || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
|
||||
if(autoflag != 3)
|
||||
equipment = autoset(equipment, 1)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
autoflag = 3
|
||||
power_alarm.clearAlarm(loc, src)
|
||||
else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment
|
||||
if(autoflag != 2)
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 2
|
||||
else if(cell.percent() <= 15) // <15%, turn off lighting & equipment
|
||||
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 1
|
||||
else // zero charge, turn all off
|
||||
if(autoflag != 0)
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 0
|
||||
update_channels()
|
||||
|
||||
// now trickle-charge the cell
|
||||
|
||||
lastused_charging = 0 // Clear the variable for new use.
|
||||
if(src.attempt_charging())
|
||||
if(excess > 0) // check to make sure we have enough to charge
|
||||
@@ -1222,7 +1187,6 @@
|
||||
chargecount = 0
|
||||
|
||||
else // no cell, switch everything off
|
||||
|
||||
charging = 0
|
||||
chargecount = 0
|
||||
equipment = autoset(equipment, 0)
|
||||
@@ -1232,13 +1196,48 @@
|
||||
autoflag = 0
|
||||
|
||||
// update icon & area power if anything changed
|
||||
|
||||
if(last_lt != lighting || last_eq != equipment || last_en != environ)
|
||||
queue_icon_update()
|
||||
update()
|
||||
else if (last_ch != charging)
|
||||
queue_icon_update()
|
||||
|
||||
/obj/machinery/power/apc/proc/update_channels()
|
||||
// Allow the APC to operate as normal if the cell can charge
|
||||
if(charging && longtermpower < 10)
|
||||
longtermpower += 1
|
||||
else if(longtermpower > -10)
|
||||
longtermpower -= 2
|
||||
|
||||
if((cell.percent() > 30) || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
|
||||
if(autoflag != 3)
|
||||
equipment = autoset(equipment, 1)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
autoflag = 3
|
||||
power_alarm.clearAlarm(loc, src)
|
||||
else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment
|
||||
if(autoflag != 2)
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 2
|
||||
else if(cell.percent() <= 15) // <15%, turn off lighting & equipment
|
||||
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 1
|
||||
else // zero charge, turn all off
|
||||
if(autoflag != 0)
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 0
|
||||
|
||||
// val 0=off, 1=off(auto) 2=on 3=on(auto)
|
||||
// on 0=off, 1=on, 2=autooff
|
||||
|
||||
@@ -1266,12 +1265,15 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
cell.emp_act(severity)
|
||||
if(occupier)
|
||||
occupier.emp_act(severity)
|
||||
|
||||
lighting = 0
|
||||
equipment = 0
|
||||
environ = 0
|
||||
update()
|
||||
|
||||
spawn(600)
|
||||
equipment = 3
|
||||
environ = 3
|
||||
update_channels()
|
||||
update()
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/ex_act(severity)
|
||||
|
||||
@@ -21,22 +21,29 @@
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
projectile_type = /obj/item/projectile/beam/practice
|
||||
|
||||
obj/item/weapon/gun/energy/laser/retro
|
||||
obj/item/weapon/gun/energy/retro
|
||||
name = "retro laser"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 3
|
||||
projectile_type = /obj/item/projectile/beam
|
||||
fire_delay = 10
|
||||
|
||||
/obj/item/weapon/gun/energy/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
|
||||
force = 5
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 3
|
||||
projectile_type = /obj/item/projectile/beam
|
||||
origin_tech = null
|
||||
charge_cost = 200 //to compensate a bit for self-recharging
|
||||
self_recharge = 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon
|
||||
name = "laser cannon"
|
||||
desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
|
||||
@@ -62,6 +69,7 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
|
||||
projectile_type = /obj/item/projectile/beam/xray
|
||||
charge_cost = 50
|
||||
fire_delay = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/sniperrifle
|
||||
name = "\improper L.W.A.P. sniper rifle"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/dartgun/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["stop_mix"])
|
||||
var/index = text2num(href_list["stop_mix"])
|
||||
|
||||
@@ -162,7 +162,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
/obj/machinery/computer/rdconsole/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
/obj/machinery/computer/rdservercontrol/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
/obj/item/weapon/gun/energy/laser/practice/xenoarch,\
|
||||
/obj/item/weapon/gun/energy/laser/xenoarch,\
|
||||
/obj/item/weapon/gun/energy/xray/xenoarch,\
|
||||
/obj/item/weapon/gun/energy/laser/captain/xenoarch)
|
||||
/obj/item/weapon/gun/energy/captain/xenoarch)
|
||||
if(spawn_type)
|
||||
var/obj/item/weapon/gun/energy/new_gun = new spawn_type(src.loc)
|
||||
new_item = new_gun
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/xenoarch
|
||||
/obj/item/weapon/gun/energy/captain/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
return
|
||||
@@ -181,6 +181,7 @@ datum/genesequence
|
||||
onclose(user, "reconstitutor")
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
if(href_list["clone"])
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
var/datum/genesequence/cloned_genesequence = completed_genesequences[sequence_num]
|
||||
@@ -201,10 +202,9 @@ datum/genesequence
|
||||
pod1.biomass -= CLONE_BIOMASS
|
||||
else
|
||||
usr << "\red \icon[src] Unable to locate cloning pod!"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/reconstitutor/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
if(href_list["insertpos"])
|
||||
//world << "inserting gene for genesequence [href_list["insertgenome"]] at pos [text2num(href_list["insertpos"])]"
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
@@ -252,9 +252,6 @@ datum/genesequence
|
||||
usr.unset_machine(src)
|
||||
usr << browse(null, "window=reconstitutor")
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/reconstitutor/proc/scan_fossil(var/obj/item/weapon/fossil/scan_fossil)
|
||||
//see whether we accept these kind of fossils
|
||||
if(accepted_fossil_types.len && !accepted_fossil_types.Find(scan_fossil.type))
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/Topic(href, href_list)
|
||||
if(..()) //I hate this "return 1 to indicate they are not allowed to use the controller" crap, but not sure how else to do it without being able to call machinery/Topic() directly.
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if("manual_arm")
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if(href_list["removeid"])
|
||||
var/dna_hash = href_list["removeid"]
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
isolate()
|
||||
|
||||
/obj/machinery/computer/centrifuge/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
if (..()) return 1
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/machinery/computer/curer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["antibody"])
|
||||
@@ -91,7 +91,6 @@
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/curer/proc/createcure(var/obj/item/weapon/reagent_containers/container)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
|
||||
if(..()) return 0
|
||||
if(..()) return 1
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/disease2/incubator/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
if (..()) return 1
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/disease2/isolator/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
if (..()) return 1
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/obj/item/weapon/virusdish/Topic(href, href_list)
|
||||
. = ..()
|
||||
if(.) return
|
||||
if(.) return 1
|
||||
|
||||
if(href_list["info"])
|
||||
usr << browse(info, "window=info_\ref[src]")
|
||||
|
||||
@@ -631,6 +631,7 @@ var/list/be_special_flags = list(
|
||||
#define NONGLOBAL 32 // Do not add to general languages list.
|
||||
#define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes)
|
||||
#define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message
|
||||
#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems
|
||||
|
||||
//Flags for zone sleeping
|
||||
#define ZONE_ACTIVE 1
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"aS" = (/obj/machinery/door/window,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
"aT" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
"aU" = (/obj/structure/lattice,/turf/space,/area/space)
|
||||
"aV" = (/obj/structure/table,/obj/item/weapon/gun/energy/laser/retro,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
"aV" = (/obj/structure/table,/obj/item/weapon/gun/energy/retro,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
"aW" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/turf/simulated/shuttle/plating,/area/derelict/ship)
|
||||
"aX" = (/obj/machinery/light/small{dir = 8},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
"aY" = (/obj/structure/table,/obj/item/weapon/tank/oxygen,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
|
||||
|
||||
Reference in New Issue
Block a user