Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into changelogs-tgui
This commit is contained in:
@@ -98,7 +98,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
remove_innate_effects(old_body)
|
||||
if(!soft_antag && old_body.stat != DEAD && !LAZYLEN(old_body.mind?.antag_datums))
|
||||
if(!soft_antag && old_body && old_body.stat != DEAD && !length(old_body.mind?.antag_datums))
|
||||
old_body.remove_from_current_living_antags()
|
||||
apply_innate_effects(new_body)
|
||||
if(!soft_antag && new_body.stat != DEAD)
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/datum/team/ashwalkers
|
||||
name = "Ashwalkers"
|
||||
show_roundend_report = FALSE
|
||||
var/list/players_spawned = new
|
||||
|
||||
/datum/antagonist/ashwalker
|
||||
name = "\improper Ash Walker"
|
||||
job_rank = ROLE_LAVALAND
|
||||
show_in_antagpanel = FALSE
|
||||
show_to_ghosts = TRUE
|
||||
antagpanel_category = "Ash Walkers"
|
||||
var/datum/team/ashwalkers/ashie_team
|
||||
|
||||
/datum/antagonist/ashwalker/create_team(datum/team/team)
|
||||
if(team)
|
||||
ashie_team = team
|
||||
objectives |= ashie_team.objectives
|
||||
else
|
||||
ashie_team = new
|
||||
|
||||
/datum/antagonist/ashwalker/get_team()
|
||||
return ashie_team
|
||||
|
||||
/datum/antagonist/ashwalker/on_body_transfer(mob/living/old_body, mob/living/new_body)
|
||||
. = ..()
|
||||
RegisterSignal(new_body, COMSIG_MOB_EXAMINATE, .proc/on_examinate)
|
||||
|
||||
/datum/antagonist/ashwalker/on_gain()
|
||||
. = ..()
|
||||
RegisterSignal(owner.current, COMSIG_MOB_EXAMINATE, .proc/on_examinate)
|
||||
|
||||
/datum/antagonist/ashwalker/on_removal()
|
||||
. = ..()
|
||||
UnregisterSignal(owner.current, COMSIG_MOB_EXAMINATE)
|
||||
|
||||
/datum/antagonist/ashwalker/proc/on_examinate(datum/source, atom/A)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(istype(A, /obj/structure/headpike))
|
||||
SEND_SIGNAL(owner.current, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_good)
|
||||
@@ -33,6 +33,10 @@
|
||||
var/ghost_usable = TRUE
|
||||
var/skip_reentry_check = FALSE //Skips the ghost role blacklist time for people who ghost/suicide/cryo
|
||||
|
||||
///override this to add special spawn conditions to a ghost role
|
||||
/obj/effect/mob_spawn/proc/allow_spawn(mob/user, silent = FALSE)
|
||||
return TRUE
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/effect/mob_spawn/attack_ghost(mob/user, latejoinercalling)
|
||||
if(!SSticker.HasRoundStarted() || !loc || !ghost_usable)
|
||||
@@ -43,6 +47,8 @@
|
||||
if(jobban_isbanned(user, banType))
|
||||
to_chat(user, "<span class='warning'>You are jobanned!</span>")
|
||||
return
|
||||
if(!allow_spawn(user, silent = FALSE))
|
||||
return
|
||||
if(QDELETED(src) || QDELETED(user))
|
||||
return
|
||||
if(isobserver(user))
|
||||
|
||||
@@ -36,3 +36,25 @@
|
||||
/datum/keybinding/living/toggle_resting/down(client/user)
|
||||
var/mob/living/L = user.mob
|
||||
L.lay_down()
|
||||
|
||||
/datum/keybinding/living/cancel_action
|
||||
hotkey_keys = list("Unbound")
|
||||
name = "cancel_action"
|
||||
full_name = "Cancel Action"
|
||||
description = "Cancel the current action."
|
||||
|
||||
/// Technically you shouldn't be doing any actions if you were sleeping either but...
|
||||
/datum/keybinding/living/can_use(client/user)
|
||||
. = ..()
|
||||
var/mob/living/mob = user.mob
|
||||
return . && (mob.stat == CONSCIOUS)
|
||||
|
||||
/datum/keybinding/living/cancel_action/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
if(length(M.do_afters))
|
||||
var/atom/target = M.do_afters[M.do_afters.len]
|
||||
to_chat(M, "<span class='notice'>You stop interacting with \the [target].</span>")
|
||||
LAZYREMOVE(M.do_afters, target)
|
||||
else
|
||||
to_chat(M, "<span class='notice'>There's nothing that you can cancel right now.</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
coldmod = 0.5
|
||||
heatmod = 1.2
|
||||
cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
cold_offset = SYNTH_COLD_OFFSET //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
blacklisted_quirks = list(/datum/quirk/coldblooded)
|
||||
balance_point_values = TRUE
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING,HAS_FLESH,HAS_BONE,HAIR,ROBOTIC_LIMBS)
|
||||
hair_alpha = 210
|
||||
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
|
||||
mutant_bodyparts = list("ipc_screen" = "Blank", "ipc_antenna" = "None")
|
||||
mutant_bodyparts = list("ipc_screen" = "Blank", "deco_wings" = "None", "ipc_antenna" = "None")
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
|
||||
gib_types = list(/obj/effect/gibspawner/ipc, /obj/effect/gibspawner/ipc/bodypartless)
|
||||
|
||||
coldmod = 0.5
|
||||
heatmod = 1.2
|
||||
cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
cold_offset = SYNTH_COLD_OFFSET //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
blacklisted_quirks = list(/datum/quirk/coldblooded)
|
||||
balance_point_values = TRUE
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
default_color = "00FFFF"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,HAS_FLESH)
|
||||
inherent_traits = list(TRAIT_TOXINLOVER)
|
||||
mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None", "legs" = "Plantigrade")
|
||||
mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None", "deco_wings" = "None", "legs" = "Plantigrade")
|
||||
say_mod = "says"
|
||||
hair_color = "mutcolor"
|
||||
hair_alpha = 160 //a notch brighter so it blends better.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
coldmod = 0.5
|
||||
heatmod = 1.2
|
||||
cold_offset = -125 //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
cold_offset = SYNTH_COLD_OFFSET //Can handle pretty cold environments, but it's still a slightly bad idea if you enter a room thats full of near-absolute-zero gas
|
||||
blacklisted_quirks = list(/datum/quirk/coldblooded)
|
||||
balance_point_values = TRUE
|
||||
|
||||
|
||||
@@ -699,6 +699,9 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
||||
var/heat_efficiency = clamp(1 + ((bodytemperature - heat) * SYNTH_HEAT_EFFICIENCY_COEFF), 0, SYNTH_SINGLE_INFLUENCE_COOLING_EFFECT_CAP)
|
||||
var/pressure_efficiency = clamp(pressure / ONE_ATMOSPHERE, 0, SYNTH_SINGLE_INFLUENCE_COOLING_EFFECT_CAP)
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_LOWPRESSURECOOLING))
|
||||
pressure_efficiency = max(pressure_efficiency, 1) //Space adaptation nulls drawbacks of low-pressure cooling.
|
||||
|
||||
var/total_environment_efficiency = min(heat_efficiency * pressure_efficiency, SYNTH_TOTAL_ENVIRONMENT_EFFECT_CAP) //At best, you can get 200% total
|
||||
return total_environment_efficiency
|
||||
|
||||
|
||||
@@ -292,18 +292,21 @@
|
||||
|
||||
/mob/living/simple_animal/bot/on_attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == INTENT_HELP)
|
||||
interact(H)
|
||||
ui_interact(H)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/attack_ai(mob/user)
|
||||
if(!topic_denied(user))
|
||||
interact(user)
|
||||
ui_interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src]'s interface is not responding!</span>")
|
||||
|
||||
/mob/living/simple_animal/bot/interact(mob/user)
|
||||
show_controls(user)
|
||||
/mob/living/simple_animal/bot/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "SimpleBot", name)
|
||||
ui.open()
|
||||
|
||||
/mob/living/simple_animal/bot/attackby(obj/item/W, mob/user, params)
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
@@ -795,56 +798,48 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
else // no path, so calculate new one
|
||||
calc_summon_path()
|
||||
|
||||
/mob/living/simple_animal/bot/Bump(M as mob|obj) //Leave no door unopened!
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["can_hack"] = (issilicon(user) || IsAdminGhost(user))
|
||||
data["custom_controls"] = list()
|
||||
data["emagged"] = emagged
|
||||
data["locked"] = locked
|
||||
data["pai"] = list()
|
||||
data["settings"] = list()
|
||||
if(!locked || issilicon(user) || IsAdminGhost(user))
|
||||
data["pai"]["allow_pai"] = allow_pai
|
||||
data["pai"]["card_inserted"] = paicard
|
||||
data["settings"]["airplane_mode"] = remote_disabled
|
||||
data["settings"]["maintenance_lock"] = !open
|
||||
data["settings"]["power"] = on
|
||||
data["settings"]["patrol_station"] = auto_patrol
|
||||
return data
|
||||
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/ui_act(action, params)
|
||||
. = ..()
|
||||
if((istype(M, /obj/machinery/door/airlock) || istype(M, /obj/machinery/door/window)) && (!isnull(access_card)))
|
||||
var/obj/machinery/door/D = M
|
||||
if(D.check_access(access_card))
|
||||
D.open()
|
||||
frustration = 0
|
||||
|
||||
/mob/living/simple_animal/bot/proc/show_controls(mob/M)
|
||||
users |= M
|
||||
var/dat = ""
|
||||
dat = get_controls(M)
|
||||
var/datum/browser/popup = new(M,window_id,window_name,350,600)
|
||||
popup.set_content(dat)
|
||||
popup.open(use_onclose = 0)
|
||||
onclose(M,window_id,ref=src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/proc/update_controls()
|
||||
for(var/mob/M in users)
|
||||
show_controls(M)
|
||||
|
||||
/mob/living/simple_animal/bot/proc/get_controls(mob/M)
|
||||
return "PROTOBOT - NOT FOR USE"
|
||||
|
||||
/mob/living/simple_animal/bot/Topic(href, href_list)
|
||||
//No ..() to prevent strip panel showing up - Todo: make that saner
|
||||
if(href_list["close"])// HUE HUE
|
||||
if(usr in users)
|
||||
users.Remove(usr)
|
||||
return TRUE
|
||||
|
||||
if(topic_denied(usr))
|
||||
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
|
||||
return TRUE
|
||||
add_fingerprint(usr)
|
||||
|
||||
if((href_list["power"]) && (bot_core.allowed(usr) || !locked))
|
||||
if(on)
|
||||
turn_off()
|
||||
else
|
||||
turn_on()
|
||||
|
||||
switch(href_list["operation"])
|
||||
if(.)
|
||||
return
|
||||
if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
to_chat(usr, span_warning("Access denied."))
|
||||
return
|
||||
if(action == "lock")
|
||||
locked = !locked
|
||||
if(locked && !(issilicon(usr) || IsAdminGhost(usr)))
|
||||
return
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
update_appearance()
|
||||
if("maintenance")
|
||||
open = !open
|
||||
if("patrol")
|
||||
if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
auto_patrol = !auto_patrol
|
||||
bot_reset()
|
||||
if("remote")
|
||||
if("airplane")
|
||||
remote_disabled = !remote_disabled
|
||||
if("hack")
|
||||
if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr))
|
||||
@@ -865,11 +860,11 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
hacked = FALSE
|
||||
to_chat(usr, "<span class='notice'>[text_dehack]</span>")
|
||||
bot_reset()
|
||||
if("ejectpai")
|
||||
if("eject_pai")
|
||||
if(paicard && (!locked || hasSiliconAccessInArea(usr) || IsAdminGhost(usr)))
|
||||
to_chat(usr, "<span class='notice'>You eject [paicard] from [bot_name]</span>")
|
||||
ejectpai(usr)
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][on]"
|
||||
@@ -897,33 +892,6 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/proc/hack(mob/user)
|
||||
var/hack
|
||||
if(hasSiliconAccessInArea(user) || IsAdminGhost(user)) //Allows silicons or admins to toggle the emag status of a bot.
|
||||
hack += "[emagged == 2 ? "Software compromised! Unit may exhibit dangerous or erratic behavior." : "Unit operating normally. Release safety lock?"]<BR>"
|
||||
hack += "Harm Prevention Safety System: <A href='?src=[REF(src)];operation=hack'>[emagged ? "<span class='bad'>DANGER</span>" : "Engaged"]</A><BR>"
|
||||
else if(!locked) //Humans with access can use this option to hide a bot from the AI's remote control panel and PDA control.
|
||||
hack += "Remote network control radio: <A href='?src=[REF(src)];operation=remote'>[remote_disabled ? "Disconnected" : "Connected"]</A><BR>"
|
||||
return hack
|
||||
|
||||
/mob/living/simple_animal/bot/proc/showpai(mob/user)
|
||||
var/eject = ""
|
||||
if((!locked || hasSiliconAccessInArea(usr) || IsAdminGhost(usr)))
|
||||
if(paicard || allow_pai)
|
||||
eject += "Personality card status: "
|
||||
if(paicard)
|
||||
if(client)
|
||||
eject += "<A href='?src=[REF(src)];operation=ejectpai'>Active</A>"
|
||||
else
|
||||
eject += "<A href='?src=[REF(src)];operation=ejectpai'>Inactive</A>"
|
||||
else if(!allow_pai || key)
|
||||
eject += "Unavailable"
|
||||
else
|
||||
eject += "Not inserted"
|
||||
eject += "<BR>"
|
||||
eject += "<BR>"
|
||||
return eject
|
||||
|
||||
/mob/living/simple_animal/bot/proc/insertpai(mob/user, obj/item/paicard/card)
|
||||
if(paicard)
|
||||
to_chat(user, "<span class='warning'>A [paicard] is already inserted!</span>")
|
||||
|
||||
@@ -443,37 +443,33 @@
|
||||
/obj/machinery/bot_core/cleanbot
|
||||
req_one_access = list(ACCESS_JANITOR, ACCESS_ROBOTICS)
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += text({"
|
||||
Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]<BR>
|
||||
Maintenance panel panel is [open ? "opened" : "closed"]"})
|
||||
if(!locked || issilicon(user)|| IsAdminGhost(user))
|
||||
dat += "<BR>Clean Blood: <A href='?src=[REF(src)];operation=blood'>[blood ? "Yes" : "No"]</A>"
|
||||
dat += "<BR>Clean Trash: <A href='?src=[REF(src)];operation=trash'>[trash ? "Yes" : "No"]</A>"
|
||||
dat += "<BR>Clean Graffiti: <A href='?src=[REF(src)];operation=drawn'>[drawn ? "Yes" : "No"]</A>"
|
||||
dat += "<BR>Exterminate Pests: <A href='?src=[REF(src)];operation=pests'>[pests ? "Yes" : "No"]</A>"
|
||||
dat += "<BR><BR>Patrol Station: <A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</A>"
|
||||
return dat
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/cleanbot/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["operation"])
|
||||
switch(href_list["operation"])
|
||||
if("blood")
|
||||
blood = !blood
|
||||
if("pests")
|
||||
pests = !pests
|
||||
if("trash")
|
||||
trash = !trash
|
||||
if("drawn")
|
||||
drawn = !drawn
|
||||
get_targets()
|
||||
update_controls()
|
||||
if(!locked || issilicon(user)|| IsAdminGhost(user))
|
||||
data["custom_controls"]["clean_blood"] = blood
|
||||
data["custom_controls"]["clean_trash"] = trash
|
||||
data["custom_controls"]["clean_graffiti"] = drawn
|
||||
data["custom_controls"]["pest_control"] = pests
|
||||
return data
|
||||
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/cleanbot/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("clean_blood")
|
||||
blood = !blood
|
||||
if("pest_control")
|
||||
pests = !pests
|
||||
if("clean_trash")
|
||||
trash = !trash
|
||||
if("clean_graffiti")
|
||||
drawn = !drawn
|
||||
get_targets()
|
||||
return
|
||||
|
||||
/obj/machinery/bot_core/cleanbot/medbay
|
||||
req_one_access = list(ACCESS_JANITOR, ACCESS_ROBOTICS, ACCESS_MEDICAL)
|
||||
|
||||
@@ -96,64 +96,45 @@
|
||||
text_dehack = "You restore [name]'s combat inhibitor."
|
||||
text_dehack_fail = "[name] ignores your attempts to restrict him!"
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += text({"
|
||||
<TT><B>Security Unit v2.6 controls</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]<BR>
|
||||
Maintenance panel panel is [open ? "opened" : "closed"]<BR>"},
|
||||
|
||||
"<A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/ed209/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(!locked || hasSiliconAccessInArea(user)|| IsAdminGhost(user))
|
||||
if(!lasercolor)
|
||||
dat += text({"<BR>
|
||||
Arrest Unidentifiable Persons: []<BR>
|
||||
Arrest for Unauthorized Weapons: []<BR>
|
||||
Arrest for Warrant: []<BR>
|
||||
<BR>
|
||||
Operating Mode: []<BR>
|
||||
Report Arrests[]<BR>
|
||||
Auto Patrol[]"},
|
||||
data["custom_controls"]["check_id"] = idcheck
|
||||
data["custom_controls"]["check_weapons"] = weaponscheck
|
||||
data["custom_controls"]["check_warrants"] = check_records
|
||||
data["custom_controls"]["handcuff_targets"] = !arrest_type
|
||||
data["custom_controls"]["arrest_alert"] = declare_arrests
|
||||
return data
|
||||
|
||||
"<A href='?src=[REF(src)];operation=idcheck'>[idcheck ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=weaponscheck'>[weaponscheck ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=ignorerec'>[check_records ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=switchmode'>[arrest_type ? "Detain" : "Arrest"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=declarearrests'>[declare_arrests ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/Topic(href, href_list)
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/ed209/ui_act(action, params)
|
||||
if(lasercolor && ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it
|
||||
return
|
||||
else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
|
||||
return
|
||||
if(..())
|
||||
return 1
|
||||
switch(lasercolor) //Opposing team cannot operate it
|
||||
if("b")
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
return TRUE
|
||||
if("r")
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
|
||||
switch(href_list["operation"])
|
||||
if("idcheck")
|
||||
switch(action)
|
||||
if("check_id")
|
||||
idcheck = !idcheck
|
||||
update_controls()
|
||||
if("weaponscheck")
|
||||
if("check_weapons")
|
||||
weaponscheck = !weaponscheck
|
||||
update_controls()
|
||||
if("ignorerec")
|
||||
if("check_warrants")
|
||||
check_records = !check_records
|
||||
update_controls()
|
||||
if("switchmode")
|
||||
if("handcuff_targets")
|
||||
arrest_type = !arrest_type
|
||||
update_controls()
|
||||
if("declarearrests")
|
||||
if("arrest_alert")
|
||||
declare_arrests = !declare_arrests
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/proc/judgement_criteria()
|
||||
var/final = FALSE
|
||||
|
||||
@@ -102,23 +102,6 @@
|
||||
text_dehack = "You detect errors in [name] and reset his programming."
|
||||
text_dehack_fail = "[name] is not responding to reset commands!"
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += "<TT><B>Mobile Fire Extinguisher v1.0</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [open ? "opened" : "closed"]<BR>"
|
||||
|
||||
dat += "Behaviour controls are [locked ? "locked" : "unlocked"]<BR>"
|
||||
if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user))
|
||||
dat += "Extinguish Fires: <A href='?src=[REF(src)];operation=extinguish_fires'>[extinguish_fires ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Extinguish People: <A href='?src=[REF(src)];operation=extinguish_people'>[extinguish_people ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Patrol Station: <A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Stationary Mode: <a href='?src=[REF(src)];operation=stationary_mode'>[stationary_mode ? "Yes" : "No"]</a><br>"
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(emagged == 1)
|
||||
@@ -138,20 +121,29 @@
|
||||
internal_ext.max_water = INFINITY
|
||||
internal_ext.refill()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/firebot/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(!locked || issilicon(user) || IsAdminGhost(user))
|
||||
data["custom_controls"]["extinguish_fires"] = extinguish_fires
|
||||
data["custom_controls"]["extinguish_people"] = extinguish_people
|
||||
data["custom_controls"]["stationary_mode"] = stationary_mode
|
||||
return data
|
||||
|
||||
switch(href_list["operation"])
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/firebot/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("extinguish_fires")
|
||||
extinguish_fires = !extinguish_fires
|
||||
if("extinguish_people")
|
||||
extinguish_people = !extinguish_people
|
||||
if("stationary_mode")
|
||||
stationary_mode = !stationary_mode
|
||||
|
||||
update_controls()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/is_burning(atom/target)
|
||||
if(ismob(target))
|
||||
|
||||
@@ -71,36 +71,6 @@
|
||||
text_dehack = "You detect errors in [name] and reset his programming."
|
||||
text_dehack_fail = "[name] is not responding to reset commands!"
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += "<TT><B>Floor Repairer Controls v1.1</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [open ? "opened" : "closed"]<BR>"
|
||||
dat += "Special tiles: "
|
||||
if(specialtiles)
|
||||
dat += "<A href='?src=[REF(src)];operation=eject'>Loaded \[[specialtiles]/[maxtiles]\]</a><BR>"
|
||||
else
|
||||
dat += "None Loaded<BR>"
|
||||
|
||||
dat += "Behaviour controls are [locked ? "locked" : "unlocked"]<BR>"
|
||||
if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user))
|
||||
dat += "Add tiles to new hull plating: <A href='?src=[REF(src)];operation=autotile'>[autotile ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Place floor tiles: <A href='?src=[REF(src)];operation=place'>[placetiles ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Replace existing floor tiles with custom tiles: <A href='?src=[REF(src)];operation=replace'>[replacetiles ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Repair damaged tiles and platings: <A href='?src=[REF(src)];operation=fix'>[fixfloors ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Traction Magnets: <A href='?src=[REF(src)];operation=anchor'>[anchored ? "Engaged" : "Disengaged"]</A><BR>"
|
||||
dat += "Patrol Station: <A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</A><BR>"
|
||||
var/bmode
|
||||
if(targetdirection)
|
||||
bmode = dir2text(targetdirection)
|
||||
else
|
||||
bmode = "disabled"
|
||||
dat += "Line Mode : <A href='?src=[REF(src)];operation=linemode'>[bmode]</A><BR>"
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/attackby(obj/item/W , mob/user, params)
|
||||
if(istype(W, /obj/item/stack/tile/plasteel))
|
||||
to_chat(user, "<span class='notice'>The floorbot can produce normal tiles itself.</span>")
|
||||
@@ -161,26 +131,44 @@
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/floorbot/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(!locked || issilicon(user) || IsAdminGhost(user))
|
||||
data["custom_controls"]["tile_hull"] = autotile
|
||||
data["custom_controls"]["place_tiles"] = placetiles
|
||||
data["custom_controls"]["place_custom"] = replacetiles
|
||||
data["custom_controls"]["repair_damage"] = fixfloors
|
||||
data["custom_controls"]["traction_magnets"] = anchored
|
||||
data["custom_controls"]["tile_stack"] = 0
|
||||
data["custom_controls"]["line_mode"] = FALSE
|
||||
if(specialtiles)
|
||||
data["custom_controls"]["tile_stack"] = specialtiles
|
||||
if(targetdirection)
|
||||
data["custom_controls"]["line_mode"] = dir2text(targetdirection)
|
||||
return data
|
||||
|
||||
switch(href_list["operation"])
|
||||
if("replace")
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/floorbot/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("place_custom")
|
||||
replacetiles = !replacetiles
|
||||
if("place")
|
||||
if("place_tiles")
|
||||
placetiles = !placetiles
|
||||
if("fix")
|
||||
if("repair_damage")
|
||||
fixfloors = !fixfloors
|
||||
if("autotile")
|
||||
if("tile_hull")
|
||||
autotile = !autotile
|
||||
if("anchor")
|
||||
if("traction_magnets")
|
||||
anchored = !anchored
|
||||
if("eject")
|
||||
if("eject_tiles")
|
||||
if(specialtiles && tiletype != null)
|
||||
empty_tiles()
|
||||
|
||||
if("linemode")
|
||||
if("line_mode")
|
||||
var/setdir = input("Select construction direction:") as null|anything in list("north","east","south","west","disable")
|
||||
switch(setdir)
|
||||
if("north")
|
||||
@@ -193,7 +181,7 @@
|
||||
targetdirection = 8
|
||||
if("disable")
|
||||
targetdirection = null
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/proc/empty_tiles()
|
||||
new tiletype(drop_location(), specialtiles)
|
||||
|
||||
@@ -78,24 +78,6 @@
|
||||
text_dehack = "You reboot [name] and restore the sound control system."
|
||||
text_dehack_fail = "[name] refuses to accept your authority!"
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += text({"
|
||||
<TT><B>Honkomatic Bike Horn Unit v1.0.7 controls</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]<BR>
|
||||
Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
|
||||
"<A href='?src=[REF(src)];power=[TRUE]'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user))
|
||||
dat += text({"<BR> Auto Patrol: []"},
|
||||
|
||||
"<A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/proc/judgement_criteria()
|
||||
var/final = NONE
|
||||
if(check_records)
|
||||
|
||||
@@ -155,87 +155,63 @@
|
||||
/mob/living/simple_animal/bot/medbot/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += "<TT><B>Medical Unit Controls v1.1</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [open ? "opened" : "closed"]<BR>"
|
||||
dat += "Beaker: "
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/medbot/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(reagent_glass)
|
||||
dat += "<A href='?src=[REF(src)];eject=1'>Loaded \[[reagent_glass.reagents.total_volume]/[reagent_glass.reagents.maximum_volume]\]</a>"
|
||||
else
|
||||
dat += "None Loaded"
|
||||
dat += "<br>Behaviour controls are [locked ? "locked" : "unlocked"]<hr>"
|
||||
data["custom_controls"]["beaker"] = reagent_glass
|
||||
data["custom_contrlos"]["reagents"] = "[reagent_glass.reagents.total_volume]/[reagent_glass.reagents.maximum_volume]"
|
||||
if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user))
|
||||
dat += "<TT>Healing Threshold: "
|
||||
dat += "<a href='?src=[REF(src)];adj_threshold=-10'>--</a> "
|
||||
dat += "<a href='?src=[REF(src)];adj_threshold=-5'>-</a> "
|
||||
dat += "[heal_threshold] "
|
||||
dat += "<a href='?src=[REF(src)];adj_threshold=5'>+</a> "
|
||||
dat += "<a href='?src=[REF(src)];adj_threshold=10'>++</a>"
|
||||
dat += "</TT><br>"
|
||||
data["custom_controls"]["injection_amount"] = injection_amount
|
||||
data["custom_controls"]["use_beaker"] = use_beaker
|
||||
data["custom_controls"]["treat_virus"] = treat_virus
|
||||
data["custom_controls"]["heal_threshold"] = heal_threshold
|
||||
data["custom_controls"]["speaker"] = !shut_up
|
||||
data["custom_controls"]["crit_alerts"] = declare_crit
|
||||
data["custom_controls"]["stationary_mode"] = stationary_mode
|
||||
return data
|
||||
|
||||
dat += "<TT>Injection Level: "
|
||||
dat += "<a href='?src=[REF(src)];adj_inject=-5'>-</a> "
|
||||
dat += "[injection_amount] "
|
||||
dat += "<a href='?src=[REF(src)];adj_inject=5'>+</a> "
|
||||
dat += "</TT><br>"
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/medbot/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("heal_threshold")
|
||||
var/adjust_num = round(text2num(params["threshold"]))
|
||||
heal_threshold = adjust_num
|
||||
if(heal_threshold < 5)
|
||||
heal_threshold = 5
|
||||
if(heal_threshold > 75)
|
||||
heal_threshold = 75
|
||||
|
||||
dat += "Reagent Source: "
|
||||
dat += "<a href='?src=[REF(src)];use_beaker=1'>[use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]</a><br>"
|
||||
if("injection_amount")
|
||||
var/adjust_num = round(text2num(params["amount"]))
|
||||
injection_amount = adjust_num
|
||||
if(injection_amount < 1)
|
||||
injection_amount = 1
|
||||
if(injection_amount > 15)
|
||||
injection_amount = 15
|
||||
|
||||
dat += "Treat Viral Infections: <a href='?src=[REF(src)];virus=1'>[treat_virus ? "Yes" : "No"]</a><br>"
|
||||
dat += "The speaker switch is [shut_up ? "off" : "on"]. <a href='?src=[REF(src)];togglevoice=[1]'>Toggle</a><br>"
|
||||
dat += "Critical Patient Alerts: <a href='?src=[REF(src)];critalerts=1'>[declare_crit ? "Yes" : "No"]</a><br>"
|
||||
dat += "Patrol Station: <a href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</a><br>"
|
||||
dat += "Stationary Mode: <a href='?src=[REF(src)];stationary=1'>[stationary_mode ? "Yes" : "No"]</a><br>"
|
||||
if("use_beaker")
|
||||
use_beaker = !use_beaker
|
||||
|
||||
return dat
|
||||
if("eject")
|
||||
if(!isnull(reagent_glass))
|
||||
reagent_glass.forceMove(drop_location())
|
||||
reagent_glass = null
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if("speaker")
|
||||
shut_up = !shut_up
|
||||
if("crit_alerts")
|
||||
declare_crit = !declare_crit
|
||||
if("stationary_mode")
|
||||
stationary_mode = !stationary_mode
|
||||
path = list()
|
||||
update_appearance()
|
||||
|
||||
if(href_list["adj_threshold"])
|
||||
var/adjust_num = text2num(href_list["adj_threshold"])
|
||||
heal_threshold += adjust_num
|
||||
if(heal_threshold < 5)
|
||||
heal_threshold = 5
|
||||
if(heal_threshold > 75)
|
||||
heal_threshold = 75
|
||||
|
||||
else if(href_list["adj_inject"])
|
||||
var/adjust_num = text2num(href_list["adj_inject"])
|
||||
injection_amount += adjust_num
|
||||
if(injection_amount < 5)
|
||||
injection_amount = 5
|
||||
if(injection_amount > 15)
|
||||
injection_amount = 15
|
||||
|
||||
else if(href_list["use_beaker"])
|
||||
use_beaker = !use_beaker
|
||||
|
||||
else if(href_list["eject"] && (!isnull(reagent_glass)))
|
||||
reagent_glass.forceMove(drop_location())
|
||||
reagent_glass = null
|
||||
|
||||
else if(href_list["togglevoice"])
|
||||
shut_up = !shut_up
|
||||
|
||||
else if(href_list["critalerts"])
|
||||
declare_crit = !declare_crit
|
||||
|
||||
else if(href_list["stationary"])
|
||||
stationary_mode = !stationary_mode
|
||||
path = list()
|
||||
update_icon()
|
||||
|
||||
else if(href_list["virus"])
|
||||
treat_virus = !treat_virus
|
||||
|
||||
update_controls()
|
||||
if("virus")
|
||||
treat_virus = !treat_virus
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
@@ -251,7 +227,6 @@
|
||||
|
||||
reagent_glass = W
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
show_controls(user)
|
||||
|
||||
else if(istype(W, /obj/item/reagent_containers/syringe/piercing))
|
||||
if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_PIERERCING))
|
||||
|
||||
@@ -276,56 +276,6 @@
|
||||
if("ejectpai")
|
||||
ejectpairemote(user)
|
||||
|
||||
// TODO: remove this; PDAs currently depend on it
|
||||
/mob/living/simple_animal/bot/mulebot/get_controls(mob/user)
|
||||
var/ai = hasSiliconAccessInArea(user)
|
||||
var/dat
|
||||
dat += "<h3>Multiple Utility Load Effector Mk. V</h3>"
|
||||
dat += "<b>ID:</b> [id]<BR>"
|
||||
dat += "<b>Power:</b> [on ? "On" : "Off"]<BR>"
|
||||
dat += "<h3>Status</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
switch(mode)
|
||||
if(BOT_IDLE)
|
||||
dat += "<span class='good'>Ready</span>"
|
||||
if(BOT_DELIVER)
|
||||
dat += "<span class='good'>[mode_name[BOT_DELIVER]]</span>"
|
||||
if(BOT_GO_HOME)
|
||||
dat += "<span class='good'>[mode_name[BOT_GO_HOME]]</span>"
|
||||
if(BOT_BLOCKED)
|
||||
dat += "<span class='average'>[mode_name[BOT_BLOCKED]]</span>"
|
||||
if(BOT_NAV,BOT_WAIT_FOR_NAV)
|
||||
dat += "<span class='average'>[mode_name[BOT_NAV]]</span>"
|
||||
if(BOT_NO_ROUTE)
|
||||
dat += "<span class='bad'>[mode_name[BOT_NO_ROUTE]]</span>"
|
||||
dat += "</div>"
|
||||
|
||||
dat += "<b>Current Load:</b> [load ? load.name : "<i>none</i>"]<BR>"
|
||||
dat += "<b>Destination:</b> [!destination ? "<i>none</i>" : destination]<BR>"
|
||||
dat += "<b>Power level:</b> [cell ? cell.percent() : 0]%"
|
||||
|
||||
if(locked && !ai && !IsAdminGhost(user))
|
||||
dat += " <br /><div class='notice'>Controls are locked</div><A href='byond://?src=[REF(src)];op=unlock'>Unlock Controls</A>"
|
||||
else
|
||||
dat += " <br /><div class='notice'>Controls are unlocked</div><A href='byond://?src=[REF(src)];op=lock'>Lock Controls</A><BR><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=[REF(src)];op=power'>Toggle Power</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=stop'>Stop</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=go'>Proceed</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=home'>Return to Home</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=destination'>Set Destination</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=setid'>Set Bot ID</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=sethome'>Set Home</A><BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=autoret'>Toggle Auto Return Home</A> ([auto_return ? "On":"Off"])<BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=autopick'>Toggle Auto Pickup Crate</A> ([auto_pickup ? "On":"Off"])<BR>"
|
||||
dat += "<A href='byond://?src=[REF(src)];op=report'>Toggle Delivery Reporting</A> ([report_delivery ? "On" : "Off"])<BR>"
|
||||
if(load)
|
||||
dat += "<A href='byond://?src=[REF(src)];op=unload'>Unload Now</A><BR>"
|
||||
dat += "<div class='notice'>The maintenance hatch is closed.</div>"
|
||||
|
||||
return dat
|
||||
|
||||
|
||||
// returns true if the bot has power
|
||||
/mob/living/simple_animal/bot/mulebot/proc/has_power()
|
||||
return !open && cell && cell.charge > 0 && (!wires.is_cut(WIRE_POWER1) && !wires.is_cut(WIRE_POWER2))
|
||||
|
||||
@@ -209,57 +209,34 @@
|
||||
text_dehack = "You reboot [name] and restore the target identification."
|
||||
text_dehack_fail = "[name] refuses to accept your authority!"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += text({"
|
||||
<TT><B>Securitron v1.6 controls</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]<BR>
|
||||
Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
|
||||
"<A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
// Variables sent to TGUI
|
||||
/mob/living/simple_animal/bot/secbot/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(!locked || hasSiliconAccessInArea(user) || IsAdminGhost(user))
|
||||
dat += text({"<BR>
|
||||
Arrest Unidentifiable Persons: []<BR>
|
||||
Arrest for Unauthorized Weapons: []<BR>
|
||||
Arrest for Warrant: []<BR>
|
||||
Operating Mode: []<BR>
|
||||
Report Arrests[]<BR>
|
||||
Auto Patrol: []"},
|
||||
data["custom_controls"]["check_id"] = idcheck
|
||||
data["custom_controls"]["check_weapons"] = weaponscheck
|
||||
data["custom_controls"]["check_warrants"] = check_records
|
||||
data["custom_controls"]["handcuff_targets"] = !arrest_type
|
||||
data["custom_controls"]["arrest_alert"] = declare_arrests
|
||||
return data
|
||||
|
||||
"<A href='?src=[REF(src)];operation=idcheck'>[idcheck ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=weaponscheck'>[weaponscheck ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=ignorerec'>[check_records ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=switchmode'>[arrest_type ? "Detain" : "Arrest"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=declarearrests'>[declare_arrests ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(!hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
// Actions received from TGUI
|
||||
/mob/living/simple_animal/bot/secbot/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !hasSiliconAccessInArea(usr) && !IsAdminGhost(usr) && !(bot_core.allowed(usr) || !locked))
|
||||
return TRUE
|
||||
switch(href_list["operation"])
|
||||
if("idcheck")
|
||||
switch(action)
|
||||
if("check_id")
|
||||
idcheck = !idcheck
|
||||
update_controls()
|
||||
if("weaponscheck")
|
||||
if("check_weapons")
|
||||
weaponscheck = !weaponscheck
|
||||
update_controls()
|
||||
if("ignorerec")
|
||||
if("check_warrants")
|
||||
check_records = !check_records
|
||||
update_controls()
|
||||
if("switchmode")
|
||||
if("handcuff_targets")
|
||||
arrest_type = !arrest_type
|
||||
update_controls()
|
||||
if("declarearrests")
|
||||
if("arrest_alert")
|
||||
declare_arrests = !declare_arrests
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/retaliate(mob/living/carbon/human/H)
|
||||
var/judgement_criteria = judgement_criteria()
|
||||
|
||||
@@ -308,10 +308,15 @@
|
||||
adjustHealth(unsuitable_atmos_damage)
|
||||
|
||||
/mob/living/simple_animal/gib(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
|
||||
if(butcher_results)
|
||||
if(butcher_results || guaranteed_butcher_results)
|
||||
var/list/butcher = list()
|
||||
if(butcher_results)
|
||||
butcher += butcher_results
|
||||
if(guaranteed_butcher_results)
|
||||
butcher += guaranteed_butcher_results
|
||||
var/atom/Tsec = drop_location()
|
||||
for(var/path in butcher_results)
|
||||
for(var/i in 1 to butcher_results[path])
|
||||
for(var/path in butcher)
|
||||
for(var/i in 1 to butcher[path])
|
||||
new path(Tsec)
|
||||
..()
|
||||
|
||||
|
||||
@@ -495,7 +495,11 @@
|
||||
|
||||
/datum/status_effect/stabilized/orange/tick()
|
||||
var/body_temperature_difference = BODYTEMP_NORMAL - owner.bodytemperature
|
||||
owner.adjust_bodytemperature(min(5,body_temperature_difference))
|
||||
var/cooling_cap = -5
|
||||
if(HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM))
|
||||
cooling_cap *= 0.5 //Only cools by half as much (which is 5 per life tick since this ticks twice as much as life) so it isn't true spaceproofness..
|
||||
body_temperature_difference += SYNTH_COLD_OFFSET //.. But also cools towards a cold temp, provided there is nothing that counters it.
|
||||
owner.adjust_bodytemperature(clamp(body_temperature_difference, cooling_cap, 5))
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/stabilized/purple
|
||||
|
||||
@@ -12,14 +12,29 @@
|
||||
max_integrity = 200
|
||||
var/faction = list("ashwalker")
|
||||
var/meat_counter = 6
|
||||
var/datum/team/ashwalkers/ashies
|
||||
var/datum/linked_objective
|
||||
|
||||
/obj/structure/lavaland/ash_walker/Initialize()
|
||||
/obj/structure/lavaland/ash_walker/Initialize(mapload)
|
||||
.=..()
|
||||
ashies = new /datum/team/ashwalkers()
|
||||
var/datum/objective/protect_object/objective = new
|
||||
objective.set_target(src)
|
||||
linked_objective = objective
|
||||
ashies.objectives += objective
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/structure/lavaland/ash_walker/Destroy()
|
||||
ashies.objectives -= linked_objective
|
||||
ashies = null
|
||||
QDEL_NULL(linked_objective)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/lavaland/ash_walker/deconstruct(disassembled)
|
||||
new /obj/item/assembly/signaler/anomaly (get_step(loc, pick(GLOB.alldirs)))
|
||||
new /obj/effect/collapse(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/lavaland/ash_walker/process()
|
||||
consume()
|
||||
@@ -28,20 +43,64 @@
|
||||
/obj/structure/lavaland/ash_walker/proc/consume()
|
||||
for(var/mob/living/H in view(src, 1)) //Only for corpse right next to/on same tile
|
||||
if(H.stat)
|
||||
visible_message("<span class='warning'>Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs.</span>")
|
||||
playsound(get_turf(src),'sound/magic/demon_consume.ogg', 100, 1)
|
||||
for(var/obj/item/W in H)
|
||||
if(!H.dropItemToGround(W))
|
||||
qdel(W)
|
||||
if(issilicon(H)) //no advantage to sacrificing borgs...
|
||||
H.gib()
|
||||
visible_message(span_notice("Serrated tendrils eagerly pull [H] apart, but find nothing of interest."))
|
||||
return
|
||||
|
||||
if(H.mind?.has_antag_datum(/datum/antagonist/ashwalker) && (H.key || H.get_ghost(FALSE, TRUE))) //special interactions for dead lava lizards with ghosts attached
|
||||
visible_message(span_warning("Serrated tendrils carefully pull [H] to [src], absorbing the body and creating it anew."))
|
||||
var/datum/mind/deadmind
|
||||
if(H.key)
|
||||
deadmind = H
|
||||
else
|
||||
deadmind = H.get_ghost(FALSE, TRUE)
|
||||
to_chat(deadmind, "Your body has been returned to the nest. You are being remade anew, and will awaken shortly. </br><b>Your memories will remain intact in your new body, as your soul is being salvaged</b>")
|
||||
SEND_SOUND(deadmind, sound('sound/magic/enter_blood.ogg',volume=100))
|
||||
addtimer(CALLBACK(src, .proc/remake_walker, H.mind, H.real_name), 20 SECONDS)
|
||||
new /obj/effect/gibspawner/generic(get_turf(H))
|
||||
qdel(H)
|
||||
return
|
||||
|
||||
if(ismegafauna(H))
|
||||
meat_counter += 20
|
||||
else
|
||||
meat_counter++
|
||||
visible_message(span_warning("Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs."))
|
||||
playsound(get_turf(src),'sound/magic/demon_consume.ogg', 100, TRUE)
|
||||
var/deliverykey = H.fingerprintslast //key of whoever brought the body
|
||||
var/mob/living/deliverymob = get_mob_by_key(deliverykey) //mob of said key
|
||||
//there is a 40% chance that the Lava Lizard unlocks their respawn with each sacrifice
|
||||
if(deliverymob && (deliverymob.mind?.has_antag_datum(/datum/antagonist/ashwalker)) && (deliverykey in ashies.players_spawned) && (prob(40)))
|
||||
to_chat(deliverymob, span_warning("<b>The Necropolis is pleased with your sacrifice. You feel confident your existence after death is secure.</b>"))
|
||||
ashies.players_spawned -= deliverykey
|
||||
H.gib()
|
||||
obj_integrity = min(obj_integrity + max_integrity*0.05,max_integrity)//restores 5% hp of tendril
|
||||
for(var/mob/living/L in view(src, 5))
|
||||
if(L.mind?.has_antag_datum(/datum/antagonist/ashwalker))
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_good)
|
||||
else
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_bad)
|
||||
|
||||
/obj/structure/lavaland/ash_walker/proc/remake_walker(datum/mind/oldmind, oldname)
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(get_step(loc, pick(GLOB.alldirs)))
|
||||
M.set_species(/datum/species/lizard/ashwalker)
|
||||
M.real_name = oldname
|
||||
M.underwear = "Nude"
|
||||
M.undershirt = "Nude"
|
||||
M.socks = "Nude"
|
||||
M.update_body()
|
||||
M.remove_language(/datum/language/common)
|
||||
oldmind.transfer_to(M)
|
||||
M.mind.grab_ghost()
|
||||
to_chat(M, "<b>You have been pulled back from beyond the grave, with a new body and renewed purpose. Glory to the Necropolis!</b>")
|
||||
playsound(get_turf(M),'sound/magic/exit_blood.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/lavaland/ash_walker/proc/spawn_mob()
|
||||
if(meat_counter >= ASH_WALKER_SPAWN_THRESHOLD)
|
||||
new /obj/effect/mob_spawn/human/ash_walker(get_step(loc, pick(GLOB.alldirs)))
|
||||
new /obj/effect/mob_spawn/human/ash_walker(get_step(loc, pick(GLOB.alldirs)), ashies)
|
||||
visible_message("<span class='danger'>One of the eggs swells to an unnatural size and tumbles free. It's ready to hatch!</span>")
|
||||
meat_counter -= ASH_WALKER_SPAWN_THRESHOLD
|
||||
|
||||
@@ -35,67 +35,63 @@
|
||||
. = ..()
|
||||
. += distance_multiplier < 1 ? "Bluespace shortcut module installed. Route is [distance_multiplier]x the original length." : ""
|
||||
|
||||
/obj/machinery/computer/custom_shuttle/ui_interact(mob/user)
|
||||
/obj/machinery/computer/custom_shuttle/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "CustomShuttleConsole", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/custom_shuttle/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/options = params2list(possible_destinations)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
var/dat = "[M ? "Current Location : [M.getStatusText()]" : "Shuttle link required."]<br><br>"
|
||||
data["docked_location"] = M ? M.get_status_text_tgui() : null
|
||||
if(M)
|
||||
dat += "<A href='?src=[REF(src)];calculate=1'>Run Flight Calculations</A><br>"
|
||||
dat += "<b>Shuttle Data</b><hr>"
|
||||
dat += "Shuttle Mass: [calculated_mass/10]tons<br>"
|
||||
dat += "Engine Force: [calculated_dforce]kN ([calculated_engine_count] engines)<br>"
|
||||
dat += "Sublight Speed: [calculated_speed]ms<sup>-1</sup><br>"
|
||||
dat += calculated_speed < 1 ? "<b>INSUFFICIENT ENGINE POWER</b><br>" : ""
|
||||
dat += calculated_non_operational_thrusters > 0 ? "<b>Warning: [calculated_non_operational_thrusters] thrusters offline.</b><br>" : ""
|
||||
dat += "Fuel Consumption: [calculated_consumption]units per distance<br>"
|
||||
dat += "Engine Cooldown: [calculated_cooldown]s<hr>"
|
||||
var/destination_found
|
||||
calculateStats(FALSE, 0, TRUE)
|
||||
data["ship_name"] = M.area_type ? M.area_type:name : "ERROR"
|
||||
data["shuttle_mass"] = calculated_mass/10
|
||||
data["engine_force"] = calculated_dforce
|
||||
data["engines"] = calculated_engine_count
|
||||
data["calculated_speed"] = calculated_speed
|
||||
data["damaged_engines"] = calculated_non_operational_thrusters
|
||||
data["calculated_consumption"] = calculated_consumption
|
||||
data["calculated_cooldown"] = calculated_cooldown
|
||||
data["locations"] = list()
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S, silent=TRUE))
|
||||
if(!M.check_dock(S, silent = TRUE))
|
||||
continue
|
||||
if(calculated_speed == 0)
|
||||
break
|
||||
destination_found = TRUE
|
||||
var/dist = round(calculateDistance(S))
|
||||
dat += "<A href='?src=[REF(src)];setloc=[S.id]'>Target [S.name] (Dist: [dist] | Fuel Cost: [round(dist * calculated_consumption)] | Time: [round(dist / calculated_speed)])</A><br>"
|
||||
if(!destination_found)
|
||||
dat += "<B>No valid destinations</B><br>"
|
||||
dat += "<hr>[targetLocation ? "Target Location : [targetLocation]" : "No Target Location"]"
|
||||
dat += "<hr><A href='?src=[REF(src)];fly=1'>Initate Flight</A><br>"
|
||||
dat += "<A href='?src=[REF(user)];mach_close=computer'>Close</a>"
|
||||
var/list/location_data = list(
|
||||
id = S.id,
|
||||
name = S.name,
|
||||
dist = round(calculateDistance(S))
|
||||
)
|
||||
data["locations"] += list(location_data)
|
||||
data["destination"] = targetLocation
|
||||
return data
|
||||
|
||||
popup = new(user, "computer", M ? M.name : "shuttle", 350, 450)
|
||||
popup.set_content("<center>[dat]</center>")
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/custom_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
/obj/machinery/computer/custom_shuttle/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
if(href_list["calculate"])
|
||||
calculateStats()
|
||||
ui_interact(usr)
|
||||
return
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='danger'>Shuttle Link Required.</span>")
|
||||
return
|
||||
if(M.launch_status == ENDGAME_LAUNCHED)
|
||||
return
|
||||
if(href_list["setloc"])
|
||||
SetTargetLocation(href_list["setloc"])
|
||||
ui_interact(usr)
|
||||
return
|
||||
else if(href_list["fly"])
|
||||
Fly()
|
||||
ui_interact(usr)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("setloc")
|
||||
SetTargetLocation(params["setloc"])
|
||||
if("fly")
|
||||
Fly()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/custom_shuttle/proc/calculateDistance(var/obj/docking_port/stationary/port)
|
||||
var/deltaX = port.x - x
|
||||
|
||||
Reference in New Issue
Block a user