mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-28 23:51:49 +01:00
Linter Introduction + Cleanup
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"
|
||||
|
||||
@@ -1392,15 +1392,15 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
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,15 +30,25 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
|
||||
<<<<<<< HEAD
|
||||
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>"
|
||||
for(var/client/C in GLOB.admins)
|
||||
=======
|
||||
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)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
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)
|
||||
<<<<<<< HEAD
|
||||
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>"
|
||||
for(var/client/C in GLOB.admins)
|
||||
=======
|
||||
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)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
if(R_ADMIN|R_EVENT & C.holder.rights)
|
||||
to_chat(C,msg)
|
||||
C << 'sound/machines/signal.ogg'
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -936,7 +936,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
|
||||
@@ -961,7 +961,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
|
||||
@@ -1025,7 +1025,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,18 @@
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!target)
|
||||
<<<<<<< HEAD
|
||||
if(ai_card)
|
||||
if(istype(ai_card,/obj/item/device/aicard))
|
||||
ai_card.tgui_interact(H, custom_state = GLOB.tgui_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)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
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
|
||||
|
||||
|
||||
@@ -31,9 +31,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
|
||||
|
||||
@@ -233,7 +233,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.
|
||||
|
||||
@@ -74,8 +74,13 @@
|
||||
/obj/effect/plant/Destroy()
|
||||
neighbors.Cut()
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
<<<<<<< HEAD
|
||||
unsense_proximity(callback = .HasProximity, center = get_turf(src))
|
||||
SSplants.remove_plant(src)
|
||||
=======
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = get_turf(src))
|
||||
plant_controller.remove_plant(src)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
SSplants.add_plant(neighbor)
|
||||
return ..()
|
||||
@@ -108,7 +113,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
|
||||
|
||||
@@ -217,7 +217,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
|
||||
|
||||
@@ -144,7 +144,7 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
|
||||
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
|
||||
@@ -170,7 +170,7 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
|
||||
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
|
||||
|
||||
|
||||
@@ -158,8 +158,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/points = 0
|
||||
@@ -329,3 +329,4 @@
|
||||
#undef PROCESS_SMELT
|
||||
#undef PROCESS_COMPRESS
|
||||
#undef PROCESS_ALLOY
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/mob/observer
|
||||
name = "observer"
|
||||
desc = "This shouldn't appear"
|
||||
@@ -964,3 +965,917 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
set name = "Respawn"
|
||||
set category = "Ghost"
|
||||
src.abandon_mob()
|
||||
=======
|
||||
/mob/observer
|
||||
name = "observer"
|
||||
desc = "This shouldn't appear"
|
||||
density = 0
|
||||
|
||||
/mob/observer/dead
|
||||
name = "ghost"
|
||||
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
|
||||
icon = 'icons/mob/ghost.dmi'
|
||||
icon_state = "ghost"
|
||||
stat = DEAD
|
||||
canmove = 0
|
||||
blinded = 0
|
||||
anchored = 1 // don't get pushed around
|
||||
|
||||
var/can_reenter_corpse
|
||||
var/datum/hud/living/carbon/hud = null // hud
|
||||
var/bootime = 0
|
||||
var/started_as_observer //This variable is set to 1 when you enter the game as an observer.
|
||||
//If you died in the game and are a ghsot - this will remain as null.
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
var/has_enabled_antagHUD = 0
|
||||
var/medHUD = 0
|
||||
var/secHUD = 0
|
||||
var/antagHUD = 0
|
||||
universal_speak = 1
|
||||
var/atom/movable/following = null
|
||||
var/admin_ghosted = 0
|
||||
var/anonsay = 0
|
||||
var/ghostvision = 1 //is the ghost able to see things humans can't?
|
||||
incorporeal_move = 1
|
||||
|
||||
var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil.
|
||||
var/ghost_sprite = null
|
||||
var/global/list/possible_ghost_sprites = list(
|
||||
"Clear" = "blank",
|
||||
"Green Blob" = "otherthing",
|
||||
"Bland" = "ghost",
|
||||
"Robed-B" = "ghost1",
|
||||
"Robed-BAlt" = "ghost2",
|
||||
"King" = "ghostking",
|
||||
"Shade" = "shade",
|
||||
"Hecate" = "ghost-narsie",
|
||||
"Glowing Statue" = "armour",
|
||||
"Artificer" = "artificer",
|
||||
"Behemoth" = "behemoth",
|
||||
"Harvester" = "harvester",
|
||||
"Wraith" = "wraith",
|
||||
"Viscerator" = "viscerator",
|
||||
"Corgi" = "corgi",
|
||||
"Tamaskan" = "tamaskan",
|
||||
"Black Cat" = "blackcat",
|
||||
"Lizard" = "lizard",
|
||||
"Goat" = "goat",
|
||||
"Space Bear" = "bear",
|
||||
"Bats" = "bat",
|
||||
"Chicken" = "chicken_white",
|
||||
"Parrot"= "parrot_fly",
|
||||
"Goose" = "goose",
|
||||
"Penguin" = "penguin",
|
||||
"Brown Crab" = "crab",
|
||||
"Gray Crab" = "evilcrab",
|
||||
"Trout" = "trout-swim",
|
||||
"Salmon" = "salmon-swim",
|
||||
"Pike" = "pike-swim",
|
||||
"Koi" = "koi-swim",
|
||||
"Carp" = "carp",
|
||||
"Red Robes" = "robe_red",
|
||||
"Faithless" = "faithless",
|
||||
"Shadowform" = "forgotten",
|
||||
"Dark Ethereal" = "bloodguardian",
|
||||
"Holy Ethereal" = "lightguardian",
|
||||
"Red Elemental" = "magicRed",
|
||||
"Blue Elemental" = "magicBlue",
|
||||
"Pink Elemental" = "magicPink",
|
||||
"Orange Elemental" = "magicOrange",
|
||||
"Green Elemental" = "magicGreen",
|
||||
"Daemon" = "daemon",
|
||||
"Guard Spider" = "guard",
|
||||
"Hunter Spider" = "hunter",
|
||||
"Nurse Spider" = "nurse",
|
||||
"Rogue Drone" = "drone",
|
||||
"ED-209" = "ed209",
|
||||
"Beepsky" = "secbot"
|
||||
)
|
||||
var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners.
|
||||
var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns
|
||||
|
||||
/mob/observer/dead/New(mob/body)
|
||||
|
||||
appearance = body
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = PLANE_GHOSTS
|
||||
alpha = 127
|
||||
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but...
|
||||
verbs += /mob/observer/dead/proc/dead_tele
|
||||
|
||||
var/turf/T
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
|
||||
gender = body.gender
|
||||
if(body.mind && body.mind.name)
|
||||
name = body.mind.name
|
||||
else
|
||||
if(body.real_name)
|
||||
name = body.real_name
|
||||
else
|
||||
if(gender == MALE)
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
else
|
||||
name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
|
||||
mind = body.mind //we don't transfer the mind but we keep a reference to it.
|
||||
|
||||
// Fix for naked ghosts.
|
||||
// Unclear why this isn't being grabbed by appearance.
|
||||
if(ishuman(body))
|
||||
var/mob/living/carbon/human/H = body
|
||||
add_overlay(H.overlays_standing)
|
||||
|
||||
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||
forceMove(T)
|
||||
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
..()
|
||||
|
||||
/mob/observer/dead/Topic(href, href_list)
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"]) in mob_list
|
||||
if(target)
|
||||
ManualFollow(target)
|
||||
if(href_list["reenter"])
|
||||
reenter_corpse()
|
||||
return
|
||||
|
||||
/mob/observer/dead/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/book/tome))
|
||||
var/mob/observer/dead/M = src
|
||||
M.manifest(user)
|
||||
|
||||
/mob/observer/dead/CanPass(atom/movable/mover, turf/target)
|
||||
return TRUE
|
||||
|
||||
/mob/observer/dead/set_stat(var/new_stat)
|
||||
if(new_stat != DEAD)
|
||||
CRASH("It is best if observers stay dead, thank you.")
|
||||
|
||||
/mob/observer/dead/examine_icon()
|
||||
var/icon/I = get_cached_examine_icon(src)
|
||||
if(!I)
|
||||
I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE)
|
||||
set_cached_examine_icon(src, I, 200 SECONDS)
|
||||
return I
|
||||
|
||||
/mob/observer/dead/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
if(is_admin(user))
|
||||
. += "\t><span class='admin'>[ADMIN_FULLMONTY(src)]</span>"
|
||||
|
||||
/*
|
||||
Transfer_mind is there to check if mob is being deleted/not going to have a body.
|
||||
Works together with spawning an observer, noted above.
|
||||
*/
|
||||
|
||||
/mob/observer/dead/Life()
|
||||
..()
|
||||
if(!loc) return
|
||||
if(!client) return 0
|
||||
|
||||
handle_regular_hud_updates()
|
||||
handle_vision()
|
||||
|
||||
/mob/proc/ghostize(var/can_reenter_corpse = 1)
|
||||
if(key)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.vr_holder && !can_reenter_corpse)
|
||||
H.exit_vr()
|
||||
return 0
|
||||
var/mob/observer/dead/ghost = new(src) //Transfer safety to observer spawning proc.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
|
||||
ghost.key = key
|
||||
if(istype(loc, /obj/structure/morgue))
|
||||
var/obj/structure/morgue/M = loc
|
||||
M.update()
|
||||
else if(istype(loc, /obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = loc
|
||||
B.update()
|
||||
if(ghost.client)
|
||||
ghost.client.time_died_as_mouse = ghost.timeofdeath
|
||||
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
/*
|
||||
This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues.
|
||||
*/
|
||||
/mob/living/verb/ghost()
|
||||
set category = "OOC"
|
||||
set name = "Ghost"
|
||||
set desc = "Relinquish your life and enter the land of the dead."
|
||||
|
||||
if(stat == DEAD && !forbid_seeing_deadchat)
|
||||
announce_ghost_joinleave(ghostize(1))
|
||||
else
|
||||
var/response
|
||||
if(src.client && src.client.holder)
|
||||
response = alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", "Ghost", "Admin Ghost", "Stay in body")
|
||||
if(response == "Admin Ghost")
|
||||
if(!src.client)
|
||||
return
|
||||
src.client.admin_ghost()
|
||||
else
|
||||
response = alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. If you ghost, you won't be able to play this round until you respawn as a new character! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body")
|
||||
if(response != "Ghost")
|
||||
return
|
||||
resting = 1
|
||||
var/turf/location = get_turf(src)
|
||||
var/special_role = check_special_role()
|
||||
if(!istype(loc,/obj/machinery/cryopod))
|
||||
log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
|
||||
else if(special_role)
|
||||
log_and_message_admins("has ghosted in cryo as [special_role]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
|
||||
var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
if(ghost)
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
ghost.set_respawn_timer()
|
||||
announce_ghost_joinleave(ghost)
|
||||
|
||||
/mob/observer/dead/can_use_hands() return 0
|
||||
/mob/observer/dead/is_active() return 0
|
||||
|
||||
/mob/observer/dead/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
/mob/observer/dead/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!client) return
|
||||
if(!(mind && mind.current && can_reenter_corpse))
|
||||
to_chat(src, "<span class='warning'>You have no body.</span>")
|
||||
return
|
||||
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, "<span class='warning'>Another consciousness is in your body... it is resisting you.</span>")
|
||||
return
|
||||
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
|
||||
var/found_rune
|
||||
for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune
|
||||
if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune.
|
||||
found_rune = 1
|
||||
break
|
||||
if(!found_rune)
|
||||
to_chat(usr, "<span class='warning'>The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.</span>")
|
||||
return
|
||||
mind.current.ajourn=0
|
||||
mind.current.key = key
|
||||
mind.current.teleop = null
|
||||
if(istype(mind.current.loc, /obj/structure/morgue))
|
||||
var/obj/structure/morgue/M = mind.current.loc
|
||||
M.update(1)
|
||||
else if(istype(mind.current.loc, /obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = mind.current.loc
|
||||
B.update(1)
|
||||
if(!admin_ghosted)
|
||||
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
|
||||
return 1
|
||||
|
||||
/mob/observer/dead/verb/toggle_medHUD()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle MedicHUD"
|
||||
set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
|
||||
|
||||
medHUD = !medHUD
|
||||
plane_holder.set_vis(VIS_CH_HEALTH, medHUD)
|
||||
plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD)
|
||||
to_chat(src, "<font color='blue'><B>Medical HUD [medHUD ? "Enabled" : "Disabled"]</B></font>")
|
||||
|
||||
/mob/observer/dead/verb/toggle_secHUD()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Security HUD"
|
||||
set desc = "Toggles Security HUD allowing you to see people's displayed ID's job, wanted status, etc"
|
||||
|
||||
secHUD = !secHUD
|
||||
plane_holder.set_vis(VIS_CH_ID, secHUD)
|
||||
plane_holder.set_vis(VIS_CH_WANTED, secHUD)
|
||||
plane_holder.set_vis(VIS_CH_IMPTRACK, secHUD)
|
||||
plane_holder.set_vis(VIS_CH_IMPLOYAL, secHUD)
|
||||
plane_holder.set_vis(VIS_CH_IMPCHEM, secHUD)
|
||||
to_chat(src, "<font color='blue'><B>Security HUD [secHUD ? "Enabled" : "Disabled"]</B></font>")
|
||||
|
||||
/mob/observer/dead/verb/toggle_antagHUD()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle AntagHUD"
|
||||
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
|
||||
|
||||
if(!config.antag_hud_allowed && !client.holder)
|
||||
to_chat(src, "<font color='red'>Admins have disabled this for this round.</font>")
|
||||
return
|
||||
if(jobban_isbanned(src, "AntagHUD"))
|
||||
to_chat(src, "<font color='red'><B>You have been banned from using this feature</B></font>")
|
||||
return
|
||||
if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder)
|
||||
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
|
||||
if(response == "No") return
|
||||
can_reenter_corpse = FALSE
|
||||
set_respawn_timer(-1) // Foreeeever
|
||||
if(!has_enabled_antagHUD && !client.holder)
|
||||
has_enabled_antagHUD = TRUE
|
||||
|
||||
antagHUD = !antagHUD
|
||||
plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD)
|
||||
to_chat(src, "<font color='blue'><B>AntagHUD [antagHUD ? "Enabled" : "Disabled"]</B></font>")
|
||||
|
||||
/mob/observer/dead/proc/dead_tele(var/area/A in return_sorted_areas())
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc = "Teleport to a location"
|
||||
|
||||
if(!istype(usr, /mob/observer/dead))
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
|
||||
if(!A)
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in return_sorted_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
usr.on_mob_jump()
|
||||
|
||||
/mob/observer/dead/verb/follow(input in getmobs())
|
||||
set category = "Ghost"
|
||||
set name = "Follow" // "Haunt"
|
||||
set desc = "Follow and haunt a mob."
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
ManualFollow(target)
|
||||
|
||||
// This is the ghost's follow verb with an argument
|
||||
/mob/observer/dead/proc/ManualFollow(var/atom/movable/target)
|
||||
if(!target)
|
||||
return
|
||||
|
||||
var/turf/targetloc = get_turf(target)
|
||||
if(check_holy(targetloc))
|
||||
to_chat(usr, "<span class='warning'>You cannot follow a mob standing on holy grounds!</span>")
|
||||
return
|
||||
if(target != src)
|
||||
if(following && following == target)
|
||||
return
|
||||
following = target
|
||||
to_chat(src, "<span class='notice'>Now following [target]</span>")
|
||||
if(ismob(target))
|
||||
forceMove(get_turf(target))
|
||||
var/mob/M = target
|
||||
M.following_mobs += src
|
||||
else
|
||||
spawn(0)
|
||||
while(target && following == target && client)
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
break
|
||||
// To stop the ghost flickering.
|
||||
if(loc != T)
|
||||
forceMove(T)
|
||||
sleep(15)
|
||||
|
||||
var/icon/I = icon(target.icon,target.icon_state,target.dir)
|
||||
|
||||
var/orbitsize = (I.Width()+I.Height())*0.5
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
var/rot_seg
|
||||
|
||||
/* We don't have this pref yet
|
||||
switch(ghost_orbit)
|
||||
if(GHOST_ORBIT_TRIANGLE)
|
||||
rot_seg = 3
|
||||
if(GHOST_ORBIT_SQUARE)
|
||||
rot_seg = 4
|
||||
if(GHOST_ORBIT_PENTAGON)
|
||||
rot_seg = 5
|
||||
if(GHOST_ORBIT_HEXAGON)
|
||||
rot_seg = 6
|
||||
else //Circular
|
||||
rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle
|
||||
*/
|
||||
|
||||
orbit(target, orbitsize, FALSE, 20, rot_seg)
|
||||
|
||||
/mob/observer/dead/orbit()
|
||||
set_dir(2) //reset dir so the right directional sprites show up
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/stop_orbit()
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
pixel_x = 0
|
||||
transform = null
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
/mob/observer/dead/proc/stop_following()
|
||||
following = null
|
||||
stop_orbit()
|
||||
|
||||
/mob/proc/update_following()
|
||||
. = get_turf(src)
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
if(M.following != src)
|
||||
following_mobs -= M
|
||||
else
|
||||
if(M.loc != .)
|
||||
M.forceMove(.)
|
||||
|
||||
/mob
|
||||
var/list/following_mobs = list()
|
||||
|
||||
/mob/Destroy()
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
M.stop_following()
|
||||
following_mobs = null
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/Destroy()
|
||||
if(ismob(following))
|
||||
var/mob/M = following
|
||||
M.following_mobs -= src
|
||||
stop_following()
|
||||
return ..()
|
||||
|
||||
/mob/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
update_following()
|
||||
|
||||
/mob/Life()
|
||||
// to catch teleports etc which directly set loc
|
||||
update_following()
|
||||
return ..()
|
||||
|
||||
/mob/proc/check_holy(var/turf/T)
|
||||
return 0
|
||||
|
||||
/mob/observer/dead/check_holy(var/turf/T)
|
||||
if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src))
|
||||
return 0
|
||||
|
||||
return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists))
|
||||
|
||||
/mob/observer/dead/verb/jumptomob(input in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
set desc = "Teleport to a mob"
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
return
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
stop_following()
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
|
||||
/mob/observer/dead/memory()
|
||||
set hidden = 1
|
||||
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
|
||||
|
||||
/mob/observer/dead/add_memory()
|
||||
set hidden = 1
|
||||
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
|
||||
|
||||
/mob/observer/dead/Post_Incorpmove()
|
||||
stop_following()
|
||||
|
||||
/mob/observer/dead/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
|
||||
if(!istype(usr, /mob/observer/dead)) return
|
||||
|
||||
// Shamelessly copied from the Gas Analyzers
|
||||
if (!( istype(usr.loc, /turf) ))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = usr.loc.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles
|
||||
|
||||
to_chat(src, "<font color='blue'><B>Results:</B></font>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(src, "<font color='blue'>Pressure: [round(pressure,0.1)] kPa</font>")
|
||||
else
|
||||
to_chat(src, "<font color='red'>Pressure: [round(pressure,0.1)] kPa</font>")
|
||||
if(total_moles)
|
||||
for(var/g in environment.gas)
|
||||
to_chat(src, "<font color='blue'>[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)</font>")
|
||||
to_chat(src, "<font color='blue'>Temperature: [round(environment.temperature-T0C,0.1)]°C ([round(environment.temperature,0.1)]K)</font>")
|
||||
to_chat(src, "<font color='blue'>Heat Capacity: [round(environment.heat_capacity(),0.1)]</font>")
|
||||
|
||||
/mob/observer/dead/verb/check_radiation()
|
||||
set name = "Check Radiation"
|
||||
set category = "Ghost"
|
||||
|
||||
var/turf/t = get_turf(src)
|
||||
if(t)
|
||||
var/rads = SSradiation.get_rads_at_turf(t)
|
||||
to_chat(src, "<span class='notice'>Radiation level: [rads ? rads : "0"] Bq.</span>")
|
||||
|
||||
|
||||
/mob/observer/dead/verb/become_mouse()
|
||||
set name = "Become mouse"
|
||||
set category = "Ghost"
|
||||
|
||||
if(config.disable_player_mice)
|
||||
to_chat(src, "<span class='warning'>Spawning as a mouse is currently disabled.</span>")
|
||||
return
|
||||
|
||||
if(!MayRespawn(1))
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || (T.z in using_map.admin_levels))
|
||||
to_chat(src, "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>")
|
||||
return
|
||||
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>")
|
||||
return
|
||||
|
||||
var/response = alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?","Squeek!","Nope!")
|
||||
if(response != "Squeek!") return //Hit the wrong key...again.
|
||||
|
||||
|
||||
//find a viable mouse candidate
|
||||
var/mob/living/simple_mob/animal/passive/mouse/host
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/list/found_vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
|
||||
if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20)
|
||||
found_vents.Add(v)
|
||||
if(found_vents.len)
|
||||
vent_found = pick(found_vents)
|
||||
host = new /mob/living/simple_mob/animal/passive/mouse(vent_found)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
|
||||
|
||||
if(host)
|
||||
if(config.uneducated_mice)
|
||||
host.universal_understand = 0
|
||||
announce_ghost_joinleave(src, 0, "They are now a mouse.")
|
||||
host.ckey = src.ckey
|
||||
host.add_ventcrawl(vent_found)
|
||||
to_chat(host, "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>")
|
||||
|
||||
/mob/observer/dead/verb/view_manfiest()
|
||||
set name = "Show Crew Manifest"
|
||||
set category = "Ghost"
|
||||
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += data_core.get_manifest()
|
||||
|
||||
src << browse(dat, "window=manifest;size=370x420;can_close=1")
|
||||
|
||||
//This is called when a ghost is drag clicked to something.
|
||||
/mob/observer/dead/MouseDrop(atom/over)
|
||||
if(!usr || !over) return
|
||||
if (isobserver(usr) && usr.client && usr.client.holder && isliving(over))
|
||||
if (usr.client.holder.cmd_ghost_drag(src,over))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
//Used for drawing on walls with blood puddles as a spooky ghost.
|
||||
/mob/observer/dead/verb/bloody_doodle()
|
||||
|
||||
set category = "Ghost"
|
||||
set name = "Write in blood"
|
||||
set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC."
|
||||
|
||||
if(!(config.cult_ghostwriter))
|
||||
to_chat(src, "<font color='red'>That verb is not currently permitted.</font>")
|
||||
return
|
||||
|
||||
if (!src.stat)
|
||||
return
|
||||
|
||||
if (usr != src)
|
||||
return 0 //something is terribly wrong
|
||||
|
||||
var/ghosts_can_write
|
||||
if(ticker.mode.name == "cult")
|
||||
if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists)
|
||||
ghosts_can_write = 1
|
||||
|
||||
if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such.
|
||||
to_chat(src, "<font color='red'>The veil is not thin enough for you to do that.</font>")
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.amount > 0)
|
||||
choices += B
|
||||
|
||||
if(!choices.len)
|
||||
to_chat(src, "<span class = 'warning'>There is no blood to use nearby.</span>")
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices
|
||||
|
||||
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
|
||||
var/turf/simulated/T = src.loc
|
||||
if (direction != "Here")
|
||||
T = get_step(T,text2dir(direction))
|
||||
|
||||
if (!istype(T))
|
||||
to_chat(src, "<span class='warning'>You cannot doodle there.</span>")
|
||||
return
|
||||
|
||||
if(!choice || choice.amount == 0 || !(src.Adjacent(choice)))
|
||||
return
|
||||
|
||||
var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808"
|
||||
|
||||
var/num_doodles = 0
|
||||
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
|
||||
num_doodles++
|
||||
if (num_doodles > 4)
|
||||
to_chat(src, "<span class='warning'>There is no space to write on!</span>")
|
||||
return
|
||||
|
||||
var/max_length = 50
|
||||
|
||||
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
|
||||
|
||||
if (message)
|
||||
|
||||
if (length(message) > max_length)
|
||||
message += "-"
|
||||
to_chat(src, "<span class='warning'>You ran out of blood to write with!</span>")
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
|
||||
W.basecolor = doodle_color
|
||||
W.update_icon()
|
||||
W.message = message
|
||||
W.add_hiddenprint(src)
|
||||
W.visible_message("<font color='red'>Invisible fingers crudely paint something in blood on [T]...</font>")
|
||||
|
||||
/mob/observer/dead/pointed(atom/A as mob|obj|turf in view())
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
|
||||
return 1
|
||||
|
||||
/mob/observer/dead/proc/manifest(mob/user)
|
||||
is_manifest = TRUE
|
||||
verbs |= /mob/observer/dead/proc/toggle_visibility
|
||||
verbs |= /mob/observer/dead/proc/ghost_whisper
|
||||
to_chat(src, "<font color='purple'>As you are now in the realm of the living, you can whisper to the living with the <b>Spectral Whisper</b> verb, inside the IC tab.</font>")
|
||||
if(plane != PLANE_WORLD)
|
||||
user.visible_message( \
|
||||
"<span class='warning'>\The [user] drags ghost, [src], to our plane of reality!</span>", \
|
||||
"<span class='warning'>You drag [src] to our plane of reality!</span>" \
|
||||
)
|
||||
toggle_visibility(TRUE)
|
||||
else
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
user.visible_message ( \
|
||||
"<span class='warning'>\The [user] just tried to smash [T.his] book into that ghost! It's not very effective.</span>", \
|
||||
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>" \
|
||||
)
|
||||
|
||||
/mob/observer/dead/proc/toggle_icon(var/icon)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
var/iconRemoved = 0
|
||||
for(var/image/I in client.images)
|
||||
if(I.icon_state == icon)
|
||||
iconRemoved = 1
|
||||
qdel(I)
|
||||
|
||||
if(!iconRemoved)
|
||||
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
|
||||
client.images += J
|
||||
|
||||
/mob/observer/dead/proc/toggle_visibility(var/forced = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Visibility"
|
||||
set desc = "Allows you to turn (in)visible (almost) at will."
|
||||
|
||||
var/toggled_invisible
|
||||
if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600)
|
||||
to_chat(src, "You must gather strength before you can turn visible again...")
|
||||
return
|
||||
|
||||
if(plane == PLANE_WORLD)
|
||||
toggled_invisible = world.time
|
||||
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='info'>You are now visible!</span>")
|
||||
|
||||
plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS
|
||||
invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER
|
||||
|
||||
// Give the ghost a cult icon which should be visible only to itself
|
||||
toggle_icon("cult")
|
||||
|
||||
/mob/observer/dead/verb/toggle_anonsay()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Anonymous Chat"
|
||||
set desc = "Toggles showing your key in dead chat."
|
||||
|
||||
src.anonsay = !src.anonsay
|
||||
if(anonsay)
|
||||
to_chat(src, "<span class='info'>Your key won't be shown when you speak in dead chat.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='info'>Your key will be publicly visible again.</span>")
|
||||
|
||||
/mob/observer/dead/canface()
|
||||
return 1
|
||||
|
||||
/mob/observer/dead/proc/can_admin_interact()
|
||||
return check_rights(R_ADMIN|R_EVENT, 0, src)
|
||||
|
||||
/mob/observer/dead/verb/toggle_ghostsee()
|
||||
set name = "Toggle Ghost Vision"
|
||||
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
|
||||
set category = "Ghost"
|
||||
ghostvision = !ghostvision
|
||||
updateghostsight()
|
||||
to_chat(src, "You [ghostvision ? "now" : "no longer"] have ghost vision.")
|
||||
|
||||
/mob/observer/dead/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
set desc = "Toggles your ability to see lighting overlays, and the darkness they create."
|
||||
set category = "Ghost"
|
||||
seedarkness = !seedarkness
|
||||
updateghostsight()
|
||||
to_chat(src, "You [seedarkness ? "now" : "no longer"] see darkness.")
|
||||
|
||||
/mob/observer/dead/proc/updateghostsight()
|
||||
plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master.
|
||||
plane_holder.set_vis(VIS_GHOSTS, ghostvision)
|
||||
|
||||
mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
if(!client)
|
||||
return 0
|
||||
if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse)
|
||||
if(feedback)
|
||||
to_chat(src, "<span class='warning'>Your non-dead body prevent you from respawning.</span>")
|
||||
return 0
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
|
||||
if(feedback)
|
||||
to_chat(src, "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/atom/proc/extra_ghost_link()
|
||||
return
|
||||
|
||||
/mob/extra_ghost_link(var/atom/ghost)
|
||||
if(client && eyeobj)
|
||||
return "|<a href='byond://?src=\ref[ghost];track=\ref[eyeobj]'>eye</a>"
|
||||
|
||||
/mob/observer/dead/extra_ghost_link(var/atom/ghost)
|
||||
if(mind && mind.current)
|
||||
return "|<a href='byond://?src=\ref[ghost];track=\ref[mind.current]'>body</a>"
|
||||
|
||||
/proc/ghost_follow_link(var/atom/target, var/atom/ghost)
|
||||
if((!target) || (!ghost)) return
|
||||
. = "<a href='byond://?src=\ref[ghost];track=\ref[target]'>follow</a>"
|
||||
. += target.extra_ghost_link(ghost)
|
||||
|
||||
//Culted Ghosts
|
||||
|
||||
/mob/observer/dead/proc/ghost_whisper()
|
||||
set name = "Spectral Whisper"
|
||||
set category = "IC"
|
||||
|
||||
if(is_manifest) //Only able to whisper if it's hit with a tome.
|
||||
var/list/options = list()
|
||||
for(var/mob/living/Ms in view(src))
|
||||
options += Ms
|
||||
var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options
|
||||
if(!M)
|
||||
return 0
|
||||
var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null)
|
||||
if(msg)
|
||||
log_say("(SPECWHISP to [key_name(M)]): [msg]", src)
|
||||
to_chat(M, "<span class='warning'> You hear a strange, unidentifiable voice in your head... <font color='purple'>[msg]</font></span>")
|
||||
to_chat(src, "<span class='warning'> You said: '[msg]' to [M].</span>")
|
||||
else
|
||||
return
|
||||
return 1
|
||||
else
|
||||
to_chat(src, "<span class='danger'>You have not been pulled past the veil!</span>")
|
||||
|
||||
/mob/observer/dead/verb/choose_ghost_sprite()
|
||||
set category = "Ghost"
|
||||
set name = "Choose Sprite"
|
||||
|
||||
var/choice
|
||||
var/previous_state
|
||||
var/finalized = "No"
|
||||
|
||||
while(finalized == "No" && src.client)
|
||||
choice = input(usr,"What would you like to use for your ghost sprite?") as null|anything in possible_ghost_sprites
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
if(choice)
|
||||
icon = 'icons/mob/ghost.dmi'
|
||||
overlays.Cut()
|
||||
|
||||
if(icon_state && icon)
|
||||
previous_state = icon_state
|
||||
|
||||
icon_state = possible_ghost_sprites[choice]
|
||||
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
|
||||
|
||||
ghost_sprite = possible_ghost_sprites[choice]
|
||||
|
||||
if(finalized == "No")
|
||||
icon_state = previous_state
|
||||
|
||||
/mob/observer/dead/is_blind()
|
||||
return FALSE
|
||||
|
||||
/mob/observer/dead/is_deaf()
|
||||
return FALSE
|
||||
|
||||
/mob/observer/dead/verb/paialert()
|
||||
set category = "Ghost"
|
||||
set name = "Blank pAI alert"
|
||||
set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope."
|
||||
|
||||
if(usr.client.prefs?.be_special & BE_PAI)
|
||||
var/count = 0
|
||||
for(var/obj/item/device/paicard/p in all_pai_cards)
|
||||
var/obj/item/device/paicard/PP = p
|
||||
if(PP.pai == null)
|
||||
count++
|
||||
PP.overlays += "pai-ghostalert"
|
||||
spawn(54)
|
||||
PP.overlays.Cut()
|
||||
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
|
||||
else
|
||||
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
|
||||
|
||||
/mob/observer/dead/speech_bubble_appearance()
|
||||
return "ghost"
|
||||
|
||||
// Lets a ghost know someone's trying to bring them back, and for them to get into their body.
|
||||
// Mostly the same as TG's sans the hud element, since we don't have TG huds.
|
||||
/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source)
|
||||
if((last_revive_notification + 2 MINUTES) > world.time)
|
||||
return
|
||||
last_revive_notification = world.time
|
||||
|
||||
if(flashwindow)
|
||||
window_flash(client)
|
||||
if(message)
|
||||
to_chat(src, "<span class='ghostalert'><font size=4>[message]</font></span>")
|
||||
if(source)
|
||||
throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source)
|
||||
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
|
||||
if(sound)
|
||||
SEND_SOUND(src, sound(sound))
|
||||
|
||||
/mob/observer/dead/verb/respawn()
|
||||
set name = "Respawn"
|
||||
set category = "Ghost"
|
||||
src.abandon_mob()
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
@@ -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
|
||||
@@ -151,7 +151,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))
|
||||
@@ -181,7 +180,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))
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -653,7 +653,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
|
||||
|
||||
|
||||
@@ -565,7 +565,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))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
|
||||
/*
|
||||
run_armor_check(a,b)
|
||||
@@ -642,3 +643,648 @@
|
||||
|
||||
/mob/living/proc/restore_all_organs()
|
||||
return
|
||||
=======
|
||||
|
||||
/*
|
||||
run_armor_check(a,b)
|
||||
args
|
||||
a:def_zone - What part is getting hit, if null will check entire body
|
||||
b:attack_flag - What type of attack, bullet, laser, energy, melee
|
||||
c:armour_pen - How much armor to ignore.
|
||||
d:absorb_text - Custom text to send to the player when the armor fully absorbs an attack.
|
||||
e:soften_text - Similar to absorb_text, custom text to send to the player when some damage is reduced.
|
||||
|
||||
Returns
|
||||
A number between 0 and 100, with higher numbers resulting in less damage taken.
|
||||
*/
|
||||
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/armour_pen = 0, var/absorb_text = null, var/soften_text = null)
|
||||
if(Debug2)
|
||||
to_world_log("## DEBUG: getarmor() was called.")
|
||||
|
||||
if(armour_pen >= 100)
|
||||
return 0 //might as well just skip the processing
|
||||
|
||||
var/armor = getarmor(def_zone, attack_flag)
|
||||
if(armor)
|
||||
var/armor_variance_range = round(armor * 0.25) //Armor's effectiveness has a +25%/-25% variance.
|
||||
var/armor_variance = rand(-armor_variance_range, armor_variance_range) //Get a random number between -25% and +25% of the armor's base value
|
||||
if(Debug2)
|
||||
to_world_log("## DEBUG: The range of armor variance is [armor_variance_range]. The variance picked by RNG is [armor_variance].")
|
||||
|
||||
armor = min(armor + armor_variance, 100) //Now we calcuate damage using the new armor percentage.
|
||||
armor = max(armor - armour_pen, 0) //Armor pen makes armor less effective.
|
||||
if(armor >= 100)
|
||||
if(absorb_text)
|
||||
to_chat(src, "<span class='danger'>[absorb_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Your armor absorbs the blow!</span>")
|
||||
|
||||
else if(armor > 0)
|
||||
if(soften_text)
|
||||
to_chat(src, "<span class='danger'>[soften_text]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Your armor softens the blow!</span>")
|
||||
if(Debug2)
|
||||
to_world_log("## DEBUG: Armor when [src] was attacked was [armor].")
|
||||
return armor
|
||||
|
||||
/*
|
||||
//Old armor code here.
|
||||
if(armour_pen >= 100)
|
||||
return 0 //might as well just skip the processing
|
||||
|
||||
var/armor = getarmor(def_zone, attack_flag)
|
||||
var/absorb = 0
|
||||
|
||||
//Roll armour
|
||||
if(prob(armor))
|
||||
absorb += 1
|
||||
if(prob(armor))
|
||||
absorb += 1
|
||||
|
||||
//Roll penetration
|
||||
if(prob(armour_pen))
|
||||
absorb -= 1
|
||||
if(prob(armour_pen))
|
||||
absorb -= 1
|
||||
|
||||
if(absorb >= 2)
|
||||
if(absorb_text)
|
||||
show_message("[absorb_text]")
|
||||
else
|
||||
show_message("<span class='warning'>Your armor absorbs the blow!</span>")
|
||||
return 2
|
||||
if(absorb == 1)
|
||||
if(absorb_text)
|
||||
show_message("[soften_text]",4)
|
||||
else
|
||||
show_message("<span class='warning'>Your armor softens the blow!</span>")
|
||||
return 1
|
||||
return 0
|
||||
*/
|
||||
|
||||
//Certain pieces of armor actually absorb flat amounts of damage from income attacks
|
||||
/mob/living/proc/get_armor_soak(var/def_zone = null, var/attack_flag = "melee", var/armour_pen = 0)
|
||||
var/soaked = getsoak(def_zone, attack_flag)
|
||||
//5 points of armor pen negate one point of soak
|
||||
if(armour_pen)
|
||||
soaked = max(soaked - (armour_pen/5), 0)
|
||||
return soaked
|
||||
|
||||
//if null is passed for def_zone, then this should return something appropriate for all zones (e.g. area effect damage)
|
||||
/mob/living/proc/getarmor(var/def_zone, var/type)
|
||||
return 0
|
||||
|
||||
/mob/living/proc/getsoak(var/def_zone, var/type)
|
||||
return 0
|
||||
|
||||
// Clicking with an empty hand
|
||||
/mob/living/attack_hand(mob/living/L)
|
||||
..()
|
||||
if(istype(L) && L.a_intent != I_HELP)
|
||||
if(ai_holder) // Using disarm, grab, or harm intent is considered a hostile action to the mob's AI.
|
||||
ai_holder.react_to_attack(L)
|
||||
|
||||
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
|
||||
//Being hit while using a deadman switch
|
||||
if(istype(get_active_hand(),/obj/item/device/assembly/signaler))
|
||||
var/obj/item/device/assembly/signaler/signaler = get_active_hand()
|
||||
if(signaler.deadman && prob(80))
|
||||
log_and_message_admins("has triggered a signaler deadman's switch")
|
||||
src.visible_message("<font color='red'>[src] triggers their deadman's switch!</font>")
|
||||
signaler.signal()
|
||||
|
||||
if(ai_holder && P.firer)
|
||||
ai_holder.react_to_attack(P.firer)
|
||||
|
||||
//Armor
|
||||
var/soaked = get_armor_soak(def_zone, P.check_armour, P.armor_penetration)
|
||||
var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration)
|
||||
var/proj_sharp = is_sharp(P)
|
||||
var/proj_edge = has_edge(P)
|
||||
|
||||
if ((proj_sharp || proj_edge) && (soaked >= round(P.damage*0.8)))
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.check_armour)))
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
//Stun Beams
|
||||
if(P.taser_effect)
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
P.on_hit(src, absorb, soaked, def_zone)
|
||||
|
||||
if(absorb == 100)
|
||||
return 2
|
||||
else if (absorb >= 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
// return absorb
|
||||
|
||||
//Handles the effects of "stun" weapons
|
||||
/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null)
|
||||
flash_pain()
|
||||
|
||||
if (stun_amount)
|
||||
Stun(stun_amount)
|
||||
Weaken(stun_amount)
|
||||
apply_effect(STUTTER, stun_amount)
|
||||
apply_effect(EYE_BLUR, stun_amount)
|
||||
|
||||
if (agony_amount)
|
||||
apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon)
|
||||
apply_effect(STUTTER, agony_amount/10)
|
||||
apply_effect(EYE_BLUR, agony_amount/10)
|
||||
|
||||
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
|
||||
return 0 //only carbon liveforms have this proc
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
var/list/L = src.get_contents()
|
||||
|
||||
if(LAZYLEN(modifiers))
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.emp_modifier))
|
||||
severity = CLAMP(severity + M.emp_modifier, 1, 5)
|
||||
|
||||
if(severity == 5) // Effectively nullified.
|
||||
return
|
||||
|
||||
for(var/obj/O in L)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/blob_act(var/obj/structure/blob/B)
|
||||
if(stat == DEAD || faction == B.faction)
|
||||
return
|
||||
|
||||
var/damage = rand(30, 40)
|
||||
var/armor_pen = 0
|
||||
var/armor_check = "melee"
|
||||
var/damage_type = BRUTE
|
||||
var/attack_message = "The blob attacks you!"
|
||||
var/attack_verb = "attacks"
|
||||
var/def_zone = pick(BP_HEAD, BP_TORSO, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
|
||||
|
||||
if(B && B.overmind)
|
||||
var/datum/blob_type/blob = B.overmind.blob_type
|
||||
|
||||
damage = rand(blob.damage_lower, blob.damage_upper)
|
||||
armor_check = blob.armor_check
|
||||
armor_pen = blob.armor_pen
|
||||
damage_type = blob.damage_type
|
||||
|
||||
attack_message = "[blob.attack_message][isSynthetic() ? "[blob.attack_message_synth]":"[blob.attack_message_living]"]"
|
||||
attack_verb = blob.attack_verb
|
||||
B.overmind.blob_type.on_attack(B, src, def_zone)
|
||||
|
||||
if( (damage_type == TOX || damage_type == OXY) && isSynthetic()) // Borgs and FBPs don't really handle tox/oxy damage the same way other mobs do.
|
||||
damage_type = BRUTE
|
||||
damage *= 0.66 // Take 2/3s as much damage.
|
||||
|
||||
visible_message("<span class='danger'>\The [B] [attack_verb] \the [src]!</span>", "<span class='danger'>[attack_message]!</span>")
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
|
||||
//Armor
|
||||
var/soaked = get_armor_soak(def_zone, armor_check, armor_pen)
|
||||
var/absorb = run_armor_check(def_zone, armor_check, armor_pen)
|
||||
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(B)
|
||||
|
||||
apply_damage(damage, damage_type, def_zone, absorb, soaked)
|
||||
|
||||
/mob/living/proc/resolve_item_attack(obj/item/I, mob/living/user, var/target_zone)
|
||||
return target_zone
|
||||
|
||||
//Called when the mob is hit with an item in combat. Returns the blocked result
|
||||
/mob/living/proc/hit_with_weapon(obj/item/I, mob/living/user, var/effective_force, var/hit_zone)
|
||||
visible_message("<span class='danger'>[src] has been [I.attack_verb.len? pick(I.attack_verb) : "attacked"] with [I.name] by [user]!</span>")
|
||||
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(user)
|
||||
|
||||
var/soaked = get_armor_soak(hit_zone, "melee")
|
||||
var/blocked = run_armor_check(hit_zone, "melee")
|
||||
|
||||
standard_weapon_hit_effects(I, user, effective_force, blocked, soaked, hit_zone)
|
||||
|
||||
if(I.damtype == BRUTE && prob(33)) // Added blood for whacking non-humans too
|
||||
var/turf/simulated/location = get_turf(src)
|
||||
if(istype(location)) location.add_blood_floor(src)
|
||||
|
||||
return blocked
|
||||
|
||||
//returns 0 if the effects failed to apply for some reason, 1 otherwise.
|
||||
/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/soaked, var/hit_zone)
|
||||
if(!effective_force || blocked >= 100)
|
||||
return 0
|
||||
//Apply weapon damage
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
var/weapon_edge = has_edge(I)
|
||||
|
||||
if(getsoak(hit_zone, "melee",) - (I.armor_penetration/5) > round(effective_force*0.8)) //soaking a hit turns sharp attacks into blunt ones
|
||||
weapon_sharp = 0
|
||||
weapon_edge = 0
|
||||
|
||||
if(prob(max(getarmor(hit_zone, "melee") - I.armor_penetration, 0))) //melee armour provides a chance to turn sharp/edge weapon attacks into blunt ones
|
||||
weapon_sharp = 0
|
||||
weapon_edge = 0
|
||||
|
||||
apply_damage(effective_force, I.damtype, hit_zone, blocked, soaked, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
|
||||
|
||||
return 1
|
||||
|
||||
//this proc handles being hit by a thrown atom
|
||||
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
|
||||
if(istype(AM,/obj/))
|
||||
var/obj/O = AM
|
||||
var/dtype = O.damtype
|
||||
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
|
||||
|
||||
var/miss_chance = 15
|
||||
if (O.throw_source)
|
||||
var/distance = get_dist(O.throw_source, loc)
|
||||
miss_chance = max(15*(distance-2), 0)
|
||||
|
||||
if (prob(miss_chance))
|
||||
visible_message("<font color='blue'>\The [O] misses [src] narrowly!</font>")
|
||||
return
|
||||
|
||||
src.visible_message("<font color='red'>[src] has been hit by [O].</font>")
|
||||
var/armor = run_armor_check(null, "melee")
|
||||
var/soaked = get_armor_soak(null, "melee")
|
||||
|
||||
|
||||
apply_damage(throw_damage, dtype, null, armor, soaked, is_sharp(O), has_edge(O), O)
|
||||
|
||||
O.throwing = 0 //it hit, so stop moving
|
||||
|
||||
if(ismob(O.thrower))
|
||||
var/mob/M = O.thrower
|
||||
var/client/assailant = M.client
|
||||
if(assailant)
|
||||
add_attack_logs(M,src,"Hit by thrown [O.name]")
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(O.thrower)
|
||||
|
||||
// Begin BS12 momentum-transfer code.
|
||||
var/mass = 1.5
|
||||
if(istype(O, /obj/item))
|
||||
var/obj/item/I = O
|
||||
mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR
|
||||
var/momentum = speed*mass
|
||||
|
||||
if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED)
|
||||
var/dir = get_dir(O.throw_source, src)
|
||||
|
||||
visible_message("<font color='red'>[src] staggers under the impact!</font>","<font color='red'>You stagger under the impact!</font>")
|
||||
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
|
||||
|
||||
if(!O || !src) return
|
||||
|
||||
if(O.sharp) //Projectile is suitable for pinning.
|
||||
if(soaked >= round(throw_damage*0.8))
|
||||
return
|
||||
|
||||
//Handles embedding for non-humans and simple_animals.
|
||||
embed(O)
|
||||
|
||||
var/turf/T = near_wall(dir,2)
|
||||
|
||||
if(T)
|
||||
src.loc = T
|
||||
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
|
||||
src.anchored = 1
|
||||
src.pinned += O
|
||||
|
||||
/mob/living/proc/embed(var/obj/O, var/def_zone=null)
|
||||
O.loc = src
|
||||
src.embedded += O
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
|
||||
|
||||
//This is called when the mob is thrown into a dense turf
|
||||
/mob/living/proc/turf_collision(var/turf/T, var/speed)
|
||||
src.take_organ_damage(speed*5)
|
||||
|
||||
/mob/living/proc/near_wall(var/direction,var/distance=1)
|
||||
var/turf/T = get_step(get_turf(src),direction)
|
||||
var/turf/last_turf = src.loc
|
||||
var/i = 1
|
||||
|
||||
while(i>0 && i<=distance)
|
||||
if(T.density) //Turf is a wall!
|
||||
return last_turf
|
||||
i++
|
||||
last_turf = T
|
||||
T = get_step(T,direction)
|
||||
|
||||
return 0
|
||||
|
||||
// End BS12 momentum-transfer code.
|
||||
|
||||
/mob/living/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(user,src,"Generic attack (probably animal)", admin_notify = FALSE) //Usually due to simple_mob attacks
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(user)
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
spawn(1) updatehealth()
|
||||
return 1
|
||||
|
||||
/mob/living/proc/IgniteMob()
|
||||
if(fire_stacks > 0 && !on_fire)
|
||||
on_fire = 1
|
||||
handle_light()
|
||||
throw_alert("fire", /obj/screen/alert/fire)
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/ExtinguishMob()
|
||||
if(on_fire)
|
||||
on_fire = 0
|
||||
fire_stacks = 0
|
||||
handle_light()
|
||||
clear_alert("fire")
|
||||
update_fire()
|
||||
|
||||
if(has_modifier_of_type(/datum/modifier/fire))
|
||||
remove_modifiers_of_type(/datum/modifier/fire)
|
||||
|
||||
/mob/living/proc/update_fire()
|
||||
return
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
fire_stacks = CLAMP(fire_stacks + add_fire_stacks, FIRE_MIN_STACKS, FIRE_MAX_STACKS)
|
||||
|
||||
/mob/living/proc/handle_fire()
|
||||
if(fire_stacks < 0)
|
||||
fire_stacks = min(0, ++fire_stacks) //If we've doused ourselves in water to avoid fire, dry off slowly
|
||||
|
||||
if(fire_stacks > 0)
|
||||
fire_stacks = max(0, (fire_stacks-0.1)) //Should slowly burn out
|
||||
|
||||
if(!on_fire)
|
||||
return 1
|
||||
else if(fire_stacks <= 0)
|
||||
ExtinguishMob() //Fire's been put out.
|
||||
return 1
|
||||
|
||||
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
|
||||
if(G.gas["oxygen"] < 1)
|
||||
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
|
||||
return 1
|
||||
|
||||
var/turf/location = get_turf(src)
|
||||
location.hotspot_expose(fire_burn_temperature(), 50, 1)
|
||||
|
||||
//altered this to cap at the temperature of the fire causing it, using the same 1:1500 value as /mob/living/carbon/human/handle_fire() in human/life.dm
|
||||
/mob/living/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature)
|
||||
if(fire_stacks < exposed_temperature/1500) // Subject to balance
|
||||
adjust_fire_stacks(2)
|
||||
else
|
||||
adjust_fire_stacks(2)
|
||||
IgniteMob()
|
||||
|
||||
//Share fire evenly between the two mobs
|
||||
//Called in MobCollide() and Crossed()
|
||||
/mob/living/proc/spread_fire(mob/living/L)
|
||||
return
|
||||
// This is commented out pending discussion on Polaris. If you're a downsteam and you want people to spread fire by touching each other, feel free to uncomment this.
|
||||
/*
|
||||
if(!istype(L))
|
||||
return
|
||||
var/L_old_on_fire = L.on_fire
|
||||
|
||||
if(on_fire) //Only spread fire stacks if we're on fire
|
||||
fire_stacks /= 2
|
||||
L.fire_stacks += fire_stacks
|
||||
if(L.IgniteMob())
|
||||
message_admins("[key_name(src)] bumped into [key_name(L)] and set them on fire.")
|
||||
|
||||
if(L_old_on_fire) //Only ignite us and gain their stacks if they were onfire before we bumped them
|
||||
L.fire_stacks /= 2
|
||||
fire_stacks += L.fire_stacks
|
||||
IgniteMob()
|
||||
*/
|
||||
|
||||
/mob/living/proc/get_cold_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/get_heat_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/get_shock_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/get_water_protection()
|
||||
return 1 // Water won't hurt most things.
|
||||
|
||||
/mob/living/proc/get_poison_protection()
|
||||
return 0
|
||||
|
||||
//Finds the effective temperature that the mob is burning at.
|
||||
/mob/living/proc/fire_burn_temperature()
|
||||
if (fire_stacks <= 0)
|
||||
return 0
|
||||
|
||||
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
|
||||
//lower limit of 700 K, same as matches and roughly the temperature of a cool flame.
|
||||
return max(2.25*round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2), 700)
|
||||
|
||||
// Called when struck by lightning.
|
||||
/mob/living/proc/lightning_act()
|
||||
// The actual damage/electrocution is handled by the tesla_zap() that accompanies this.
|
||||
Paralyse(5)
|
||||
stuttering += 20
|
||||
make_jittery(150)
|
||||
emp_act(1)
|
||||
to_chat(src, span("critical", "You've been struck by lightning!"))
|
||||
|
||||
// Called when touching a lava tile.
|
||||
// Does roughly 100 damage to unprotected mobs, and 20 to fully protected mobs.
|
||||
/mob/living/lava_act()
|
||||
add_modifier(/datum/modifier/fire/intense, 8 SECONDS) // Around 40 total if left to burn and without fire protection per stack.
|
||||
inflict_heat_damage(40) // Another 40, however this is instantly applied to unprotected mobs.
|
||||
adjustFireLoss(20) // Lava cannot be 100% resisted with fire protection.
|
||||
|
||||
/mob/living/proc/reagent_permeability()
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_actions()
|
||||
//Pretty bad, i'd use picked/dropped instead but the parent calls in these are nonexistent
|
||||
for(var/datum/action/A in actions)
|
||||
if(A.CheckRemoval(src))
|
||||
A.Remove(src)
|
||||
for(var/obj/item/I in src)
|
||||
if(I.action_button_name)
|
||||
if(!I.action)
|
||||
if(I.action_button_is_hands_free)
|
||||
I.action = new/datum/action/item_action/hands_free
|
||||
else
|
||||
I.action = new/datum/action/item_action
|
||||
I.action.name = I.action_button_name
|
||||
I.action.target = I
|
||||
I.action.Grant(src)
|
||||
return
|
||||
|
||||
/mob/living/update_action_buttons()
|
||||
if(!hud_used) return
|
||||
if(!client) return
|
||||
|
||||
if(hud_used.hud_shown != 1) //Hud toggled to minimal
|
||||
return
|
||||
|
||||
client.screen -= hud_used.hide_actions_toggle
|
||||
for(var/datum/action/A in actions)
|
||||
if(A.button)
|
||||
client.screen -= A.button
|
||||
|
||||
if(hud_used.action_buttons_hidden)
|
||||
if(!hud_used.hide_actions_toggle)
|
||||
hud_used.hide_actions_toggle = new(hud_used)
|
||||
hud_used.hide_actions_toggle.UpdateIcon()
|
||||
|
||||
if(!hud_used.hide_actions_toggle.moved)
|
||||
hud_used.hide_actions_toggle.screen_loc = hud_used.ButtonNumberToScreenCoords(1)
|
||||
//hud_used.SetButtonCoords(hud_used.hide_actions_toggle,1)
|
||||
|
||||
client.screen += hud_used.hide_actions_toggle
|
||||
return
|
||||
|
||||
var/button_number = 0
|
||||
for(var/datum/action/A in actions)
|
||||
button_number++
|
||||
if(A.button == null)
|
||||
var/obj/screen/movable/action_button/N = new(hud_used)
|
||||
N.owner = A
|
||||
A.button = N
|
||||
|
||||
var/obj/screen/movable/action_button/B = A.button
|
||||
|
||||
B.UpdateIcon()
|
||||
|
||||
B.name = A.UpdateName()
|
||||
|
||||
client.screen += B
|
||||
|
||||
if(!B.moved)
|
||||
B.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number)
|
||||
//hud_used.SetButtonCoords(B,button_number)
|
||||
|
||||
if(button_number > 0)
|
||||
if(!hud_used.hide_actions_toggle)
|
||||
hud_used.hide_actions_toggle = new(hud_used)
|
||||
hud_used.hide_actions_toggle.InitialiseIcon(src)
|
||||
if(!hud_used.hide_actions_toggle.moved)
|
||||
hud_used.hide_actions_toggle.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number+1)
|
||||
//hud_used.SetButtonCoords(hud_used.hide_actions_toggle,button_number+1)
|
||||
client.screen += hud_used.hide_actions_toggle
|
||||
|
||||
// Returns a number to determine if something is harder or easier to hit than normal.
|
||||
/mob/living/proc/get_evasion()
|
||||
var/result = evasion // First we get the 'base' evasion. Generally this is zero.
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.evasion))
|
||||
result += M.evasion
|
||||
return result
|
||||
|
||||
/mob/living/proc/get_accuracy_penalty()
|
||||
// Certain statuses make it harder to score a hit.
|
||||
var/accuracy_penalty = 0
|
||||
if(eye_blind)
|
||||
accuracy_penalty += 75
|
||||
if(eye_blurry)
|
||||
accuracy_penalty += 30
|
||||
if(confused)
|
||||
accuracy_penalty += 45
|
||||
|
||||
return accuracy_penalty
|
||||
|
||||
// Applies direct "cold" damage while checking protection against the cold.
|
||||
/mob/living/proc/inflict_cold_damage(amount)
|
||||
amount *= 1 - get_cold_protection(50) // Within spacesuit protection.
|
||||
if(amount > 0)
|
||||
adjustFireLoss(amount)
|
||||
|
||||
// Ditto, but for "heat".
|
||||
/mob/living/proc/inflict_heat_damage(amount)
|
||||
amount *= 1 - get_heat_protection(10000) // Within firesuit protection.
|
||||
if(amount > 0)
|
||||
adjustFireLoss(amount)
|
||||
|
||||
// and one for electricity because why not
|
||||
/mob/living/proc/inflict_shock_damage(amount)
|
||||
electrocute_act(amount, null, 1 - get_shock_protection(), pick(BP_HEAD, BP_TORSO, BP_GROIN))
|
||||
|
||||
// also one for water (most things resist it entirely, except for slimes)
|
||||
/mob/living/proc/inflict_water_damage(amount)
|
||||
amount *= 1 - get_water_protection()
|
||||
if(amount > 0)
|
||||
adjustToxLoss(amount)
|
||||
|
||||
// one for abstracted away ""poison"" (mostly because simplemobs shouldn't handle reagents)
|
||||
/mob/living/proc/inflict_poison_damage(amount)
|
||||
if(isSynthetic())
|
||||
return
|
||||
amount *= 1 - get_poison_protection()
|
||||
if(amount > 0)
|
||||
adjustToxLoss(amount)
|
||||
|
||||
/mob/living/proc/can_inject(var/mob/user, var/error_msg, var/target_zone, var/ignore_thickness = FALSE)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
var/t = shooter.zone_sel.selecting
|
||||
if ((t in list( O_EYES, O_MOUTH )))
|
||||
t = BP_HEAD
|
||||
var/obj/item/organ/external/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn, var/emp=0)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
/mob/living/proc/restore_all_organs()
|
||||
return
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/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)
|
||||
//VOREStation Edit - multiz lol
|
||||
if(!(D.z in using_map.get_map_levels(z, TRUE, 0)))
|
||||
@@ -42,8 +42,13 @@
|
||||
//VOREStation Edit - multiz lol
|
||||
if(D.foreign_droid)
|
||||
continue
|
||||
<<<<<<< HEAD
|
||||
|
||||
data["drones"].Add(list(list(
|
||||
=======
|
||||
|
||||
drones.Add(list(list(
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
"name" = D.real_name,
|
||||
"active" = D.stat != 2,
|
||||
"charge" = D.cell.charge,
|
||||
@@ -51,6 +56,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,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
@@ -405,3 +406,424 @@
|
||||
|
||||
/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
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -170,7 +170,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()
|
||||
|
||||
@@ -72,7 +72,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)
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/var/global/datum/topic_state/default/default_state = new()
|
||||
|
||||
/datum/topic_state/default/href_list(var/mob/user)
|
||||
return list()
|
||||
|
||||
/datum/topic_state/default/can_use_topic(var/src_object, var/mob/user)
|
||||
return user.default_can_use_topic(src_object)
|
||||
|
||||
/mob/proc/default_can_use_topic(var/src_object)
|
||||
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
||||
|
||||
/mob/observer/dead/default_can_use_topic(var/src_object)
|
||||
if(can_admin_interact())
|
||||
return STATUS_INTERACTIVE // Admins are more equal
|
||||
if(!client || get_dist(src_object, src) > client.view) // Preventing ghosts from having a million windows open by limiting to objects in range
|
||||
return STATUS_CLOSE
|
||||
return STATUS_UPDATE // Ghosts can view updates
|
||||
|
||||
/mob/living/silicon/pai/default_can_use_topic(var/src_object)
|
||||
if((src_object == src || src_object == radio || src_object == communicator) && !stat)
|
||||
return STATUS_INTERACTIVE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction()
|
||||
if(. <= STATUS_DISABLED)
|
||||
return
|
||||
|
||||
// robots can interact with things they can see within their view range
|
||||
if((src_object in view(src)) && get_dist(src_object, src) <= src.client.view)
|
||||
return STATUS_INTERACTIVE // interactive (green visibility)
|
||||
return STATUS_DISABLED // no updates, completely disabled (red visibility)
|
||||
|
||||
/mob/living/silicon/ai/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction()
|
||||
if(. != STATUS_INTERACTIVE)
|
||||
return
|
||||
|
||||
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
|
||||
// unless it's on the same level as the object it's interacting with.
|
||||
var/turf/T = get_turf(src_object)
|
||||
if(!T || !(z == T.z || (T.z in using_map.player_levels)))
|
||||
return STATUS_CLOSE
|
||||
|
||||
// If an object is in view then we can interact with it
|
||||
if(src_object in view(client.view, src))
|
||||
return STATUS_INTERACTIVE
|
||||
|
||||
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
|
||||
if(is_in_chassis())
|
||||
//stop AIs from leaving windows open and using then after they lose vision
|
||||
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
|
||||
return STATUS_CLOSE
|
||||
return STATUS_INTERACTIVE
|
||||
else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard
|
||||
return STATUS_INTERACTIVE
|
||||
|
||||
return STATUS_CLOSE
|
||||
|
||||
//Some atoms such as vehicles might have special rules for how mobs inside them interact with NanoUI.
|
||||
/atom/proc/contents_nano_distance(var/src_object, var/mob/living/user)
|
||||
return user.shared_living_nano_distance(src_object)
|
||||
|
||||
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
|
||||
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
|
||||
return STATUS_CLOSE
|
||||
|
||||
var/dist = get_dist(src_object, src)
|
||||
if (dist <= 1)
|
||||
return STATUS_INTERACTIVE // interactive (green visibility)
|
||||
else if (dist <= 2)
|
||||
return STATUS_UPDATE // update only (orange visibility)
|
||||
else if (dist <= 4)
|
||||
return STATUS_DISABLED // no updates, completely disabled (red visibility)
|
||||
return STATUS_CLOSE
|
||||
|
||||
/mob/living/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction(src_object)
|
||||
if(. != STATUS_CLOSE)
|
||||
if(loc)
|
||||
. = min(., loc.contents_nano_distance(src_object, src))
|
||||
if(. == STATUS_INTERACTIVE)
|
||||
return STATUS_UPDATE
|
||||
|
||||
/mob/living/carbon/human/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction(src_object)
|
||||
if(. != STATUS_CLOSE)
|
||||
. = min(., shared_living_nano_distance(src_object))
|
||||
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
|
||||
return STATUS_INTERACTIVE
|
||||
@@ -0,0 +1,44 @@
|
||||
// This file contains all Nano procs/definitions for external classes/objects
|
||||
|
||||
/**
|
||||
* Called when a Nano UI window is closed
|
||||
* This is how Nano handles closed windows
|
||||
* It must be a verb so that it can be called using winset
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/client/verb/nanoclose(var/uiref as text)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = "nanoclose"
|
||||
|
||||
var/datum/nanoui/ui = locate(uiref)
|
||||
|
||||
if (istype(ui))
|
||||
ui.close()
|
||||
|
||||
if(ui.ref)
|
||||
var/href = "close=1"
|
||||
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic()
|
||||
else if (ui.on_close_logic)
|
||||
// no atomref specified (or not found)
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
src.mob.unset_machine()
|
||||
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
* If ui_interact is not used then the UI will not update correctly
|
||||
* ui_interact is currently defined for /atom/movable
|
||||
*
|
||||
* @param user /mob The mob who is interacting with this ui
|
||||
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
|
||||
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
|
||||
* @param force_open boolean Force the UI to (re)open, even if it's already open
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/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
|
||||
/mob/var/list/open_uis = list()
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -581,7 +581,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()
|
||||
@@ -988,12 +988,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"
|
||||
|
||||
@@ -208,16 +208,23 @@ 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")
|
||||
<<<<<<< HEAD
|
||||
else if (destination == "Virgo-Prime Governmental Authority") // Vorestation Edit
|
||||
message_admins(sender, "VIRGO GOVERNMENT FAX", rcvdcopy, "CentComFaxReply", "#1F66A0")
|
||||
else if (destination == "Supply")
|
||||
=======
|
||||
else if(destination == "Sif Governmental Authority")
|
||||
message_admins(sender, "SIF GOVERNMENT FAX", rcvdcopy, "CentComFaxReply", "#1F66A0")
|
||||
else if(destination == "Supply")
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
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)]
|
||||
|
||||
|
||||
@@ -635,7 +635,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"
|
||||
@@ -612,7 +613,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)
|
||||
|
||||
@@ -359,6 +359,7 @@
|
||||
/obj/item/device/destTagger/attack_self(mob/user as mob)
|
||||
tgui_interact(user)
|
||||
|
||||
<<<<<<< HEAD
|
||||
/obj/item/device/destTagger/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
@@ -370,6 +371,13 @@
|
||||
return FALSE
|
||||
currTag = new_tag
|
||||
. = TRUE
|
||||
=======
|
||||
Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["nextTag"] && (href_list["nextTag"] in GLOB.tagger_locations))
|
||||
src.currTag = href_list["nextTag"]
|
||||
openwindow(usr)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
/obj/machinery/disposal/deliveryChute
|
||||
name = "Delivery chute"
|
||||
|
||||
@@ -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,19 +110,18 @@
|
||||
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),
|
||||
)))
|
||||
<<<<<<< HEAD
|
||||
|
||||
data["lockedData"]["active"] = active
|
||||
data["lockedData"]["failing"] = (time_since_fail <= 2)
|
||||
@@ -140,6 +139,26 @@
|
||||
data["lockedData"]["gen_power"] = round(field.len * min(strengthen_rate, target_field_strength - average_field_strength) / energy_conversion_rate)
|
||||
|
||||
return data
|
||||
=======
|
||||
lockedData["capacitors"] = caps
|
||||
|
||||
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 list("locked" = locked, "lockedData" = lockedData)
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
/obj/machinery/shield_gen/process()
|
||||
if (!anchored && active)
|
||||
|
||||
@@ -60,9 +60,34 @@
|
||||
"internalTemplateName" = "EscapePodConsole",
|
||||
)
|
||||
|
||||
<<<<<<< HEAD
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
=======
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "escape_pod_console.tmpl", name, 470, 290)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/Topic(href, href_list)
|
||||
if((. = ..()))
|
||||
return
|
||||
|
||||
if(href_list["manual_arm"])
|
||||
pod.arming_controller.arm()
|
||||
return TOPIC_REFRESH
|
||||
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
|
||||
pod.launch(src)
|
||||
return TOPIC_REFRESH
|
||||
return 0
|
||||
>>>>>>> fdabe51... Linter Introduction + Cleanup (#8085)
|
||||
|
||||
switch(action)
|
||||
if("manual_arm")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -129,7 +129,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
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
color = material.icon_colour
|
||||
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)
|
||||
|
||||
@@ -158,10 +158,10 @@
|
||||
data["doors_open"] = lift.doors_are_open()
|
||||
data["fire_mode"] = lift.fire_mode
|
||||
|
||||
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),
|
||||
@@ -170,6 +170,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)))
|
||||
}
|
||||
|
||||
@@ -253,17 +253,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