mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge pull request #279 from Markolie/master
[BUGFIX] Add report_alerts variable to areas, zeroth law fix, cameranet code update
This commit is contained in:
@@ -1109,15 +1109,6 @@ steam.start() -- spawns the effect
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/obj/item/device/handtv/attack_self(mob/usr as mob)
|
||||
var/list/cameras = new/list()
|
||||
for (var/obj/machinery/camera/C in cameranet.viewpoints)
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if (C.hasbug && C.status)
|
||||
cameras.Add(C)
|
||||
if (length(cameras) == 0)
|
||||
|
||||
@@ -101,13 +101,20 @@ AI MODULES
|
||||
for(var/templaw in laws)
|
||||
target.add_inherent_law(templaw)
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth
|
||||
var/removeownlaw = 0
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
if(target.laws.zeroth)
|
||||
target << "[sender.real_name] attempted to modify your zeroth law."
|
||||
target << "It would be in your best interest to play along with [sender.real_name] that:"
|
||||
for(var/failedlaw in laws)
|
||||
target << "[failedlaw]"
|
||||
return 1
|
||||
if(removeownlaw && (laws[1] == target.laws.zeroth))
|
||||
target.clear_zeroth_law()
|
||||
return 2
|
||||
else
|
||||
target << "[sender.real_name] attempted to modify your zeroth law."
|
||||
target << "It would be in your best interest to play along with [sender.real_name] that:"
|
||||
for(var/failedlaw in laws)
|
||||
target << "[failedlaw]"
|
||||
return 1
|
||||
|
||||
for(var/templaw in laws)
|
||||
target.set_zeroth_law(templaw)
|
||||
@@ -149,7 +156,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/zeroth/oneHuman
|
||||
name = "'OneHuman' AI Module"
|
||||
var/targetName = ""
|
||||
desc = "A 'one human' AI module: 'Only <name> is crew.'"
|
||||
desc = "A 'one human' AI module: 'Only <name> is crew.' This module adds a zeroth law, which can only be removed by uploading this board again."
|
||||
origin_tech = "programming=3;materials=6" //made with diamonds!
|
||||
laws = list("Only <name> is crew.")
|
||||
|
||||
@@ -159,6 +166,7 @@ AI MODULES
|
||||
targetName = targName
|
||||
laws[1] = "Only [targetName] is crew"
|
||||
desc = "A 'one crew' AI module: '[laws[1]]'"
|
||||
removeownlaw = 1
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/oneHuman/install(var/mob/living/silicon/S,var/mob/user)
|
||||
if(!targetName)
|
||||
@@ -167,8 +175,10 @@ AI MODULES
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/oneHuman/transmitInstructions(var/mob/living/silicon/target, var/mob/sender)
|
||||
if(..())
|
||||
return "[targetName], but the AI's existing law 0 cannot be overriden."
|
||||
if(..() == 1)
|
||||
return "[targetName], but the AI's existing zeroth law cannot be overriden."
|
||||
if(..() == 2)
|
||||
return "The AI's zeroth law has been overridden."
|
||||
return targetName
|
||||
|
||||
|
||||
@@ -186,13 +196,17 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/quarantine
|
||||
name = "'Quarantine' AI Module"
|
||||
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.'"
|
||||
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.' This module adds a zeroth law, which can only be removed by uploading this board again."
|
||||
origin_tech = "programming=3;biotech=2;materials=4"
|
||||
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.")
|
||||
removeownlaw = 1
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
if(..())
|
||||
return "The AI's existing law 0 cannot be overriden."
|
||||
var/result = ..()
|
||||
if(result == 1)
|
||||
return "The AI's existing zeroth law cannot be overriden."
|
||||
if(result == 2)
|
||||
return "The AI's zeroth law has been overridden."
|
||||
return laws[1]
|
||||
|
||||
/******************** OxygenIsToxicToHumans ********************/
|
||||
@@ -259,7 +273,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
target.clear_inherent_laws()
|
||||
target.clear_inherent_laws()
|
||||
|
||||
/******************* Full Core Boards *******************/
|
||||
|
||||
|
||||
@@ -34,14 +34,6 @@
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master)
|
||||
return 0
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -157,13 +157,6 @@
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master) return 0
|
||||
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "metal"
|
||||
hardness = 3
|
||||
|
||||
@@ -27,13 +27,6 @@ obj/structure/windoor_assembly
|
||||
var/secure = 0 //Whether or not this creates a secure windoor
|
||||
var/state = "01" //How far the door assembly has progressed
|
||||
|
||||
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
air_master.mark_for_update(loc)
|
||||
|
||||
return 1
|
||||
|
||||
obj/structure/windoor_assembly/New(dir=NORTH)
|
||||
..()
|
||||
src.ini_dir = src.dir
|
||||
|
||||
@@ -403,14 +403,6 @@ var/global/wcColored
|
||||
dir = ini_dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
|
||||
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
|
||||
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
//checks if this window is full-tile one
|
||||
/obj/structure/window/proc/is_fulltile()
|
||||
if(dir & (dir - 1))
|
||||
|
||||
Reference in New Issue
Block a user