mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Polaris Sync & bugfix
- Polaris Sync - Fixes bug being unable to pick up micros - Fixes all conflicts that came with sync
This commit is contained in:
@@ -59,7 +59,8 @@ proc/admin_notice(var/message, var/rights)
|
||||
<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> -
|
||||
<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> -
|
||||
[admin_jump_link(M, src)]\] <br>
|
||||
<b>Mob type</b> = [M.type]<br><br>
|
||||
<b>Mob type:</b> [M.type]<br>
|
||||
<b>Inactivity time:</b> [M.client ? "[M.client.inactivity/600] minutes" : "Logged out"]<br/><br/>
|
||||
<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> |
|
||||
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
|
||||
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
|
||||
@@ -1348,6 +1349,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
H.paralysis = 0
|
||||
msg = "has unparalyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
|
||||
/datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob)
|
||||
set category = "Debug"
|
||||
set name = "Set Telecrystals"
|
||||
@@ -1380,3 +1382,93 @@ proc/admin_notice(var/message, var/rights)
|
||||
else
|
||||
usr << "You do not have access to this command."
|
||||
|
||||
|
||||
/datum/admins/proc/sendFax()
|
||||
set category = "Special Verbs"
|
||||
set name = "Send Fax"
|
||||
set desc = "Sends a fax to this machine"
|
||||
var/department = input("Choose a fax", "Fax") as null|anything in alldepartments
|
||||
for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes)
|
||||
if(sendto.department == department)
|
||||
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
return
|
||||
|
||||
var/replyorigin = input(src.owner, "Please specify who the fax is coming from", "Origin") as text|null
|
||||
|
||||
var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us
|
||||
faxreply = P
|
||||
|
||||
P.admindatum = src
|
||||
P.origin = replyorigin
|
||||
P.destination = sendto
|
||||
|
||||
P.adminbrowse()
|
||||
|
||||
|
||||
datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in
|
||||
|
||||
/datum/admins/proc/faxCallback(var/obj/item/weapon/paper/admin/P, var/obj/machinery/photocopier/faxmachine/destination)
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
P.name = "[P.origin] - [customname]"
|
||||
P.desc = "This is a paper titled '" + P.name + "'."
|
||||
|
||||
var/shouldStamp = 1
|
||||
if(!P.sender) // admin initiated
|
||||
switch(alert("Would you like the fax stamped?",, "Yes", "No"))
|
||||
if("No")
|
||||
shouldStamp = 0
|
||||
|
||||
if(shouldStamp)
|
||||
P.stamps += "<hr><i>This paper has been stamped by the [P.origin] Quantum Relay.</i>"
|
||||
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
var/{x; y;}
|
||||
x = rand(-2, 0)
|
||||
y = rand(-1, 2)
|
||||
P.offset_x += x
|
||||
P.offset_y += y
|
||||
stampoverlay.pixel_x = x
|
||||
stampoverlay.pixel_y = y
|
||||
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-cent"
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp/centcomm
|
||||
P.overlays += stampoverlay
|
||||
|
||||
var/obj/item/rcvdcopy
|
||||
rcvdcopy = destination.copy(P)
|
||||
rcvdcopy.loc = null //hopefully this shouldn't cause trouble
|
||||
adminfaxes += rcvdcopy
|
||||
|
||||
|
||||
|
||||
if(destination.recievefax(P))
|
||||
src.owner << "<span class='notice'>Message reply to transmitted successfully.</span>"
|
||||
if(P.sender) // sent as a reply
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(P.sender)]")
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN | R_MOD) & C.holder.rights)
|
||||
C << "<span class='log_message'><span class='prefix'>FAX LOG:</span>[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(P.sender)] (<a href='?_src_=holder;AdminFaxView=\ref[rcvdcopy]'>VIEW</a>)</span>"
|
||||
else
|
||||
log_admin("[key_name(src.owner)] has sent a fax message to [destination.department]")
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN | R_MOD) & C.holder.rights)
|
||||
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>"
|
||||
|
||||
else
|
||||
src.owner << "<span class='warning'>Message reply failed.</span>"
|
||||
|
||||
spawn(100)
|
||||
qdel(P)
|
||||
faxreply = null
|
||||
return
|
||||
|
||||
@@ -97,7 +97,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/toggle_debug_logs,
|
||||
/client/proc/toggle_attack_logs,
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/fixatmos
|
||||
/client/proc/fixatmos,
|
||||
/datum/admins/proc/sendFax
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -306,7 +307,9 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/allow_character_respawn // Allows a ghost to respawn ,
|
||||
/client/proc/allow_character_respawn, // Allows a ghost to respawn ,
|
||||
/datum/admins/proc/sendFax
|
||||
|
||||
)
|
||||
|
||||
var/list/admin_verbs_mentor = list(
|
||||
|
||||
@@ -13,6 +13,7 @@ var/list/admin_datums = list()
|
||||
var/datum/feed_channel/admincaster_feed_channel = new /datum/feed_channel
|
||||
var/admincaster_signature //What you'll sign the newsfeeds as
|
||||
|
||||
|
||||
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
|
||||
if(!ckey)
|
||||
error("Admin datum created without a ckey argument. Datum has been deleted")
|
||||
@@ -57,22 +58,26 @@ proc/admin_proc()
|
||||
|
||||
NOTE: It checks usr by default. Supply the "user" argument if you wish to check for a specific mob.
|
||||
*/
|
||||
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
|
||||
if(user && user.client)
|
||||
if(rights_required)
|
||||
if(user.client.holder)
|
||||
if(rights_required & user.client.holder.rights)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
/proc/check_rights(rights_required, show_msg=1, var/client/C = usr)
|
||||
if(ismob(C))
|
||||
var/mob/M = C
|
||||
C = M.client
|
||||
if(!C)
|
||||
return FALSE
|
||||
if(!C.holder)
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You are not an admin.</span>"
|
||||
return FALSE
|
||||
|
||||
if(rights_required)
|
||||
if(rights_required & C.holder.rights)
|
||||
return TRUE
|
||||
else
|
||||
if(user.client.holder)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You are not an admin.</font>"
|
||||
return 0
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</span>"
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
/proc/check_if_greater_rights_than(client/other)
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
|
||||
dat += "Round Duration: <B>[round_duration_as_text()]</B><BR>"
|
||||
dat += "Round Duration: <B>[roundduration2text()]</B><BR>"
|
||||
dat += "<B>Emergency shuttle</B><BR>"
|
||||
if (!emergency_shuttle.online())
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
|
||||
|
||||
+12
-77
@@ -1386,86 +1386,21 @@
|
||||
H.show(src.owner)
|
||||
return
|
||||
|
||||
else if(href_list["CentcommFaxReply"])
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
else if(href_list["FaxReply"])
|
||||
var/mob/sender = locate(href_list["FaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
//todo: sanitize
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
// Create the reply message
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
|
||||
if(fax.recievefax(P))
|
||||
src.owner << "\blue Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1)
|
||||
else
|
||||
src.owner << "\red Message reply failed."
|
||||
|
||||
spawn(100)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
else if(href_list["SolGovFaxReply"])
|
||||
//TODO
|
||||
/*
|
||||
var/mob/living/carbon/human/H = locate(href_list["SolGovFaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in machines)
|
||||
if(F == fax)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
// animate! it's alive!
|
||||
flick("faxreceive", F)
|
||||
|
||||
// give the sprite some time to flick
|
||||
spawn(20)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "Sol Government- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cap"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped and encrypted by the Sol Government Quantum Relay.</i>"
|
||||
|
||||
src.owner << "Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
|
||||
return
|
||||
src.owner << "/red Unable to locate fax!"
|
||||
*/
|
||||
var/replyorigin = href_list["replyorigin"]
|
||||
|
||||
|
||||
var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us
|
||||
faxreply = P
|
||||
|
||||
P.admindatum = src
|
||||
P.origin = replyorigin
|
||||
P.destination = fax
|
||||
P.sender = sender
|
||||
|
||||
P.adminbrowse()
|
||||
|
||||
else if(href_list["jumpto"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
Reference in New Issue
Block a user