mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Linter Introduction + Cleanup (#8085)
* Adds linter defines to repo. * Uncomments linter defines already in the code. * Resolves unreachable code linter errors. * Nukes decade+ old syndie specops code except for computer since that's mapped in????? * Resolves procs has no parent linter error. * Proc signature fixes * Bad comments * "In" danger * Type safety * Implied nested list abuse * Top level ..() usage * Sleepy coder typos * Invalid kwargs calls * Pointless returns * Linter hacks (see full message) Byond doesn't care and it has no effect but linter doesn't like var/proc for holding references to procs, despite that it's valid byond code. Also, the linter seems to have serious issues figuring out relative proc names. This commit is a sort of take-it-or-leave-it thing. It's not required, it just cuts down on warnings, but this code is valid DM code. * WHATEVER THIS IS * Trick dreamchecker linter into ignoring this file's sins in it's weird use of vars * Fix list decoration syntax - Its a list, not list of lists - To declare that a var is a list you can `var/list/blah = list()` syntax or the `var/blah[0]` syntax. Both do exactly the same thing. But if you do `var/list/blah[0]` that is just like doing `var/list/list/blah = list()` * Hopefully stops the ai holder subtype folder from going quantum and sometimes changes capitalization over time, and incidentally causing 20+ linter errors. * Fixes unwrapped negated object in list linter error. * Resolves colon-like list accessing linter error. * Turns linter on in linter config. * Fixes closet indentation properly and cleans up suit storage unit switch. Co-authored-by: Aronai Sieyes <arokha@arokha.com> Co-authored-by: Leshana <Leshana@users.noreply.github.com>
This commit is contained in:
@@ -39,9 +39,9 @@
|
||||
log_misc("ToR data updated!")
|
||||
if(usr)
|
||||
to_chat(usr, "<span class='filter_adminlog'>ToRban updated.</span>")
|
||||
return 1
|
||||
return
|
||||
log_misc("ToR data update aborted: no data.")
|
||||
return 0
|
||||
return
|
||||
|
||||
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
|
||||
set name = "ToRban"
|
||||
|
||||
@@ -1388,15 +1388,15 @@ proc/admin_notice(var/message, var/rights)
|
||||
|
||||
if(2) //Admins
|
||||
var/ref_mob = "\ref[M]"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
|
||||
if(3) //Devs
|
||||
var/ref_mob = "\ref[M]"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>)([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>)([admin_jump_link(M)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
|
||||
if(4) //Event Managers
|
||||
var/ref_mob = "\ref[M]"
|
||||
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
|
||||
|
||||
|
||||
/proc/ishost(whom)
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#define MEMOFILE "data/memo.sav" //where the memos are saved
|
||||
#define ENABLE_MEMOS 1 //using a define because screw making a config variable for it. This is more efficient and purty.
|
||||
#define ENABLE_MEMOS // this is so stupid
|
||||
|
||||
//switch verb so we don't spam up the verb lists with like, 3 verbs for this feature.
|
||||
/client/proc/admin_memo(task in list("write","show","delete"))
|
||||
set name = "Memo"
|
||||
set category = "Server"
|
||||
if(!ENABLE_MEMOS) return
|
||||
#ifndef ENABLE_MEMOS
|
||||
return
|
||||
#endif
|
||||
if(!check_rights(0)) return
|
||||
switch(task)
|
||||
if("write") admin_memo_write()
|
||||
@@ -31,11 +33,13 @@
|
||||
|
||||
//show all memos
|
||||
/client/proc/admin_memo_show()
|
||||
if(ENABLE_MEMOS)
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
for(var/ckey in F.dir)
|
||||
to_chat(src, "<span class='filter_adminlog'><center><span class='motd'><b>Admin Memo</b><i> by [F[ckey]]</i></span></center></span>")
|
||||
#ifndef ENABLE_MEMOS
|
||||
return
|
||||
#endif
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
for(var/ckey in F.dir)
|
||||
to_chat(src, "<span class='filter_adminlog'><center><span class='motd'><b>Admin Memo</b><i> by [F[ckey]]</i></span></center></span>")
|
||||
|
||||
//delete your own or somebody else's memo
|
||||
/client/proc/admin_memo_delete()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
var/security = 0
|
||||
if((T && T in using_map.admin_levels) || prisonwarped.Find(H))
|
||||
if((T in using_map.admin_levels) || prisonwarped.Find(H))
|
||||
//don't warp them if they aren't ready or are already there
|
||||
continue
|
||||
H.Paralyse(5)
|
||||
|
||||
@@ -634,14 +634,14 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
|
||||
if(!is_proper_datum(i))
|
||||
continue
|
||||
world.SDQL_var(i, query_tree["call"][1], null, i, superuser, src)
|
||||
obj_count_finished++
|
||||
obj_count_finished += 1
|
||||
SDQL2_TICK_CHECK
|
||||
SDQL2_HALT_CHECK
|
||||
|
||||
if("delete")
|
||||
for(var/datum/d in found)
|
||||
SDQL_qdel_datum(d)
|
||||
obj_count_finished++
|
||||
obj_count_finished += 1
|
||||
SDQL2_TICK_CHECK
|
||||
SDQL2_HALT_CHECK
|
||||
|
||||
@@ -663,7 +663,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
|
||||
if(!is_proper_datum(d))
|
||||
continue
|
||||
SDQL_internal_vv(d, set_list)
|
||||
obj_count_finished++
|
||||
obj_count_finished += 1
|
||||
SDQL2_TICK_CHECK
|
||||
SDQL2_HALT_CHECK
|
||||
if(islist(obj_count_finished))
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
|
||||
admin_ticket_log(C, "<span class='pm notice'>PM From [irc_tagged]: [msg]</span>")
|
||||
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
window_flash(C)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/inactive_on_main_station = 0
|
||||
for(var/zone/zone in air_master.zones)
|
||||
var/turf/simulated/turf = locate() in zone.contents
|
||||
if(turf && turf.z in using_map.station_levels)
|
||||
if(turf?.z in using_map.station_levels)
|
||||
if(zone.needs_update)
|
||||
active_on_main_station++
|
||||
else
|
||||
@@ -79,7 +79,7 @@
|
||||
var/output = "<b>Radio Report</b><hr>"
|
||||
for (var/fq in radio_controller.frequencies)
|
||||
output += "<b>Freq: [fq]</b><br>"
|
||||
var/list/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
|
||||
var/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
|
||||
if (!fqs)
|
||||
output += " <b>ERROR</b><br>"
|
||||
continue
|
||||
|
||||
@@ -43,8 +43,6 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
set category = "Mapping"
|
||||
set name = "-None of these are for ingame use!!"
|
||||
|
||||
..()
|
||||
|
||||
/client/proc/camera_view()
|
||||
set category = "Mapping"
|
||||
set name = "Camera Range Display"
|
||||
@@ -96,7 +94,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
if(!(locate(/obj/structure/grille,T)))
|
||||
var/window_check = 0
|
||||
for(var/obj/structure/window/W in T)
|
||||
if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) )
|
||||
if (W.dir == turn(C1.dir,180) || (W.dir in list(5,6,9,10)) )
|
||||
window_check = 1
|
||||
break
|
||||
if(!window_check)
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
|
||||
msg = "<font color='blue'><b><font color=orange>[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentComReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
msg = "<font color='blue'><b><font color=orange>[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentComReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN|R_EVENT & C.holder.rights)
|
||||
to_chat(C,msg)
|
||||
C << 'sound/machines/signal.ogg'
|
||||
|
||||
/proc/Syndicate_announce(var/msg, var/mob/Sender)
|
||||
msg = "<font color='blue'><b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
msg = "<font color='blue'><b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN|R_EVENT & C.holder.rights)
|
||||
to_chat(C,msg)
|
||||
|
||||
@@ -297,7 +297,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
var/var_value
|
||||
|
||||
if(param_var_name)
|
||||
if(!param_var_name in O.vars)
|
||||
if(!(param_var_name in O.vars))
|
||||
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])")
|
||||
return
|
||||
variable = param_var_name
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
|
||||
var/chosen_target
|
||||
if(preferred_target && preferred_target in targets)
|
||||
if(preferred_target && (preferred_target in targets))
|
||||
chosen_target = preferred_target
|
||||
else
|
||||
chosen_target = pick(targets)
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
/obj/item/device/assembly_holder/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(isturf(old_loc))
|
||||
unsense_proximity(callback = .HasProximity, center = old_loc)
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = old_loc)
|
||||
if(isturf(loc))
|
||||
sense_proximity(callback = .HasProximity)
|
||||
sense_proximity(callback = /atom/proc/HasProximity)
|
||||
|
||||
/obj/item/device/assembly_holder/HasProximity(turf/T, atom/movable/AM, old_loc)
|
||||
if(a_left)
|
||||
|
||||
@@ -90,9 +90,9 @@
|
||||
/obj/item/device/assembly/prox_sensor/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(isturf(old_loc))
|
||||
unsense_proximity(range = range, callback = .HasProximity, center = old_loc)
|
||||
unsense_proximity(range = range, callback = /atom/proc/HasProximity, center = old_loc)
|
||||
if(isturf(loc))
|
||||
sense_proximity(range = range, callback = .HasProximity)
|
||||
sense_proximity(range = range, callback = /atom/proc/HasProximity)
|
||||
sense()
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/tgui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
if(href_list["category"])
|
||||
var/category = locate(href_list["category"])
|
||||
if(category && category in categories)
|
||||
if(category && (category in categories))
|
||||
selected_category = category
|
||||
. = 1
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@
|
||||
under_icon = rolled_down_icon
|
||||
|
||||
// The _s is because the icon update procs append it.
|
||||
if((under_icon == rolled_down_icon && "[worn_state]_s" in cached_icon_states(under_icon)) || ("[worn_state]_d_s" in cached_icon_states(under_icon)))
|
||||
if((under_icon == rolled_down_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_d_s" in cached_icon_states(under_icon)))
|
||||
if(rolled_down != 1)
|
||||
rolled_down = 0
|
||||
else
|
||||
@@ -908,7 +908,7 @@
|
||||
under_icon = new /icon("[INV_W_UNIFORM_DEF_ICON]_[index].dmi")
|
||||
|
||||
// The _s is because the icon update procs append it.
|
||||
if((under_icon == rolled_down_sleeves_icon && "[worn_state]_s" in cached_icon_states(under_icon)) || ("[worn_state]_r_s" in cached_icon_states(under_icon)))
|
||||
if((under_icon == rolled_down_sleeves_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_r_s" in cached_icon_states(under_icon)))
|
||||
if(rolled_sleeves != 1)
|
||||
rolled_sleeves = 0
|
||||
else
|
||||
@@ -972,7 +972,6 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
set_sensors(usr)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/verb/rollsuit()
|
||||
set name = "Roll Down Jumpsuit"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return state2use
|
||||
|
||||
//HELMET: May have a lighting overlay
|
||||
/obj/item/clothing/head/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0)
|
||||
/obj/item/clothing/head/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0,var/icon/clip_mask = null)
|
||||
var/image/standing = ..()
|
||||
if(on && slot_name == slot_head_str)
|
||||
var/cache_key = "[light_overlay][LAZYACCESS(sprite_sheets,body_type) ? "_[body_type]" : ""]"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
interface_desc = "A socket that supports a range of artificial intelligence systems."
|
||||
|
||||
var/mob/integrated_ai // Direct reference to the actual mob held in the suit.
|
||||
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
|
||||
var/obj/item/device/aicard/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
|
||||
var/obj/item/ai_verbs/verb_holder
|
||||
|
||||
/obj/item/rig_module/ai_container/process()
|
||||
@@ -132,11 +132,10 @@
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!target)
|
||||
if(ai_card)
|
||||
if(istype(ai_card,/obj/item/device/aicard))
|
||||
ai_card.tgui_interact(H, custom_state = deep_inventory_state)
|
||||
else
|
||||
eject_ai(H)
|
||||
if(istype(ai_card))
|
||||
ai_card.tgui_interact(H, custom_state = deep_inventory_state)
|
||||
else
|
||||
eject_ai(H)
|
||||
update_verb_holder()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/clothing/accessory/proc/get_mob_overlay()
|
||||
if(!istype(loc,/obj/item/clothing/)) //don't need special handling if it's worn as normal item.
|
||||
return ..()
|
||||
return
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(ishuman(has_suit.loc))
|
||||
wearer = has_suit.loc
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/machinery/microscope/proc/remove_sample(var/mob/living/remover)
|
||||
if(!istype(remover) || remover.incapacitated() || !Adjacent(remover))
|
||||
return ..()
|
||||
return
|
||||
if(!sample)
|
||||
to_chat(remover, "<span class='warning'>\The [src] does not have a sample in it.</span>")
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return 0
|
||||
if(access_cent_captain in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
else if((access_hop in held_card.access) || (access_captain in held_card.access))
|
||||
return 1
|
||||
|
||||
/obj/machinery/account_database/proc/create_transation(target, reason, amount)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
if(access_cent_captain in C.access || access_hop in C.access || access_captain in C.access)
|
||||
if((access_cent_captain in C.access) || (access_hop in C.access) || (access_captain in C.access))
|
||||
access_code = 0
|
||||
to_chat(usr, "[bicon(src)]<span class='info'>Access code reset to 0.</span>")
|
||||
else if (istype(I, /obj/item/weapon/card/emag))
|
||||
@@ -285,7 +285,5 @@
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, 1)
|
||||
src.visible_message("[bicon(src)] \The [src] chimes.")
|
||||
transaction_paid = 1
|
||||
else
|
||||
..()
|
||||
|
||||
//emag?
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/datum/event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in using_map.station_levels)
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ mob/living/carbon/proc/dream()
|
||||
sleep(rand(40,70))
|
||||
if(paralysis <= 0)
|
||||
dreaming = 0
|
||||
return 0
|
||||
return
|
||||
dreaming = 0
|
||||
return 1
|
||||
return
|
||||
|
||||
mob/living/carbon/proc/handle_dreams()
|
||||
if(client && !dreaming && prob(5))
|
||||
|
||||
@@ -160,7 +160,6 @@
|
||||
layer_stage = 8
|
||||
|
||||
/obj/structure/chaoscake/proc/HasSliceMissing()
|
||||
..()
|
||||
if(slices < maxslices)
|
||||
if(interval >= regentime)
|
||||
interval = 0
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
if(candymaker_loop)
|
||||
candymaker_loop.stop(src)
|
||||
|
||||
/obj/machinery/appliance/mixer/candy/change_product_appearance(var/obj/item/weapon/reagent_containers/food/snacks/cooked/product)
|
||||
/obj/machinery/appliance/mixer/candy/change_product_appearance(var/obj/item/weapon/reagent_containers/food/snacks/product)
|
||||
food_color = get_random_colour(1)
|
||||
. = ..()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/datum/event2/event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in get_location_z_levels())
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in get_location_z_levels()))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/station_map/proc/setup_holomap()
|
||||
. = ..()
|
||||
bogus = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
original_zLevel = T.z
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
to_chat(user, "You slice up \the [src].")
|
||||
var/slices = rand(3,5)
|
||||
var/reagents_to_transfer = round(reagents.total_volume/slices)
|
||||
for(var/i=i;i<=slices;i++)
|
||||
for(var/i=1; i<=slices; i++)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
|
||||
if(reagents_to_transfer) reagents.trans_to_obj(F,reagents_to_transfer)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/plantgene
|
||||
var/genetype // Label used when applying trait.
|
||||
var/list/values // Values to copy into the target seed datum.
|
||||
var/list/list/values // Values to copy into the target seed datum.
|
||||
|
||||
/datum/seed
|
||||
//Tracking.
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/obj/effect/plant/Destroy()
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
unsense_proximity(callback = .HasProximity, center = get_turf(src))
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = get_turf(src))
|
||||
plant_controller.remove_plant(src)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
plant_controller.add_plant(neighbor)
|
||||
@@ -107,7 +107,7 @@
|
||||
name = seed.display_name
|
||||
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
sense_proximity(callback = .HasProximity) // Grabby
|
||||
sense_proximity(callback = /atom/proc/HasProximity) // Grabby
|
||||
max_growth = VINE_GROWTH_STAGES
|
||||
growth_threshold = max_health/VINE_GROWTH_STAGES
|
||||
icon = 'icons/obj/hydroponics_vines.dmi'
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
. = ..()
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
if(isturf(old_loc))
|
||||
unsense_proximity(callback = .HasProximity, center = old_loc)
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = old_loc)
|
||||
if(isturf(loc))
|
||||
sense_proximity(callback = .HasProximity)
|
||||
sense_proximity(callback = /atom/proc/HasProximity)
|
||||
|
||||
/obj/effect/plant/attack_hand(var/mob/user)
|
||||
manual_unbuckle(user)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
/datum/integrated_io/dir/write_data_to_pin(var/new_data)
|
||||
if(isnull(new_data) || new_data in alldirs + list(UP, DOWN))
|
||||
if(isnull(new_data) || (new_data in alldirs + list(UP, DOWN)))
|
||||
data = new_data
|
||||
holder.on_data_written()
|
||||
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
else
|
||||
activate_pin(3)
|
||||
return
|
||||
return
|
||||
var/datum/reagent/B
|
||||
if(istype(T, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
continue
|
||||
|
||||
// Did we already place down a very similar submap?
|
||||
if(chosen_template.template_group && chosen_template.template_group in template_groups_used)
|
||||
if(chosen_template.template_group && (chosen_template.template_group in template_groups_used))
|
||||
priority_submaps -= chosen_template
|
||||
potential_submaps -= chosen_template
|
||||
continue
|
||||
|
||||
@@ -139,7 +139,7 @@ var/global/use_preloader = FALSE
|
||||
var/maxx = xcrdStart
|
||||
|
||||
// Assemble the grid of keys
|
||||
var/list/key_list = list()
|
||||
var/list/list/key_list = list()
|
||||
for(var/line in gridLines)
|
||||
var/list/line_keys = list()
|
||||
xcrd = 1
|
||||
@@ -165,7 +165,7 @@ var/global/use_preloader = FALSE
|
||||
if(orientation != 0)
|
||||
var/num_cols = key_list[1].len
|
||||
var/num_rows = key_list.len
|
||||
var/list/new_key_list = list()
|
||||
var/list/list/new_key_list = list()
|
||||
// If it's rotated 180 degrees, the dimensions are the same
|
||||
if(orientation == 180)
|
||||
new_key_list.len = num_rows
|
||||
|
||||
@@ -188,7 +188,7 @@ var/list/name_to_material
|
||||
if(islist(composite_material))
|
||||
for(var/material_string in composite_material)
|
||||
temp_matter[material_string] = composite_material[material_string]
|
||||
else if(SHEET_MATERIAL_AMOUNT)
|
||||
else
|
||||
temp_matter[name] = SHEET_MATERIAL_AMOUNT
|
||||
return temp_matter
|
||||
|
||||
|
||||
@@ -163,8 +163,8 @@
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/obj/machinery/mineral/console = null
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/list/ores_processing = list()
|
||||
var/list/ores_stored = list()
|
||||
var/active = FALSE
|
||||
var/tick = 0
|
||||
|
||||
@@ -338,3 +338,4 @@
|
||||
#undef PROCESS_SMELT
|
||||
#undef PROCESS_COMPRESS
|
||||
#undef PROCESS_ALLOY
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -242,7 +242,6 @@
|
||||
M.apply_damage(0.5 * damage, BRUTE, BP_R_ARM)
|
||||
|
||||
blood_splatter(src, M, 1)
|
||||
..()
|
||||
|
||||
/mob/living/bot/mulebot/relaymove(var/mob/user, var/direction)
|
||||
if(load == user)
|
||||
|
||||
@@ -219,12 +219,4 @@
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (machine.check_eye(src) < 0)
|
||||
reset_view(null)
|
||||
else
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
return 1
|
||||
@@ -141,7 +141,6 @@
|
||||
set name = "Attach Limb"
|
||||
set category = "Object"
|
||||
set desc = "Attach a replacement limb."
|
||||
set usr = src
|
||||
|
||||
var/obj/item/organ/external/E = get_active_hand()
|
||||
if(!check_can_attach_modular_limb(E))
|
||||
@@ -171,7 +170,6 @@
|
||||
set name = "Remove Limb"
|
||||
set category = "Object"
|
||||
set desc = "Detach one of your limbs."
|
||||
set usr = src
|
||||
|
||||
var/list/detachable_limbs = get_modular_limbs(return_first_found = FALSE, validate_proc = /obj/item/organ/external/proc/can_remove_modular_limb)
|
||||
if(!length(detachable_limbs))
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
if(istype(back, /obj/item/weapon/tank/jetpack))
|
||||
return back
|
||||
else if(istype(rig))
|
||||
for(var/obj/item/rig_module/maneuvering_jets.module in rig.installed_modules)
|
||||
for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules)
|
||||
return module.jets
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
else
|
||||
var/list/datum/sprite_accessory/hair/valid_hairstyles = list()
|
||||
for(var/hair_string in hair_styles_list)
|
||||
var/list/datum/sprite_accessory/hair/test = hair_styles_list[hair_string]
|
||||
var/datum/sprite_accessory/hair/test = hair_styles_list[hair_string]
|
||||
if(test.flags & HAIR_TIEABLE)
|
||||
valid_hairstyles.Add(hair_string)
|
||||
selected_string = input("Select a new hairstyle", "Your hairstyle", hair_style) as null|anything in valid_hairstyles
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
/mob/living/carbon/human/proc/can_break_straight_jacket()
|
||||
if((HULK in mutations) || species.can_shred(src,1))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/proc/break_straight_jacket()
|
||||
visible_message(
|
||||
|
||||
@@ -646,7 +646,8 @@
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
var/obj/machinery/atmospherics/unary/cryo_cell/cc = loc
|
||||
loc_temp = cc.air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
|
||||
@@ -145,15 +145,13 @@
|
||||
P.old_style_target(A)
|
||||
P.fire()
|
||||
playsound(src, 'sound/weapons/pierce.ogg', 25, 0)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrosive Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Abilities"
|
||||
|
||||
if(!O in oview(1))
|
||||
if(!(O in oview(1)))
|
||||
to_chat(src, "<span class='alium'>[O] is too far away.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
standing.underlays += underlay
|
||||
|
||||
for(var/mut in mutations)
|
||||
if(LASER)
|
||||
if(mut == LASER)
|
||||
standing.overlays += "lasereyes_s" //TODO
|
||||
|
||||
overlays_standing[MUTATIONS_LAYER] = standing
|
||||
|
||||
@@ -229,32 +229,33 @@
|
||||
/datum/inventory_panel/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
var/list/data = ..()
|
||||
|
||||
data["slots"] = list()
|
||||
data["slots"].Add(list(list(
|
||||
var/list/slots = list()
|
||||
slots.Add(list(list(
|
||||
"name" = "Head (Mask)",
|
||||
"item" = host.wear_mask,
|
||||
"act" = "mask",
|
||||
)))
|
||||
data["slots"].Add(list(list(
|
||||
slots.Add(list(list(
|
||||
"name" = "Left Hand",
|
||||
"item" = host.l_hand,
|
||||
"act" = "l_hand",
|
||||
)))
|
||||
data["slots"].Add(list(list(
|
||||
slots.Add(list(list(
|
||||
"name" = "Right Hand",
|
||||
"item" = host.r_hand,
|
||||
"act" = "r_hand",
|
||||
)))
|
||||
data["slots"].Add(list(list(
|
||||
slots.Add(list(list(
|
||||
"name" = "Back",
|
||||
"item" = host.back,
|
||||
"act" = "back",
|
||||
)))
|
||||
data["slots"].Add(list(list(
|
||||
slots.Add(list(list(
|
||||
"name" = "Pockets",
|
||||
"item" = "Empty Pockets",
|
||||
"act" = "pockets",
|
||||
)))
|
||||
data["slots"] = slots
|
||||
|
||||
data["internals"] = host.internals
|
||||
data["internalsValid"] = istype(host.wear_mask, /obj/item/clothing/mask) && istype(host.back, /obj/item/weapon/tank)
|
||||
@@ -300,33 +301,37 @@
|
||||
if(istype(H.w_uniform, /obj/item/clothing/under))
|
||||
suit = H.w_uniform
|
||||
|
||||
data["slots"] = list()
|
||||
|
||||
var/list/slots = list()
|
||||
for(var/entry in H.species.hud.gear)
|
||||
var/list/slot_ref = H.species.hud.gear[entry]
|
||||
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
|
||||
continue
|
||||
var/obj/item/thing_in_slot = H.get_equipped_item(slot_ref["slot"])
|
||||
data["slots"].Add(list(list(
|
||||
slots.Add(list(list(
|
||||
"name" = slot_ref["name"],
|
||||
"item" = thing_in_slot,
|
||||
"act" = "targetSlot",
|
||||
"params" = list("slot" = slot_ref["slot"]),
|
||||
)))
|
||||
data["slots"] = slots
|
||||
|
||||
data["specialSlots"] = list()
|
||||
|
||||
var/list/specialSlots = list()
|
||||
if(H.species.hud.has_hands)
|
||||
data["specialSlots"].Add(list(list(
|
||||
specialSlots.Add(list(list(
|
||||
"name" = "Left Hand",
|
||||
"item" = H.l_hand,
|
||||
"act" = "targetSlot",
|
||||
"params" = list("slot" = slot_l_hand),
|
||||
)))
|
||||
data["specialSlots"].Add(list(list(
|
||||
specialSlots.Add(list(list(
|
||||
"name" = "Right Hand",
|
||||
"item" = H.r_hand,
|
||||
"act" = "targetSlot",
|
||||
"params" = list("slot" = slot_r_hand),
|
||||
)))
|
||||
data["specialSlots"] = specialSlots
|
||||
|
||||
data["internals"] = H.internals
|
||||
data["internalsValid"] = (istype(H.wear_mask, /obj/item/clothing/mask) || istype(H.head, /obj/item/clothing/head/helmet/space)) && (istype(H.back, /obj/item/weapon/tank) || istype(H.belt, /obj/item/weapon/tank) || istype(H.s_store, /obj/item/weapon/tank))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,14 +34,14 @@
|
||||
/obj/machinery/computer/drone_control/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["drones"] = list()
|
||||
var/list/drones = list()
|
||||
for(var/mob/living/silicon/robot/drone/D in mob_list)
|
||||
if(D.z != z)
|
||||
continue
|
||||
if(D.foreign_droid)
|
||||
continue
|
||||
|
||||
data["drones"].Add(list(list(
|
||||
|
||||
drones.Add(list(list(
|
||||
"name" = D.real_name,
|
||||
"active" = D.stat != 2,
|
||||
"charge" = D.cell.charge,
|
||||
@@ -49,6 +49,7 @@
|
||||
"loc" = "[get_area(D)]",
|
||||
"ref" = "\ref[D]",
|
||||
)))
|
||||
data["drones"] = drones
|
||||
|
||||
data["fabricator"] = dronefab
|
||||
data["fabPower"] = dronefab?.produce_drones
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
updateicon()
|
||||
|
||||
// This one takes an object's type instead of an instance, as above.
|
||||
/mob/living/silicon/robot/proc/has_active_type(var/type_to_compare)
|
||||
|
||||
@@ -1,419 +1,419 @@
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
var/syndicate = 0
|
||||
var/const/MAIN_CHANNEL = "Main Frequency"
|
||||
var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws
|
||||
var/list/stating_laws = list()// Channels laws are currently being stated on
|
||||
var/obj/item/device/radio/common_radio
|
||||
|
||||
has_huds = TRUE
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
|
||||
//Used in say.dm.
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
|
||||
var/next_alarm_notice
|
||||
var/list/datum/alarm/queued_alarms = new()
|
||||
|
||||
var/list/access_rights
|
||||
var/obj/item/weapon/card/id/idcard
|
||||
var/idcard_type = /obj/item/weapon/card/id/synthetic
|
||||
|
||||
var/hudmode = null
|
||||
|
||||
/mob/living/silicon/New()
|
||||
silicon_mob_list |= src
|
||||
..()
|
||||
add_language(LANGUAGE_GALCOM)
|
||||
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
|
||||
init_id()
|
||||
init_subsystems()
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
silicon_mob_list -= src
|
||||
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
|
||||
AH.unregister_alarm(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/init_id()
|
||||
if(idcard)
|
||||
return
|
||||
idcard = new idcard_type(src)
|
||||
set_id_info(idcard)
|
||||
|
||||
/mob/living/silicon/proc/SetName(pickedName as text)
|
||||
real_name = pickedName
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.take_organ_damage(0,20,emp=1)
|
||||
Confuse(5)
|
||||
if(2)
|
||||
src.take_organ_damage(0,15,emp=1)
|
||||
Confuse(4)
|
||||
if(3)
|
||||
src.take_organ_damage(0,10,emp=1)
|
||||
Confuse(3)
|
||||
if(4)
|
||||
src.take_organ_damage(0,5,emp=1)
|
||||
Confuse(2)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
to_chat(src, "<span class='danger'><B>*BZZZT*</B></span>")
|
||||
to_chat(src, "<span class='danger'>Warning: Electromagnetic pulse detected.</span>")
|
||||
..()
|
||||
|
||||
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount)
|
||||
return //immune
|
||||
|
||||
/mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 0.0)
|
||||
if(shock_damage > 0)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, loc)
|
||||
s.start()
|
||||
|
||||
shock_damage *= siemens_coeff //take reduced damage
|
||||
take_overall_damage(0, shock_damage)
|
||||
visible_message("<span class='warning'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='danger'>Energy pulse detected, system damaged!</span>", \
|
||||
"<span class='warning'>You hear an electrical crack.</span>")
|
||||
if(prob(20))
|
||||
Stun(2)
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
||||
return
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(!Proj.nodamage)
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(Proj.damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(Proj.damage)
|
||||
|
||||
Proj.on_hit(src,2)
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// this function shows the health of the AI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [round((health/getMaxHealth())*100)]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
// This is a pure virtual function, it should be overwritten by all subclasses
|
||||
/mob/living/silicon/proc/show_malf_ai()
|
||||
return 0
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/living/silicon/proc/show_emergency_shuttle_eta()
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
if(statpanel("Status"))
|
||||
show_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
show_malf_ai()
|
||||
..()
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
var/dat = "<div align='center'>"
|
||||
if(!data_core)
|
||||
to_chat(src, "<span class='notice'>There is no data to form a manifest with. Contact your Nanotrasen administrator.</span>")
|
||||
return
|
||||
dat += data_core.get_manifest(1) //The 1 makes it monochrome.
|
||||
|
||||
var/datum/browser/popup = new(src, "Crew Manifest", "Crew Manifest", 370, 420, src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
//can't inject synths
|
||||
/mob/living/silicon/can_inject(var/mob/user, var/error_msg)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>The armoured plating is too tough.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak(datum/language/speaking)
|
||||
if(universal_speak)
|
||||
return TRUE
|
||||
//need speech synthesizer support to vocalize a language
|
||||
if(speaking in speech_synthesizer_langs)
|
||||
return TRUE
|
||||
if(speaking && speaking.flags & INNATE)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
var/var/datum/language/added_language = GLOB.all_languages[language]
|
||||
if(!added_language)
|
||||
return
|
||||
|
||||
. = ..(language)
|
||||
if (can_speak && (added_language in languages) && !(added_language in speech_synthesizer_langs))
|
||||
speech_synthesizer_langs += added_language
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
var/var/datum/language/removed_language = GLOB.all_languages[rem_language]
|
||||
if(!removed_language)
|
||||
return
|
||||
|
||||
..(rem_language)
|
||||
speech_synthesizer_langs -= removed_language
|
||||
|
||||
/mob/living/silicon/check_lang_data()
|
||||
. = ""
|
||||
|
||||
if(default_language)
|
||||
. += "Current default language: [default_language] - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a><br><br>"
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
var/default_str
|
||||
if(L == default_language)
|
||||
default_str = " - default - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a>"
|
||||
else
|
||||
default_str = " - <a href='byond://?src=\ref[src];default_lang=\ref[L]'>set default</a>"
|
||||
|
||||
var/synth = (L in speech_synthesizer_langs)
|
||||
. += "<b>[L.name] ([get_language_prefix()][L.key])</b>[synth ? default_str : null]<br>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br>[L.desc]<br><br>"
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security","Medical","Disable")
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
if(plane_holder)
|
||||
//Enable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,TRUE)
|
||||
|
||||
//Disable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
|
||||
|
||||
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
|
||||
if ("Medical")
|
||||
if(plane_holder)
|
||||
//Disable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
|
||||
|
||||
//Enable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,TRUE)
|
||||
|
||||
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
|
||||
if ("Disable")
|
||||
if(plane_holder)
|
||||
//Disable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
|
||||
|
||||
//Disable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
|
||||
to_chat(src, "Sensor augmentations disabled.")
|
||||
|
||||
hudmode = sensor_type //This is checked in examine.dm on humans, so they can see medical/security records depending on mode
|
||||
|
||||
/mob/living/silicon/verb/pose()
|
||||
set name = "Set Pose"
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text)
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ex_act(severity)
|
||||
if(!blinded)
|
||||
flash_eyes()
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.explosion_modifier))
|
||||
severity = CLAMP(severity + M.explosion_modifier, 1, 4)
|
||||
|
||||
severity = round(severity)
|
||||
|
||||
if(severity > 3)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(100)
|
||||
adjustFireLoss(100)
|
||||
if(!anchored)
|
||||
gib()
|
||||
if(2.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
if(3.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
|
||||
if(!next_alarm_notice)
|
||||
next_alarm_notice = world.time + SecondsToTicks(10)
|
||||
if(alarm.hidden)
|
||||
return
|
||||
if(alarm.origin && !(get_z(alarm.origin) in using_map.get_map_levels(get_z(src), TRUE, om_range = DEFAULT_OVERMAP_RANGE)))
|
||||
return
|
||||
|
||||
var/list/alarms = queued_alarms[alarm_handler]
|
||||
if(was_raised)
|
||||
// Raised alarms are always set
|
||||
alarms[alarm] = 1
|
||||
else
|
||||
// Alarms that were raised but then cleared before the next notice are instead removed
|
||||
if(alarm in alarms)
|
||||
alarms -= alarm
|
||||
// And alarms that have only been cleared thus far are set as such
|
||||
else
|
||||
alarms[alarm] = -1
|
||||
|
||||
/mob/living/silicon/proc/process_queued_alarms()
|
||||
if(next_alarm_notice && (world.time > next_alarm_notice))
|
||||
next_alarm_notice = 0
|
||||
|
||||
var/alarm_raised = 0
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == 1)
|
||||
alarm_raised = 1
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='warning'>--- [AH.category] Detected ---</span>")
|
||||
raised_alarm(A)
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == -1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='notice'>--- [AH.category] Cleared ---</span>")
|
||||
to_chat(src, "\The [A.alarm_name()].")
|
||||
|
||||
if(alarm_raised)
|
||||
to_chat(src, "<A HREF=?src=\ref[src];showalerts=1>\[Show Alerts\]</A>")
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
alarms.Cut()
|
||||
|
||||
/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A)
|
||||
to_chat(src, "[A.alarm_name()]!")
|
||||
|
||||
/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A)
|
||||
var/cameratext = ""
|
||||
for(var/obj/machinery/camera/C in A.cameras())
|
||||
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
|
||||
to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
|
||||
|
||||
|
||||
/mob/living/silicon/proc/is_traitor()
|
||||
return mind && (mind in traitors.current_antagonists)
|
||||
|
||||
/mob/living/silicon/proc/is_malf()
|
||||
return mind && (mind in malf.current_antagonists)
|
||||
|
||||
/mob/living/silicon/proc/is_malf_or_traitor()
|
||||
return is_traitor() || is_malf()
|
||||
|
||||
/mob/living/silicon/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/reset_view()
|
||||
. = ..()
|
||||
if(cameraFollow)
|
||||
cameraFollow = null
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/clear_client()
|
||||
//Handle job slot/tater cleanup.
|
||||
var/job = mind.assigned_role
|
||||
|
||||
job_master.FreeRole(job)
|
||||
|
||||
if(mind.objectives.len)
|
||||
qdel(mind.objectives)
|
||||
mind.special_role = null
|
||||
|
||||
clear_antag_roles(mind)
|
||||
|
||||
ghostize(0)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/silicon/has_vision()
|
||||
return 0 //NOT REAL EYES
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
var/syndicate = 0
|
||||
var/const/MAIN_CHANNEL = "Main Frequency"
|
||||
var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws
|
||||
var/list/stating_laws = list()// Channels laws are currently being stated on
|
||||
var/obj/item/device/radio/common_radio
|
||||
|
||||
has_huds = TRUE
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
|
||||
//Used in say.dm.
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
|
||||
var/next_alarm_notice
|
||||
var/list/datum/alarm/queued_alarms = new()
|
||||
|
||||
var/list/access_rights
|
||||
var/obj/item/weapon/card/id/idcard
|
||||
var/idcard_type = /obj/item/weapon/card/id/synthetic
|
||||
|
||||
var/hudmode = null
|
||||
|
||||
/mob/living/silicon/New()
|
||||
silicon_mob_list |= src
|
||||
..()
|
||||
add_language(LANGUAGE_GALCOM)
|
||||
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
|
||||
init_id()
|
||||
init_subsystems()
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
silicon_mob_list -= src
|
||||
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
|
||||
AH.unregister_alarm(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/init_id()
|
||||
if(idcard)
|
||||
return
|
||||
idcard = new idcard_type(src)
|
||||
set_id_info(idcard)
|
||||
|
||||
/mob/living/silicon/proc/SetName(pickedName as text)
|
||||
real_name = pickedName
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.take_organ_damage(0,20,emp=1)
|
||||
Confuse(5)
|
||||
if(2)
|
||||
src.take_organ_damage(0,15,emp=1)
|
||||
Confuse(4)
|
||||
if(3)
|
||||
src.take_organ_damage(0,10,emp=1)
|
||||
Confuse(3)
|
||||
if(4)
|
||||
src.take_organ_damage(0,5,emp=1)
|
||||
Confuse(2)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
to_chat(src, "<span class='danger'><B>*BZZZT*</B></span>")
|
||||
to_chat(src, "<span class='danger'>Warning: Electromagnetic pulse detected.</span>")
|
||||
..()
|
||||
|
||||
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount)
|
||||
return //immune
|
||||
|
||||
/mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 0.0, var/def_zone = null, var/stun = 1)
|
||||
if(shock_damage > 0)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, loc)
|
||||
s.start()
|
||||
|
||||
shock_damage *= siemens_coeff //take reduced damage
|
||||
take_overall_damage(0, shock_damage)
|
||||
visible_message("<span class='warning'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='danger'>Energy pulse detected, system damaged!</span>", \
|
||||
"<span class='warning'>You hear an electrical crack.</span>")
|
||||
if(prob(20))
|
||||
Stun(2)
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
||||
return
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(!Proj.nodamage)
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(Proj.damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(Proj.damage)
|
||||
|
||||
Proj.on_hit(src,2)
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1)
|
||||
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// this function shows the health of the AI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [round((health/getMaxHealth())*100)]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
// This is a pure virtual function, it should be overwritten by all subclasses
|
||||
/mob/living/silicon/proc/show_malf_ai()
|
||||
return 0
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/living/silicon/proc/show_emergency_shuttle_eta()
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
if(statpanel("Status"))
|
||||
show_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
show_malf_ai()
|
||||
..()
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
var/dat = "<div align='center'>"
|
||||
if(!data_core)
|
||||
to_chat(src, "<span class='notice'>There is no data to form a manifest with. Contact your Nanotrasen administrator.</span>")
|
||||
return
|
||||
dat += data_core.get_manifest(1) //The 1 makes it monochrome.
|
||||
|
||||
var/datum/browser/popup = new(src, "Crew Manifest", "Crew Manifest", 370, 420, src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
//can't inject synths
|
||||
/mob/living/silicon/can_inject(var/mob/user, var/error_msg, var/target_zone, var/ignore_thickness = FALSE)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>The armoured plating is too tough.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak(datum/language/speaking)
|
||||
if(universal_speak)
|
||||
return TRUE
|
||||
//need speech synthesizer support to vocalize a language
|
||||
if(speaking in speech_synthesizer_langs)
|
||||
return TRUE
|
||||
if(speaking && speaking.flags & INNATE)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
var/datum/language/added_language = GLOB.all_languages[language]
|
||||
if(!added_language)
|
||||
return
|
||||
|
||||
. = ..(language)
|
||||
if (can_speak && (added_language in languages) && !(added_language in speech_synthesizer_langs))
|
||||
speech_synthesizer_langs += added_language
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
var/datum/language/removed_language = GLOB.all_languages[rem_language]
|
||||
if(!removed_language)
|
||||
return
|
||||
|
||||
..(rem_language)
|
||||
speech_synthesizer_langs -= removed_language
|
||||
|
||||
/mob/living/silicon/check_lang_data()
|
||||
. = ""
|
||||
|
||||
if(default_language)
|
||||
. += "Current default language: [default_language] - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a><br><br>"
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
var/default_str
|
||||
if(L == default_language)
|
||||
default_str = " - default - <a href='byond://?src=\ref[src];default_lang=reset'>reset</a>"
|
||||
else
|
||||
default_str = " - <a href='byond://?src=\ref[src];default_lang=\ref[L]'>set default</a>"
|
||||
|
||||
var/synth = (L in speech_synthesizer_langs)
|
||||
. += "<b>[L.name] ([get_language_prefix()][L.key])</b>[synth ? default_str : null]<br>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br>[L.desc]<br><br>"
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security","Medical","Disable")
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
if(plane_holder)
|
||||
//Enable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,TRUE)
|
||||
|
||||
//Disable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
|
||||
|
||||
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
|
||||
if ("Medical")
|
||||
if(plane_holder)
|
||||
//Disable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
|
||||
|
||||
//Enable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,TRUE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,TRUE)
|
||||
|
||||
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
|
||||
if ("Disable")
|
||||
if(plane_holder)
|
||||
//Disable Security planes
|
||||
plane_holder.set_vis(VIS_CH_ID,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_WANTED,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
|
||||
|
||||
//Disable Medical planes
|
||||
plane_holder.set_vis(VIS_CH_STATUS,FALSE)
|
||||
plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
|
||||
to_chat(src, "Sensor augmentations disabled.")
|
||||
|
||||
hudmode = sensor_type //This is checked in examine.dm on humans, so they can see medical/security records depending on mode
|
||||
|
||||
/mob/living/silicon/verb/pose()
|
||||
set name = "Set Pose"
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text)
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ex_act(severity)
|
||||
if(!blinded)
|
||||
flash_eyes()
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.explosion_modifier))
|
||||
severity = CLAMP(severity + M.explosion_modifier, 1, 4)
|
||||
|
||||
severity = round(severity)
|
||||
|
||||
if(severity > 3)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(100)
|
||||
adjustFireLoss(100)
|
||||
if(!anchored)
|
||||
gib()
|
||||
if(2.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
if(3.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
|
||||
if(!next_alarm_notice)
|
||||
next_alarm_notice = world.time + SecondsToTicks(10)
|
||||
if(alarm.hidden)
|
||||
return
|
||||
if(alarm.origin && !(get_z(alarm.origin) in using_map.get_map_levels(get_z(src), TRUE, om_range = DEFAULT_OVERMAP_RANGE)))
|
||||
return
|
||||
|
||||
var/list/alarms = queued_alarms[alarm_handler]
|
||||
if(was_raised)
|
||||
// Raised alarms are always set
|
||||
alarms[alarm] = 1
|
||||
else
|
||||
// Alarms that were raised but then cleared before the next notice are instead removed
|
||||
if(alarm in alarms)
|
||||
alarms -= alarm
|
||||
// And alarms that have only been cleared thus far are set as such
|
||||
else
|
||||
alarms[alarm] = -1
|
||||
|
||||
/mob/living/silicon/proc/process_queued_alarms()
|
||||
if(next_alarm_notice && (world.time > next_alarm_notice))
|
||||
next_alarm_notice = 0
|
||||
|
||||
var/alarm_raised = 0
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == 1)
|
||||
alarm_raised = 1
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='warning'>--- [AH.category] Detected ---</span>")
|
||||
raised_alarm(A)
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == -1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='notice'>--- [AH.category] Cleared ---</span>")
|
||||
to_chat(src, "\The [A.alarm_name()].")
|
||||
|
||||
if(alarm_raised)
|
||||
to_chat(src, "<A HREF=?src=\ref[src];showalerts=1>\[Show Alerts\]</A>")
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
alarms.Cut()
|
||||
|
||||
/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A)
|
||||
to_chat(src, "[A.alarm_name()]!")
|
||||
|
||||
/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A)
|
||||
var/cameratext = ""
|
||||
for(var/obj/machinery/camera/C in A.cameras())
|
||||
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
|
||||
to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
|
||||
|
||||
|
||||
/mob/living/silicon/proc/is_traitor()
|
||||
return mind && (mind in traitors.current_antagonists)
|
||||
|
||||
/mob/living/silicon/proc/is_malf()
|
||||
return mind && (mind in malf.current_antagonists)
|
||||
|
||||
/mob/living/silicon/proc/is_malf_or_traitor()
|
||||
return is_traitor() || is_malf()
|
||||
|
||||
/mob/living/silicon/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/reset_view()
|
||||
. = ..()
|
||||
if(cameraFollow)
|
||||
cameraFollow = null
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/clear_client()
|
||||
//Handle job slot/tater cleanup.
|
||||
var/job = mind.assigned_role
|
||||
|
||||
job_master.FreeRole(job)
|
||||
|
||||
if(mind.objectives.len)
|
||||
qdel(mind.objectives)
|
||||
mind.special_role = null
|
||||
|
||||
clear_antag_roles(mind)
|
||||
|
||||
ghostize(0)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/silicon/has_vision()
|
||||
return 0 //NOT REAL EYES
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
default_pixel_y = rand(-6, 10)
|
||||
|
||||
// Makes the AI unable to willingly go on land.
|
||||
/mob/living/simple_mob/animal/passive/fish/IMove(newloc)
|
||||
/mob/living/simple_mob/animal/passive/fish/IMove(turf/newloc, safety = TRUE)
|
||||
if(is_type_in_list(newloc, suitable_turf_types))
|
||||
return ..() // Procede as normal.
|
||||
return MOVEMENT_FAILED // Don't leave the water!
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
chemicals -= 30
|
||||
|
||||
if(host.getToxLoss() >= 30 && chemicals > 50)
|
||||
var/randomchem = pickweight("tramadol" = 7, "anti_toxin" = 15, "frostoil" = 3)
|
||||
var/randomchem = pickweight(list("tramadol" = 7, "anti_toxin" = 15, "frostoil" = 3))
|
||||
host.reagents.add_reagent(randomchem, 5)
|
||||
chemicals -= 50
|
||||
|
||||
@@ -330,10 +330,6 @@
|
||||
if(!host)
|
||||
return
|
||||
|
||||
if(ai_holder)
|
||||
ai_holder.hostile = initial(ai_holder.hostile)
|
||||
ai_holder.lose_target()
|
||||
|
||||
host_bodypart.implants -= src
|
||||
host_bodypart = null
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
|
||||
// Close to mid-ranged shooter that arcs over other things, ideal if allies are in front of it.
|
||||
// Difference from siege hivebots is that siege hivebots have limited charges for their attacks, are very long range, and \
|
||||
// Difference from siege hivebots is that siege hivebots have limited charges for their attacks, are very long range, and
|
||||
// the projectiles have an AoE component, where as backline hivebots do not.
|
||||
/mob/living/simple_mob/mechanical/hivebot/ranged_damage/backline
|
||||
name = "backline hivebot"
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
return L.assess_perp(src, FALSE, FALSE, TRUE, FALSE) <= 3
|
||||
|
||||
// Variant that has high armor pen. Slightly slower attack speed and movement. Meant to be dispersed in groups with other ones
|
||||
/mob/living/simple_mob/mechanical/viscerator/piercing.
|
||||
/mob/living/simple_mob/mechanical/viscerator/piercing
|
||||
attack_armor_pen = 20
|
||||
base_attack_cooldown = 10 // One attack a second or so.
|
||||
movement_cooldown = 0.5
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -169,7 +169,7 @@
|
||||
var/mob/living/carbon/LAssailant = null
|
||||
|
||||
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
|
||||
var/spell/list/spell_list = list()
|
||||
var/list/spell/spell_list = list()
|
||||
|
||||
//Changlings, but can be used in other modes
|
||||
// var/obj/effect/proc_holder/changpower/list/power_list = list()
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if(PM.sub_planes)
|
||||
var/list/subplanes = PM.sub_planes
|
||||
for(var/SP in subplanes)
|
||||
set_vis(which = SP, new_alpha = new_alpha)
|
||||
set_vis(which = SP, state = !!new_alpha)
|
||||
|
||||
/datum/plane_holder/proc/set_ao(var/which = null, var/enabled = FALSE)
|
||||
ASSERT(which)
|
||||
|
||||
@@ -10,5 +10,3 @@
|
||||
return 0
|
||||
else
|
||||
return fail_chance * 2 ** (factor*(SKILL_BASIC - points))
|
||||
|
||||
return FALSE // We don't actually have a skills system, so never fail.
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
size = O.w_class
|
||||
|
||||
user.visible_message(span("notice", "[user] begins to [movtext] \the [hoistee]!"), span("notice", "You begin to [movtext] \the [hoistee]!"), span("notice", "You hear the sound of a crank."))
|
||||
if (do_after(user, (1 SECONDS) * size / 4, act_target = src))
|
||||
if (do_after(user, (1 SECONDS) * size / 4, target = src))
|
||||
move_dir(movedir, 1)
|
||||
|
||||
/obj/structure/hoist/proc/collapse_kit()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
/turf/simulated/open/proc/update()
|
||||
plane = OPENSPACE_PLANE + src.z
|
||||
below = GetBelow(src)
|
||||
turf_changed_event.register(below, src, /turf/simulated/open/update_icon)
|
||||
turf_changed_event.register(below, src, /atom/proc/update_icon)
|
||||
levelupdate()
|
||||
below.update_icon() // So the 'ceiling-less' overlay gets added.
|
||||
for(var/atom/movable/A in src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(. != STATUS_CLOSE)
|
||||
if(loc)
|
||||
. = min(., loc.contents_nano_distance(src_object, src))
|
||||
if(STATUS_INTERACTIVE)
|
||||
if(. == STATUS_INTERACTIVE)
|
||||
return STATUS_UPDATE
|
||||
|
||||
/mob/living/carbon/human/default_can_use_topic(var/src_object)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, master_ui = null, var/datum/topic_state/state = default_state)
|
||||
return
|
||||
|
||||
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
var/obj/mecha/M = owner.loc
|
||||
return M.return_temperature()
|
||||
else if(istype(owner.loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
return owner.loc:air_contents.temperature
|
||||
var/obj/machinery/atmospherics/unary/cryo_cell/cc = owner.loc
|
||||
return cc.air_contents.temperature
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//external organs handle brokenness a bit differently when it comes to damage. Instead brute_dam is checked inside process()
|
||||
//this also ensures that an external organ cannot be "broken" without broken_description being set.
|
||||
/obj/item/organ/external/is_broken()
|
||||
return ((status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN) && (!splinted || (splinted && splinted in src.contents && prob(30))))
|
||||
return ((status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN) && (!splinted || (splinted && (splinted in src.contents) && prob(30))))
|
||||
|
||||
//Determines if we even need to process this organ.
|
||||
/obj/item/organ/external/proc/need_process()
|
||||
@@ -965,12 +965,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
holder = owner
|
||||
if(!holder)
|
||||
return
|
||||
if (holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
||||
if (holder.handcuffed && (body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT)))
|
||||
holder.visible_message(\
|
||||
"\The [holder.handcuffed.name] falls off of [holder.name].",\
|
||||
"\The [holder.handcuffed.name] falls off you.")
|
||||
holder.drop_from_inventory(holder.handcuffed)
|
||||
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
||||
if (holder.legcuffed && (body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)))
|
||||
holder.visible_message(\
|
||||
"\The [holder.legcuffed.name] falls off of [holder.name].",\
|
||||
"\The [holder.legcuffed.name] falls off you.")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(D)
|
||||
if(!D.ckey || !D.client)
|
||||
D.death()
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/organ/external/diona
|
||||
name = "tendril"
|
||||
|
||||
@@ -196,16 +196,17 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
adminfaxes += rcvdcopy
|
||||
|
||||
//message badmins that a fax has arrived
|
||||
if (destination == using_map.boss_name)
|
||||
|
||||
// Sadly, we can't use a switch statement here due to not using a constant value for the current map's centcom name.
|
||||
if(destination == using_map.boss_name)
|
||||
message_admins(sender, "[uppertext(using_map.boss_short)] FAX", rcvdcopy, "CentComFaxReply", "#006100")
|
||||
else if ("Sif Governmental Authority")
|
||||
else if(destination == "Sif Governmental Authority")
|
||||
message_admins(sender, "SIF GOVERNMENT FAX", rcvdcopy, "CentComFaxReply", "#1F66A0")
|
||||
else if ("Supply")
|
||||
else if(destination == "Supply")
|
||||
message_admins(sender, "[uppertext(using_map.boss_short)] SUPPLY FAX", rcvdcopy, "CentComFaxReply", "#5F4519")
|
||||
else
|
||||
message_admins(sender, "[uppertext(destination)] FAX", rcvdcopy, "UNKNOWN")
|
||||
|
||||
|
||||
sendcooldown = 1800
|
||||
sleep(50)
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
|
||||
@@ -90,16 +90,14 @@
|
||||
ui.open()
|
||||
|
||||
/obj/structure/filingcabinet/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["contents"] = list()
|
||||
var/list/files = list()
|
||||
for(var/obj/item/P in src)
|
||||
data["contents"].Add(list(list(
|
||||
files.Add(list(list(
|
||||
"name" = P.name,
|
||||
"ref" = "\ref[P]",
|
||||
)))
|
||||
|
||||
return data
|
||||
return list("contents" = files)
|
||||
|
||||
/obj/structure/filingcabinet/tgui_act(action, params)
|
||||
if(..())
|
||||
@@ -146,7 +144,6 @@
|
||||
P.name = "Security Record ([G.fields["name"]])"
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/security/attack_hand()
|
||||
populate()
|
||||
@@ -184,7 +181,6 @@
|
||||
P.name = "Medical Record ([G.fields["name"]])"
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/medical/attack_hand()
|
||||
populate()
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
var/input_stamp = input(user, "Choose a stamp to disguise as.", "Choose a stamp.") in show_stamps
|
||||
|
||||
if(user && src in user.contents)
|
||||
if(user && (src in user.contents)) // Er, how necessary is this in attack_self?
|
||||
|
||||
var/obj/item/weapon/stamp/chosen_stamp = stamps[capitalize(input_stamp)]
|
||||
|
||||
|
||||
@@ -630,7 +630,6 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
src.use(15)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do that.</span>")
|
||||
..()
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/verb/set_colour()
|
||||
set name = "Change Colour"
|
||||
|
||||
@@ -531,12 +531,10 @@
|
||||
|
||||
if(percent_unstable >= warnpoint) //we're unstable, start warning engineering
|
||||
global_announcer.autosay(warnmessage, "Field Stability Monitor", "Engineering")
|
||||
stable = 0 //we know we're not stable, so let's not state the safe message.
|
||||
sleep(20)
|
||||
return
|
||||
if(percent_unstable < warnpoint && stable == 0) //The field is stable again. Let's set our safe variable and state the safe message.
|
||||
stable = FALSE //we know we're not stable, so let's not state the safe message.
|
||||
else if(percent_unstable < warnpoint && stable == 0) //The field is stable again. Let's set our safe variable and state the safe message.
|
||||
global_announcer.autosay(stablemessage, "Field Stability Monitor", "Engineering")
|
||||
stable = 1
|
||||
stable = TRUE
|
||||
return
|
||||
|
||||
//Reaction radiation is fairly buggy and there's at least three procs dealing with radiation here, this is to ensure constant radiation output.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/obj/machinery/containment_field/Initialize()
|
||||
. = ..()
|
||||
shockdirs = list(turn(dir,90),turn(dir,-90))
|
||||
sense_proximity(callback = .HasProximity)
|
||||
sense_proximity(callback = /atom/proc/HasProximity)
|
||||
|
||||
/obj/machinery/containment_field/set_dir(new_dir)
|
||||
. = ..()
|
||||
@@ -26,7 +26,7 @@
|
||||
shockdirs = list(turn(dir,90),turn(dir,-90))
|
||||
|
||||
/obj/machinery/containment_field/Destroy()
|
||||
unsense_proximity(callback = .HasProximity)
|
||||
unsense_proximity(callback = /atom/proc/HasProximity)
|
||||
if(FG1 && !FG1.clean_up)
|
||||
FG1.cleanup()
|
||||
if(FG2 && !FG2.clean_up)
|
||||
|
||||
@@ -244,7 +244,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
update_state()
|
||||
update_icon()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -384,4 +383,3 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
update_icon()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(!target_mob)
|
||||
return
|
||||
|
||||
if(Bump(target_mob, forced=1)) //If we hit a turf, try to force an interaction with a mob on the turf.
|
||||
if(Bump(target_mob)) //If we hit a turf, try to force an interaction with a mob on the turf.
|
||||
done_mob_unique = TRUE
|
||||
success = TRUE
|
||||
else if(firer)
|
||||
|
||||
@@ -240,7 +240,8 @@
|
||||
/datum/reagent/carthatoline/overdose(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustHalLoss(2)
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.internal_organs_by_name[O_STOMACH].take_damage(removed * 2) // Causes stomach contractions, makes sense for an overdose to make it much worse.
|
||||
var/obj/item/organ/internal/stomach/st = H.internal_organs_by_name[O_STOMACH]
|
||||
st?.take_damage(removed * 2) // Causes stomach contractions, makes sense for an overdose to make it much worse.
|
||||
|
||||
/datum/reagent/dexalin
|
||||
name = "Dexalin"
|
||||
@@ -611,7 +612,8 @@
|
||||
..()
|
||||
if(prob(5)) // 1 in 20
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.internal_organs_by_name[O_HEART].take_damage(1)
|
||||
var/obj/item/organ/internal/heart/ht = H.internal_organs_by_name[O_HEART]
|
||||
ht?.take_damage(1)
|
||||
to_chat(M, "<span class='warning'>Huh... Is this what a heart attack feels like?</span>")
|
||||
|
||||
/datum/reagent/alkysine
|
||||
|
||||
@@ -246,7 +246,8 @@
|
||||
..()
|
||||
if(prob(10)) // 1 in 10. This thing's made with welder fuel and fertilizer, what do you expect?
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.internal_organs_by_name[O_HEART].take_damage(1)
|
||||
var/obj/item/organ/internal/heart/ht = H.internal_organs_by_name[O_HEART]
|
||||
ht?.take_damage(1)
|
||||
to_chat(M, "<span class='warning'>Huh... Is this what a heart attack feels like?</span>")
|
||||
|
||||
/datum/reagent/toxin/potassium_chloride
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
ptype = newtype
|
||||
dir = newdir
|
||||
// Disposals handle "bent"/"corner" strangely, handle this specially.
|
||||
if(ptype == DISPOSAL_PIPE_STRAIGHT && dir in cornerdirs)
|
||||
if(ptype == DISPOSAL_PIPE_STRAIGHT && (dir in cornerdirs))
|
||||
ptype = DISPOSAL_PIPE_CORNER
|
||||
switch(dir)
|
||||
if(NORTHWEST)
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
|
||||
Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["nextTag"] && href_list["nextTag"] in GLOB.tagger_locations)
|
||||
if(href_list["nextTag"] && (href_list["nextTag"] in GLOB.tagger_locations))
|
||||
src.currTag = href_list["nextTag"]
|
||||
openwindow(usr)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
client/verb/tcssave()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || issilicon(mob))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode != mob)
|
||||
return
|
||||
@@ -28,7 +28,7 @@ client/verb/tcssave()
|
||||
client/verb/tcscompile()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode != mob)
|
||||
return
|
||||
@@ -79,7 +79,7 @@ client/verb/tcscompile()
|
||||
client/verb/tcsrun()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode != mob)
|
||||
return
|
||||
@@ -145,7 +145,7 @@ client/verb/tcsrun()
|
||||
client/verb/exittcs()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode == mob)
|
||||
Machine.storedcode = "[winget(mob, "tcscode", "text")]"
|
||||
@@ -157,7 +157,7 @@ client/verb/exittcs()
|
||||
client/verb/tcsrevert()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode != mob)
|
||||
return
|
||||
@@ -186,7 +186,7 @@ client/verb/tcsrevert()
|
||||
client/verb/tcsclearmem()
|
||||
set hidden = 1
|
||||
if(mob.machine || issilicon(mob))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
|
||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||
if(Machine.editingcode != mob)
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
|
||||
if((access_captain in C.access) || (access_security in C.access) || (access_engine in C.access))
|
||||
src.locked = !src.locked
|
||||
to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
|
||||
updateDialog()
|
||||
@@ -59,7 +59,7 @@
|
||||
owned_gen.capacitors |= src
|
||||
owned_gen.updateDialog()
|
||||
else
|
||||
if(owned_gen && src in owned_gen.capacitors)
|
||||
if(owned_gen && (src in owned_gen.capacitors))
|
||||
owned_gen.capacitors -= src
|
||||
owned_gen = null
|
||||
else
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = W
|
||||
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
|
||||
if((access_captain in C.access) || (access_security in C.access) || (access_engine in C.access))
|
||||
src.locked = !src.locked
|
||||
to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
|
||||
updateDialog()
|
||||
@@ -110,36 +110,35 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shield_gen/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/lockedData = list()
|
||||
|
||||
data["locked"] = locked
|
||||
data["lockedData"] = list()
|
||||
if(!locked)
|
||||
data["lockedData"]["capacitors"] = list()
|
||||
var/list/caps = list()
|
||||
for(var/obj/machinery/shield_capacitor/C in capacitors)
|
||||
data["lockedData"]["capacitors"].Add(list(list(
|
||||
caps.Add(list(list(
|
||||
"active" = C.active,
|
||||
"stored_charge" = C.stored_charge,
|
||||
"max_charge" = C.max_charge,
|
||||
"failing" = (C.time_since_fail <= 2),
|
||||
)))
|
||||
lockedData["capacitors"] = caps
|
||||
|
||||
data["lockedData"]["active"] = active
|
||||
data["lockedData"]["failing"] = (time_since_fail <= 2)
|
||||
data["lockedData"]["radius"] = field_radius
|
||||
data["lockedData"]["max_radius"] = max_field_radius
|
||||
data["lockedData"]["z_range"] = z_range
|
||||
data["lockedData"]["max_z_range"] = 10
|
||||
data["lockedData"]["average_field_strength"] = average_field_strength
|
||||
data["lockedData"]["target_field_strength"] = target_field_strength
|
||||
data["lockedData"]["max_field_strength"] = max_field_strength
|
||||
data["lockedData"]["shields"] = LAZYLEN(field)
|
||||
data["lockedData"]["upkeep"] = round(field.len * max(average_field_strength * dissipation_rate, min_dissipation) / energy_conversion_rate)
|
||||
data["lockedData"]["strengthen_rate"] = strengthen_rate
|
||||
data["lockedData"]["max_strengthen_rate"] = max_strengthen_rate
|
||||
data["lockedData"]["gen_power"] = round(field.len * min(strengthen_rate, target_field_strength - average_field_strength) / energy_conversion_rate)
|
||||
lockedData["active"] = active
|
||||
lockedData["failing"] = (time_since_fail <= 2)
|
||||
lockedData["radius"] = field_radius
|
||||
lockedData["max_radius"] = max_field_radius
|
||||
lockedData["z_range"] = z_range
|
||||
lockedData["max_z_range"] = 10
|
||||
lockedData["average_field_strength"] = average_field_strength
|
||||
lockedData["target_field_strength"] = target_field_strength
|
||||
lockedData["max_field_strength"] = max_field_strength
|
||||
lockedData["shields"] = LAZYLEN(field)
|
||||
lockedData["upkeep"] = round(field.len * max(average_field_strength * dissipation_rate, min_dissipation) / energy_conversion_rate)
|
||||
lockedData["strengthen_rate"] = strengthen_rate
|
||||
lockedData["max_strengthen_rate"] = max_strengthen_rate
|
||||
lockedData["gen_power"] = round(field.len * min(strengthen_rate, target_field_strength - average_field_strength) / energy_conversion_rate)
|
||||
|
||||
return data
|
||||
return list("locked" = locked, "lockedData" = lockedData)
|
||||
|
||||
/obj/machinery/shield_gen/process()
|
||||
if (!anchored && active)
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
if((. = ..()))
|
||||
return
|
||||
|
||||
if("manual_arm")
|
||||
if(href_list["manual_arm"])
|
||||
pod.arming_controller.arm()
|
||||
return TOPIC_REFRESH
|
||||
if("force_launch")
|
||||
if(href_list["force_launch"])
|
||||
if (pod.can_force())
|
||||
pod.force_launch(src)
|
||||
else if (emergency_shuttle.departed && pod.can_launch()) //allow players to manually launch ahead of time if the shuttle leaves
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
return current_destination.routes.Copy()
|
||||
|
||||
/datum/shuttle_web_master/proc/get_current_destination()
|
||||
RETURN_TYPE(/datum/shuttle_destination)
|
||||
return current_destination
|
||||
|
||||
/datum/shuttle_web_master/proc/get_destination_by_type(var/type_to_get)
|
||||
|
||||
@@ -277,7 +277,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(level_max[Sp_TOTAL] <= ( spell_levels[Sp_SPEED] + spell_levels[Sp_POWER] )) //too many levels, can't do it
|
||||
return 0
|
||||
|
||||
if(upgrade_type && upgrade_type in spell_levels && upgrade_type in level_max)
|
||||
if(upgrade_type && (upgrade_type in spell_levels) && (upgrade_type in level_max))
|
||||
if(spell_levels[upgrade_type] >= level_max[upgrade_type])
|
||||
return 0
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/fireball/recoil(mob/user as mob)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
explosion(user.loc, -1, 0, 2, 3, 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke
|
||||
|
||||
@@ -466,20 +466,3 @@
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// HEART SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// To be finished after some tests.
|
||||
// /datum/surgery_step/ribcage/heart/cut
|
||||
// allowed_tools = list(
|
||||
// /obj/item/weapon/surgical/scalpel = 100, \
|
||||
// /obj/item/weapon/material/knife = 75, \
|
||||
// /obj/item/weapon/material/shard = 50, \
|
||||
// )
|
||||
|
||||
// min_duration = 30
|
||||
// max_duration = 40
|
||||
|
||||
// /datum/surgery_step/ribcage/heart/cut/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// return ..() && target.op_stage.ribcage == 2
|
||||
@@ -120,7 +120,7 @@
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
..()
|
||||
|
||||
/obj/structure/table/alien/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||
/obj/structure/table/alien/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
/obj/structure/table/rack/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
if(monitored_alarm_ids)
|
||||
for(var/obj/machinery/alarm/alarm in machines)
|
||||
if(alarm.alarm_id && alarm.alarm_id in monitored_alarm_ids)
|
||||
if(alarm.alarm_id && (alarm.alarm_id in monitored_alarm_ids))
|
||||
monitored_alarms += alarm
|
||||
// machines may not yet be ordered at this point
|
||||
monitored_alarms = dd_sortedObjectList(monitored_alarms)
|
||||
|
||||
@@ -117,10 +117,10 @@
|
||||
|
||||
data["doors_open"] = lift.doors_are_open()
|
||||
|
||||
data["floors"] = list()
|
||||
var/list/floors = list()
|
||||
for(var/i in lift.floors.len to 1 step -1)
|
||||
var/datum/turbolift_floor/floor = lift.floors[i]
|
||||
data["floors"].Add(list(list(
|
||||
floors.Add(list(list(
|
||||
"id" = i,
|
||||
"ref" = "\ref[floor]",
|
||||
"queued" = (floor in lift.queued_floors),
|
||||
@@ -129,6 +129,7 @@
|
||||
"label" = floor.label,
|
||||
"name" = floor.name,
|
||||
)))
|
||||
data["floors"] = floors
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -176,7 +176,6 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
/proc/jsEncode(var/list/message) {
|
||||
if(!islist(message))
|
||||
CRASH("Passed a non-list to encode.")
|
||||
return; //Necessary?
|
||||
|
||||
return url_encode(url_encode(json_encode(message)))
|
||||
}
|
||||
|
||||
@@ -246,17 +246,18 @@ var/global/list/virusDB = list()
|
||||
"rate" = stageprob * 10,
|
||||
"resistance" = resistance,
|
||||
"species" = jointext(affected_species, ", "),
|
||||
"symptoms" = list(),
|
||||
"ref" = "\ref[src]",
|
||||
)
|
||||
|
||||
|
||||
var/list/symptoms = list()
|
||||
for(var/datum/disease2/effectholder/E in effects)
|
||||
.["symptoms"].Add(list(list(
|
||||
symptoms.Add(list(list(
|
||||
"stage" = E.stage,
|
||||
"name" = E.effect.name,
|
||||
"strength" = "[E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"]",
|
||||
"aggressiveness" = E.chance * 15,
|
||||
)))
|
||||
.["symptoms"] = symptoms
|
||||
|
||||
/datum/disease2/disease/proc/addToDB()
|
||||
if ("[uniqueID]" in virusDB)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
/obj/item/weapon/vampiric/hear_talk(mob/M, list/message_pieces, verb)
|
||||
..()
|
||||
if(world.time - last_bloodcall >= bloodcall_interval && M in view(7, src))
|
||||
if(world.time - last_bloodcall >= bloodcall_interval && (M in view(7, src)))
|
||||
bloodcall(M)
|
||||
|
||||
/obj/item/weapon/vampiric/proc/bloodcall(var/mob/living/carbon/human/M)
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
|
||||
|
||||
//Equalizes a list of gas mixtures. Used for pipe networks.
|
||||
/proc/equalize_gases(datum/gas_mixture/list/gases)
|
||||
/proc/equalize_gases(list/datum/gas_mixture/gases)
|
||||
//Calculate totals from individual components
|
||||
var/total_volume = 0
|
||||
var/total_thermal_energy = 0
|
||||
|
||||
Reference in New Issue
Block a user