mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
//All credit for this goes to Uristqwerty.
|
||||
|
||||
//And some to me! -Mini
|
||||
|
||||
|
||||
|
||||
//This file is partly designed around being able to uninclude it to go back to the old ai viewing system completely.
|
||||
//(And therefore also be portable to another similar codebase simply by transferring the file and including it after the other AI code files.)
|
||||
//There are probably a few parts that don't do that at the moment, but I'll fix them at some point.
|
||||
|
||||
/turf
|
||||
var/image/obscured
|
||||
var/image/dim
|
||||
@@ -290,19 +298,13 @@ var/datum/cameranet/cameranet = new()
|
||||
set name = "freelook"
|
||||
current = null //cancel camera view first, it causes problems
|
||||
cameraFollow = null
|
||||
machine = null
|
||||
if(client.eye == eyeobj)
|
||||
client.eye = src
|
||||
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
|
||||
c.remove(eyeobj)
|
||||
freelook()
|
||||
else
|
||||
if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
|
||||
eyeobj = new()
|
||||
client.eye = eyeobj
|
||||
eyeobj.loc = loc
|
||||
cameranet.visibility(eyeobj)
|
||||
cameraFollow = null
|
||||
// machine = null
|
||||
if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
|
||||
eyeobj = new()
|
||||
client.eye = eyeobj
|
||||
eyeobj.loc = loc
|
||||
cameranet.visibility(eyeobj)
|
||||
cameraFollow = null
|
||||
|
||||
/mob/aiEye/Move()
|
||||
. = ..()
|
||||
@@ -366,6 +368,47 @@ var/datum/cameranet/cameranet = new()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/switchCamera(atom/A)
|
||||
eyeobj.loc = A.loc
|
||||
return
|
||||
/mob/living/silicon/ai/switchCamera(var/obj/machinery/camera/C)
|
||||
eyeobj.loc = C.loc
|
||||
cameranet.visibility(eyeobj)
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
|
||||
if (user != src)
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in world)
|
||||
L.Add(C)
|
||||
|
||||
camera_sort(L)
|
||||
L = camera_network_sort(L)
|
||||
|
||||
var/list/D = list()
|
||||
for (var/obj/machinery/camera/C in L)
|
||||
if ( C.network in src.networks )
|
||||
D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
D["Cancel"] = "Cancel"
|
||||
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in D
|
||||
|
||||
if (!t || t == "Cancel")
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
eyeobj.loc = C.loc
|
||||
cameranet.visibility(eyeobj)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
reset_view(null)
|
||||
machine = null
|
||||
del eyeobj
|
||||
src.freelook()
|
||||
|
||||
@@ -161,6 +161,8 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
plasma_captured.toxins = round(gas_covered.toxins * transfer_ratio)
|
||||
plasma_captured.temperature = gas_covered.temperature
|
||||
gas_covered.toxins -= plasma_captured.toxins
|
||||
plasma_captured.update_values()
|
||||
gas_covered.update_values()
|
||||
held_plasma.merge(plasma_captured)
|
||||
//
|
||||
environment.merge(gas_covered)
|
||||
@@ -302,7 +304,9 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
plasma_lost.temperature = held_plasma.temperature
|
||||
//
|
||||
plasma_lost.toxins = held_plasma.toxins * loss_ratio
|
||||
plasma_lost.update_values()
|
||||
held_plasma.toxins -= held_plasma.toxins * loss_ratio
|
||||
held_plasma.update_values()
|
||||
//
|
||||
environment.merge(plasma_lost)
|
||||
radiation += loss_ratio * mega_energy * 0.1
|
||||
@@ -310,6 +314,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
return 1
|
||||
else
|
||||
held_plasma.toxins = 0
|
||||
held_plasma.update_values()
|
||||
return 0
|
||||
|
||||
//the !!fun!! part
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
|
||||
//a lot of these variables are pretty hacked, so dont rely on the comments
|
||||
/obj/machinery/power/supermatter/process()
|
||||
|
||||
//core can no longer spontaneously explode
|
||||
/*
|
||||
previousdet = det
|
||||
@@ -110,15 +109,15 @@
|
||||
//nothing can happen in a vacuum
|
||||
var/datum/gas_mixture/removed = env
|
||||
var/retardation_factor = 0.5
|
||||
if(env.total_moles())
|
||||
if(env.total_moles)
|
||||
//Remove gas from surrounding area
|
||||
var/transfer_moles = gasefficency * env.total_moles()
|
||||
var/transfer_moles = gasefficency * env.total_moles
|
||||
removed = env.remove(transfer_moles)
|
||||
|
||||
//100% oxygen atmosphere = 100% plasma production
|
||||
//100% nitrogen atmosphere = 0% plasma production
|
||||
//anything else is halfway in between; an atmosphere with no nitrogen or oxygen will still be at 50% (but steadily rise as more oxygen is made)
|
||||
var/total_moles = removed.total_moles()
|
||||
var/total_moles = removed.total_moles
|
||||
if(total_moles)
|
||||
retardation_factor += removed.oxygen / (total_moles * 2) - removed.nitrogen / (total_moles * 2)
|
||||
else
|
||||
@@ -143,6 +142,7 @@
|
||||
//
|
||||
produced = device_energy * OXYGEN_RELEASE_MODIFIER * retardation_factor
|
||||
removed.oxygen += produced
|
||||
removed.update_values()
|
||||
//
|
||||
mega_energy = 0
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
|
||||
msg += "<EM>\a [src], one of the cat-like Tajarans.</EM>!\n"
|
||||
msg += "<EM>\a [src], one of the cat-like Tajarans</EM>!\n"
|
||||
|
||||
//uniform
|
||||
if (src.w_uniform && !skipjumpsuit)
|
||||
|
||||
Reference in New Issue
Block a user