mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Merge branch 'master' into upstream-merge-8098
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)
|
||||
@@ -1630,6 +1630,19 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies
|
||||
for(var/client/C in GLOB.admins)
|
||||
if((R_ADMIN | R_MOD | R_EVENT) & C.holder.rights)
|
||||
to_chat(C, "<span class='log_message'><span class='prefix'>FAX LOG:</span>[key_name_admin(src.owner)] has sent a fax message to [destination.department] (<a href='?_src_=holder;AdminFaxView=\ref[rcvdcopy]'>VIEW</a>)</span>")
|
||||
|
||||
var/plaintext_title = P.sender ? "replied to [key_name(P.sender)]'s fax" : "sent a fax message to [destination.department]"
|
||||
var/fax_text = paper_html_to_plaintext(P.info)
|
||||
log_game(plaintext_title)
|
||||
log_game(fax_text)
|
||||
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_FAX_SENT,
|
||||
list(
|
||||
"name" = "[key_name(owner)] [plaintext_title].",
|
||||
"body" = fax_text
|
||||
)
|
||||
)
|
||||
|
||||
else
|
||||
to_chat(src.owner, "<span class='warning'>Message reply failed.</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -235,7 +235,9 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/admin_give_modifier,
|
||||
/client/proc/simple_DPS,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/debug_global_variables
|
||||
/client/proc/debug_global_variables,
|
||||
/client/proc/ping_webhook,
|
||||
/client/proc/reload_webhooks
|
||||
)
|
||||
|
||||
var/list/admin_verbs_paranoid_debug = list(
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -184,6 +184,17 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
log_admin("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
||||
if(admin_number_present <= 0)
|
||||
to_chat(C, "<span class='notice'>No active admins are online, your adminhelp was sent to the admin discord.</span>") //VOREStation Edit
|
||||
|
||||
// Also send it to discord since that's the hip cool thing now.
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) ticket opened.",
|
||||
"body" = "[key_name(initiator)] has opened a ticket. \n[msg]",
|
||||
"color" = COLOR_WEBHOOK_POOR
|
||||
)
|
||||
)
|
||||
|
||||
GLOB.ahelp_tickets.active_tickets += src
|
||||
|
||||
/datum/admin_help/Destroy()
|
||||
@@ -273,6 +284,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
feedback_inc("ahelp_reopen")
|
||||
TicketPanel() //can only be done from here, so refresh it
|
||||
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) reopened.",
|
||||
"body" = "Reopened by [key_name(usr)]."
|
||||
)
|
||||
)
|
||||
|
||||
//private
|
||||
/datum/admin_help/proc/RemoveActive()
|
||||
if(state != AHELP_ACTIVE)
|
||||
@@ -298,6 +317,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
var/msg = "Ticket [TicketHref("#[id]")] closed by [key_name_admin(usr)]."
|
||||
message_admins(msg)
|
||||
log_admin(msg)
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) closed.",
|
||||
"body" = "Closed by [key_name(usr)].",
|
||||
"color" = COLOR_WEBHOOK_BAD
|
||||
)
|
||||
)
|
||||
|
||||
//Mark open ticket as resolved/legitimate, returns ahelp verb
|
||||
/datum/admin_help/proc/Resolve(silent = FALSE)
|
||||
@@ -315,6 +342,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name_admin(usr)]"
|
||||
message_admins(msg)
|
||||
log_admin(msg)
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) resolved.",
|
||||
"body" = "Marked as Resolved by [key_name(usr)].",
|
||||
"color" = COLOR_WEBHOOK_GOOD
|
||||
)
|
||||
)
|
||||
|
||||
//Close and return ahelp verb, use if ticket is incoherent
|
||||
/datum/admin_help/proc/Reject(key_name = key_name_admin(usr))
|
||||
@@ -335,6 +370,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
log_admin(msg)
|
||||
AddInteraction("Rejected by [key_name_admin(usr)].")
|
||||
Close(silent = TRUE)
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) rejected.",
|
||||
"body" = "Rejected by [key_name(usr)].",
|
||||
"color" = COLOR_WEBHOOK_BAD
|
||||
)
|
||||
)
|
||||
|
||||
//Resolve ticket with IC Issue message
|
||||
/datum/admin_help/proc/ICIssue(key_name = key_name_admin(usr))
|
||||
@@ -354,6 +397,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
log_admin(msg)
|
||||
AddInteraction("Marked as IC issue by [key_name_admin(usr)]")
|
||||
Resolve(silent = TRUE)
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) marked as IC issue.",
|
||||
"body" = "Marked as IC Issue by [key_name(usr)].",
|
||||
"color" = COLOR_WEBHOOK_BAD
|
||||
)
|
||||
)
|
||||
|
||||
//Resolve ticket with IC Issue message
|
||||
/datum/admin_help/proc/HandleIssue()
|
||||
@@ -365,11 +416,18 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
if(initiator)
|
||||
to_chat(initiator, msg)
|
||||
|
||||
feedback_inc("ahelp_icissue")
|
||||
feedback_inc("ahelp_handling")
|
||||
msg = "Ticket [TicketHref("#[id]")] being handled by [key_name(usr,FALSE,FALSE)]"
|
||||
message_admins(msg)
|
||||
log_admin(msg)
|
||||
AddInteraction("[key_name_admin(usr)] is now handling this ticket.")
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_AHELP_SENT,
|
||||
list(
|
||||
"name" = "Ticket ([id]) (Game ID: [game_id]) being handled.",
|
||||
"body" = "[key_name(usr)] is now handling the ticket."
|
||||
)
|
||||
)
|
||||
|
||||
//Show the ticket panel
|
||||
/datum/admin_help/proc/TicketPanel()
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
to_world("<span class='alert'>[custom_event_msg]</span>")
|
||||
to_world("<br>")
|
||||
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_CUSTOM_EVENT,
|
||||
list(
|
||||
"text" = custom_event_msg,
|
||||
)
|
||||
)
|
||||
|
||||
// normal verb for players to view info
|
||||
/client/verb/cmd_view_custom_event()
|
||||
set category = "OOC"
|
||||
|
||||
@@ -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,15 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
|
||||
msg = "<font color='blue'><b><font color=orange>[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentComReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
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 GLOB.admins) //VOREStation Edit - GLOB admins
|
||||
if(R_ADMIN|R_EVENT & C.holder.rights)
|
||||
to_chat(C,msg)
|
||||
C << 'sound/machines/signal.ogg'
|
||||
|
||||
/proc/Syndicate_announce(var/msg, var/mob/Sender)
|
||||
msg = "<font color='blue'><b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</font>"
|
||||
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 GLOB.admins) //VOREStation Edit - GLOB admins
|
||||
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
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
// Used when a target is out of sight or invisible.
|
||||
/datum/ai_holder/proc/engage_unseen_enemy()
|
||||
ai_log("engage_unseen_enemy() : Entering.", AI_LOG_TRACE)
|
||||
// Also handled in strategic updates but handling it here allows for more fine resolution timeouts
|
||||
if((lose_target_time+lose_target_timeout) >= world.time)
|
||||
return remove_target()
|
||||
// Lets do some last things before giving up.
|
||||
if(conserve_ammo || !holder.ICheckRangedAttack(target_last_seen_turf))
|
||||
if(get_dist(holder, target_last_seen_turf) > 1) // We last saw them over there.
|
||||
// Go to where you last saw the enemy.
|
||||
return give_destination(target_last_seen_turf, 1, TRUE) // Sets stance as well
|
||||
else if(lose_target_time < world.time) // We last saw them next to us, so do a blind attack on that tile.
|
||||
if(melee_on_tile(target_last_seen_turf) != ATTACK_SUCCESSFUL && intelligence_level >= AI_NORMAL)
|
||||
var/obj/O = find_escape_route()
|
||||
if(istype(O))
|
||||
return give_destination(get_turf(O), 0, TRUE)
|
||||
// We last saw them next to us, so do a blind attack on that tile.
|
||||
else if(melee_on_tile(target_last_seen_turf) != ATTACK_SUCCESSFUL && intelligence_level >= AI_NORMAL)
|
||||
var/obj/O = find_escape_route()
|
||||
if(istype(O))
|
||||
return give_destination(get_turf(O), 0, TRUE)
|
||||
else
|
||||
return find_target()
|
||||
else
|
||||
|
||||
@@ -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)
|
||||
@@ -183,6 +183,7 @@
|
||||
give_up_movement()
|
||||
lose_target_position()
|
||||
set_stance(STANCE_IDLE)
|
||||
return TRUE
|
||||
|
||||
// Check if target is visible to us.
|
||||
/datum/ai_holder/proc/can_see_target(atom/movable/the_target, view_range = vision_range)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
update_icon()
|
||||
return ..(loc)
|
||||
|
||||
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target)
|
||||
/obj/effect/blob/CanPass(var/atom/movable/mover, var/turf/target)
|
||||
return FALSE
|
||||
|
||||
/obj/effect/blob/ex_act(var/severity)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ var/global/list/all_tooltip_styles = list(
|
||||
if(!UI_style_new) return
|
||||
|
||||
var/UI_style_alpha_new = input(usr, "Select a new alpha (transparency) parameter for your UI, between 50 and 255") as null|num
|
||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
if(!UI_style_alpha_new || !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
|
||||
var/UI_style_color_new = input(usr, "Choose your UI color. Dark colors are not recommended!") as color|null
|
||||
if(!UI_style_color_new) return
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights && R_BAN & C.holder.rights)
|
||||
|
||||
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights)) //Event Managerss can't see stealthmins
|
||||
if(C.holder.fakekey && !((R_ADMIN & holder.rights) || (R_MOD & holder.rights))) //Event Managerss can't see stealthmins
|
||||
continue
|
||||
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
@@ -110,7 +110,7 @@
|
||||
else if(R_ADMIN & C.holder.rights && !(R_SERVER & C.holder.rights))
|
||||
modmsg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights))
|
||||
if(C.holder.fakekey && !((R_ADMIN & holder.rights) || (R_MOD & holder.rights)))
|
||||
continue
|
||||
if(C.holder.fakekey)
|
||||
msg += " <i>(as [C.holder.fakekey])</i>"
|
||||
@@ -131,7 +131,7 @@
|
||||
num_mods_online++
|
||||
|
||||
else if(R_SERVER & C.holder.rights)
|
||||
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights))
|
||||
if(C.holder.fakekey && !((R_ADMIN & holder.rights) || (R_MOD & holder.rights)))
|
||||
continue
|
||||
devmsg += "\t[C] is a [C.holder.rank]"
|
||||
if(C.holder.fakekey)
|
||||
@@ -152,7 +152,7 @@
|
||||
num_devs_online++
|
||||
|
||||
else
|
||||
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights))
|
||||
if(C.holder.fakekey && !((R_ADMIN & holder.rights) || (R_MOD & holder.rights)))
|
||||
continue
|
||||
eventMmsg += "\t[C] is a [C.holder.rank]"
|
||||
if(C.holder.fakekey)
|
||||
|
||||
@@ -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]" : ""]"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to_chat(user, "<span class='warning'>You can't fit anyone else into \the [src]!</span>")
|
||||
else
|
||||
var/obj/item/weapon/holder/micro/holder = I
|
||||
if(holder.held_mob && holder.held_mob in holder)
|
||||
if(holder.held_mob && (holder.held_mob in holder))
|
||||
to_chat(holder.held_mob, "<span class='warning'>[user] stuffs you into \the [src]!</span>")
|
||||
holder.held_mob.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You stuff \the [holder.held_mob] into \the [src]!</span>")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
set src in usr
|
||||
|
||||
adjust_fibers(usr)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/hyperfiber/proc/adjust_fibers(mob/user)
|
||||
if(hides_bulges == FALSE)
|
||||
@@ -63,7 +62,6 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
bluespace_size(usr)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/hyperfiber/bluespace/proc/bluespace_size(mob/usr as mob)
|
||||
if (!ishuman(usr))
|
||||
@@ -143,8 +141,8 @@
|
||||
name = "pizza delivery uniform"
|
||||
desc = "A dedicated outfit for pizza delivery people, one of most dangerous occupations around these parts. Can be rolled up for extra show of skin."
|
||||
icon = 'icons/obj/clothing/uniforms_vr.dmi'
|
||||
icon_override = 'icons/mob/uniform_vr.dmi'
|
||||
index = "vr"
|
||||
rolled_down_icon = 'icons/mob/uniform_rolled_down_vr.dmi'
|
||||
icon_state = "pizzadelivery"
|
||||
item_state = "pizzadelivery"
|
||||
rolled_down = 1
|
||||
rolled_down = 0
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -634,6 +634,7 @@
|
||||
/obj/item/weapon/circuitboard/atm,
|
||||
/obj/item/weapon/circuitboard/guestpass,
|
||||
/obj/item/weapon/circuitboard/keycard_auth,
|
||||
/obj/item/weapon/circuitboard/geiger,
|
||||
/obj/item/weapon/circuitboard/photocopier,
|
||||
/obj/item/weapon/circuitboard/fax,
|
||||
/obj/item/weapon/circuitboard/request,
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
emote_sound = 'sound/voice/teshsqueak.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
|
||||
/decl/emote/audible/teshchirp
|
||||
key = "chirp"
|
||||
key = "tchirp" // VOREStation Edit
|
||||
emote_message_1p = "You chirp!"
|
||||
emote_message_3p = "chirps!"
|
||||
emote_message_1p_target = "You chirp at TARGET!"
|
||||
|
||||
@@ -59,9 +59,11 @@
|
||||
emote_message_3p = "lets out a bork."
|
||||
emote_sound = 'sound/voice/bork.ogg'
|
||||
/decl/emote/audible/mrow
|
||||
key = "mrow"
|
||||
emote_message_3p = "lets out a mrow."
|
||||
emote_sound = 'sound/voice/mrow.ogg'
|
||||
/decl/emote/audible/hypno
|
||||
key = "hypno"
|
||||
emote_message_3p = "lets out a mystifying tone."
|
||||
emote_sound = 'sound/voice/hypno.ogg'
|
||||
/decl/emote/audible/hiss
|
||||
|
||||
@@ -10,4 +10,3 @@
|
||||
"sound" = H.species.male_scream_sound,
|
||||
"vol" = emote_volume
|
||||
)
|
||||
return ..()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(istype(get_area(temp_vent), /area/crew_quarters/sleep))
|
||||
continue
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/proc/send2irc(var/channel, var/msg)
|
||||
return // VOREStation Edit - Can't exploit shell if we never call shell!
|
||||
/* Unreachable with above VOREStation Edit
|
||||
if (config.use_irc_bot)
|
||||
if (config.use_node_bot)
|
||||
shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[escape_shell_arg(msg)]\"")
|
||||
@@ -22,6 +23,7 @@
|
||||
spawn(0)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [escape_shell_arg(msg)]")
|
||||
return
|
||||
*/
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
if(config.main_irc)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/proc/ext_python(var/script, var/args, var/scriptsprefix = 1)
|
||||
return // VOREStation Edit - Can't exploit shell if we never call shell!
|
||||
/* Unreachable with above vorestation edit
|
||||
if(scriptsprefix)
|
||||
script = "scripts/" + script
|
||||
|
||||
@@ -25,4 +26,6 @@
|
||||
script = replacetext(script, "/", "\\")
|
||||
|
||||
var/command = config.python_path + " " + script + " " + args
|
||||
return shell(command)
|
||||
return shell(command)
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -1,280 +1,280 @@
|
||||
/* SmartFridge. Much todo
|
||||
*/
|
||||
/obj/machinery/smartfridge
|
||||
name = "\improper SmartFridge"
|
||||
desc = "For storing all sorts of things! This one doesn't accept any of them!"
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "fridge_food"
|
||||
var/icon_base = "fridge_food" //Iconstate to base all the broken/deny/etc on
|
||||
var/icon_contents = "food" //Overlay to put on glass to show contents
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = NOREACT
|
||||
var/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000. //VOREStation Edit - Nonglobal so subtypes can override to lower values
|
||||
var/list/item_records = list()
|
||||
var/datum/stored_item/currently_vending = null //What we're putting out of the machine.
|
||||
var/stored_datum_type = /datum/stored_item
|
||||
var/seconds_electrified = 0;
|
||||
var/shoot_inventory = 0
|
||||
var/locked = 0
|
||||
var/scan_id = 1
|
||||
var/is_secure = 0
|
||||
var/wrenchable = 0
|
||||
var/datum/wires/smartfridge/wires = null
|
||||
var/persistent = null // Path of persistence datum used to track contents
|
||||
|
||||
/obj/machinery/smartfridge/secure
|
||||
is_secure = 1
|
||||
icon_state = "fridge_sci"
|
||||
icon_base = "fridge_sci"
|
||||
icon_contents = "chem"
|
||||
|
||||
/obj/machinery/smartfridge/Initialize()
|
||||
. = ..()
|
||||
if(persistent)
|
||||
SSpersistence.track_value(src, persistent)
|
||||
if(is_secure)
|
||||
wires = new/datum/wires/smartfridge/secure(src)
|
||||
else
|
||||
wires = new/datum/wires/smartfridge(src)
|
||||
|
||||
/obj/machinery/smartfridge/Destroy()
|
||||
qdel(wires)
|
||||
for(var/A in item_records) //Get rid of item records.
|
||||
qdel(A)
|
||||
wires = null
|
||||
if(persistent)
|
||||
SSpersistence.forget_value(src, persistent)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/smartfridge/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(src.seconds_electrified > 0)
|
||||
src.seconds_electrified--
|
||||
if(src.shoot_inventory && prob(2))
|
||||
src.throw_item()
|
||||
|
||||
/obj/machinery/smartfridge/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/smartfridge/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "[icon_base]-off"
|
||||
else
|
||||
icon_state = icon_base
|
||||
|
||||
if(is_secure)
|
||||
add_overlay("[icon_base]-sidepanel")
|
||||
|
||||
if(panel_open)
|
||||
add_overlay("[icon_base]-panel")
|
||||
|
||||
var/is_off = ""
|
||||
if(inoperable())
|
||||
is_off = "-off"
|
||||
|
||||
// Fridge contents
|
||||
if(contents)
|
||||
switch(contents.len)
|
||||
if(0)
|
||||
add_overlay("empty[is_off]")
|
||||
if(1 to 2)
|
||||
add_overlay("[icon_contents]-1[is_off]")
|
||||
if(3 to 5)
|
||||
add_overlay("[icon_contents]-2[is_off]")
|
||||
if(6 to 8)
|
||||
add_overlay("[icon_contents]-3[is_off]")
|
||||
else
|
||||
add_overlay("[icon_contents]-4[is_off]")
|
||||
|
||||
// Fridge top
|
||||
var/image/top = image(icon, "[icon_base]-top")
|
||||
top.pixel_z = 32
|
||||
top.layer = ABOVE_WINDOW_LAYER
|
||||
add_overlay(top)
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.is_screwdriver())
|
||||
panel_open = !panel_open
|
||||
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(wrenchable && default_unfasten_wrench(user, O, 20))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/device/multitool) || O.is_wirecutter())
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='notice'>\The [src] is unpowered and useless.</span>")
|
||||
return
|
||||
|
||||
if(accept_check(O))
|
||||
user.remove_from_mob(O)
|
||||
stock(O)
|
||||
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].</span>", "<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weapon/storage/bag))
|
||||
var/obj/item/weapon/storage/bag/P = O
|
||||
var/plants_loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(accept_check(G))
|
||||
P.remove_from_storage(G) //fixes ui bug - Pull Request 5515
|
||||
stock(G)
|
||||
plants_loaded = 1
|
||||
if(plants_loaded)
|
||||
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [P].</span>", "<span class='notice'>You load \the [src] with \the [P].</span>")
|
||||
if(P.contents.len > 0)
|
||||
to_chat(user, "<span class='notice'>Some items are refused.</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weapon/gripper)) // Grippers. ~Mechoid.
|
||||
var/obj/item/weapon/gripper/B = O //B, for Borg.
|
||||
if(!B.wrapped)
|
||||
to_chat(user, "\The [B] is not holding anything.")
|
||||
return
|
||||
else
|
||||
var/B_held = B.wrapped
|
||||
to_chat(user, "You use \the [B] to put \the [B_held] into \the [src].")
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] smartly refuses [O].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/secure/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
to_chat(user, "You short out the product lock on [src].")
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/proc/find_record(var/obj/item/O)
|
||||
for(var/datum/stored_item/I as anything in item_records)
|
||||
if((O.type == I.item_path) && (O.name == I.item_name))
|
||||
return I
|
||||
return null
|
||||
|
||||
/obj/machinery/smartfridge/proc/stock(obj/item/O)
|
||||
var/datum/stored_item/I = find_record(O)
|
||||
if(!istype(I))
|
||||
I = new stored_datum_type(src, O.type, O.name)
|
||||
item_records.Add(I)
|
||||
I.add_product(O)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/proc/vend(datum/stored_item/I, var/count)
|
||||
var/amount = I.get_amount()
|
||||
// Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
if(amount <= 0)
|
||||
return
|
||||
|
||||
for(var/i = 1 to min(amount, count))
|
||||
I.get_product(get_turf(src))
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
wires.Interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/smartfridge/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "SmartVend", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/smartfridge/tgui_data(mob/user)
|
||||
. = list()
|
||||
|
||||
var/list/items = list()
|
||||
for(var/i=1 to length(item_records))
|
||||
var/datum/stored_item/I = item_records[i]
|
||||
var/count = I.get_amount()
|
||||
if(count > 0)
|
||||
items.Add(list(list("name" = html_encode(capitalize(I.item_name)), "index" = i, "amount" = count)))
|
||||
|
||||
.["contents"] = items
|
||||
.["name"] = name
|
||||
.["locked"] = locked
|
||||
.["secure"] = is_secure
|
||||
|
||||
/obj/machinery/smartfridge/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
add_fingerprint(usr)
|
||||
switch(action)
|
||||
if("Release")
|
||||
var/amount = 0
|
||||
if(params["amount"])
|
||||
amount = params["amount"]
|
||||
else
|
||||
amount = input("How many items?", "How many items would you like to take out?", 1) as num|null
|
||||
|
||||
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src))
|
||||
return FALSE
|
||||
|
||||
var/index = text2num(params["index"])
|
||||
if(index < 1 || index > LAZYLEN(item_records))
|
||||
return TRUE
|
||||
|
||||
vend(item_records[index], amount)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/smartfridge/proc/throw_item()
|
||||
var/obj/throw_item = null
|
||||
var/mob/living/target = locate() in view(7,src)
|
||||
if(!target)
|
||||
return FALSE
|
||||
|
||||
for(var/datum/stored_item/I in item_records)
|
||||
throw_item = I.get_product(get_turf(src))
|
||||
if (!throw_item)
|
||||
continue
|
||||
break
|
||||
|
||||
if(!throw_item)
|
||||
return FALSE
|
||||
spawn(0)
|
||||
throw_item.throw_at(target,16,3,src)
|
||||
src.visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
SStgui.update_uis(src)
|
||||
return TRUE
|
||||
|
||||
/************************
|
||||
* Secure SmartFridges
|
||||
*************************/
|
||||
|
||||
/obj/machinery/smartfridge/secure/tgui_act(action, params)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return TRUE
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
|
||||
if(!allowed(usr) && !emagged && locked != -1 && action == "Release")
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return TRUE
|
||||
return ..()
|
||||
/* SmartFridge. Much todo
|
||||
*/
|
||||
/obj/machinery/smartfridge
|
||||
name = "\improper SmartFridge"
|
||||
desc = "For storing all sorts of things! This one doesn't accept any of them!"
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "fridge_food"
|
||||
var/icon_base = "fridge_food" //Iconstate to base all the broken/deny/etc on
|
||||
var/icon_contents = "food" //Overlay to put on glass to show contents
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = NOREACT
|
||||
var/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
|
||||
var/list/item_records = list()
|
||||
var/datum/stored_item/currently_vending = null //What we're putting out of the machine.
|
||||
var/stored_datum_type = /datum/stored_item
|
||||
var/seconds_electrified = 0;
|
||||
var/shoot_inventory = 0
|
||||
var/locked = 0
|
||||
var/scan_id = 1
|
||||
var/is_secure = 0
|
||||
var/wrenchable = 0
|
||||
var/datum/wires/smartfridge/wires = null
|
||||
var/persistent = null // Path of persistence datum used to track contents
|
||||
|
||||
/obj/machinery/smartfridge/secure
|
||||
is_secure = 1
|
||||
icon_state = "fridge_sci"
|
||||
icon_base = "fridge_sci"
|
||||
icon_contents = "chem"
|
||||
|
||||
/obj/machinery/smartfridge/Initialize()
|
||||
. = ..()
|
||||
if(persistent)
|
||||
SSpersistence.track_value(src, persistent)
|
||||
if(is_secure)
|
||||
wires = new/datum/wires/smartfridge/secure(src)
|
||||
else
|
||||
wires = new/datum/wires/smartfridge(src)
|
||||
|
||||
/obj/machinery/smartfridge/Destroy()
|
||||
qdel(wires)
|
||||
for(var/A in item_records) //Get rid of item records.
|
||||
qdel(A)
|
||||
wires = null
|
||||
if(persistent)
|
||||
SSpersistence.forget_value(src, persistent)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/smartfridge/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(src.seconds_electrified > 0)
|
||||
src.seconds_electrified--
|
||||
if(src.shoot_inventory && prob(2))
|
||||
src.throw_item()
|
||||
|
||||
/obj/machinery/smartfridge/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/smartfridge/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "[icon_base]-off"
|
||||
else
|
||||
icon_state = icon_base
|
||||
|
||||
if(is_secure)
|
||||
add_overlay("[icon_base]-sidepanel")
|
||||
|
||||
if(panel_open)
|
||||
add_overlay("[icon_base]-panel")
|
||||
|
||||
var/is_off = ""
|
||||
if(inoperable())
|
||||
is_off = "-off"
|
||||
|
||||
// Fridge contents
|
||||
if(contents)
|
||||
switch(contents.len)
|
||||
if(0)
|
||||
add_overlay("empty[is_off]")
|
||||
if(1 to 2)
|
||||
add_overlay("[icon_contents]-1[is_off]")
|
||||
if(3 to 5)
|
||||
add_overlay("[icon_contents]-2[is_off]")
|
||||
if(6 to 8)
|
||||
add_overlay("[icon_contents]-3[is_off]")
|
||||
else
|
||||
add_overlay("[icon_contents]-4[is_off]")
|
||||
|
||||
// Fridge top
|
||||
var/image/top = image(icon, "[icon_base]-top")
|
||||
top.pixel_z = 32
|
||||
top.layer = ABOVE_WINDOW_LAYER
|
||||
add_overlay(top)
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.is_screwdriver())
|
||||
panel_open = !panel_open
|
||||
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(wrenchable && default_unfasten_wrench(user, O, 20))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/device/multitool) || O.is_wirecutter())
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='notice'>\The [src] is unpowered and useless.</span>")
|
||||
return
|
||||
|
||||
if(accept_check(O))
|
||||
user.remove_from_mob(O)
|
||||
stock(O)
|
||||
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].</span>", "<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weapon/storage/bag))
|
||||
var/obj/item/weapon/storage/bag/P = O
|
||||
var/plants_loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(accept_check(G))
|
||||
P.remove_from_storage(G) //fixes ui bug - Pull Request 5515
|
||||
stock(G)
|
||||
plants_loaded = 1
|
||||
if(plants_loaded)
|
||||
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [P].</span>", "<span class='notice'>You load \the [src] with \the [P].</span>")
|
||||
if(P.contents.len > 0)
|
||||
to_chat(user, "<span class='notice'>Some items are refused.</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weapon/gripper)) // Grippers. ~Mechoid.
|
||||
var/obj/item/weapon/gripper/B = O //B, for Borg.
|
||||
if(!B.wrapped)
|
||||
to_chat(user, "\The [B] is not holding anything.")
|
||||
return
|
||||
else
|
||||
var/B_held = B.wrapped
|
||||
to_chat(user, "You use \the [B] to put \the [B_held] into \the [src].")
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] smartly refuses [O].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/secure/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
to_chat(user, "You short out the product lock on [src].")
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/proc/find_record(var/obj/item/O)
|
||||
for(var/datum/stored_item/I as anything in item_records)
|
||||
if((O.type == I.item_path) && (O.name == I.item_name))
|
||||
return I
|
||||
return null
|
||||
|
||||
/obj/machinery/smartfridge/proc/stock(obj/item/O)
|
||||
var/datum/stored_item/I = find_record(O)
|
||||
if(!istype(I))
|
||||
I = new stored_datum_type(src, O.type, O.name)
|
||||
item_records.Add(I)
|
||||
I.add_product(O)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/proc/vend(datum/stored_item/I, var/count)
|
||||
var/amount = I.get_amount()
|
||||
// Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
if(amount <= 0)
|
||||
return
|
||||
|
||||
for(var/i = 1 to min(amount, count))
|
||||
I.get_product(get_turf(src))
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
wires.Interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/smartfridge/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "SmartVend", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/smartfridge/tgui_data(mob/user)
|
||||
. = list()
|
||||
|
||||
var/list/items = list()
|
||||
for(var/i=1 to length(item_records))
|
||||
var/datum/stored_item/I = item_records[i]
|
||||
var/count = I.get_amount()
|
||||
if(count > 0)
|
||||
items.Add(list(list("name" = html_encode(capitalize(I.item_name)), "index" = i, "amount" = count)))
|
||||
|
||||
.["contents"] = items
|
||||
.["name"] = name
|
||||
.["locked"] = locked
|
||||
.["secure"] = is_secure
|
||||
|
||||
/obj/machinery/smartfridge/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
add_fingerprint(usr)
|
||||
switch(action)
|
||||
if("Release")
|
||||
var/amount = 0
|
||||
if(params["amount"])
|
||||
amount = params["amount"]
|
||||
else
|
||||
amount = input("How many items?", "How many items would you like to take out?", 1) as num|null
|
||||
|
||||
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src))
|
||||
return FALSE
|
||||
|
||||
var/index = text2num(params["index"])
|
||||
if(index < 1 || index > LAZYLEN(item_records))
|
||||
return TRUE
|
||||
|
||||
vend(item_records[index], amount)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/smartfridge/proc/throw_item()
|
||||
var/obj/throw_item = null
|
||||
var/mob/living/target = locate() in view(7,src)
|
||||
if(!target)
|
||||
return FALSE
|
||||
|
||||
for(var/datum/stored_item/I in item_records)
|
||||
throw_item = I.get_product(get_turf(src))
|
||||
if (!throw_item)
|
||||
continue
|
||||
break
|
||||
|
||||
if(!throw_item)
|
||||
return FALSE
|
||||
spawn(0)
|
||||
throw_item.throw_at(target,16,3,src)
|
||||
src.visible_message("<span class='warning'>[src] launches [throw_item.name] at [target.name]!</span>")
|
||||
SStgui.update_uis(src)
|
||||
return TRUE
|
||||
|
||||
/************************
|
||||
* Secure SmartFridges
|
||||
*************************/
|
||||
|
||||
/obj/machinery/smartfridge/secure/tgui_act(action, params)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return TRUE
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
|
||||
if(!allowed(usr) && !emagged && locked != -1 && action == "Release")
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -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,7 +74,7 @@
|
||||
/obj/effect/plant/Destroy()
|
||||
neighbors.Cut()
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
unsense_proximity(callback = .HasProximity, center = get_turf(src))
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = get_turf(src))
|
||||
SSplants.remove_plant(src)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
SSplants.add_plant(neighbor)
|
||||
@@ -108,7 +108,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)
|
||||
|
||||
@@ -100,17 +100,17 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
data["power_draw_per_use"] = power_draw_per_use
|
||||
data["extended_desc"] = extended_desc
|
||||
|
||||
data["inputs"] = list()
|
||||
var/list/inputs = list()
|
||||
var/list/outputs = list()
|
||||
var/list/activators = list()
|
||||
for(var/datum/integrated_io/io in inputs)
|
||||
data["inputs"].Add(list(tgui_pin_data(io)))
|
||||
inputs.Add(list(tgui_pin_data(io)))
|
||||
|
||||
data["outputs"] = list()
|
||||
for(var/datum/integrated_io/io in outputs)
|
||||
data["outputs"].Add(list(tgui_pin_data(io)))
|
||||
outputs.Add(list(tgui_pin_data(io)))
|
||||
|
||||
data["activators"] = list()
|
||||
for(var/datum/integrated_io/io in activators)
|
||||
var/list/activator = list(
|
||||
var/list/list/activator = list(
|
||||
"ref" = REF(io),
|
||||
"name" = io.name,
|
||||
"pulse_out" = io.data,
|
||||
@@ -124,7 +124,11 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
"holder_name" = linked.holder.displayed_name,
|
||||
)))
|
||||
|
||||
data["activators"].Add(list(activator))
|
||||
activators.Add(list(activator))
|
||||
|
||||
data["inputs"] = inputs
|
||||
data["outputs"] = outputs
|
||||
data["activators"] = activators
|
||||
|
||||
return data
|
||||
|
||||
@@ -136,14 +140,15 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
pindata["name"] = io.name
|
||||
pindata["data"] = io.display_data(io.data)
|
||||
pindata["ref"] = REF(io)
|
||||
pindata["linked"] = list()
|
||||
var/list/linked_list = list()
|
||||
for(var/datum/integrated_io/linked in io.linked)
|
||||
pindata["linked"].Add(list(list(
|
||||
linked_list.Add(list(list(
|
||||
"ref" = REF(linked),
|
||||
"name" = linked.name,
|
||||
"holder_ref" = REF(linked.holder),
|
||||
"holder_name" = linked.holder.displayed_name,
|
||||
)))
|
||||
pindata["linked"] = linked_list
|
||||
return pindata
|
||||
|
||||
/obj/item/integrated_circuit/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
|
||||
@@ -108,12 +108,14 @@
|
||||
for(var/category in SScircuit.circuit_fabricator_recipe_list)
|
||||
var/list/cat_obj = list(
|
||||
"name" = category,
|
||||
"items" = list()
|
||||
"items" = null
|
||||
)
|
||||
var/list/circuit_list = SScircuit.circuit_fabricator_recipe_list[category]
|
||||
var/list/items = list()
|
||||
for(var/path in circuit_list)
|
||||
var/obj/O = path
|
||||
var/can_build = TRUE
|
||||
|
||||
if(ispath(path, /obj/item/integrated_circuit))
|
||||
var/obj/item/integrated_circuit/IC = path
|
||||
if((initial(IC.spawn_flags) & IC_SPAWN_RESEARCH) && (!(initial(IC.spawn_flags) & IC_SPAWN_DEFAULT)) && !upgraded)
|
||||
@@ -127,13 +129,15 @@
|
||||
var/obj/item/I = path
|
||||
cost = initial(I.w_class)
|
||||
|
||||
cat_obj["items"].Add(list(list(
|
||||
items.Add(list(list(
|
||||
"name" = initial(O.name),
|
||||
"desc" = initial(O.desc),
|
||||
"can_build" = can_build,
|
||||
"cost" = cost,
|
||||
"path" = path,
|
||||
)))
|
||||
|
||||
cat_obj["items"] = items
|
||||
categories.Add(list(cat_obj))
|
||||
data["categories"] = categories
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/obj/effect/fake_sun
|
||||
name = "fake sun"
|
||||
desc = "Deletes itself, but first updates all the lighting on outdoor turfs."
|
||||
icon = 'icons/effects/effects_vr.dmi'
|
||||
icon_state = "fakesun"
|
||||
|
||||
var/list/possible_light_setups = list(
|
||||
list(
|
||||
"brightness" = 6.0,
|
||||
"color" = "#abfff7"
|
||||
),
|
||||
list(
|
||||
"brightness" = 4.0,
|
||||
"color" = "#F4EA55"
|
||||
),
|
||||
list(
|
||||
"brightness" = 2.5,
|
||||
"color" = "#EE9AC6"
|
||||
),
|
||||
list(
|
||||
"brightness" = 1.0,
|
||||
"color" = "#A3A291"
|
||||
),
|
||||
list(
|
||||
"brightness" = 1.0,
|
||||
"color" = "#F07AD8"
|
||||
),
|
||||
list(
|
||||
"brightness" = 1.0,
|
||||
"color" = "#61AEF3"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.7,
|
||||
"color" = "#f3932d"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.5,
|
||||
"color" = "#631E8A"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.3,
|
||||
"color" = "#253682"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.1,
|
||||
"color" = "#27024B"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.1,
|
||||
"color" = "#9AEAEE"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0.1,
|
||||
"color" = "#B92B00"
|
||||
),
|
||||
list(
|
||||
"brightness" = 0,
|
||||
"color" = "#000000"
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
/obj/effect/fake_sun/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/fake_sun/LateInitialize()
|
||||
. = ..()
|
||||
|
||||
var/list/our_choice = pick(possible_light_setups)
|
||||
|
||||
// Calculate new values to apply
|
||||
var/new_brightness = our_choice["brightness"]
|
||||
var/new_color = our_choice["color"]
|
||||
var/lum_r = new_brightness * GetRedPart (new_color) / 255
|
||||
var/lum_g = new_brightness * GetGreenPart(new_color) / 255
|
||||
var/lum_b = new_brightness * GetBluePart (new_color) / 255
|
||||
var/static/update_gen = -1 // Used to prevent double-processing corners. Otherwise would happen when looping over adjacent turfs.
|
||||
|
||||
var/list/turfs = block(locate(1,1,z),locate(world.maxx,world.maxy,z))
|
||||
|
||||
for(var/turf/simulated/T as anything in turfs)
|
||||
if(!T.lighting_overlay)
|
||||
T.lighting_build_overlay()
|
||||
if(!T.outdoors)
|
||||
continue
|
||||
for(var/C in T.get_corners())
|
||||
var/datum/lighting_corner/LC = C
|
||||
if(LC.update_gen != update_gen && LC.active)
|
||||
LC.update_gen = update_gen
|
||||
LC.update_lumcount(lum_r, lum_g, lum_b)
|
||||
update_gen--
|
||||
qdel(src)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"silicates" = /obj/item/weapon/ore/glass,
|
||||
"carbon" = /obj/item/weapon/ore/coal,
|
||||
"copper" = /obj/item/weapon/ore/copper,
|
||||
"tin" = /obj/item/weapon/ore/tin,
|
||||
// "tin" = /obj/item/weapon/ore/tin,
|
||||
"bauxite" = /obj/item/weapon/ore/bauxite,
|
||||
"rutile" = /obj/item/weapon/ore/rutile
|
||||
)
|
||||
|
||||
@@ -69,20 +69,21 @@
|
||||
else
|
||||
data["has_id"] = FALSE
|
||||
|
||||
data["ores"] = list()
|
||||
|
||||
var/list/ores = list()
|
||||
for(var/ore in machine.ores_processing)
|
||||
if(!machine.ores_stored[ore] && !show_all_ores)
|
||||
continue
|
||||
var/ore/O = GLOB.ore_data[ore]
|
||||
if(!O)
|
||||
continue
|
||||
data["ores"].Add(list(list(
|
||||
ores.Add(list(list(
|
||||
"ore" = ore,
|
||||
"name" = O.display_name,
|
||||
"amount" = machine.ores_stored[ore],
|
||||
"processing" = machine.ores_processing[ore] ? machine.ores_processing[ore] : 0,
|
||||
)))
|
||||
|
||||
data["ores"] = ores
|
||||
data["showAllOres"] = show_all_ores
|
||||
data["power"] = machine.active
|
||||
data["speed"] = machine.speed_process
|
||||
@@ -158,8 +159,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 +330,4 @@
|
||||
#undef PROCESS_SMELT
|
||||
#undef PROCESS_COMPRESS
|
||||
#undef PROCESS_ALLOY
|
||||
|
||||
|
||||
@@ -37,13 +37,15 @@
|
||||
/obj/machinery/mineral/stacking_unit_console/tgui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
|
||||
data["stacktypes"] = list()
|
||||
|
||||
var/list/stacktypes = list()
|
||||
for(var/stacktype in machine.stack_storage)
|
||||
if(machine.stack_storage[stacktype] > 0)
|
||||
data["stacktypes"].Add(list(list(
|
||||
stacktypes.Add(list(list(
|
||||
"type" = stacktype,
|
||||
"amt" = machine.stack_storage[stacktype],
|
||||
)))
|
||||
data["stacktypes"] = stacktypes
|
||||
data["stackingAmt"] = machine.stack_amt
|
||||
return data
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ var/list/mining_overlay_cache = list()
|
||||
"marble" = /obj/item/weapon/ore/marble,
|
||||
"lead" = /obj/item/weapon/ore/lead,
|
||||
"copper" = /obj/item/weapon/ore/copper,
|
||||
"tin" = /obj/item/weapon/ore/tin,
|
||||
// "tin" = /obj/item/weapon/ore/tin,
|
||||
"bauxite" = /obj/item/weapon/ore/bauxite,
|
||||
// "void opal" = /obj/item/weapon/ore/void_opal,
|
||||
// "painite" = /obj/item/weapon/ore/painite,
|
||||
@@ -650,10 +650,10 @@ turf/simulated/mineral/floor/light_corner
|
||||
|
||||
var/mineral_name
|
||||
if(rare_ore)
|
||||
mineral_name = pickweight(list("marble" = 5,/* "quartz" = 15,*/ "copper" = 10, "tin" = 5, "bauxite" = 5, "uranium" = 15, "platinum" = 20, "hematite" = 15, "rutile" = 20, "carbon" = 15, "diamond" = 3, "gold" = 15, "silver" = 15, "phoron" = 25, "lead" = 5,/* "void opal" = 1,*/ "verdantium" = 2/*, "painite" = 1*/))
|
||||
mineral_name = pickweight(list("marble" = 5,/* "quartz" = 15,*/ "copper" = 10, /*"tin" = 5,*/ "bauxite" = 5, "uranium" = 15, "platinum" = 20, "hematite" = 15, "rutile" = 20, "carbon" = 15, "diamond" = 3, "gold" = 15, "silver" = 15, "phoron" = 25, "lead" = 5,/* "void opal" = 1,*/ "verdantium" = 2/*, "painite" = 1*/))
|
||||
|
||||
else
|
||||
mineral_name = pickweight(list("marble" = 3,/* "quartz" = 10,*/ "copper" = 20, "tin" = 15, "bauxite" = 15, "uranium" = 10, "platinum" = 10, "hematite" = 70, "rutile" = 15, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 3,/* "void opal" = 1,*/ "verdantium" = 1/*, "painite" = 1*/))
|
||||
mineral_name = pickweight(list("marble" = 3,/* "quartz" = 10,*/ "copper" = 20, /*"tin" = 15,*/ "bauxite" = 15, "uranium" = 10, "platinum" = 10, "hematite" = 70, "rutile" = 15, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 3,/* "void opal" = 1,*/ "verdantium" = 1/*, "painite" = 1*/))
|
||||
|
||||
if(mineral_name && (mineral_name in GLOB.ore_data))
|
||||
mineral = GLOB.ore_data[mineral_name]
|
||||
|
||||
@@ -207,7 +207,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
..()
|
||||
|
||||
/obj/structure/table/survival_pod/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||
/obj/structure/table/survival_pod/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -331,7 +331,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
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())
|
||||
/mob/observer/dead/proc/jumpable_areas()
|
||||
var/list/areas = return_sorted_areas()
|
||||
if(client?.holder)
|
||||
return areas
|
||||
|
||||
for(var/area/A as anything in areas)
|
||||
if(A.z in using_map?.secret_levels)
|
||||
areas -= A
|
||||
return areas
|
||||
|
||||
/mob/observer/dead/proc/jumpable_mobs()
|
||||
var/list/mobs = getmobs()
|
||||
if(client?.holder)
|
||||
return mobs
|
||||
|
||||
for(var/key in mobs)
|
||||
var/mobz = get_z(mobs[key])
|
||||
if(mobz in using_map?.secret_levels)
|
||||
mobs -= key
|
||||
return mobs
|
||||
|
||||
/mob/observer/dead/proc/dead_tele(var/area/A in jumpable_areas())
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc = "Teleport to a location"
|
||||
@@ -341,27 +362,51 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return
|
||||
|
||||
if(!A)
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in return_sorted_areas()
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in jumpable_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
usr.on_mob_jump()
|
||||
|
||||
/mob/observer/dead/verb/follow(input in getmobs())
|
||||
/mob/observer/dead/verb/follow(input in jumpable_mobs())
|
||||
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()
|
||||
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in jumpable_mobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
var/target = jumpable_mobs()[input]
|
||||
if(!target) return
|
||||
ManualFollow(target)
|
||||
|
||||
/mob/observer/dead/forceMove(atom/destination)
|
||||
if(client?.holder)
|
||||
return ..()
|
||||
|
||||
if(get_z(destination) in using_map?.secret_levels)
|
||||
to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts."))
|
||||
if(following)
|
||||
stop_following()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/Move(atom/newloc, direct = 0, movetime)
|
||||
if(client?.holder)
|
||||
return ..()
|
||||
|
||||
if(get_z(newloc) in using_map?.secret_levels)
|
||||
to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts."))
|
||||
if(following)
|
||||
stop_following()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
// This is the ghost's follow verb with an argument
|
||||
/mob/observer/dead/proc/ManualFollow(var/atom/movable/target)
|
||||
if(!target)
|
||||
@@ -371,6 +416,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(check_holy(targetloc))
|
||||
to_chat(usr, "<span class='warning'>You cannot follow a mob standing on holy grounds!</span>")
|
||||
return
|
||||
if(get_z(target) in using_map?.secret_levels)
|
||||
to_chat(src, SPAN_WARNING("Sorry, that target is in an area that ghosts aren't allowed to go."))
|
||||
return
|
||||
if(target != src)
|
||||
if(following && following == target)
|
||||
return
|
||||
@@ -418,7 +466,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set_dir(2) //reset dir so the right directional sprites show up
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/stop_orbit(datum/component/orbiter/orbits)
|
||||
/mob/observer/dead/stop_orbit()
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
@@ -473,7 +521,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
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
|
||||
/mob/observer/dead/verb/jumptomob(input in jumpable_mobs()) //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"
|
||||
@@ -483,11 +531,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in getmobs()
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in jumpable_mobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
var/target = jumpable_mobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
set name = "Notify Transcore"
|
||||
set desc = "If your past-due backup notification was missed or ignored, you can use this to send a new one."
|
||||
|
||||
if(src.mind && src.mind.name in SStranscore.backed_up)
|
||||
if(src.mind && (src.mind.name in SStranscore.backed_up))
|
||||
var/datum/transhuman/mind_record/record = SStranscore.backed_up[src.mind.name]
|
||||
if(!(record.dead_state == MR_DEAD))
|
||||
to_chat(src, "<span class='warning'>Your backup is not past-due yet.</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -162,14 +162,14 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/protean_blob/adjustBruteLoss(var/amount)
|
||||
/mob/living/simple_mob/protean_blob/adjustBruteLoss(var/amount,var/include_robo)
|
||||
amount *= 1.5
|
||||
if(humanform)
|
||||
return humanform.adjustBruteLoss(amount)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/protean_blob/adjustFireLoss(var/amount)
|
||||
/mob/living/simple_mob/protean_blob/adjustFireLoss(var/amount,var/include_robo)
|
||||
amount *= 1.5
|
||||
if(humanform)
|
||||
return humanform.adjustFireLoss(amount)
|
||||
@@ -187,7 +187,7 @@
|
||||
return humanform.adjustOxyLoss(amount)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_mob/protean_blob/adjustHalLoss(amount)
|
||||
if(humanform)
|
||||
return humanform.adjustHalLoss(amount)
|
||||
@@ -230,7 +230,7 @@
|
||||
else
|
||||
animate(src, alpha = 0, time = 2 SECONDS)
|
||||
sleep(2 SECONDS)
|
||||
|
||||
|
||||
if(!QDELETED(src)) // Human's handle death should have taken us, but maybe we were adminspawned or something without a human counterpart
|
||||
qdel(src)
|
||||
|
||||
@@ -380,7 +380,7 @@ var/global/list/disallowed_protean_accessories = list(
|
||||
var/obj/belly/B = belly
|
||||
B.forceMove(blob)
|
||||
B.owner = blob
|
||||
|
||||
|
||||
//We can still speak our languages!
|
||||
blob.languages = languages.Copy()
|
||||
|
||||
@@ -402,10 +402,14 @@ var/global/list/disallowed_protean_accessories = list(
|
||||
if(!istype(blob))
|
||||
return
|
||||
|
||||
if(istype(blob.loc, /obj/machinery/atmospherics))
|
||||
to_chat(src, "You cannot reform in these confines!")
|
||||
return
|
||||
|
||||
var/panel_was_up = FALSE
|
||||
if(client?.statpanel == "Protean")
|
||||
panel_was_up = TRUE
|
||||
|
||||
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(LAZYLEN(buckled_mobs))
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
for(var/obj/item/organ/I in H.internal_organs)
|
||||
I.removed()
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
for(var/obj/item/I in H.contents)
|
||||
H.drop_from_inventory(I)
|
||||
|
||||
qdel(H)
|
||||
|
||||
@@ -308,6 +308,11 @@
|
||||
wikilink="https://wiki.vore-station.net/Diona"
|
||||
|
||||
/datum/species/human
|
||||
blurb = "Humanity originated in the Sol system, and over the last three centuries has spread \
|
||||
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
|
||||
While the central Sol government maintains control of its far-flung people, powerful corporate \
|
||||
interests, rampant cyber and bio-augmentation and secretive factions make life on most human \
|
||||
worlds tumultous at best."
|
||||
color_mult = 1
|
||||
icobase = 'icons/mob/human_races/r_human_vr.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_human_vr.dmi'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
|
||||
overlays_standing[HAIR_LAYER] = image(face_standing, layer = BODY_LAYER+HAIR_LAYER, "pixel_y" = head_organ.head_offset)
|
||||
apply_layer(HAIR_LAYER)
|
||||
return
|
||||
//return //VOREStation Edit
|
||||
|
||||
// VOREStation Edit - START
|
||||
var/icon/hair_acc_s = get_hair_accessory_overlay()
|
||||
@@ -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))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@
|
||||
var/decompiler = FALSE
|
||||
var/delivery = FALSE
|
||||
var/delivery_tag = "Fuel"
|
||||
var/list/deliverylists = list()
|
||||
var/list/list/deliverylists = list()
|
||||
var/list/deliveryslot_1 = list()
|
||||
var/list/deliveryslot_2 = list()
|
||||
var/list/deliveryslot_3 = list()
|
||||
|
||||
@@ -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,8 @@
|
||||
//VOREStation Edit - multiz lol
|
||||
if(D.foreign_droid)
|
||||
continue
|
||||
|
||||
data["drones"].Add(list(list(
|
||||
|
||||
drones.Add(list(list(
|
||||
"name" = D.real_name,
|
||||
"active" = D.stat != 2,
|
||||
"charge" = D.cell.charge,
|
||||
@@ -51,6 +51,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)
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
if(C.installed != 0) amount += C.electronics_damage
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
|
||||
/mob/living/silicon/robot/adjustBruteLoss(var/amount,var/include_robo)
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0)
|
||||
else
|
||||
heal_overall_damage(-amount, 0)
|
||||
|
||||
/mob/living/silicon/robot/adjustFireLoss(var/amount)
|
||||
/mob/living/silicon/robot/adjustFireLoss(var/amount,var/include_robo)
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount)
|
||||
else
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/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)
|
||||
/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)
|
||||
@@ -113,7 +113,7 @@
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
/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
|
||||
|
||||
|
||||
@@ -153,8 +153,22 @@
|
||||
show_malf_ai()
|
||||
..()
|
||||
|
||||
/* VOREStation Removal
|
||||
// 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)
|
||||
/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
|
||||
@@ -173,7 +187,7 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
var/var/datum/language/added_language = GLOB.all_languages[language]
|
||||
var/datum/language/added_language = GLOB.all_languages[language]
|
||||
if(!added_language)
|
||||
return
|
||||
|
||||
@@ -183,7 +197,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
var/var/datum/language/removed_language = GLOB.all_languages[rem_language]
|
||||
var/datum/language/removed_language = GLOB.all_languages[rem_language]
|
||||
if(!removed_language)
|
||||
return
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
return FALSE
|
||||
|
||||
// Checks to see if mob doesn't like this kind of turf
|
||||
/mob/living/simple_mob/IMove(newloc)
|
||||
/mob/living/simple_mob/IMove(turf/newloc, safety = TRUE)
|
||||
if(istype(newloc,/turf/unsimulated/floor/sky))
|
||||
return MOVEMENT_FAILED //Mobs aren't that stupid, probably
|
||||
return ..() // Procede as normal.
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
if(large_cocoon)
|
||||
C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3")
|
||||
|
||||
ai_holder.target = null
|
||||
ai_holder.remove_target()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -139,14 +139,14 @@
|
||||
say_list_type = /datum/say_list/possum
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/opossum)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/opossum/adjustBruteLoss(damage)
|
||||
/mob/living/simple_mob/animal/passive/opossum/adjustBruteLoss(var/amount,var/include_robo)
|
||||
. = ..()
|
||||
if(damage >= 3)
|
||||
if(amount >= 3)
|
||||
respond_to_damage()
|
||||
|
||||
/mob/living/simple_mob/animal/passive/opossum/adjustFireLoss(damage)
|
||||
/mob/living/simple_mob/animal/passive/opossum/adjustFireLoss(var/amount,var/include_robo)
|
||||
. = ..()
|
||||
if(damage >= 3)
|
||||
if(amount >= 3)
|
||||
respond_to_damage()
|
||||
|
||||
/mob/living/simple_mob/animal/passive/opossum/lay_down()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
retaliate = 1
|
||||
cooperative = TRUE
|
||||
speak_chance = 1
|
||||
lose_target_timeout = 0 // Easily distracted
|
||||
|
||||
/datum/ai_holder/simple_mob/woof/hostile
|
||||
hostile = 1
|
||||
|
||||
+1225
-1225
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.
|
||||
|
||||
@@ -55,8 +55,7 @@
|
||||
var/mob/living/silicon/ai/O = ..(move)
|
||||
if(O)
|
||||
O.flavor_text = O.client?.prefs?.flavor_texts["general"]
|
||||
|
||||
return O
|
||||
return O
|
||||
//VOREStation Edit End
|
||||
|
||||
return ..(move)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
else if(prey.can_be_drop_pred && pred.can_be_drop_prey) //Is person being fallen onto pred & person falling prey
|
||||
pred.feed_grabbed_to_self_falling_nom(prey,pred) //oh, how the tables have turned.
|
||||
*/
|
||||
/mob/zshadow/fall_impact(var/atom/hit_atom) //You actually "fall" onto their shadow, first.
|
||||
/mob/zshadow/fall_impact(var/atom/hit_atom, var/damage_min = 0, var/damage_max = 10, var/silent = FALSE, var/planetary = FALSE) //You actually "fall" onto their shadow, first.
|
||||
/*
|
||||
var/floor_below = src.loc.below //holy fuck
|
||||
for(var/mob/M in floor_below.contents)
|
||||
|
||||
@@ -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()
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
user.verbs |= /mob/living/carbon/human/proc/nif_menu
|
||||
|
||||
/datum/component/nif_menu/proc/nif_menu_click(atom/movable/screen/nif/image, location, control, params, user)
|
||||
/datum/component/nif_menu/proc/nif_menu_click(obj/screen/nif/image, location, control, params, user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.nif)
|
||||
INVOKE_ASYNC(H.nif, .proc/tgui_interact, user)
|
||||
@@ -118,13 +118,14 @@
|
||||
data["nif_percent"] = round((durability/initial(durability))*100)
|
||||
data["nif_stat"] = stat
|
||||
|
||||
data["modules"] = list()
|
||||
|
||||
var/list/modules = list()
|
||||
if(stat == NIF_WORKING)
|
||||
for(var/nifsoft in nifsofts)
|
||||
if(!nifsoft)
|
||||
continue
|
||||
var/datum/nifsoft/NS = nifsoft
|
||||
data["modules"].Add(list(list(
|
||||
modules.Add(list(list(
|
||||
"name" = NS.name,
|
||||
"desc" = NS.desc,
|
||||
"p_drain" = NS.p_drain,
|
||||
@@ -137,6 +138,7 @@
|
||||
"stat_text" = NS.stat_text(),
|
||||
"ref" = REF(NS),
|
||||
)))
|
||||
data["modules"] = modules
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if((. = ..()))
|
||||
mode = 1
|
||||
|
||||
/datum/nifsoft/medichines_org/deactivate()
|
||||
/datum/nifsoft/medichines_org/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
a_drain = initial(a_drain)
|
||||
mode = initial(mode)
|
||||
@@ -90,7 +90,7 @@
|
||||
if((. = ..()))
|
||||
mode = 1
|
||||
|
||||
/datum/nifsoft/medichines_syn/deactivate()
|
||||
/datum/nifsoft/medichines_syn/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
mode = 0
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
if((. = ..()))
|
||||
nif.notify("Now taking air from reserves.")
|
||||
|
||||
/datum/nifsoft/spare_breath/deactivate()
|
||||
/datum/nifsoft/spare_breath/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
nif.notify("Now taking air from environment and refilling reserves.")
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
deactivate()
|
||||
return TRUE
|
||||
|
||||
/datum/nifsoft/mindbackup/deactivate()
|
||||
/datum/nifsoft/mindbackup/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
arscreen.tgui_interact(nif.human)
|
||||
return TRUE
|
||||
|
||||
/datum/nifsoft/crewmonitor/deactivate()
|
||||
/datum/nifsoft/crewmonitor/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
return TRUE
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
tgarscreen.tgui_interact(nif.human)
|
||||
return TRUE
|
||||
|
||||
/datum/nifsoft/alarmmonitor/deactivate()
|
||||
/datum/nifsoft/alarmmonitor/deactivate(var/force = FALSE)
|
||||
if((. = ..()))
|
||||
return TRUE
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user