mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01: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:
@@ -186,12 +186,13 @@ var/global/floorIsLava = 0
|
||||
var/f = 1
|
||||
for(var/k in all_languages)
|
||||
var/datum/language/L = all_languages[k]
|
||||
if(!f) body += " | "
|
||||
else f = 0
|
||||
if(L in M.languages)
|
||||
body += "<a href='?src=\ref[src];toglang=\ref[M];lang=[html_encode(k)]' style='color:#006600'>[k]</a>"
|
||||
else
|
||||
body += "<a href='?src=\ref[src];toglang=\ref[M];lang=[html_encode(k)]' style='color:#ff0000'>[k]</a>"
|
||||
if(!(L.flags & INNATE))
|
||||
if(!f) body += " | "
|
||||
else f = 0
|
||||
if(L in M.languages)
|
||||
body += "<a href='?src=\ref[src];toglang=\ref[M];lang=[html_encode(k)]' style='color:#006600'>[k]</a>"
|
||||
else
|
||||
body += "<a href='?src=\ref[src];toglang=\ref[M];lang=[html_encode(k)]' style='color:#ff0000'>[k]</a>"
|
||||
|
||||
body += {"<br>
|
||||
</body></html>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -709,7 +709,7 @@
|
||||
spark_system.start()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
|
||||
|
||||
if(!installed_modules.len)
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -517,4 +523,4 @@
|
||||
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
|
||||
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
|
||||
|
||||
#undef SCRAMBLE_CACHE_LEN
|
||||
#undef SCRAMBLE_CACHE_LEN
|
||||
|
||||
@@ -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,10 +64,11 @@
|
||||
message = trim(message)
|
||||
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
speech_problem_flag = handle_r[3]
|
||||
if(!speaking || !(speaking.flags & NO_STUTTER))
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
@@ -120,12 +120,14 @@ 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)
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
// Only add actual cameras to the list of cameras
|
||||
if(istype(c, /obj/machinery/camera))
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
chunk.hasChanged()
|
||||
|
||||
// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0.
|
||||
|
||||
@@ -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
|
||||
#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,17 +22,18 @@ 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
|
||||
if(!gen_dir)
|
||||
T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]"
|
||||
else
|
||||
T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]"
|
||||
for(var/atom/movable/AM in T)
|
||||
if (!AM.anchored)
|
||||
AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1)
|
||||
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
|
||||
T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]"
|
||||
for(var/atom/movable/AM in T)
|
||||
if (!AM.anchored)
|
||||
AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1)
|
||||
|
||||
|
||||
//list used to cache empty zlevels to avoid nedless map bloat
|
||||
|
||||
@@ -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)
|
||||
|
||||
+42
-40
@@ -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
|
||||
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]")
|
||||
|
||||
Reference in New Issue
Block a user