Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
/obj/structure/AIcore
|
||||
#define AI_CORE_BRAIN(X) X.braintype == "Android" ? "brain" : "MMI"
|
||||
|
||||
/obj/structure/ai_core
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
name = "\improper AI core"
|
||||
@@ -8,28 +10,76 @@
|
||||
max_integrity = 500
|
||||
var/state = 0
|
||||
var/datum/ai_laws/laws
|
||||
var/obj/item/circuitboard/circuit = null
|
||||
var/obj/item/mmi/brain = null
|
||||
var/can_deconstruct = TRUE
|
||||
var/obj/item/circuitboard/aicore/circuit = null
|
||||
var/obj/item/mmi/core_mmi
|
||||
|
||||
/obj/structure/AIcore/Initialize(mapload)
|
||||
/obj/structure/ai_core/Initialize(mapload)
|
||||
. = ..()
|
||||
laws = new
|
||||
laws.set_laws_config()
|
||||
|
||||
/obj/structure/AIcore/Destroy()
|
||||
if(circuit)
|
||||
qdel(circuit)
|
||||
/obj/structure/ai_core/examine(mob/user)
|
||||
. = ..()
|
||||
if(!anchored)
|
||||
if(state != EMPTY_CORE)
|
||||
. += span_notice("It has some <b>bolts</b> that could be tightened.")
|
||||
else
|
||||
. += span_notice("It has some <b>bolts</b> that could be tightened. The frame can be <b>melted</b> down.")
|
||||
else
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
. += span_notice("There is a <b>slot</b> for a circuit board, its <b>bolts</b> can be loosened.")
|
||||
if(CIRCUIT_CORE)
|
||||
. += span_notice("The circuit board can be <b>screwed</b> into place or <b>pried</b> out.")
|
||||
if(SCREWED_CORE)
|
||||
. += span_notice("The frame can be <b>wired</b>, the circuit board can be <b>unfastened</b>.")
|
||||
if(CABLED_CORE)
|
||||
if(!core_mmi)
|
||||
. += span_notice("There are wires which could be hooked up to an <b>MMI or positronic brain</b>, or <b>cut</b>.")
|
||||
else
|
||||
var/accept_laws = TRUE
|
||||
if(core_mmi.laws.id != DEFAULT_AI_LAWID || !core_mmi.brainmob || !core_mmi.brainmob?.mind)
|
||||
accept_laws = FALSE
|
||||
. += span_notice("There is a <b>slot</b> for a reinforced glass panel, the [AI_CORE_BRAIN(core_mmi)] could be <b>pried</b> out.[accept_laws ? " A law module can be <b>swiped</b> across." : ""]")
|
||||
if(GLASS_CORE)
|
||||
. += span_notice("The monitor [core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? "and neural interface " : ""]can be <b>screwed</b> in, the panel can be <b>pried</b> out.")
|
||||
if(AI_READY_CORE)
|
||||
. += span_notice("The monitor's connection can be <b>cut</b>[core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? " the neural interface can be <b>screwed</b> in." : "."]")
|
||||
|
||||
/obj/structure/ai_core/handle_atom_del(atom/A)
|
||||
if(A == circuit)
|
||||
circuit = null
|
||||
if(brain)
|
||||
qdel(brain)
|
||||
brain = null
|
||||
if((state != GLASS_CORE) && (state != AI_READY_CORE))
|
||||
state = EMPTY_CORE
|
||||
update_appearance()
|
||||
if(A == core_mmi)
|
||||
core_mmi = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive
|
||||
name = "Networked AI core"
|
||||
/obj/structure/ai_core/Destroy()
|
||||
QDEL_NULL(circuit)
|
||||
QDEL_NULL(core_mmi)
|
||||
QDEL_NULL(laws)
|
||||
return ..()
|
||||
|
||||
/obj/structure/ai_core/deactivated
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
|
||||
/obj/structure/ai_core/deactivated/Initialize(mapload, posibrain = FALSE)
|
||||
. = ..()
|
||||
circuit = new(src)
|
||||
if(posibrain)
|
||||
core_mmi = new/obj/item/mmi/posibrain(src)
|
||||
else
|
||||
core_mmi = new(src)
|
||||
core_mmi.brain = new(core_mmi)
|
||||
core_mmi.update_appearance()
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive
|
||||
name = "networked AI core"
|
||||
desc = "This AI core is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
|
||||
can_deconstruct = FALSE
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
@@ -37,11 +87,24 @@
|
||||
var/safety_checks = TRUE
|
||||
var/active = TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/examine(mob/user)
|
||||
/obj/structure/ai_core/latejoin_inactive/Initialize(mapload)
|
||||
. = ..()
|
||||
. += "Its transmitter seems to be [active? "on" : "off"]."
|
||||
circuit = new(src)
|
||||
core_mmi = new(src)
|
||||
core_mmi.brain = new(core_mmi)
|
||||
core_mmi.update_appearance()
|
||||
GLOB.latejoin_ai_cores += src
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
|
||||
/obj/structure/ai_core/latejoin_inactive/Destroy()
|
||||
GLOB.latejoin_ai_cores -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Its transmitter seems to be <b>[active? "on" : "off"]</b>."
|
||||
. += span_notice("You could [active? "deactivate" : "activate"] it with a multitool.")
|
||||
|
||||
/obj/structure/ai_core/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
|
||||
if(!available)
|
||||
return FALSE
|
||||
if(!safety_checks)
|
||||
@@ -56,42 +119,61 @@
|
||||
return FALSE
|
||||
if(!SSmapping.level_trait(T.z,ZTRAIT_STATION))
|
||||
return FALSE
|
||||
if(!istype(T, /turf/open/floor))
|
||||
if(!isfloorturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
/obj/structure/ai_core/latejoin_inactive/attackby(obj/item/P, mob/user, params)
|
||||
if(P.tool_behaviour == TOOL_MULTITOOL)
|
||||
active = !active
|
||||
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/Initialize(mapload)
|
||||
/obj/structure/ai_core/wrench_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
GLOB.latejoin_ai_cores += src
|
||||
default_unfasten_wrench(user, tool)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/latejoin_inactive/Destroy()
|
||||
GLOB.latejoin_ai_cores -= src
|
||||
return ..()
|
||||
/obj/structure/ai_core/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(state == AI_READY_CORE)
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "no brain installed!")
|
||||
return TRUE
|
||||
else if(!core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
|
||||
balloon_alert(user, "brain is inactive!")
|
||||
return TRUE
|
||||
else
|
||||
balloon_alert(user, "connecting neural network...")
|
||||
if(!tool.use_tool(src, user, 10 SECONDS))
|
||||
return TRUE
|
||||
if(!ai_structure_to_mob())
|
||||
return TRUE
|
||||
balloon_alert(user, "connected neural network")
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
return default_unfasten_wrench(user, P, 20)
|
||||
/obj/structure/ai_core/attackby(obj/item/P, mob/user, params)
|
||||
if(!anchored)
|
||||
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
|
||||
if(P.tool_behaviour == TOOL_WELDER)
|
||||
if(state != EMPTY_CORE)
|
||||
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
|
||||
balloon_alert(user, "core must be empty to deconstruct it!")
|
||||
return
|
||||
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
|
||||
balloon_alert(user, "deconstructing frame...")
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == EMPTY_CORE)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
balloon_alert(user, "deconstructed frame")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
balloon_alert(user, "bolt it down first!")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
@@ -99,7 +181,7 @@
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
balloon_alert(user, "circuit board inserted")
|
||||
update_icon()
|
||||
state = CIRCUIT_CORE
|
||||
circuit = P
|
||||
@@ -107,13 +189,13 @@
|
||||
if(CIRCUIT_CORE)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
balloon_alert(user, "board screwed into place")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
return
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
balloon_alert(user, "circuit board removed")
|
||||
state = EMPTY_CORE
|
||||
update_icon()
|
||||
circuit.forceMove(loc)
|
||||
@@ -122,7 +204,7 @@
|
||||
if(SCREWED_CORE)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
balloon_alert(user, "circuit board unfastened")
|
||||
state = CIRCUIT_CORE
|
||||
update_icon()
|
||||
return
|
||||
@@ -130,61 +212,73 @@
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use_tool(src, user, 0, 5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
balloon_alert(user, "adding cables to frame...")
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
|
||||
balloon_alert(user, "added cables to frame.")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
balloon_alert(user, "need five lengths of cable!")
|
||||
return
|
||||
if(CABLED_CORE)
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
|
||||
if(core_mmi)
|
||||
balloon_alert(user, "remove the [AI_CORE_BRAIN(core_mmi)] first!")
|
||||
else
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
balloon_alert(user, "cables removed")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "add a brain first!")
|
||||
return
|
||||
var/obj/item/stack/sheet/rglass/G = P
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
balloon_alert(user, "adding glass panel...")
|
||||
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
balloon_alert(user, "added glass panel")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
|
||||
balloon_alert(user, "need two sheets of reinforced glass!")
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/aiModule))
|
||||
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
|
||||
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
|
||||
if(istype(P, /obj/item/ai_module))
|
||||
if(!core_mmi)
|
||||
balloon_alert(user, "no brain installed!")
|
||||
return
|
||||
var/obj/item/aiModule/module = P
|
||||
if(!core_mmi.brainmob || !core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
|
||||
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] is inactive!")
|
||||
return
|
||||
if(core_mmi.laws.id != DEFAULT_AI_LAWID)
|
||||
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] already has set laws!")
|
||||
return
|
||||
var/obj/item/ai_module/module = P
|
||||
module.install(laws, user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/mmi) && !brain)
|
||||
if(istype(P, /obj/item/mmi) && !core_mmi)
|
||||
var/obj/item/mmi/M = P
|
||||
if(!M.brainmob)
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
if(M.brainmob.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
if(!M.brain_check(user))
|
||||
var/install = tgui_alert(user, "This [AI_CORE_BRAIN(M)] is inactive, would you like to make an inactive AI?", "Installing AI [AI_CORE_BRAIN(M)]", list("Yes", "No"))
|
||||
if(install != "Yes")
|
||||
return
|
||||
if(M.brainmob?.suiciding)
|
||||
to_chat(user, span_warning("[M.name] is completely useless!"))
|
||||
return
|
||||
if(!user.transferItemToLoc(M, src))
|
||||
return
|
||||
core_mmi = M
|
||||
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
|
||||
update_appearance()
|
||||
|
||||
if(!M.brainmob.client)
|
||||
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
|
||||
return
|
||||
|
||||
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(M.brainmob, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
|
||||
var/mob/living/brain/B = M.brainmob
|
||||
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(B, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
|
||||
if(!QDELETED(M))
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
return
|
||||
@@ -196,47 +290,36 @@
|
||||
if(!user.transferItemToLoc(M,src))
|
||||
return
|
||||
|
||||
brain = M
|
||||
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
|
||||
core_mmi = M
|
||||
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && brain)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && core_mmi)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
brain = null
|
||||
balloon_alert(user, "removed [AI_CORE_BRAIN(core_mmi)]")
|
||||
core_mmi.forceMove(loc)
|
||||
core_mmi = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(GLASS_CORE)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
balloon_alert(user, "removed glass panel")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(core_mmi?.brainmob?.suiciding)
|
||||
to_chat(user, span_warning("The brain installed is completely useless."))
|
||||
return
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(brain)
|
||||
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
|
||||
if(!istype(brain.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(brain.brainmob, TRUE)
|
||||
|
||||
var/mob/living/silicon/ai/A = null
|
||||
|
||||
if (brain.overrides_aicore_laws)
|
||||
A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
|
||||
else
|
||||
A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
|
||||
|
||||
if(brain.force_replace_ai_name)
|
||||
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
|
||||
SSblackbox.record_feedback("amount", "ais_created", 1)
|
||||
qdel(src)
|
||||
balloon_alert(user, "connected monitor[core_mmi?.brainmob?.mind ? " and neural network" : ""]")
|
||||
if(core_mmi.brainmob?.mind)
|
||||
ai_structure_to_mob()
|
||||
else
|
||||
state = AI_READY_CORE
|
||||
update_icon()
|
||||
@@ -247,15 +330,39 @@
|
||||
P.transfer_ai("INACTIVE", "AICARD", src, user)
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
balloon_alert(user, "disconnected monitor")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/update_icon_state()
|
||||
/obj/structure/ai_core/proc/ai_structure_to_mob()
|
||||
var/mob/living/brain/the_brainmob = core_mmi.brainmob
|
||||
if(!the_brainmob.mind || the_brainmob.suiciding)
|
||||
return FALSE
|
||||
the_brainmob.mind.remove_antags_for_borging()
|
||||
if(!the_brainmob.mind.has_ever_been_ai)
|
||||
SSblackbox.record_feedback("amount", "ais_created", 1)
|
||||
var/mob/living/silicon/ai/ai_mob = null
|
||||
|
||||
if(core_mmi.overrides_aicore_laws)
|
||||
ai_mob = new /mob/living/silicon/ai(loc, core_mmi.laws, the_brainmob)
|
||||
core_mmi.laws = null //MMI's law datum is being donated, so we need the MMI to let it go or the GC will eat it
|
||||
else
|
||||
ai_mob = new /mob/living/silicon/ai(loc, laws, the_brainmob)
|
||||
laws = null //we're giving the new AI this datum, so let's not delete it when we qdel(src) 5 lines from now
|
||||
|
||||
if(core_mmi.force_replace_ai_name)
|
||||
ai_mob.fully_replace_character_name(ai_mob.name, core_mmi.replacement_ai_name())
|
||||
if(core_mmi.braintype == "Android")
|
||||
ai_mob.posibrain_inside = TRUE
|
||||
deadchat_broadcast(" has been brought online at <b>[get_area_name(ai_mob, format_text = TRUE)]</b>.", span_name("[ai_mob]"), follow_target = ai_mob, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ai_core/update_icon_state()
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
icon_state = "0"
|
||||
@@ -264,7 +371,7 @@
|
||||
if(SCREWED_CORE)
|
||||
icon_state = "2"
|
||||
if(CABLED_CORE)
|
||||
if(brain)
|
||||
if(core_mmi)
|
||||
icon_state = "3b"
|
||||
else
|
||||
icon_state = "3"
|
||||
@@ -273,8 +380,8 @@
|
||||
if(AI_READY_CORE)
|
||||
icon_state = "ai-empty"
|
||||
|
||||
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
|
||||
if(state == GLASS_CORE)
|
||||
/obj/structure/ai_core/deconstruct(disassembled = TRUE)
|
||||
if(state >= GLASS_CORE)
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
if(state >= CABLED_CORE)
|
||||
new /obj/item/stack/cable_coil(loc, 5)
|
||||
@@ -284,13 +391,13 @@
|
||||
new /obj/item/stack/sheet/plasteel(loc, 4)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/AIcore/deactivated
|
||||
/obj/structure/ai_core/deactivated
|
||||
name = "inactive AI"
|
||||
icon_state = "ai-empty"
|
||||
anchored = TRUE
|
||||
state = AI_READY_CORE
|
||||
|
||||
/obj/structure/AIcore/deactivated/New()
|
||||
/obj/structure/ai_core/deactivated/New()
|
||||
..()
|
||||
circuit = new(src)
|
||||
|
||||
@@ -307,23 +414,38 @@ That prevents a few funky behaviors.
|
||||
if(istype(card))
|
||||
if(card.flush)
|
||||
to_chat(user, "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol.")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
/obj/structure/ai_core/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(state != AI_READY_CORE || !..())
|
||||
return
|
||||
//Transferring a carded AI to a core.
|
||||
if(core_mmi && core_mmi.brainmob)
|
||||
if(core_mmi.brainmob.mind)
|
||||
to_chat(user, span_warning("[src] already contains an active mind!"))
|
||||
return
|
||||
else if(core_mmi.brainmob.suiciding)
|
||||
to_chat(user, span_warning("[AI_CORE_BRAIN(core_mmi)] installed in [src] is completely useless!"))
|
||||
return
|
||||
//Transferring a carded AI to a core.
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
AI.control_disabled = 0
|
||||
AI.radio_enabled = 1
|
||||
AI.control_disabled = FALSE
|
||||
AI.radio_enabled = TRUE
|
||||
AI.forceMove(loc) // to replace the terminal.
|
||||
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
to_chat(AI, span_notice("You have been uploaded to a stationary terminal. Remote device connection restored."))
|
||||
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
card.AI = null
|
||||
AI.battery = circuit.battery
|
||||
if(core_mmi.braintype == "Android")
|
||||
AI.posibrain_inside = TRUE
|
||||
else
|
||||
AI.posibrain_inside = FALSE
|
||||
qdel(src)
|
||||
else //If for some reason you use an empty card on an empty AI terminal.
|
||||
to_chat(user, "There is no AI loaded on this terminal!")
|
||||
to_chat(user, span_alert("There is no AI loaded on this terminal."))
|
||||
|
||||
/obj/item/circuitboard/aicore
|
||||
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
|
||||
var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
|
||||
|
||||
#undef AI_CORE_BRAIN
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || !user.cuff_resist_check() || M.buckled )
|
||||
return
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
R.loaded = src
|
||||
forceMove(R)
|
||||
user.visible_message("[user] collects [src].", "<span class='notice'>You collect [src].</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return 0
|
||||
return FALSE
|
||||
if(has_buckled_mobs())
|
||||
return 0
|
||||
return FALSE
|
||||
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
|
||||
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
|
||||
usr.put_in_hands(B)
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
if(user in src)
|
||||
return
|
||||
if(src.tool_interact(W,user))
|
||||
return 1 // No afterattack
|
||||
return TRUE // No afterattack
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
close()
|
||||
else
|
||||
O.forceMove(T)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/relaymove(mob/living/user, direction)
|
||||
if(user.stat || !isturf(loc))
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
/obj/structure/closet/body_bag/close()
|
||||
if(..())
|
||||
density = FALSE
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/closet/body_bag/handle_lock_addition()
|
||||
return
|
||||
@@ -59,11 +59,11 @@
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return 0
|
||||
return FALSE
|
||||
if(opened)
|
||||
return 0
|
||||
return FALSE
|
||||
if(contents.len)
|
||||
return 0
|
||||
return FALSE
|
||||
visible_message("<span class='notice'>[usr] folds up [src].</span>")
|
||||
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
|
||||
usr.put_in_hands(B)
|
||||
@@ -83,15 +83,15 @@
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return 0
|
||||
return FALSE
|
||||
if(opened)
|
||||
return 0
|
||||
return FALSE
|
||||
if(contents.len >= mob_storage_capacity / 2)
|
||||
to_chat(usr, "<span class='warning'>There are too many things inside of [src] to fold it up!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/obj/item/bodybag/bluespace/B in src)
|
||||
to_chat(usr, "<span class='warning'>You can't recursively fold bluespace body bags!</span>" )
|
||||
return 0
|
||||
return FALSE
|
||||
visible_message("<span class='notice'>[usr] folds up [src].</span>")
|
||||
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
|
||||
usr.put_in_hands(B)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/structure/closet/cardboard/open()
|
||||
if(opened || !can_open())
|
||||
return 0
|
||||
return FALSE
|
||||
var/list/alerted = null
|
||||
if(egged < world.time)
|
||||
var/mob/living/Snake = null
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == MELEE && damage_amount < melee_min_damage)
|
||||
return 0
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
// Exists to work around the minimum 700 cr price for goodies / small items / materials
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it.
|
||||
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return FALSE or just end it.
|
||||
return ..() //Stops it from opening and turning invisible when items are used on it.
|
||||
|
||||
else
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == MELEE && damage_amount < 25)
|
||||
return 0
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/update_overlays()
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
if(break_sound)
|
||||
playsound(src, break_sound, 50, 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -753,7 +753,7 @@
|
||||
|
||||
/datum/action/toggle_dead_chat_mob/Trigger()
|
||||
if(!..())
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/M = target
|
||||
if(HAS_TRAIT_FROM(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT))
|
||||
REMOVE_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
var/obj/item/stack/sheet/runed_metal/R = W
|
||||
if(R.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(R.get_amount() < 1)
|
||||
@@ -452,7 +452,7 @@
|
||||
var/obj/item/stack/sheet/bronze/B = W
|
||||
if(B.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two bronze sheets to build a bronze wall!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] begins plating [src] with bronze...</span>", "<span class='notice'>You begin constructing a bronze wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(B.get_amount() < 2)
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='warning'>[src] is out of water!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
reagents.trans_to(mop, 5)
|
||||
to_chat(user, "<span class='notice'>You wet [mop] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
if(!length(items))
|
||||
return
|
||||
items = sortList(items)
|
||||
items = sort_list(items)
|
||||
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, PROC_REF(check_menu), user), radius = 38, require_near = TRUE)
|
||||
if(!pick)
|
||||
return
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user, check_loc) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if(user.incapacitated() || !istype(user))
|
||||
return
|
||||
M.forceMove(get_turf(src))
|
||||
@@ -80,7 +80,7 @@
|
||||
return FALSE
|
||||
var/client/C = controller.client
|
||||
if(C)
|
||||
var/atom/A = C.mouseObject
|
||||
var/atom/A = C.mouse_object_ref?.resolve()
|
||||
var/turf/T = get_turf(A)
|
||||
if(istype(T)) //They're hovering over something in the map.
|
||||
direction_track(controller, T)
|
||||
|
||||
@@ -330,6 +330,17 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/attackby(obj/P, mob/user, params)
|
||||
if(!istype(P, /obj/item/riding_offhand))
|
||||
return ..()
|
||||
|
||||
var/obj/item/riding_offhand/riding_item = P
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
user.unbuckle_mob(carried_mob)
|
||||
MouseDrop_T(carried_mob, user)
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
@@ -369,9 +380,9 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
if(.)
|
||||
return
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
|
||||
. = !density
|
||||
|
||||
@@ -78,28 +78,28 @@
|
||||
|
||||
/mob/living/carbon/human/petrify(statue_timer)
|
||||
if(!isturf(loc))
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
|
||||
S.name = "statue of [name]"
|
||||
bleedsuppress = 1
|
||||
S.copy_overlays(src)
|
||||
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/monkey/petrify(statue_timer)
|
||||
if(!isturf(loc))
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
|
||||
S.name = "statue of a monkey"
|
||||
S.icon_state = "monkey"
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/petrify(statue_timer)
|
||||
if(!isturf(loc))
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/structure/statue/petrified/S = new (loc, src, statue_timer)
|
||||
S.name = "statue of a corgi"
|
||||
S.icon_state = "corgi"
|
||||
S.desc = "If it takes forever, I will wait for you..."
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -77,24 +77,24 @@
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if(istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(ismecha(A))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
else if(isliving(A)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(isbot(A)) //Bots understand the secrets
|
||||
return 1
|
||||
return TRUE
|
||||
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
|
||||
return 1
|
||||
return TRUE
|
||||
if(!M.lying && !(SEND_SIGNAL(M, COMSIG_CHECK_VENTCRAWL)) && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return ..(NORTH)
|
||||
|
||||
/obj/structure/reflector/proc/dir_map_to_angle(dir)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
var/pdir = P.dir
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/structure/spirit_board/proc/spirit_board_pick_letter(mob/M)
|
||||
if(!spirit_board_checks(M))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(virgin)
|
||||
virgin = 0
|
||||
@@ -48,7 +48,7 @@
|
||||
bonus = 10 //Give some other people a chance, hog.
|
||||
|
||||
if(next_use - bonus > world.time )
|
||||
return 0 //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
|
||||
return FALSE //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
|
||||
|
||||
//lighting check
|
||||
var/light_amount = 0
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
if(light_amount > 0.2)
|
||||
to_chat(M, "<span class='warning'>It's too bright here to use [src.name]!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//mobs in range check
|
||||
var/users_in_range = 0
|
||||
@@ -71,6 +71,6 @@
|
||||
|
||||
if(users_in_range < 2)
|
||||
to_chat(M, "<span class='warning'>There aren't enough people to use the [src.name]!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
. = . || (caller.pass_flags & PASSTABLE)
|
||||
|
||||
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.forceMove(src.loc)
|
||||
pushed_mob.set_resting(TRUE, FALSE)
|
||||
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
|
||||
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
|
||||
log_combat(user, pushed_mob, "placed")
|
||||
pushed_mob.forceMove(loc)
|
||||
pushed_mob.set_resting(TRUE, TRUE)
|
||||
pushed_mob.visible_message(span_notice("[user] places [pushed_mob] onto [src]."), \
|
||||
span_notice("[user] places [pushed_mob] onto [src]."))
|
||||
log_combat(user, pushed_mob, "places", null, "onto [src]")
|
||||
|
||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
@@ -205,6 +205,30 @@
|
||||
return
|
||||
// If the tray IS empty, continue on (tray will be placed on the table like other items)
|
||||
|
||||
if(istype(I, /obj/item/riding_offhand))
|
||||
var/obj/item/riding_offhand/riding_item = I
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablelimbsmash(user, carried_mob)
|
||||
else
|
||||
var/tableplace_delay = 3.5 SECONDS
|
||||
var/skills_space = ""
|
||||
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
|
||||
tableplace_delay = 2 SECONDS
|
||||
skills_space = " expertly"
|
||||
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
|
||||
tableplace_delay = 2.75 SECONDS
|
||||
skills_space = " quickly"
|
||||
carried_mob.visible_message(span_notice("[user] begins to[skills_space] place [carried_mob] onto [src]..."),
|
||||
span_userdanger("[user] begins to[skills_space] place [carried_mob] onto [src]..."))
|
||||
if(do_after(user, tableplace_delay, target = carried_mob))
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tableplace(user, carried_mob)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
|
||||
if(user.transferItemToLoc(I, drop_location()))
|
||||
var/list/click_params = params2list(params)
|
||||
@@ -717,11 +741,11 @@
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
return TRUE
|
||||
if(istype(mover) && (mover.pass_flags & PASSTABLE))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/structure/rack/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
|
||||
. = !density
|
||||
@@ -745,7 +769,7 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/rack/attack_paw(mob/living/user)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(atom/movable/AM)
|
||||
if(!pod_moving && open_status == STATION_TUBE_OPEN && ismob(AM) && AM.dir == boarding_dir)
|
||||
@@ -132,8 +132,8 @@
|
||||
if(open_status == STATION_TUBE_CLOSED && pod && pod.loc == loc)
|
||||
pod.follow_tube()
|
||||
pod_moving = 0
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/transit_tube/station/process()
|
||||
if(!pod_moving)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
// Called to check if a pod should stop upon entering this tube.
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
// Called when a pod stops in this tube section.
|
||||
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
|
||||
@@ -66,18 +66,18 @@
|
||||
|
||||
for(var/direction in tube_dirs)
|
||||
if(direction == from_dir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_exit(in_dir)
|
||||
for(var/direction in tube_dirs)
|
||||
if(direction == in_dir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/structure/transit_tube_pod/Process_Spacemove()
|
||||
if(moving) //No drifting while moving in the tubes
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -597,7 +597,7 @@
|
||||
busy = TRUE
|
||||
if(!do_after(user, 4 SECONDS, src))
|
||||
busy = FALSE
|
||||
return 1
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
O.clean_blood()
|
||||
@@ -609,7 +609,7 @@
|
||||
reagents.reaction(O, TOUCH)
|
||||
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
|
||||
"<span class='notice'>You wash [O] using [src].</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover, turf/target)
|
||||
if(mover.pass_flags & pass_flags_self)
|
||||
|
||||
@@ -165,7 +165,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
if(.)
|
||||
return
|
||||
if(dir == FULLTILE_WINDOW_DIR)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
return FALSE //full tile window, you can't move into it!
|
||||
var/attempted_dir = get_dir(loc, target)
|
||||
if(attempted_dir == dir)
|
||||
return
|
||||
@@ -184,10 +184,10 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && (O.pass_flags & PASSGLASS))
|
||||
return 1
|
||||
return TRUE
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
@@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
|
||||
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(!can_be_reached(user))
|
||||
return 1
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
|
||||
if(!can_be_reached(user))
|
||||
return 1 //skip the afterattack
|
||||
return TRUE //skip the afterattack
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -454,8 +454,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
if(get_dir(user,src) & dir)
|
||||
for(var/obj/O in loc)
|
||||
if(!O.CanPass(user, user.loc, 1))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user