mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge Fix
This commit is contained in:
@@ -60,9 +60,9 @@ var/global/nologevent = 0
|
||||
body += "<a href='?_src_=holder;traitor=\ref[M]'>TP</a> - "
|
||||
body += "<a href='?src=[usr.UID()];priv_msg=\ref[M]'>PM</a> - "
|
||||
body += "<a href='?_src_=holder;subtlemessage=\ref[M]'>SM</a> - "
|
||||
body += "[admin_jump_link(M)]\] </b><br>"
|
||||
if(ishuman(M) && M.mind)
|
||||
body += "<a href='?_src_=holder;HeadsetMessage=[M.UID()]'>HM</a>"
|
||||
body += "<a href='?_src_=holder;HeadsetMessage=[M.UID()]'>HM</a> -"
|
||||
body += "[admin_jump_link(M)]\] </b><br>"
|
||||
body += "<b>Mob type:</b> [M.type]<br>"
|
||||
if(M.client)
|
||||
if(M.client.related_accounts_cid.len)
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
|
||||
return dat
|
||||
|
||||
/datum/adminTicketHolder/proc/showUI(var/client/user, var/tab)
|
||||
/datum/adminTicketHolder/proc/showUI(mob/user, var/tab)
|
||||
var/dat = null
|
||||
dat = returnUI(tab)
|
||||
var/datum/browser/popup = new(user, "admintickets", "Admin Tickets", 1400, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/adminTicketHolder/proc/showDetailUI(var/client/user, var/ticketID)
|
||||
/datum/adminTicketHolder/proc/showDetailUI(mob/user, var/ticketID)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[ticketID]
|
||||
var/status = "[T.state2text()]"
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/adminTicketHolder/proc/userDetailUI(var/client/user)
|
||||
/datum/adminTicketHolder/proc/userDetailUI(mob/user)
|
||||
//dat
|
||||
var/tickets = checkForTicket(user)
|
||||
var/tickets = checkForTicket(user.client)
|
||||
var/dat
|
||||
dat += "<h1>Your open tickets</h1>"
|
||||
dat += "<table>"
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
if(href_list["details"])
|
||||
var/indexNum = text2num(href_list["details"])
|
||||
showDetailUI(usr.client, indexNum)
|
||||
showDetailUI(usr, indexNum)
|
||||
return
|
||||
|
||||
if(href_list["resolve"])
|
||||
@@ -169,4 +169,4 @@
|
||||
if(globAdminTicketHolder.assignAdminToTicket(usr.client, indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) has taken ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your ticket is being handled by [usr.client].")
|
||||
showDetailUI(usr, indexNum)
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
if(!holder && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
globAdminTicketHolder.userDetailUI(usr.client)
|
||||
globAdminTicketHolder.userDetailUI(usr)
|
||||
|
||||
@@ -1216,8 +1216,7 @@
|
||||
|
||||
//strip their stuff and stick it in the crate
|
||||
for(var/obj/item/I in M)
|
||||
M.unEquip(I)
|
||||
if(I)
|
||||
if(M.unEquip(I))
|
||||
I.loc = locker
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
@@ -2033,26 +2032,6 @@
|
||||
log_admin("[key_name(src.owner)] sent [key_name(H)] a standard '[stype]' fax")
|
||||
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax")
|
||||
|
||||
else if(href_list["SyndicateReply"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(H.stat != 0)
|
||||
to_chat(usr, "The person you are trying to contact is not conscious.")
|
||||
return
|
||||
if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset))
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset")
|
||||
return
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from The Syndicate", "")
|
||||
if(!input)
|
||||
return
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\"")
|
||||
|
||||
else if(href_list["HONKReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["HONKReply"])
|
||||
if(!istype(H))
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
prayer_type = "CULTIST PRAYER"
|
||||
deity = ticker.cultdat.entity_name
|
||||
|
||||
log_say("(PRAYER) [msg]", usr)
|
||||
msg = "<span class='notice'>[bicon(cross)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]:</font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=[UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>) (<A HREF='?_src_=holder;Bless=[UID()]'>BLESS</A>) (<A HREF='?_src_=holder;Smite=[UID()]'>SMITE</A>):</b> [msg]</span>"
|
||||
|
||||
for(var/client/X in admins)
|
||||
@@ -36,11 +37,10 @@
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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;CentcommReply=\ref[Sender]'>RPLY</A>):</span> [msg]"
|
||||
msg = "<span class='boldnotice'><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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>) [ADMIN_CENTCOM_REPLY(Sender)]):</span> [msg]"
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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]'>REPLY</A>):</span> [msg]"
|
||||
msg = "<span class='boldnotice'><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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>) [ADMIN_SYNDICATE_REPLY(Sender)]:</span> [msg]"
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
@@ -79,10 +79,10 @@
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>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>) [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
to_chat(X, "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>")
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
spawn_antag(C, get_turf(src.loc), "syndieborg")
|
||||
else
|
||||
checking = FALSE
|
||||
to_chat(user, "<span class='notice'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>")
|
||||
to_chat(user, "<span class='notice'>Unable to connect to Syndicate command. Please wait and try again later or refund your teleporter through your uplink.</span>")
|
||||
return
|
||||
|
||||
/obj/item/antag_spawner/borg_tele/spawn_antag(client/C, turf/T, type = "")
|
||||
|
||||
@@ -111,29 +111,8 @@
|
||||
if(!customer_account)
|
||||
to_chat(user, "Unable to access account: incorrect credentials.")
|
||||
return 0
|
||||
|
||||
if(token_price > customer_account.money)
|
||||
to_chat(user, "Insufficient funds in account.")
|
||||
return 0
|
||||
else
|
||||
// Okay to move the money at this point
|
||||
|
||||
// debit money from the purchaser's account
|
||||
customer_account.money -= token_price
|
||||
|
||||
// create entry in the purchaser's account log
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[src.name]"
|
||||
T.purpose = "Purchase of [src.name] credit"
|
||||
if(token_price > 0)
|
||||
T.amount = "([token_price])"
|
||||
else
|
||||
T.amount = "[token_price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
customer_account.transaction_log.Add(T)
|
||||
return 1
|
||||
|
||||
return customer_account.charge(token_price, null, "Purchase of [name] credit", name, name)
|
||||
|
||||
/obj/machinery/arcade/proc/start_play(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
@@ -159,4 +138,4 @@
|
||||
|
||||
/obj/machinery/arcade/Destroy()
|
||||
src.close_game()
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -10,46 +10,67 @@
|
||||
|
||||
bomb_name = "voice-activated bomb"
|
||||
|
||||
describe()
|
||||
if(recorded || listening)
|
||||
return "A meter on [src] flickers with every nearby sound."
|
||||
else
|
||||
return "[src] is deactivated."
|
||||
/obj/item/assembly/voice/describe()
|
||||
if(recorded || listening)
|
||||
return "A meter on [src] flickers with every nearby sound."
|
||||
else
|
||||
return "[src] is deactivated."
|
||||
|
||||
hear_talk(mob/living/M as mob, msg)
|
||||
hear_input(M, msg, 0)
|
||||
/obj/item/assembly/voice/hear_talk(mob/living/M as mob, msg)
|
||||
hear_input(M, msg, 0)
|
||||
|
||||
hear_message(mob/living/M as mob, msg)
|
||||
/obj/item/assembly/voice/hear_message(mob/living/M as mob, msg)
|
||||
hear_input(M, msg, 1)
|
||||
|
||||
proc/hear_input(mob/living/M as mob, msg, type)
|
||||
if(!istype(M,/mob/living))
|
||||
return
|
||||
if(listening)
|
||||
recorded = msg
|
||||
recorded_type = type
|
||||
listening = 0
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("[bicon(src)] beeps, \"Activation message is [type ? "the sound when one [recorded]" : "'[recorded]'."]\"")
|
||||
else
|
||||
if(findtext(msg, recorded) && type == recorded_type)
|
||||
pulse(0)
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("<span class='warning'>[bicon(src)] beeps!</span>")
|
||||
/obj/item/assembly/voice/proc/hear_input(mob/living/M as mob, msg, type)
|
||||
if(!istype(M,/mob/living))
|
||||
return
|
||||
if(listening)
|
||||
recorded = msg
|
||||
recorded_type = type
|
||||
listening = 0
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("[bicon(src)] beeps, \"Activation message is [type ? "the sound when one [recorded]" : "'[recorded]'."]\"")
|
||||
else if(findtext(msg, recorded) && type == recorded_type)
|
||||
pulse(0)
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("<span class='warning'>[bicon(src)] beeps!</span>")
|
||||
|
||||
activate()
|
||||
return // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way.
|
||||
/obj/item/assembly/voice/activate()
|
||||
return // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way.
|
||||
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!user || !secured) return 0
|
||||
/obj/item/assembly/voice/attack_self(mob/user)
|
||||
if(!user || !secured) return 0
|
||||
|
||||
listening = !listening
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("[bicon(src)] beeps, \"[listening ? "Now" : "No longer"] recording input.\"")
|
||||
return 1
|
||||
listening = !listening
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("[bicon(src)] beeps, \"[listening ? "Now" : "No longer"] recording input.\"")
|
||||
return 1
|
||||
|
||||
|
||||
toggle_secure()
|
||||
. = ..()
|
||||
listening = 0
|
||||
/obj/item/assembly/voice/toggle_secure()
|
||||
. = ..()
|
||||
listening = 0
|
||||
|
||||
/obj/item/assembly/voice/noise
|
||||
name = "noise sensor"
|
||||
desc = "A simple noise sensor that triggers on vocalizations other then speech."
|
||||
icon_state = "voice"
|
||||
materials = list(MAT_METAL=100, MAT_GLASS=10)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
bomb_name = "noise-activated bomb"
|
||||
|
||||
/obj/item/assembly/voice/noise/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/voice/noise/describe()
|
||||
return "[src] does not appear to have any controls."
|
||||
|
||||
/obj/item/assembly/voice/noise/hear_talk(mob/living/M as mob, msg)
|
||||
return
|
||||
|
||||
/obj/item/assembly/voice/hear_message(mob/living/M as mob, msg)
|
||||
pulse(0)
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("<span class='warning'>[bicon(src)] beeps!</span>")
|
||||
@@ -1,677 +0,0 @@
|
||||
/*
|
||||
SwapMaps library by Lummox JR
|
||||
developed for digitalBYOND
|
||||
http://www.digitalbyond.org
|
||||
|
||||
Version 2.1
|
||||
|
||||
The purpose of this library is to make it easy for authors to swap maps
|
||||
in and out of their game using savefiles. Swapped-out maps can be
|
||||
transferred between worlds for an MMORPG, sent to the client, etc.
|
||||
This is facilitated by the use of a special datum and a global list.
|
||||
|
||||
Uses of swapmaps:
|
||||
|
||||
- Temporary battle arenas
|
||||
- House interiors
|
||||
- Individual custom player houses
|
||||
- Virtually unlimited terrain
|
||||
- Sharing maps between servers running different instances of the same
|
||||
game
|
||||
- Loading and saving pieces of maps for reusable room templates
|
||||
*/
|
||||
|
||||
/*
|
||||
User Interface:
|
||||
|
||||
VARS:
|
||||
|
||||
swapmaps_iconcache
|
||||
An associative list of icon files with names, like
|
||||
'player.dmi' = "player"
|
||||
swapmaps_mode
|
||||
This must be set at runtime, like in world/New().
|
||||
|
||||
SWAPMAPS_SAV 0 (default)
|
||||
Uses .sav files for raw /savefile output.
|
||||
SWAPMAPS_TEXT 1
|
||||
Uses .txt files via ExportText() and ImportText(). These maps
|
||||
are easily editable and appear to take up less space in the
|
||||
current version of BYOND.
|
||||
|
||||
PROCS:
|
||||
|
||||
SwapMaps_Find(id)
|
||||
Find a map by its id
|
||||
SwapMaps_Load(id)
|
||||
Load a map by its id
|
||||
SwapMaps_Save(id)
|
||||
Save a map by its id (calls swapmap.Save())
|
||||
SwapMaps_Unload(id)
|
||||
Save and unload a map by its id (calls swapmap.Unload())
|
||||
SwapMaps_Save_All()
|
||||
Save all maps
|
||||
SwapMaps_DeleteFile(id)
|
||||
Delete a map file
|
||||
SwapMaps_CreateFromTemplate(id)
|
||||
Create a new map by loading another map to use as a template.
|
||||
This map has id==src and will not be saved. To make it savable,
|
||||
change id with swapmap.SetID(newid).
|
||||
SwapMaps_LoadChunk(id,turf/locorner)
|
||||
Load a swapmap as a "chunk", at a specific place. A new datum is
|
||||
created but it's not added to the list of maps to save or unload.
|
||||
The new datum can be safely deleted without affecting the turfs
|
||||
it loaded. The purpose of this is to load a map file onto part of
|
||||
another swapmap or an existing part of the world.
|
||||
locorner is the corner turf with the lowest x,y,z values.
|
||||
SwapMaps_SaveChunk(id,turf/corner1,turf/corner2)
|
||||
Save a piece of the world as a "chunk". A new datum is created
|
||||
for the chunk, but it can be deleted without destroying any turfs.
|
||||
The chunk file can be reloaded as a swapmap all its own, or loaded
|
||||
via SwapMaps_LoadChunk() to become part of another map.
|
||||
SwapMaps_GetSize(id)
|
||||
Return a list corresponding to the x,y,z sizes of a map file,
|
||||
without loading the map.
|
||||
Returns null if the map is not found.
|
||||
SwapMaps_AddIconToCache(name,icon)
|
||||
Cache an icon file by name for space-saving storage
|
||||
|
||||
swapmap.New(id,x,y,z)
|
||||
Create a new map; specify id, width (x), height (y), and
|
||||
depth (z)
|
||||
Default size is world.maxx,world.maxy,1
|
||||
swapmap.New(id,turf1,turf2)
|
||||
Create a new map; specify id and 2 corners
|
||||
This becomes a /swapmap for one of the compiled-in maps, for
|
||||
easy saving.
|
||||
swapmap.New()
|
||||
Create a new map datum, but does not allocate space or assign an
|
||||
ID (used for loading).
|
||||
swapmap.Del()
|
||||
Deletes a map but does not save
|
||||
swapmap.Save()
|
||||
Saves to map_[id].sav
|
||||
Maps with id==src are not saved.
|
||||
swapmap.Unload()
|
||||
Saves the map and then deletes it
|
||||
Maps with id==src are not saved.
|
||||
swapmap.SetID(id)
|
||||
Change the map's id and make changes to the lookup list
|
||||
swapmap.AllTurfs(z)
|
||||
Returns a block of turfs encompassing the entire map, or on just
|
||||
one z-level
|
||||
z is in world coordinates; it is optional
|
||||
swapmap.Contains(turf/T)
|
||||
Returns nonzero if T is inside the map's boundaries.
|
||||
Also works for objs and mobs, but the proc is not area-safe.
|
||||
swapmap.InUse()
|
||||
Returns nonzero if a mob with a key is within the map's
|
||||
boundaries.
|
||||
swapmap.LoCorner(z=z1)
|
||||
Returns locate(x1,y1,z), where z=z1 if none is specified.
|
||||
swapmap.HiCorner(z=z2)
|
||||
Returns locate(x2,y2,z), where z=z2 if none is specified.
|
||||
swapmap.BuildFilledRectangle(turf/corner1,turf/corner2,item)
|
||||
Builds a filled rectangle of item from one corner turf to the
|
||||
other, on multiple z-levels if necessary. The corners may be
|
||||
specified in any order.
|
||||
item is a type path like /turf/wall or /obj/barrel{full=1}.
|
||||
swapmap.BuildRectangle(turf/corner1,turf/corner2,item)
|
||||
Builds an unfilled rectangle of item from one corner turf to
|
||||
the other, on multiple z-levels if necessary.
|
||||
swapmap.BuildInTurfs(list/turfs,item)
|
||||
Builds item on all of the turfs listed. The list need not
|
||||
contain only turfs, or even only atoms.
|
||||
*/
|
||||
|
||||
swapmap
|
||||
var/id // a string identifying this map uniquely
|
||||
var/x1 // minimum x,y,z coords
|
||||
var/y1
|
||||
var/z1
|
||||
var/x2 // maximum x,y,z coords (also used as width,height,depth until positioned)
|
||||
var/y2
|
||||
var/z2
|
||||
var/tmp/locked // don't move anyone to this map; it's saving or loading
|
||||
var/tmp/mode // save as text-mode
|
||||
var/ischunk // tells the load routine to load to the specified location
|
||||
|
||||
New(_id,x,y,z)
|
||||
if(isnull(_id)) return
|
||||
id=_id
|
||||
mode=swapmaps_mode
|
||||
if(isturf(x) && isturf(y))
|
||||
/*
|
||||
Special format: Defines a map as an existing set of turfs;
|
||||
this is useful for saving a compiled map in swapmap format.
|
||||
Because this is a compiled-in map, its turfs are not deleted
|
||||
when the datum is deleted.
|
||||
*/
|
||||
x1=min(x:x,y:x);x2=max(x:x,y:x)
|
||||
y1=min(x:y,y:y);y2=max(x:y,y:y)
|
||||
z1=min(x:z,y:z);z2=max(x:z,y:z)
|
||||
InitializeSwapMaps()
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
qdel(src)
|
||||
return
|
||||
x2=x?(x):world.maxx
|
||||
y2=y?(y):world.maxy
|
||||
z2=z?(z):1
|
||||
AllocateSwapMap()
|
||||
|
||||
Destroy()
|
||||
// a temporary datum for a chunk can be deleted outright
|
||||
// for others, some cleanup is necessary
|
||||
if(!ischunk)
|
||||
swapmaps_loaded-=src
|
||||
swapmaps_byname-=id
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
var/list/areas=new
|
||||
for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
for(var/obj/O in A) qdel(O)
|
||||
for(var/mob/M in A)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
areas[A.loc]=null
|
||||
qdel(A)
|
||||
// delete areas that belong only to this map
|
||||
for(var/area/a in areas)
|
||||
if(a && !a.contents.len) qdel(a)
|
||||
if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ()
|
||||
qdel(areas)
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/*
|
||||
Savefile format:
|
||||
map
|
||||
id
|
||||
x // size, not coords
|
||||
y
|
||||
z
|
||||
areas // list of areas, not including default
|
||||
[each z; 1 to depth]
|
||||
[each y; 1 to height]
|
||||
[each x; 1 to width]
|
||||
type // of turf
|
||||
AREA // if non-default; saved as a number (index into areas list)
|
||||
vars // all other changed vars
|
||||
*/
|
||||
Write(savefile/S)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
if(!defarea) defarea=new world.area
|
||||
areas=list()
|
||||
for(var/turf/T in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
areas[T.loc]=null
|
||||
for(n in areas) // quickly eliminate associations for smaller storage
|
||||
areas-=n
|
||||
areas+=n
|
||||
areas-=defarea
|
||||
InitializeSwapMaps()
|
||||
locked=1
|
||||
S["id"] << id
|
||||
S["z"] << z2-z1+1
|
||||
S["y"] << y2-y1+1
|
||||
S["x"] << x2-x1+1
|
||||
S["areas"] << areas
|
||||
for(n in 1 to areas.len) areas[areas[n]]=n
|
||||
var/oldcd=S.cd
|
||||
for(z in z1 to z2)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y in y1 to y2)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x in x1 to x2)
|
||||
S.cd="[x-x1+1]"
|
||||
var/turf/T=locate(x,y,z)
|
||||
S["type"] << T.type
|
||||
if(T.loc!=defarea) S["AREA"] << areas[T.loc]
|
||||
T.Write(S)
|
||||
S.cd=".."
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
|
||||
Read(savefile/S,_id,turf/locorner)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
id=_id
|
||||
if(locorner)
|
||||
ischunk=1
|
||||
x1=locorner.x
|
||||
y1=locorner.y
|
||||
z1=locorner.z
|
||||
if(!defarea) defarea=new world.area
|
||||
if(!_id)
|
||||
S["id"] >> id
|
||||
else
|
||||
var/dummy
|
||||
S["id"] >> dummy
|
||||
S["z"] >> z2 // these are depth,
|
||||
S["y"] >> y2 // height,
|
||||
S["x"] >> x2 // width
|
||||
S["areas"] >> areas
|
||||
locked=1
|
||||
AllocateSwapMap() // adjust x1,y1,z1 - x2,y2,z2 coords
|
||||
var/oldcd=S.cd
|
||||
for(z in z1 to z2)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y in y1 to y2)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x in x1 to x2)
|
||||
S.cd="[x-x1+1]"
|
||||
var/tp
|
||||
S["type"]>>tp
|
||||
var/turf/T=locate(x,y,z)
|
||||
T.loc.contents-=T
|
||||
T=new tp(locate(x,y,z))
|
||||
if("AREA" in S.dir)
|
||||
S["AREA"]>>n
|
||||
var/area/A=areas[n]
|
||||
A.contents+=T
|
||||
else defarea.contents+=T
|
||||
// clear the turf
|
||||
for(var/obj/O in T) qdel(O)
|
||||
for(var/mob/M in T)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
// finish the read
|
||||
T.Read(S)
|
||||
S.cd=".."
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
|
||||
/*
|
||||
Find an empty block on the world map in which to load this map.
|
||||
If no space is found, increase world.maxz as necessary. (If the
|
||||
map is greater in x,y size than the current world, expand
|
||||
world.maxx and world.maxy too.)
|
||||
|
||||
Ignore certain operations if loading a map as a chunk. Use the
|
||||
x1,y1,z1 position for it, and *don't* count it as a loaded map.
|
||||
*/
|
||||
proc/AllocateSwapMap()
|
||||
InitializeSwapMaps()
|
||||
world.maxx=max(x2,world.maxx) // stretch x/y if necessary
|
||||
world.maxy=max(y2,world.maxy)
|
||||
if(!ischunk)
|
||||
if(world.maxz<=swapmaps_compiled_maxz)
|
||||
z1=swapmaps_compiled_maxz+1
|
||||
x1=1;y1=1
|
||||
else
|
||||
var/list/l=ConsiderRegion(1,1,world.maxx,world.maxy,swapmaps_compiled_maxz+1)
|
||||
x1=l[1]
|
||||
y1=l[2]
|
||||
z1=l[3]
|
||||
qdel(l)
|
||||
x2+=x1-1
|
||||
y2+=y1-1
|
||||
z2+=z1-1
|
||||
space_manager.increase_max_zlevel_to(z2) // stretch z if necessary
|
||||
if(!ischunk)
|
||||
swapmaps_loaded[src]=null
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2)
|
||||
while(1)
|
||||
var/nextz=0
|
||||
var/swapmap/M
|
||||
for(M in swapmaps_loaded)
|
||||
if(M.z2<Z1 || (Z2 && M.z1>Z2) || M.z1>=Z1+z2 ||\
|
||||
M.x1>X2 || M.x2<X1 || M.x1>=X1+x2 ||\
|
||||
M.y1>Y2 || M.y2<Y1 || M.y1>=Y1+y2) continue
|
||||
// look for sub-regions with a defined ceiling
|
||||
var/nz2=Z2?(Z2):Z1+z2-1+M.z2-M.z1
|
||||
if(M.x1>=X1+x2)
|
||||
.=ConsiderRegion(X1,Y1,M.x1-1,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.x2<=X2-x2)
|
||||
.=ConsiderRegion(M.x2+1,Y1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
if(M.y1>=Y1+y2)
|
||||
.=ConsiderRegion(X1,Y1,X2,M.y1-1,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.y2<=Y2-y2)
|
||||
.=ConsiderRegion(X1,M.y2+1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
nextz=nextz?min(nextz,M.z2+1):(M.z2+1)
|
||||
if(!M)
|
||||
/* If nextz is not 0, then at some point there was an overlap that
|
||||
could not be resolved by using an area to the side */
|
||||
if(nextz) Z1=nextz
|
||||
if(!nextz || (Z2 && Z2-Z1+1<z2))
|
||||
return (!Z2 || Z2-Z1+1>=z2)?list(X1,Y1,Z1):null
|
||||
X1=1;X2=world.maxx
|
||||
Y1=1;Y2=world.maxy
|
||||
|
||||
proc/CutXYZ()
|
||||
var/mx=swapmaps_compiled_maxx
|
||||
var/my=swapmaps_compiled_maxy
|
||||
var/mz=swapmaps_compiled_maxz
|
||||
for(var/swapmap/M in swapmaps_loaded) // may not include src
|
||||
mx=max(mx,M.x2)
|
||||
my=max(my,M.y2)
|
||||
mz=max(mz,M.z2)
|
||||
world.maxx=mx
|
||||
world.maxy=my
|
||||
space_manager.cut_levels_downto(mz)
|
||||
|
||||
// save and delete
|
||||
proc/Unload()
|
||||
Save()
|
||||
qdel(src)
|
||||
|
||||
proc/Save()
|
||||
if(id==src) return 0
|
||||
var/savefile/S=mode?(new):new("map_[id].sav")
|
||||
S << src
|
||||
while(locked) sleep(1)
|
||||
if(mode)
|
||||
fdel("map_[id].txt")
|
||||
S.ExportText("/","map_[id].txt")
|
||||
return 1
|
||||
|
||||
// this will not delete existing savefiles for this map
|
||||
proc/SetID(newid)
|
||||
swapmaps_byname-=id
|
||||
id=newid
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
proc/AllTurfs(z)
|
||||
if(isnum(z) && (z<z1 || z>z2)) return null
|
||||
return block(LoCorner(z),HiCorner(z))
|
||||
|
||||
// this could be safely called for an obj or mob as well, but
|
||||
// probably not an area
|
||||
proc/Contains(turf/T)
|
||||
return (T && T.x>=x1 && T.x<=x2\
|
||||
&& T.y>=y1 && T.y<=y2\
|
||||
&& T.z>=z1 && T.z<=z2)
|
||||
|
||||
proc/InUse()
|
||||
for(var/turf/T in AllTurfs())
|
||||
for(var/mob/M in T) if(M.key) return 1
|
||||
|
||||
proc/LoCorner(z=z1)
|
||||
return locate(x1,y1,z)
|
||||
proc/HiCorner(z=z2)
|
||||
return locate(x2,y2,z)
|
||||
|
||||
/*
|
||||
Build procs: Take 2 turfs as corners, plus an item type.
|
||||
An item may be like:
|
||||
|
||||
/turf/wall
|
||||
/obj/fence{icon_state="iron"}
|
||||
*/
|
||||
proc/BuildFilledRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
for(T in block(T1,T2)) new item(T)
|
||||
|
||||
proc/BuildRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
if(T2.x-T1.x<2 || T2.y-T1.y<2) BuildFilledRectangle(T1,T2,item)
|
||||
else
|
||||
//for(T in block(T1,T2)-block(locate(T1.x+1,T1.y+1,T1.z),locate(T2.x-1,T2.y-1,T2.z)))
|
||||
for(T in block(T1,locate(T2.x,T1.y,T2.z))) new item(T)
|
||||
for(T in block(locate(T1.x,T2.y,T1.z),T2)) new item(T)
|
||||
for(T in block(locate(T1.x,T1.y+1,T1.z),locate(T1.x,T2.y-1,T2.z))) new item(T)
|
||||
for(T in block(locate(T2.x,T1.y+1,T1.z),locate(T2.x,T2.y-1,T2.z))) new item(T)
|
||||
|
||||
/*
|
||||
Supplementary build proc: Takes a list of turfs, plus an item
|
||||
type. Actually the list doesn't have to be just turfs.
|
||||
*/
|
||||
proc/BuildInTurfs(list/turfs,item)
|
||||
for(var/T in turfs) new item(T)
|
||||
|
||||
atom
|
||||
Write(savefile/S)
|
||||
for(var/V in vars-"x"-"y"-"z"-"contents"-"icon"-"overlays"-"underlays")
|
||||
if(issaved(vars[V]))
|
||||
if(vars[V]!=initial(vars[V])) S[V]<<vars[V]
|
||||
else S.dir.Remove(V)
|
||||
if(icon!=initial(icon))
|
||||
if(swapmaps_iconcache && swapmaps_iconcache[icon])
|
||||
S["icon"]<<swapmaps_iconcache[icon]
|
||||
else S["icon"]<<icon
|
||||
// do not save mobs with keys; do save other mobs
|
||||
var/mob/M
|
||||
for(M in src) if(M.key) break
|
||||
if(overlays.len) S["overlays"]<<overlays
|
||||
if(underlays.len) S["underlays"]<<underlays
|
||||
if(contents.len && !isarea(src))
|
||||
var/list/l=contents
|
||||
if(M)
|
||||
l=l.Copy()
|
||||
for(M in src) if(M.key) l-=M
|
||||
if(l.len) S["contents"]<<l
|
||||
if(l!=contents) qdel(l)
|
||||
Read(savefile/S)
|
||||
var/list/l
|
||||
if(contents.len) l=contents
|
||||
..()
|
||||
// if the icon was a text string, it would not have loaded properly
|
||||
// replace it from the cache list
|
||||
if(!icon && ("icon" in S.dir))
|
||||
var/ic
|
||||
S["icon"]>>ic
|
||||
if(istext(ic)) icon=swapmaps_iconcache[ic]
|
||||
if(l && contents!=l)
|
||||
contents+=l
|
||||
qdel(l)
|
||||
|
||||
|
||||
// set this up (at runtime) as follows:
|
||||
// list(\
|
||||
// 'player.dmi'="player",\
|
||||
// 'monster.dmi'="monster",\
|
||||
// ...
|
||||
// 'item.dmi'="item")
|
||||
var/list/swapmaps_iconcache
|
||||
|
||||
// preferred mode; sav or text
|
||||
var/const/SWAPMAPS_SAV=0
|
||||
var/const/SWAPMAPS_TEXT=1
|
||||
var/swapmaps_mode=SWAPMAPS_SAV
|
||||
|
||||
var/swapmaps_compiled_maxx
|
||||
var/swapmaps_compiled_maxy
|
||||
var/swapmaps_compiled_maxz
|
||||
var/swapmaps_initialized
|
||||
var/swapmaps_loaded
|
||||
var/swapmaps_byname
|
||||
|
||||
proc/InitializeSwapMaps()
|
||||
if(swapmaps_initialized) return
|
||||
swapmaps_initialized=1
|
||||
swapmaps_compiled_maxx=world.maxx
|
||||
swapmaps_compiled_maxy=world.maxy
|
||||
swapmaps_compiled_maxz=world.maxz
|
||||
swapmaps_loaded=list()
|
||||
swapmaps_byname=list()
|
||||
if(swapmaps_iconcache)
|
||||
for(var/V in swapmaps_iconcache)
|
||||
// reverse-associate everything
|
||||
// so you can look up an icon file by name or vice-versa
|
||||
swapmaps_iconcache[swapmaps_iconcache[V]]=V
|
||||
|
||||
proc/SwapMaps_AddIconToCache(name,icon)
|
||||
if(!swapmaps_iconcache) swapmaps_iconcache=list()
|
||||
swapmaps_iconcache[name]=icon
|
||||
swapmaps_iconcache[icon]=name
|
||||
|
||||
proc/SwapMaps_Find(id)
|
||||
InitializeSwapMaps()
|
||||
return swapmaps_byname[id]
|
||||
|
||||
proc/SwapMaps_Load(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(!M)
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
text=1
|
||||
else if(fexists("map_[id].sav"))
|
||||
S=new("map_[id].sav")
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
text=1
|
||||
else return // no file found
|
||||
if(text)
|
||||
S=new
|
||||
S.ImportText("/",file("map_[id].txt"))
|
||||
S >> M
|
||||
while(M.locked) sleep(1)
|
||||
M.mode=text
|
||||
return M
|
||||
|
||||
proc/SwapMaps_Save(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(M) M.Save()
|
||||
return M
|
||||
|
||||
proc/SwapMaps_Save_All()
|
||||
InitializeSwapMaps()
|
||||
for(var/swapmap/M in swapmaps_loaded)
|
||||
if(M) M.Save()
|
||||
|
||||
proc/SwapMaps_Unload(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(!M) return // return silently from an error
|
||||
M.Unload()
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_DeleteFile(id)
|
||||
fdel("map_[id].sav")
|
||||
fdel("map_[id].txt")
|
||||
|
||||
proc/SwapMaps_CreateFromTemplate(template_id)
|
||||
var/swapmap/M=new
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
|
||||
text=1
|
||||
else if(fexists("map_[template_id].sav"))
|
||||
S=new("map_[template_id].sav")
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
|
||||
text=1
|
||||
else
|
||||
log_world("SwapMaps error in SwapMaps_CreateFromTemplate(): map_[template_id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
S.ImportText("/",file("map_[template_id].txt"))
|
||||
/*
|
||||
This hacky workaround is needed because S >> M will create a brand new
|
||||
M to fill with data. There's no way to control the Read() process
|
||||
properly otherwise. The //.0 path should always match the map, however.
|
||||
*/
|
||||
S.cd="//.0"
|
||||
M.Read(S,M)
|
||||
M.mode=text
|
||||
while(M.locked) sleep(1)
|
||||
return M
|
||||
|
||||
proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
var/swapmap/M=new
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
|
||||
text=1
|
||||
else if(fexists("map_[chunk_id].sav"))
|
||||
S=new("map_[chunk_id].sav")
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
|
||||
text=1
|
||||
else
|
||||
log_world("SwapMaps error in SwapMaps_LoadChunk(): map_[chunk_id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
S.ImportText("/",file("map_[chunk_id].txt"))
|
||||
/*
|
||||
This hacky workaround is needed because S >> M will create a brand new
|
||||
M to fill with data. There's no way to control the Read() process
|
||||
properly otherwise. The //.0 path should always match the map, however.
|
||||
*/
|
||||
S.cd="//.0"
|
||||
M.Read(S,M,locorner)
|
||||
while(M.locked) sleep(1)
|
||||
qdel(M)
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
|
||||
if(!corner1 || !corner2)
|
||||
log_world("SwapMaps error in SwapMaps_SaveChunk():")
|
||||
if(!corner1) log_world(" corner1 turf is null")
|
||||
if(!corner2) log_world(" corner2 turf is null")
|
||||
return
|
||||
var/swapmap/M=new
|
||||
M.id=chunk_id
|
||||
M.ischunk=1 // this is a chunk
|
||||
M.x1=min(corner1.x,corner2.x)
|
||||
M.y1=min(corner1.y,corner2.y)
|
||||
M.z1=min(corner1.z,corner2.z)
|
||||
M.x2=max(corner1.x,corner2.x)
|
||||
M.y2=max(corner1.y,corner2.y)
|
||||
M.z2=max(corner1.z,corner2.z)
|
||||
M.mode=swapmaps_mode
|
||||
M.Save()
|
||||
while(M.locked) sleep(1)
|
||||
qdel(M)
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_GetSize(id)
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
text=1
|
||||
else if(fexists("map_[id].sav"))
|
||||
S=new("map_[id].sav")
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
text=1
|
||||
else
|
||||
log_world("SwapMaps error in SwapMaps_GetSize(): map_[id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
S.ImportText("/",file("map_[id].txt"))
|
||||
/*
|
||||
The //.0 path should always be the map. There's no other way to
|
||||
read this data.
|
||||
*/
|
||||
S.cd="//.0"
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
S["x"] >> x
|
||||
S["y"] >> y
|
||||
S["z"] >> z
|
||||
return list(x,y,z)
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
/obj/item/paper/terrorspiders9
|
||||
name = "paper - 'Research Notes'"
|
||||
info = "<b>The notes appear gibberish to you. Perhaps a destructive analyser in R&D could make sense of them.</b>"
|
||||
info = "<b>The notes appear gibberish to you. Perhaps a destructive analyzer in R&D could make sense of them.</b>"
|
||||
origin_tech = "combat=4;materials=4;engineering=4;biotech=4"
|
||||
|
||||
/obj/item/gun/energy/laser/awaymission_aeg
|
||||
@@ -257,5 +257,3 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Your ID card already has all the access this machine can give.</span>")
|
||||
. = 1
|
||||
|
||||
|
||||
|
||||
@@ -19,4 +19,9 @@
|
||||
/area/awaymission/BMPship/Fore
|
||||
name = "\improper Fore Block"
|
||||
icon_state = "away3"
|
||||
requires_power = 1
|
||||
|
||||
/area/awaymission/BMPship/Gate
|
||||
name = "\improper Gateway Block"
|
||||
icon_state = "away4"
|
||||
requires_power = 1
|
||||
@@ -234,7 +234,7 @@
|
||||
D.account = get_card_account(id, occupant)
|
||||
if(!D.account)
|
||||
return null
|
||||
if(!D.account.charge(100, transaction_purpose = "10 minutes", dest_name = name))
|
||||
if(!D.account.charge(100, null, "10 minutes hotel stay", "Biesel GalaxyNet Terminal [rand(111,1111)]", "[name]"))
|
||||
return null
|
||||
|
||||
D.occupant = occupant
|
||||
@@ -251,7 +251,7 @@
|
||||
if(!D || !D.occupant)
|
||||
return
|
||||
|
||||
if(D.account.charge(100, transaction_purpose = "10 minutes", dest_name = name))
|
||||
if(D.account.charge(100, null, "10 minutes hotel stay extension", "Biesel GalaxyNet Terminal [rand(111,1111)]", "[name]"))
|
||||
D.roomtimer = addtimer(CALLBACK(src, .proc/process_room, roomid), PAY_INTERVAL, TIMER_STOPPABLE)
|
||||
else
|
||||
force_checkout(roomid)
|
||||
@@ -299,4 +299,4 @@
|
||||
return
|
||||
|
||||
S.retal_target = target
|
||||
S.retal = 1
|
||||
S.retal = 1
|
||||
|
||||
@@ -200,6 +200,7 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
|
||||
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
|
||||
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
|
||||
"large_stamp-rep.png" = 'icons/paper_icons/large_stamp-rep.png',
|
||||
"talisman.png" = 'icons/paper_icons/talisman.png',
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
|
||||
)
|
||||
@@ -348,4 +349,4 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
register_asset(asset_name, assets[asset_name])
|
||||
|
||||
/datum/asset/mob_hunt/send(client)
|
||||
send_asset_list(client, assets, verify)
|
||||
send_asset_list(client, assets, verify)
|
||||
|
||||
@@ -561,6 +561,7 @@ BLIND // can't see anything
|
||||
strip_delay = 80
|
||||
put_on_delay = 80
|
||||
burn_state = FIRE_PROOF
|
||||
hide_tail_by_species = null
|
||||
species_restricted = list("exclude","Diona","Vox","Wryn")
|
||||
|
||||
//Under clothing
|
||||
|
||||
@@ -202,7 +202,27 @@
|
||||
var/aggressiveness = 1
|
||||
var/safety = 1
|
||||
actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/adjust, /datum/action/item_action/selectphrase)
|
||||
|
||||
var/phrase_list = list(
|
||||
|
||||
"halt" = "HALT! HALT! HALT! HALT!",
|
||||
"bobby" = "Stop in the name of the Law.",
|
||||
"compliance" = "Compliance is in your best ineterest.",
|
||||
"justice" = "Prepare for justice!",
|
||||
"running" = "Running will only increase your sentence",
|
||||
"dontmove" = "Don't move, Creep!",
|
||||
"floor" = "Down on the floor, Creep!",
|
||||
"robocop" = "Dead or alive you're coming with me.",
|
||||
"god" = "God made today for the crooks we could not catch yesterday.",
|
||||
"freeze" = "Freeze, Scum Bag!",
|
||||
"imperial" = "Stop right there, criminal scum!",
|
||||
"bash" = "Stop or I'll bash you.",
|
||||
"harry" = "Go ahead, make my day",
|
||||
"asshole" = "Stop breaking the law, asshole.",
|
||||
"stfu" = "You have the right to shut the fuck up",
|
||||
"shutup" = "Shut up crime!",
|
||||
"super" = "Face the wrath of the golden bolt.",
|
||||
"dredd" = "I am, the LAW!"
|
||||
)
|
||||
/obj/item/clothing/mask/gas/sechailer/hos
|
||||
name = "\improper HOS SWAT mask"
|
||||
desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000. It has a tan stripe."
|
||||
@@ -250,133 +270,34 @@
|
||||
else if(actiontype == /datum/action/item_action/adjust)
|
||||
adjustmask(user)
|
||||
else if(actiontype == /datum/action/item_action/selectphrase)
|
||||
var/key = phrase_list[phrase]
|
||||
var/message = phrase_list[key]
|
||||
|
||||
if (!safety)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: FUCK YOUR CUNT YOU SHIT EATING COCKSUCKER MAN EAT A DONG FUCKING ASS RAMMING SHIT FUCK EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS OF FUCK AND DO SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FUCK ASS WANKER FROM THE DEPTHS OF SHIT.</span>")
|
||||
return
|
||||
|
||||
switch(aggressiveness)
|
||||
if(1)
|
||||
switch(phrase)
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop in the name of the Law.</span>")
|
||||
phrase = 2
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Compliance is in your best interest.</span>")
|
||||
phrase = 3
|
||||
if(3)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Prepare for justice.</span>")
|
||||
phrase = 4
|
||||
if(4)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Running will only increase your sentence.</span>")
|
||||
phrase = 5
|
||||
if(5)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Don't move, Creep!</span>")
|
||||
phrase = 6
|
||||
if(6)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: HALT! HALT! HALT! HALT!</span>")
|
||||
phrase = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: HALT! HALT! HALT! HALT!</span>")
|
||||
phrase = 1
|
||||
phrase = (phrase < 6) ? (phrase + 1) : 1
|
||||
key = phrase_list[phrase]
|
||||
message = phrase_list[key]
|
||||
to_chat(user,"<span class='notice'>You set the restrictor to: [message]</span>")
|
||||
if(2)
|
||||
switch(phrase)
|
||||
if(7)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Dead or alive you're coming with me.</span>")
|
||||
phrase = 8
|
||||
if(8)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: God made today for the crooks we could not catch yesterday.</span>")
|
||||
phrase = 9
|
||||
if(9)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Freeze, Scum Bag!</span>")
|
||||
phrase = 10
|
||||
if(10)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop right there, criminal scum!</span>")
|
||||
phrase = 11
|
||||
if(11)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Down on the floor, Creep!</span>")
|
||||
phrase = 7
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Down on the floor, Creep!</span>")
|
||||
phrase = 7
|
||||
phrase = (phrase < 11 && phrase >= 7) ? (phrase + 1) : 7
|
||||
key = phrase_list[phrase]
|
||||
message = phrase_list[key]
|
||||
to_chat(user,"<span class='notice'>You set the restrictor to: [message]</span>")
|
||||
if(3)
|
||||
switch(phrase)
|
||||
if(12)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Go ahead, make my day.</span>")
|
||||
phrase = 13
|
||||
if(13)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop breaking the law, ass hole.</span>")
|
||||
phrase = 14
|
||||
if(14)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: You have the right to shut the fuck up.</span>")
|
||||
phrase = 15
|
||||
if(15)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Shut up crime!</span>")
|
||||
phrase = 16
|
||||
if(16)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Face the wrath of the golden bolt.</span>")
|
||||
phrase = 17
|
||||
if(17)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: I am, the LAW!</span>")
|
||||
phrase = 18
|
||||
if(18)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop or I'll bash you.</span>")
|
||||
phrase = 12
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Go ahead, make my day.</span>")
|
||||
phrase = 13
|
||||
|
||||
phrase = (phrase < 18 && phrase >= 12 ) ? (phrase + 1) : 12
|
||||
key = phrase_list[phrase]
|
||||
message = phrase_list[key]
|
||||
to_chat(user,"<span class='notice'>You set the restrictor to: [message]</span>")
|
||||
if(4)
|
||||
switch(phrase)
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop in the name of the Law.</span>")
|
||||
phrase = 2
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Compliance is in your best interest.</span>")
|
||||
phrase = 3
|
||||
if(3)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Prepare for justice.</span>")
|
||||
phrase = 4
|
||||
if(4)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Running will only increase your sentence.</span>")
|
||||
phrase = 5
|
||||
if(5)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Don't move, Creep!</span>")
|
||||
phrase = 6
|
||||
if(6)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Down on the floor, Creep!</span>")
|
||||
phrase = 7
|
||||
if(7)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Dead or alive you're coming with me.</span>")
|
||||
phrase = 8
|
||||
if(8)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: God made today for the crooks we could not catch yesterday.</span>")
|
||||
phrase = 9
|
||||
if(9)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Freeze, Scum Bag!</span>")
|
||||
phrase = 10
|
||||
if(10)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop right there, criminal scum!</span>")
|
||||
phrase = 11
|
||||
if(11)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop or I'll bash you.</span>")
|
||||
phrase = 12
|
||||
if(12)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Go ahead, make my day.</span>")
|
||||
phrase = 13
|
||||
if(13)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Stop breaking the law, ass hole.</span>")
|
||||
phrase = 14
|
||||
if(14)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: You have the right to shut the fuck up.</span>")
|
||||
phrase = 15
|
||||
if(15)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Shut up crime!</span>")
|
||||
phrase = 16
|
||||
if(16)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: Face the wrath of the golden bolt.</span>")
|
||||
phrase = 17
|
||||
if(17)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: I am, the LAW!</span>")
|
||||
phrase = 18
|
||||
if(18)
|
||||
to_chat(user, "<span class='notice'>You set the restrictor to: HALT! HALT! HALT! HALT!</span>")
|
||||
phrase = 1
|
||||
phrase = (phrase < 18 && phrase >= 1 ) ? (phrase + 1) : 1
|
||||
key = phrase_list[phrase]
|
||||
message = phrase_list[key]
|
||||
to_chat(user,"<span class='notice'>You set the restrictor to: [message]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It's broken.</span>")
|
||||
|
||||
@@ -419,77 +340,20 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/proc/halt()
|
||||
var/phrase_text = null
|
||||
var/phrase_sound = null
|
||||
var/key = phrase_list[phrase]
|
||||
var/message = phrase_list[key]
|
||||
|
||||
|
||||
if(cooldown < world.time - 35) // A cooldown, to stop people being jerks
|
||||
if(!safety)
|
||||
phrase_text = "FUCK YOUR CUNT YOU SHIT EATING COCKSUCKER MAN EAT A DONG FUCKING ASS RAMMING SHIT FUCK EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS OF FUCK AND DO SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FUCK ASS WANKER FROM THE DEPTHS OF SHIT."
|
||||
usr.visible_message("[usr]'s Compli-o-Nator: <font color='red' size='4'><b>[phrase_text]</b></font>")
|
||||
message = "FUCK YOUR CUNT YOU SHIT EATING COCKSUCKER MAN EAT A DONG FUCKING ASS RAMMING SHIT FUCK EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS OF FUCK AND DO SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FUCK ASS WANKER FROM THE DEPTHS OF SHIT."
|
||||
usr.visible_message("[usr]'s Compli-o-Nator: <font color='red' size='4'><b>[message]</b></font>")
|
||||
playsound(src.loc, 'sound/voice/binsult.ogg', 100, 0, 4)
|
||||
cooldown = world.time
|
||||
return
|
||||
|
||||
|
||||
switch(phrase) //sets the properties of the chosen phrase
|
||||
if(1) // good cop
|
||||
phrase_text = "HALT! HALT! HALT! HALT!"
|
||||
phrase_sound = "halt"
|
||||
if(2)
|
||||
phrase_text = "Stop in the name of the Law."
|
||||
phrase_sound = "bobby"
|
||||
if(3)
|
||||
phrase_text = "Compliance is in your best interest."
|
||||
phrase_sound = "compliance"
|
||||
if(4)
|
||||
phrase_text = "Prepare for justice!"
|
||||
phrase_sound = "justice"
|
||||
if(5)
|
||||
phrase_text = "Running will only increase your sentence."
|
||||
phrase_sound = "running"
|
||||
if(6) // bad cop
|
||||
phrase_text = "Don't move, Creep!"
|
||||
phrase_sound = "dontmove"
|
||||
if(7)
|
||||
phrase_text = "Down on the floor, Creep!"
|
||||
phrase_sound = "floor"
|
||||
if(8)
|
||||
phrase_text = "Dead or alive you're coming with me."
|
||||
phrase_sound = "robocop"
|
||||
if(9)
|
||||
phrase_text = "God made today for the crooks we could not catch yesterday."
|
||||
phrase_sound = "god"
|
||||
if(10)
|
||||
phrase_text = "Freeze, Scum Bag!"
|
||||
phrase_sound = "freeze"
|
||||
if(11)
|
||||
phrase_text = "Stop right there, criminal scum!"
|
||||
phrase_sound = "imperial"
|
||||
if(12) // LA-PD
|
||||
phrase_text = "Stop or I'll bash you."
|
||||
phrase_sound = "bash"
|
||||
if(13)
|
||||
phrase_text = "Go ahead, make my day."
|
||||
phrase_sound = "harry"
|
||||
if(14)
|
||||
phrase_text = "Stop breaking the law, ass hole."
|
||||
phrase_sound = "asshole"
|
||||
if(15)
|
||||
phrase_text = "You have the right to shut the fuck up."
|
||||
phrase_sound = "stfu"
|
||||
if(16)
|
||||
phrase_text = "Shut up crime!"
|
||||
phrase_sound = "shutup"
|
||||
if(17)
|
||||
phrase_text = "Face the wrath of the golden bolt."
|
||||
phrase_sound = "super"
|
||||
if(18)
|
||||
phrase_text = "I am, the LAW!"
|
||||
phrase_sound = "dredd"
|
||||
|
||||
usr.visible_message("[usr]'s Compli-o-Nator: <font color='red' size='4'><b>[phrase_text]</b></font>")
|
||||
playsound(src.loc, "sound/voice/complionator/[phrase_sound].ogg", 100, 0, 4)
|
||||
usr.visible_message("[usr]'s Compli-o-Nator: <font color='red' size='4'><b>[message]</b></font>")
|
||||
playsound(src.loc, "sound/voice/complionator/[key].ogg", 100, 0, 4)
|
||||
cooldown = world.time
|
||||
|
||||
|
||||
|
||||
@@ -120,6 +120,78 @@
|
||||
mute = MUZZLE_MUTE_NONE
|
||||
security_lock = TRUE
|
||||
locked = FALSE
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock
|
||||
name = "shock muzzle"
|
||||
desc = "A muzzle designed to prevent biting. This one is fitted with a behavior correction system."
|
||||
var/obj/item/assembly/trigger = null
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/attackby(obj/item/W, mob/user, params)
|
||||
if(isscrewdriver(W) && trigger)
|
||||
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
|
||||
trigger.forceMove(get_turf(user))
|
||||
trigger.master = null
|
||||
trigger.holder = null
|
||||
trigger = null
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/assembly/signaler) || istype(W, /obj/item/assembly/voice))
|
||||
if(istype(trigger, /obj/item/assembly/signaler) || istype(trigger, /obj/item/assembly/voice))
|
||||
to_chat(user, "<span class='notice'>Something is already attached to [src].</span>")
|
||||
return FALSE
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>You are unable to insert [W] into [src].</span>")
|
||||
return FALSE
|
||||
trigger = W
|
||||
trigger.forceMove(src)
|
||||
trigger.master = src
|
||||
trigger.holder = src
|
||||
to_chat(user, "<span class='notice'>You attach the [W] to [src].</span>")
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/assembly))
|
||||
to_chat(user, "<span class='notice'>That won't fit in [src]. Perhaps a signaler or voice analyzer would?</span>")
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/proc/can_shock(obj/item/clothing/C)
|
||||
if(istype(C))
|
||||
if(isliving(C.loc))
|
||||
return C.loc
|
||||
else if(isliving(loc))
|
||||
return loc
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/proc/process_activation(var/obj/D, var/normal = 1, var/special = 1)
|
||||
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
var/mob/M = can_shock(loc)
|
||||
if(M)
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
|
||||
M.Weaken(5)
|
||||
M.Stuttering(1)
|
||||
M.Jitter(20)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(trigger)
|
||||
trigger.HasProximity(AM)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/hear_talk(mob/living/M as mob, msg)
|
||||
if(trigger)
|
||||
trigger.hear_talk(M, msg)
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/hear_message(mob/living/M as mob, msg)
|
||||
if(trigger)
|
||||
trigger.hear_message(M, msg)
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/mask/surgical
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd, /obj/item/crowbar, \
|
||||
/obj/item/screwdriver, /obj/item/weldingtool, /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, \
|
||||
/obj/item/radio, /obj/item/analyzer, /obj/item/gun/energy/laser, /obj/item/gun/energy/pulse, \
|
||||
/obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun)
|
||||
/obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun, /obj/item/gun/projectile/automatic/lasercarbine, /obj/item/gun/energy/gun/blueshield)
|
||||
strip_delay = 130
|
||||
species_fit = list("Drask", "Vox")
|
||||
sprite_sheets = list(
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/t_scanner, /obj/item/rcd)
|
||||
siemens_coefficient = 0
|
||||
|
||||
hide_tail_by_species = list("Vox" , "Vulpkanin" , "Unathi" , "Tajaran")
|
||||
species_restricted = list("exclude","Diona","Wryn")
|
||||
sprite_sheets = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
@@ -313,7 +314,7 @@
|
||||
on = 1
|
||||
actions_types = list(/datum/action/item_action/toggle_helmet_mode)
|
||||
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE
|
||||
visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE|HIDETAIL
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon()
|
||||
icon_state = "hardsuit[on]-[item_color]"
|
||||
@@ -379,7 +380,7 @@
|
||||
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
|
||||
slowdown = 1
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch your hardsuit to combat mode. You will take damage in zero pressure environments, but you are more suited for a fight.</span>")
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
slowdown = 0
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
flags_size = ONESIZEFITSALL
|
||||
allowed = list(/obj/item) //for stuffing exta special presents
|
||||
allowed = list(/obj/item) //for stuffing extra special presents
|
||||
|
||||
//Space pirate outfit
|
||||
/obj/item/clothing/head/helmet/space/pirate
|
||||
@@ -139,13 +139,20 @@
|
||||
//Paramedic EVA suit
|
||||
/obj/item/clothing/head/helmet/space/eva/paramedic
|
||||
name = "Paramedic EVA helmet"
|
||||
desc = "A paramedic EVA helmet. Used in the recovery of bodies from space."
|
||||
desc = "A brand new paramedic EVA helmet. It seems to mold to your head shape. Used for retrieving bodies in space."
|
||||
icon_state = "paramedic-eva-helmet"
|
||||
item_state = "paramedic-eva-helmet"
|
||||
species_fit = list("Vox", "Grey")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox", "Grey" , "Skrell" , "Tajaran" , "Drask" , "Unathi" , "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi',
|
||||
"Grey" = 'icons/mob/species/grey/helmet.dmi'
|
||||
"Grey" = 'icons/mob/species/grey/helmet.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/helmet.dmi',
|
||||
"Tajaran" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/helmet.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/helmet.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/hats.dmi'
|
||||
@@ -155,10 +162,18 @@
|
||||
name = "Paramedic EVA suit"
|
||||
icon_state = "paramedic-eva"
|
||||
item_state = "paramedic-eva"
|
||||
desc = "A paramedic EVA suit. Used in the recovery of bodies from space."
|
||||
species_fit = list("Vox")
|
||||
desc = "A brand new paramedic EVA suit. The nitrile seems a bit too thin to be space proof. Used for retrieving bodies in space."
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox", "Grey" , "Skrell" , "Tajaran" , "Drask" , "Unathi" , "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi',
|
||||
"Grey" = 'icons/mob/species/grey/suit.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/suit.dmi',
|
||||
"Tajaran" = 'icons/mob/species/tajaran/suit.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/suit.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/suit.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi'
|
||||
|
||||
@@ -331,6 +331,12 @@
|
||||
item_state = "lingspacesuit"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/draculacoat // Bleh!
|
||||
name = "transylvanian coat"
|
||||
desc = "<i>What is a spessman? A miserable little pile of secrets.</i>"
|
||||
icon_state = "draculacoat"
|
||||
item_state = "draculacoat"
|
||||
|
||||
/*
|
||||
* Winter Coats
|
||||
*/
|
||||
|
||||
@@ -243,7 +243,6 @@
|
||||
/obj/item/clothing/accessory/holobadge/cord
|
||||
icon_state = "holobadge-cord"
|
||||
item_color = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
|
||||
@@ -97,18 +97,9 @@ log transactions
|
||||
if(!powered())
|
||||
return
|
||||
var/obj/item/stack/spacecash/C = I
|
||||
authenticated_account.money += C.amount
|
||||
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 50, 1)
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = authenticated_account.owner_name
|
||||
T.purpose = "Credit deposit"
|
||||
T.amount = C.amount
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
authenticated_account.credit(C.amount, "Credit deposit", machine_id, authenticated_account.owner_name)
|
||||
|
||||
to_chat(user, "<span class='info'>You insert [C] into [src].</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -175,19 +166,8 @@ log transactions
|
||||
else if(transfer_amount <= authenticated_account.money)
|
||||
var/target_account_number = text2num(href_list["target_acc_number"])
|
||||
var/transfer_purpose = href_list["purpose"]
|
||||
if(linked_db.charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
|
||||
if(linked_db.charge_to_account(target_account_number, authenticated_account, transfer_purpose, machine_id, transfer_amount))
|
||||
to_chat(usr, "[bicon(src)]<span class='info'>Funds transfer successful.</span>")
|
||||
authenticated_account.money -= transfer_amount
|
||||
|
||||
//create an entry in the account transaction log
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "Account #[target_account_number]"
|
||||
T.purpose = transfer_purpose
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
T.amount = "([transfer_amount])"
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>Funds transfer failed.</span>")
|
||||
|
||||
@@ -263,15 +243,7 @@ log transactions
|
||||
authenticated_account.money -= amount
|
||||
withdraw_arbitrary_sum(amount)
|
||||
|
||||
//create an entry in the account transaction log
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = authenticated_account.owner_name
|
||||
T.purpose = "Credit withdrawal"
|
||||
T.amount = "([amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
authenticated_account.charge(amount, null, "Credit withdrawal", machine_id, authenticated_account.owner_name)
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>You don't have enough funds to do that!</span>")
|
||||
if("balance_statement")
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
var/global/current_date_string
|
||||
#define STATION_CREATION_DATE "2 April, 2555"
|
||||
#define STATION_CREATION_TIME "11:24:30"
|
||||
#define STATION_START_CASH 75000
|
||||
#define STATION_SOURCE_TERMINAL "Biesel GalaxyNet Terminal #227"
|
||||
#define DEPARTMENT_START_CASH 5000
|
||||
|
||||
var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
@@ -15,19 +20,13 @@ var/global/list/all_money_accounts = list()
|
||||
station_account.owner_name = "[station_name()] Station Account"
|
||||
station_account.account_number = rand(111111, 999999)
|
||||
station_account.remote_access_pin = rand(1111, 111111)
|
||||
station_account.money = 75000
|
||||
station_account.money = STATION_START_CASH
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = station_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = 75000
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
station_account.makeTransactionLog(STATION_START_CASH, "Account Creation", STATION_SOURCE_TERMINAL, station_account.owner_name, FALSE,
|
||||
STATION_CREATION_DATE, STATION_CREATION_TIME)
|
||||
|
||||
//add the account
|
||||
station_account.transaction_log.Add(T)
|
||||
all_money_accounts.Add(station_account)
|
||||
|
||||
/proc/create_department_account(department)
|
||||
@@ -37,19 +36,13 @@ var/global/list/all_money_accounts = list()
|
||||
department_account.owner_name = "[department] Account"
|
||||
department_account.account_number = rand(111111, 999999)
|
||||
department_account.remote_access_pin = rand(1111, 111111)
|
||||
department_account.money = 5000
|
||||
department_account.money = DEPARTMENT_START_CASH
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = department_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = department_account.money
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
department_account.makeTransactionLog(DEPARTMENT_START_CASH, "Account Creation", STATION_SOURCE_TERMINAL, department_account.owner_name, FALSE,
|
||||
STATION_CREATION_DATE, STATION_CREATION_TIME)
|
||||
|
||||
//add the account
|
||||
department_account.transaction_log.Add(T)
|
||||
all_money_accounts.Add(department_account)
|
||||
|
||||
department_accounts[department] = department_account
|
||||
@@ -73,7 +66,7 @@ var/global/list/all_money_accounts = list()
|
||||
if(!source_db)
|
||||
//set a random date, time and location some time over the past few decades
|
||||
T.date = "[num2text(rand(1,31))] [pick(month_names)], [rand(game_year - 20,game_year - 1)]"
|
||||
T.time = "[rand(0,23)]:[rand(0,59)]"
|
||||
T.time = "[rand(0,23)]:[rand(0,59)]:[rand(0,59)]"
|
||||
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
|
||||
|
||||
M.account_number = rand(111111, 999999)
|
||||
@@ -104,7 +97,7 @@ var/global/list/all_money_accounts = list()
|
||||
<i>Date and time:</i> [station_time_timestamp()], [current_date_string]<br><br>
|
||||
<i>Creation terminal ID:</i> [source_db.machine_id]<br>
|
||||
<i>Authorised NT officer overseeing creation:</i> [overseer]<br>"}
|
||||
// END AUTOFIX
|
||||
|
||||
//stamp the paper
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
@@ -133,7 +126,6 @@ var/global/list/all_money_accounts = list()
|
||||
|
||||
/datum/money_account/New()
|
||||
..()
|
||||
//security_level = pick (0,1) //Stealing is now slightly viable
|
||||
|
||||
/datum/transaction
|
||||
var/target_name = ""
|
||||
@@ -142,222 +134,14 @@ var/global/list/all_money_accounts = list()
|
||||
var/date = ""
|
||||
var/time = ""
|
||||
var/source_terminal = ""
|
||||
/*
|
||||
/obj/machinery/account_database
|
||||
name = "Accounts database"
|
||||
desc = "Holds transaction logs, account data and all kinds of other financial records."
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "analyser"
|
||||
density = 1
|
||||
req_one_access = list(access_hop, access_captain)
|
||||
var/receipt_num
|
||||
var/machine_id = ""
|
||||
var/obj/item/card/id/held_card
|
||||
var/access_level = 0
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
..()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
if(department_accounts.len == 0)
|
||||
for(var/department in station_departments)
|
||||
create_department_account(department)
|
||||
if(!vendor_account)
|
||||
create_department_account("Vendor")
|
||||
vendor_account = department_accounts["Vendor"]
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
|
||||
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
|
||||
/obj/machinery/account_database/attack_hand(mob/user as mob)
|
||||
if(ishuman(user) && !user.stat && get_dist(src,user) <= 1)
|
||||
var/dat = "<b>Accounts Database</b><br>"
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:171: dat += "<i>[machine_id]</i><br>"
|
||||
dat += {"<i>[machine_id]</i><br>
|
||||
Confirm identity: <a href='?src=[UID()];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"}
|
||||
// END AUTOFIX
|
||||
if(access_level > 0)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:175: dat += "<a href='?src=[UID()];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>"
|
||||
dat += {"<a href='?src=[UID()];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>
|
||||
You may not edit accounts at this terminal, only create and view them.<br>"}
|
||||
// END AUTOFIX
|
||||
if(creating_new_account)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:178: dat += "<br>"
|
||||
dat += {"<br>
|
||||
<a href='?src=[UID()];choice=view_accounts_list;'>Return to accounts list</a>
|
||||
<form name='create_account' action='?src=[UID()]' method='get'>
|
||||
<input type='hidden' name='src' value='[UID()]'>
|
||||
<input type='hidden' name='choice' value='finalise_create_account'>
|
||||
<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>
|
||||
<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>
|
||||
<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>
|
||||
<input type='submit' value='Create'><br>
|
||||
</form>"}
|
||||
// END AUTOFIX
|
||||
else
|
||||
if(detailed_account_view)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:190: dat += "<br>"
|
||||
dat += {"<br>
|
||||
<a href='?src=[UID()];choice=view_accounts_list;'>Return to accounts list</a><hr>
|
||||
<b>Account number:</b> #[detailed_account_view.account_number]<br>
|
||||
<b>Account holder:</b> [detailed_account_view.owner_name]<br>
|
||||
<b>Account balance:</b> $[detailed_account_view.money]<br>
|
||||
<table border=1 style='width:100%'>
|
||||
<tr>
|
||||
<td><b>Date</b></td>
|
||||
<td><b>Time</b></td>
|
||||
<td><b>Target</b></td>
|
||||
<td><b>Purpose</b></td>
|
||||
<td><b>Value</b></td>
|
||||
<td><b>Source terminal ID</b></td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
for(var/datum/transaction/T in detailed_account_view.transaction_log)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:205: dat += "<tr>"
|
||||
dat += {"<tr>
|
||||
<td>[T.date]</td>
|
||||
<td>[T.time]</td>
|
||||
<td>[T.target_name]</td>
|
||||
<td>[T.purpose]</td>
|
||||
<td>$[T.amount]</td>
|
||||
<td>[T.source_terminal]</td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
dat += "</table>"
|
||||
else
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:215: dat += "<a href='?src=[UID()];choice=create_account;'>Create new account</a><br><br>"
|
||||
dat += {"<a href='?src=[UID()];choice=create_account;'>Create new account</a><br><br>
|
||||
<table border=1 style='width:100%'>"}
|
||||
// END AUTOFIX
|
||||
for(var/i=1, i<=all_money_accounts.len, i++)
|
||||
var/datum/money_account/D = all_money_accounts[i]
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:219: dat += "<tr>"
|
||||
dat += {"<tr>
|
||||
<td>#[D.account_number]</td>
|
||||
<td>[D.owner_name]</td>
|
||||
<td><a href='?src=[UID()];choice=view_account_detail;account_index=[i]'>View in detail</a></td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
dat += "</table>"
|
||||
|
||||
user << browse(dat,"window=account_db;size=700x650")
|
||||
else
|
||||
user << browse(null,"window=account_db")
|
||||
|
||||
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
|
||||
if(istype(O, /obj/item/card))
|
||||
var/obj/item/card/id/idcard = O
|
||||
if(!held_card)
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
held_card = idcard
|
||||
|
||||
if(access_cent_captain in idcard.access)
|
||||
access_level = 2
|
||||
else if(access_hop in idcard.access || access_captain in idcard.access)
|
||||
access_level = 1
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/Topic(var/href, var/href_list)
|
||||
..()
|
||||
if(href_list["toggle_activated"])
|
||||
activated = !activated
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
if("finalise_create_account")
|
||||
var/account_name = href_list["holder_name"]
|
||||
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
|
||||
create_account(account_name, starting_funds, src)
|
||||
if(starting_funds > 0)
|
||||
//subtract the money
|
||||
station_account.money -= starting_funds
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = account_name
|
||||
T.purpose = "New account funds initialisation"
|
||||
T.amount = "([starting_funds])"
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = machine_id
|
||||
station_account.transaction_log.Add(T)
|
||||
|
||||
creating_new_account = 0
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
access_level = 0
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if(access_cent_captain in C.access)
|
||||
access_level = 2
|
||||
else if(access_hop in C.access || access_captain in C.access)
|
||||
access_level = 1
|
||||
if("view_account_detail")
|
||||
var/index = text2num(href_list["account_index"])
|
||||
if(index && index <= all_money_accounts.len)
|
||||
detailed_account_view = all_money_accounts[index]
|
||||
if("view_accounts_list")
|
||||
detailed_account_view = null
|
||||
creating_new_account = 0
|
||||
|
||||
src.attack_hand(usr)
|
||||
*/
|
||||
/obj/machinery/computer/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
/obj/machinery/computer/account_database/proc/charge_to_account(attempt_account_number, datum/money_account/source, purpose, terminal_id, amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number && !D.suspended)
|
||||
D.money += amount
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
T.purpose = purpose
|
||||
if(amount < 0)
|
||||
T.amount = "([amount])"
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
source.charge(amount, D, purpose, terminal_id, "Account #[D.account_number]", "Transfer from [source.owner_name]",
|
||||
"[D.owner_name]")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -378,3 +162,9 @@ var/global/list/all_money_accounts = list()
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number)
|
||||
return D
|
||||
|
||||
#undef STATION_CREATION_DATE
|
||||
#undef STATION_CREATION_TIME
|
||||
#undef STATION_START_CASH
|
||||
#undef STATION_SOURCE_TERMINAL
|
||||
#undef DEPARTMENT_START_CASH
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
var/global/current_date_string
|
||||
|
||||
/obj/machinery/computer/account_database
|
||||
name = "Accounts Uplink Terminal"
|
||||
@@ -15,34 +16,6 @@
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(var/mob/user)
|
||||
if(user.can_admin_interact())
|
||||
return 2
|
||||
if(!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/account_database/proc/create_transation(target, reason, amount)
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
|
||||
/obj/machinery/computer/account_database/proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/computer/account_database/New()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
@@ -55,11 +28,29 @@
|
||||
vendor_account = department_accounts["Vendor"]
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[time2text(world.timeofday, "DD MM")], [game_year]"
|
||||
current_date_string = "[time2text(world.timeofday, "DD Month")], [game_year]"
|
||||
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(var/mob/user)
|
||||
if(user.can_admin_interact())
|
||||
return 2
|
||||
if(!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/account_database/proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/computer/account_database/attackby(obj/O, mob/user, params)
|
||||
if(!istype(O, /obj/item/card/id))
|
||||
return ..()
|
||||
@@ -160,16 +151,6 @@
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
|
||||
if("add_funds")
|
||||
var/amount = input("Enter the amount you wish to add", "Silently add funds") as num
|
||||
if(detailed_account_view)
|
||||
detailed_account_view.money += amount
|
||||
|
||||
if("remove_funds")
|
||||
var/amount = input("Enter the amount you wish to remove", "Silently remove funds") as num
|
||||
if(detailed_account_view)
|
||||
detailed_account_view.money -= amount
|
||||
|
||||
if("toggle_suspension")
|
||||
if(detailed_account_view)
|
||||
detailed_account_view.suspended = !detailed_account_view.suspended
|
||||
@@ -182,14 +163,10 @@
|
||||
starting_funds = Clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt.
|
||||
starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap.
|
||||
|
||||
create_account(account_name, starting_funds, src)
|
||||
var/datum/money_account/M = create_account(account_name, starting_funds, src)
|
||||
if(starting_funds > 0)
|
||||
//subtract the money
|
||||
station_account.money -= starting_funds
|
||||
|
||||
//create a transaction log entry
|
||||
var/trx = create_transation(account_name, "New account activation", "([starting_funds])")
|
||||
station_account.transaction_log.Add(trx)
|
||||
station_account.charge(starting_funds, null, "New account activation",
|
||||
"", "New account activation", M.owner_name)
|
||||
|
||||
creating_new_account = 0
|
||||
ui.close()
|
||||
@@ -205,19 +182,6 @@
|
||||
detailed_account_view = null
|
||||
creating_new_account = 0
|
||||
|
||||
if("revoke_payroll")
|
||||
var/funds = detailed_account_view.money
|
||||
var/account_trx = create_transation(station_account.owner_name, "Revoke payroll", "([funds])")
|
||||
var/station_trx = create_transation(detailed_account_view.owner_name, "Revoke payroll", funds)
|
||||
|
||||
station_account.money += funds
|
||||
detailed_account_view.money = 0
|
||||
|
||||
detailed_account_view.transaction_log.Add(account_trx)
|
||||
station_account.transaction_log.Add(station_trx)
|
||||
|
||||
callHook("revoke_payroll", list(detailed_account_view))
|
||||
|
||||
if("print")
|
||||
var/text
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
desc = "Swipe your ID card to make purchases electronically."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "eftpos"
|
||||
var/machine_id = ""
|
||||
var/eftpos_name = "Default EFTPOS scanner"
|
||||
var/machine_name = ""
|
||||
var/transaction_locked = 0
|
||||
var/transaction_paid = 0
|
||||
var/transaction_amount = 0
|
||||
@@ -15,7 +14,7 @@
|
||||
|
||||
/obj/item/eftpos/New()
|
||||
..()
|
||||
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
|
||||
machine_name = "[station_name()] EFTPOS #[num_financial_terminals++]"
|
||||
access_code = rand(1111,111111)
|
||||
reconnect_database()
|
||||
spawn(0)
|
||||
@@ -28,14 +27,10 @@
|
||||
/obj/item/eftpos/proc/print_reference()
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
var/obj/item/paper/R = new(loc)
|
||||
R.name = "Reference: [eftpos_name]"
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\EFTPOS.dm:31: R.info = "<b>[eftpos_name] reference</b><br><br>"
|
||||
R.info = {"<b>[eftpos_name] reference</b><br><br>
|
||||
R.name = "Reference: [machine_name]"
|
||||
R.info = {"<b>[machine_name] reference</b><br><br>
|
||||
Access code: [access_code]<br><br>
|
||||
<b>Do not lose or misplace this code.</b><br>"}
|
||||
// END AUTOFIX
|
||||
//stamp the paper
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
@@ -86,8 +81,7 @@
|
||||
|
||||
/obj/item/eftpos/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["eftpos_name"] = eftpos_name
|
||||
data["machine_id"] = machine_id
|
||||
data["machine_name"] = machine_name
|
||||
data["transaction_locked"] = transaction_locked
|
||||
data["transaction_paid"] = transaction_paid
|
||||
data["transaction_purpose"] = transaction_purpose
|
||||
@@ -112,15 +106,6 @@
|
||||
print_reference()
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>Incorrect code entered.</span>")
|
||||
if("change_id")
|
||||
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
|
||||
if(attempt_code == access_code)
|
||||
var/name = input("Enter a new terminal ID for this device", "Enter new EFTPOS ID") as text|null
|
||||
if(name)
|
||||
eftpos_name = "[name] EFTPOS scanner"
|
||||
print_reference()
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>Incorrect code entered.</span>")
|
||||
if("link_account")
|
||||
if(!linked_db)
|
||||
reconnect_database()
|
||||
@@ -179,48 +164,34 @@
|
||||
if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/C = I
|
||||
visible_message("<span class='info'>[user] swipes a card through [src].</span>")
|
||||
if(transaction_locked && !transaction_paid)
|
||||
if(linked_account)
|
||||
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
if(transaction_amount <= D.money)
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, 1)
|
||||
visible_message("[bicon(src)] The [src] chimes.")
|
||||
transaction_paid = 1
|
||||
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
linked_account.money += transaction_amount
|
||||
if(!transaction_locked || transaction_paid)
|
||||
return
|
||||
|
||||
if(!linked_account)
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>EFTPOS is not connected to an account.</span>")
|
||||
return
|
||||
|
||||
var/confirm = alert("Are you sure you want to pay $[transaction_amount] to Account: [linked_account.owner_name] ", "Confirm transaction", "Yes", "No")
|
||||
if(confirm == "No")
|
||||
return
|
||||
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
|
||||
if(!D)
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>Unable to access account. Check security settings and try again.</span>")
|
||||
|
||||
if(transaction_amount > D.money)
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>You don't have that much money!</span>")
|
||||
return
|
||||
|
||||
var/transSuccess = D.charge(transaction_amount, linked_account, transaction_purpose, machine_name, D.owner_name)
|
||||
if(transSuccess == TRUE)
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, 1)
|
||||
visible_message("[bicon(src)] The [src] chimes.")
|
||||
transaction_paid = 1
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
|
||||
T.purpose = transaction_purpose
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = transaction_purpose
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
linked_account.transaction_log.Add(T)
|
||||
else
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>You don't have that much money!</span>")
|
||||
else
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>Unable to access account. Check security settings and try again.</span>")
|
||||
else
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>EFTPOS is not connected to an account.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
//emag?
|
||||
//emag?
|
||||
|
||||
@@ -46,47 +46,69 @@
|
||||
/datum/money_account/proc/fmtBalance()
|
||||
return "$[num2septext(money)]"
|
||||
|
||||
/datum/money_account/proc/charge(var/transaction_amount,var/datum/money_account/dest,var/transaction_purpose, var/terminal_name="", var/terminal_id=0, var/dest_name = "UNKNOWN")
|
||||
// Seperated from charge so they can reuse the code and also because there's many instances where a log will be made without actually making a transaction
|
||||
/datum/money_account/proc/makeTransactionLog(transaction_amount = 0, transaction_purpose, terminal_name = "",
|
||||
dest_name = "UNKNOWN", charging = TRUE, date = current_date_string, time = "")
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = dest_name
|
||||
T.purpose = transaction_purpose
|
||||
if(!charging || transaction_amount == 0)
|
||||
T.amount = "[transaction_amount]"
|
||||
else
|
||||
T.amount = "([transaction_amount])"
|
||||
|
||||
T.source_terminal = terminal_name
|
||||
T.date = date
|
||||
if(time == "")
|
||||
T.time = station_time_timestamp()
|
||||
else
|
||||
T.time = time
|
||||
transaction_log.Add(T)
|
||||
|
||||
// Charge is for transferring money from an account to another. The destination account can possibly not exist (Magical money sink)
|
||||
/datum/money_account/proc/charge(transaction_amount = 0, datum/money_account/dest, transaction_purpose,
|
||||
terminal_name = "", dest_name = "UNKNOWN", dest_purpose, dest_target_name)
|
||||
if(suspended)
|
||||
to_chat(usr, "<span class='warning'>Unable to access source account: account suspended.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
if(transaction_amount <= money)
|
||||
//transfer the money
|
||||
money -= transaction_amount
|
||||
makeTransactionLog(transaction_amount, transaction_purpose, terminal_name, dest_name)
|
||||
if(dest)
|
||||
dest.money += transaction_amount
|
||||
dest.makeTransactionLog(transaction_amount,
|
||||
dest_purpose ? dest_purpose : transaction_purpose, terminal_name, dest_target_name ? dest_target_name : dest_name, FALSE)
|
||||
return 1
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Insufficient funds in account.</span>")
|
||||
return 0
|
||||
|
||||
// phantom_charge is for when you want to charge an account, without making any corresponding log (e.g. you make it yourself with custom date
|
||||
// or there won't be any log for some IC reasons (hacking)
|
||||
/datum/money_account/proc/phantom_charge(transaction_amount = 0, datum/money_account/dest, suspensionbypass = 0)
|
||||
if(suspended && !suspensionbypass)
|
||||
return 0
|
||||
|
||||
if(transaction_amount <= money)
|
||||
//transfer the money
|
||||
money -= transaction_amount
|
||||
if(dest)
|
||||
dest.money += transaction_amount
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T
|
||||
if(dest)
|
||||
T = new()
|
||||
T.target_name = owner_name
|
||||
if(terminal_name!="")
|
||||
T.target_name += " (via [terminal_name])"
|
||||
T.purpose = transaction_purpose
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
if(terminal_id)
|
||||
T.source_terminal = terminal_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
dest.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = (!dest) ? dest_name : dest.owner_name
|
||||
if(terminal_name!="")
|
||||
T.target_name += " (via [terminal_name])"
|
||||
T.purpose = transaction_purpose
|
||||
T.amount = "[transaction_amount]"
|
||||
if(terminal_id)
|
||||
T.source_terminal = terminal_id
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
transaction_log.Add(T)
|
||||
return 1
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Insufficient funds in account.</span>")
|
||||
return 0
|
||||
return 0
|
||||
|
||||
// Credit is for giving money to an account out of thin air. Suspension does not matter.
|
||||
/datum/money_account/proc/credit(transaction_amount = 0, transaction_purpose,
|
||||
terminal_name = "", dest_name = "UNKNOWN", date = current_date_string, time = "")
|
||||
|
||||
money += transaction_amount
|
||||
makeTransactionLog(transaction_amount, transaction_purpose, terminal_name, dest_name, FALSE, date, time)
|
||||
return 1
|
||||
|
||||
//phantom_credit is like the above without any log
|
||||
/datum/money_account/proc/phantom_credit(transaction_amount = 0)
|
||||
money += transaction_amount
|
||||
return 1
|
||||
|
||||
@@ -11,14 +11,20 @@
|
||||
if(!T)
|
||||
return kill()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a blob?", ROLE_BLOB, 1)
|
||||
var/mob/C
|
||||
if(candidates.len)
|
||||
C = pick(candidates)
|
||||
Blob = new /obj/structure/blob/core(T, new_overmind=C.client)
|
||||
for(var/i in 1 to 5)
|
||||
Blob.process()
|
||||
else
|
||||
if(!candidates.len)
|
||||
return kill()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in all_vent_pumps)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
vents += temp_vent
|
||||
var/obj/vent = pick(vents)
|
||||
var/mob/living/simple_animal/mouse/blobinfected/B = new(vent.loc)
|
||||
var/mob/M = pick(candidates)
|
||||
B.key = M.key
|
||||
to_chat(B, "<span class='userdanger'>You are now a mouse, infected with blob spores. Find somewhere isolated... before you burst and become the blob! Use ventcrawl (alt-click on vents) to move around.</span>")
|
||||
var/image/alert_overlay = image('icons/mob/blob.dmi', "blank_blob")
|
||||
notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B, alert_overlay = alert_overlay)
|
||||
|
||||
/datum/event/blob/tick()
|
||||
if(!Blob)
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
if(announce)
|
||||
event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai, /area/syndicate_depot)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering, /area/syndicate_depot)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || !is_station_level(S.z))
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
S.last_charge = S.charge
|
||||
S.last_output_attempt = S.output_attempt
|
||||
@@ -35,26 +35,26 @@
|
||||
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || !is_station_level(C.z))
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai, /area/syndicate_depot)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering, /area/syndicate_depot)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
if(announce)
|
||||
event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || !is_station_level(C.z))
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || !is_station_level(S.z))
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
S.charge = S.last_charge
|
||||
S.output_attempt = S.last_output_attempt
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define MINIMUM_PERCENTAGE_LOSS 0.5
|
||||
#define VARIABLE_LOSS 2 // Invariant: 1 - VARIABLE_LOSS/10 >= MINIMUM_PERCENTAGE_LOSS
|
||||
|
||||
/var/global/account_hack_attempted = 0
|
||||
|
||||
/datum/event/money_hacker
|
||||
@@ -16,7 +19,7 @@
|
||||
|
||||
/datum/event/money_hacker/announce()
|
||||
var/message = "A brute force hack has been detected (in progress since [station_time_timestamp()]). The target of the attack is: Financial account #[affected_account.account_number], \
|
||||
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \
|
||||
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected account until the attack has ceased. \
|
||||
Notifications will be sent as updates occur.<br>"
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
@@ -32,35 +35,38 @@
|
||||
|
||||
/datum/event/money_hacker/end()
|
||||
var/message
|
||||
if(affected_account && !affected_account)
|
||||
//hacker wins
|
||||
if(!isnull(affected_account) && !affected_account.suspended)
|
||||
message = "The hack attempt has succeeded."
|
||||
|
||||
//subtract the money
|
||||
var/lost = affected_account.money * 0.8 + (rand(2,4) - 2) / 10
|
||||
affected_account.money -= lost
|
||||
var/lost = affected_account.money * (MINIMUM_PERCENTAGE_LOSS + rand(0,VARIABLE_LOSS) / 10);
|
||||
|
||||
affected_account.phantom_charge(lost)
|
||||
|
||||
|
||||
//create a taunting log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = pick("","yo brotha from anotha motha","el Presidente","chieF smackDowN")
|
||||
T.purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
|
||||
T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
|
||||
var/dest_name = pick("","yo brotha from anotha motha","el Presidente","chieF smackDowN")
|
||||
var/amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
|
||||
var/purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
|
||||
var/date1 = "31 December, 1999"
|
||||
var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]"
|
||||
T.date = pick("", current_date_string, date1, date2)
|
||||
var/date = pick("", current_date_string, date1, date2)
|
||||
var/time1 = rand(0, 99999999)
|
||||
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
|
||||
T.time = pick("", station_time_timestamp(), time2)
|
||||
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
|
||||
var/time = pick("", station_time_timestamp(), time2)
|
||||
var/source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
|
||||
|
||||
affected_account.makeTransactionLog(amount, purpose, source_terminal, dest_name, TRUE, date, time)
|
||||
|
||||
affected_account.transaction_log.Add(T)
|
||||
|
||||
else
|
||||
//crew wins
|
||||
message = "The attack has ceased, the affected accounts can now be brought online."
|
||||
message = "The attack has ceased, the affected account can now be brought online."
|
||||
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
|
||||
|
||||
#undef MINIMUM_PERCENTAGE_LOSS
|
||||
#undef VARIABLE_LOSS
|
||||
|
||||
@@ -8,19 +8,9 @@
|
||||
if(all_money_accounts.len)
|
||||
var/datum/money_account/D = pick(all_money_accounts)
|
||||
winner_name = D.owner_name
|
||||
if(!D.suspended)
|
||||
D.money += winner_sum
|
||||
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "Nyx Daily Grand Slam -Stellar- Lottery"
|
||||
T.purpose = "Winner!"
|
||||
T.amount = winner_sum
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = "Biesel TCD Terminal #[rand(111,333)]"
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
deposit_success = 1
|
||||
D.credit(winner_sum, "Winner!", "Biesel TCD Terminal #[rand(111,333)]", "Nyx Daily Grand Slam -Stellar- Lottery")
|
||||
deposit_success = 1
|
||||
|
||||
/datum/event/money_lotto/announce()
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
nightmare()
|
||||
if(ishuman(src))
|
||||
if(prob(10))
|
||||
emote("writhes in [p_their()] sleep.")
|
||||
custom_emote(1,"writhes in [p_their()] sleep.")
|
||||
dir = pick(cardinal)
|
||||
|
||||
/mob/living/carbon/proc/experience_dream(dream_image, isNightmare)
|
||||
|
||||
@@ -226,9 +226,8 @@
|
||||
|
||||
if(load(O, user))
|
||||
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>")
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
|
||||
else if(istype(O, /obj/item/storage/bag))
|
||||
var/obj/item/storage/bag/P = O
|
||||
var/plants_loaded = 0
|
||||
@@ -242,7 +241,7 @@
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else
|
||||
else if(!istype(O, /obj/item/card/emag))
|
||||
to_chat(user, "<span class='notice'>\The [src] smartly refuses [O].</span>")
|
||||
return 1
|
||||
|
||||
@@ -308,11 +307,6 @@
|
||||
to_chat(user, "<span class='notice'>Some items are refused.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/secure/emag_act(mob/user)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
to_chat(user, "You short out the product lock on [src].")
|
||||
|
||||
/*******************
|
||||
* SmartFridge Menu
|
||||
********************/
|
||||
@@ -539,6 +533,16 @@
|
||||
/************************
|
||||
* Secure SmartFridges
|
||||
*************************/
|
||||
/obj/machinery/smartfridge/secure/emag_act(mob/user)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
to_chat(user, "You short out the product lock on [src].")
|
||||
|
||||
/obj/machinery/smartfridge/secure/emp_act(severity)
|
||||
if(prob(40/severity) && (!emagged) && (locked != -1))
|
||||
playsound(loc, 'sound/effects/sparks4.ogg', 60, 1)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
|
||||
/obj/machinery/smartfridge/secure/Topic(href, href_list)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -221,6 +221,8 @@
|
||||
return
|
||||
|
||||
if(over_object == M)
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_hands(src)
|
||||
|
||||
else if(istype(over_object, /obj/screen))
|
||||
@@ -374,10 +376,11 @@
|
||||
H.parentdeck = parentdeck
|
||||
H.concealed = concealed
|
||||
H.update_icon()
|
||||
update_icon()
|
||||
|
||||
if(!cards.len)
|
||||
qdel(src)
|
||||
return
|
||||
update_icon()
|
||||
|
||||
/obj/item/cardhand/verb/discard(var/mob/user as mob)
|
||||
|
||||
@@ -410,7 +413,7 @@
|
||||
if(cards.len)
|
||||
update_icon()
|
||||
if(H.cards.len)
|
||||
usr.visible_message("<span class='notice'>The [user] plays the [discarding].</span>", "<span class='notice'>You play the [discarding].</span>")
|
||||
usr.visible_message("<span class='notice'>The [usr] plays the [discarding].</span>", "<span class='notice'>You play the [discarding].</span>")
|
||||
H.loc = get_step(usr,usr.dir)
|
||||
|
||||
if(!cards.len)
|
||||
@@ -419,7 +422,6 @@
|
||||
/obj/item/cardhand/update_icon(var/direction = 0)
|
||||
|
||||
if(!cards.len)
|
||||
qdel(src)
|
||||
return
|
||||
else if(cards.len > 1)
|
||||
name = "hand of cards"
|
||||
|
||||
@@ -315,12 +315,16 @@
|
||||
/datum/plant_gene/trait/teleport/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
|
||||
var/teleport_radius = max(round(G.seed.potency / 10), 1)
|
||||
var/turf/T = get_turf(C)
|
||||
to_chat(C, "<span class='warning'>You slip through spacetime!</span>")
|
||||
do_teleport(C, T, teleport_radius)
|
||||
if(prob(50))
|
||||
do_teleport(G, T, teleport_radius)
|
||||
if(do_teleport(C, T, teleport_radius))
|
||||
to_chat(C, "<span class='warning'>You slip through spacetime!</span>")
|
||||
if(prob(50))
|
||||
do_teleport(G, T, teleport_radius)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect...
|
||||
qdel(G)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect...
|
||||
to_chat(C, "<span class='warning'>[src] sparks, and burns up!</span>")
|
||||
new /obj/effect/decal/cleanable/molten_object(T)
|
||||
qdel(G)
|
||||
|
||||
|
||||
|
||||
@@ -664,6 +664,9 @@
|
||||
var/turf/T = get_turf(H)
|
||||
T.add_vomit_floor(H)
|
||||
playsound(H, 'sound/effects/splat.ogg', 50, 1)
|
||||
else
|
||||
visible_message("<span class='warning'>[src] flickers and fails, due to bluespace interference!</span>")
|
||||
qdel(src)
|
||||
|
||||
/**********************Resonator**********************/
|
||||
|
||||
|
||||
@@ -24,15 +24,20 @@
|
||||
return target
|
||||
|
||||
// All mobs should have custom emote, really..
|
||||
/mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
/mob/proc/custom_emote(var/m_type=EMOTE_VISUAL,var/message = null)
|
||||
|
||||
if(stat || !use_me && usr == src)
|
||||
if(usr)
|
||||
to_chat(usr, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
if(m_type == 2 && muzzled) return
|
||||
var/muzzled = is_muzzled()
|
||||
if(muzzled)
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
if(m_type == EMOTE_SOUND && M.mute >= MUZZLE_MUTE_MUFFLE)
|
||||
return //Not all muzzles block sound
|
||||
if(m_type == EMOTE_SOUND && !can_speak())
|
||||
return
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
@@ -63,7 +68,7 @@
|
||||
|
||||
|
||||
// Type 1 (Visual) emotes are sent to anyone in view of the item
|
||||
if(m_type & 1)
|
||||
if(m_type & EMOTE_VISUAL)
|
||||
var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
|
||||
can_see |= viewers(src,null)
|
||||
for(var/mob/O in can_see)
|
||||
@@ -80,7 +85,7 @@
|
||||
|
||||
// Type 2 (Audible) emotes are sent to anyone in hear range
|
||||
// of the *LOCATION* -- this is important for pAIs to be heard
|
||||
else if(m_type & 2)
|
||||
else if(m_type & EMOTE_SOUND)
|
||||
for(var/mob/O in get_mobs_in_view(7,src))
|
||||
|
||||
if(O.status_flags & PASSEMOTES)
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/muzzled = is_muzzled()
|
||||
if(muzzled)
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
if(M.mute == MUZZLE_MUTE_NONE)
|
||||
muzzled = 0 //Not all muzzles block sound
|
||||
if(!can_speak())
|
||||
muzzled = 1
|
||||
//var/m_type = 1
|
||||
|
||||
@@ -1328,7 +1328,7 @@
|
||||
dna.species.create_organs(src)
|
||||
|
||||
for(var/thing in kept_items)
|
||||
equip_to_slot_or_del(thing, kept_items[thing])
|
||||
equip_to_slot_if_possible(thing, kept_items[thing], redraw_mob = 0)
|
||||
|
||||
//Handle default hair/head accessories for created mobs.
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
|
||||
if(H.status_flags & GOTTAGOFAST)
|
||||
. -= 1
|
||||
if(H.status_flags & GOTTAGOREALLYFAST)
|
||||
. -= 2
|
||||
if(H.status_flags & GOTTAGOFAST_METH)
|
||||
. -= 1
|
||||
return .
|
||||
|
||||
/datum/species/proc/on_species_gain(mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment.
|
||||
|
||||
@@ -140,8 +140,13 @@
|
||||
hair += Entry[3] // Adds custom screen to list
|
||||
|
||||
var/new_style = input(H, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair
|
||||
var/new_color = input("Please select hair color.", "Monitor Color", head_organ.hair_colour) as null|color
|
||||
|
||||
if(H.incapacitated())
|
||||
to_chat(src, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
|
||||
to_chat(H, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
|
||||
return
|
||||
|
||||
if(new_style)
|
||||
H.change_hair(new_style, 1) // The 1 is to enable custom sprites
|
||||
H.change_hair(new_style, 1) // The 1 is to enable custom sprites
|
||||
if(new_color)
|
||||
H.change_hair_color(new_color)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
icon_state = "radio"
|
||||
|
||||
//
|
||||
//Robotic Component Analyser, basically a health analyser for robots
|
||||
//Robotic Component Analyzer, basically a health analyzer for robots
|
||||
//
|
||||
/obj/item/robotanalyzer
|
||||
name = "cyborg analyzer"
|
||||
|
||||
@@ -290,7 +290,7 @@ var/list/robot_verbs_default = list(
|
||||
if(N.kickoff)
|
||||
modules = list("Nations")
|
||||
if(mmi != null && mmi.alien)
|
||||
modules = "Hunter"
|
||||
modules = list("Hunter")
|
||||
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
|
||||
if(!modtype)
|
||||
return
|
||||
@@ -394,7 +394,6 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
if("Hunter")
|
||||
module = new /obj/item/robot_module/alien/hunter(src)
|
||||
icon = "icons/mob/alien.dmi"
|
||||
icon_state = "xenoborg-state-a"
|
||||
modtype = "Xeno-Hu"
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
if(message_mode)
|
||||
used_radios += radio
|
||||
if(!is_component_functioning("radio"))
|
||||
to_chat(src, "<span class='warning'>Your radio isn't functional at this time.</span>")
|
||||
return 0
|
||||
@@ -18,8 +19,10 @@
|
||||
if(..())
|
||||
return 1
|
||||
if(message_mode == "department")
|
||||
used_radios += aiRadio
|
||||
return holopad_talk(message, verb, speaking)
|
||||
else if(message_mode)
|
||||
used_radios += aiRadio
|
||||
if(aiRadio.disabledAi || aiRestorePowerRoutine || stat)
|
||||
to_chat(src, "<span class='danger'>System Error - Transceiver Disabled.</span>")
|
||||
return 0
|
||||
@@ -36,6 +39,7 @@
|
||||
else if(message_mode)
|
||||
if(message_mode == "general")
|
||||
message_mode = null
|
||||
used_radios += radio
|
||||
return radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/say_quote(var/text)
|
||||
|
||||
@@ -146,3 +146,57 @@
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "splats"
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
|
||||
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
|
||||
var/cycles_alive = 0
|
||||
var/cycles_limit = 30
|
||||
var/has_burst = FALSE
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/Life()
|
||||
cycles_alive++
|
||||
var/timeleft = (cycles_limit - cycles_alive) * 2
|
||||
if(ismob(loc)) // if someone ate it, burst immediately
|
||||
burst(FALSE)
|
||||
else if(timeleft < 1) // if timer expired, burst.
|
||||
burst(FALSE)
|
||||
else if(cycles_alive % 2 == 0) // give the mouse/player a countdown reminder every 2 cycles
|
||||
to_chat(src, "<span class='warning'>[timeleft] seconds until you burst, and become a blob...</span>")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/death(gibbed)
|
||||
burst(gibbed)
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/proc/burst(gibbed)
|
||||
if(has_burst)
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
if(!is_station_level(T.z) || isspaceturf(T))
|
||||
to_chat(src, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
|
||||
return FALSE
|
||||
has_burst = TRUE
|
||||
var/datum/mind/blobmind = mind
|
||||
var/client/C = client
|
||||
if(istype(blobmind) && istype(C))
|
||||
blobmind.special_role = SPECIAL_ROLE_BLOB
|
||||
var/obj/structure/blob/core/core = new(T, 200, C, 3)
|
||||
if(core.overmind && core.overmind.mind)
|
||||
//core.overmind.mind.name = blob.name
|
||||
core.overmind.mind.special_role = SPECIAL_ROLE_BLOB_OVERMIND
|
||||
else
|
||||
new /obj/structure/blob/core(T) // Ghosts will be prompted to control it.
|
||||
if(ismob(loc)) // in case some taj/etc ate the mouse.
|
||||
var/mob/M = loc
|
||||
M.gib()
|
||||
if(!gibbed)
|
||||
gib()
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/get_scooped(mob/living/carbon/grabber)
|
||||
to_chat(grabber, "<span class='warning'>You try to pick up [src], but they slip out of your grasp!</span>")
|
||||
to_chat(src, "<span class='warning'>[src] tries to pick you up, but you wriggle free of their grasp!</span>")
|
||||
@@ -65,10 +65,12 @@
|
||||
addtimer(CALLBACK(src, .proc/inert_check), 2400)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/proc/inert_check()
|
||||
if(!owner && !preserved)
|
||||
go_inert()
|
||||
else
|
||||
if(owner)
|
||||
preserved(implanted = 1)
|
||||
else if(preserved)
|
||||
preserved()
|
||||
else
|
||||
go_inert()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/proc/preserved(implanted = 0)
|
||||
inert = FALSE
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
var/damage = O.force
|
||||
if(O.damtype == STAMINA)
|
||||
damage = 0
|
||||
health -= damage
|
||||
if(force_threshold && damage < force_threshold)
|
||||
visible_message("<span class='boldwarning'>[src] is unharmed by [O]!</span>")
|
||||
return
|
||||
adjustHealth(damage)
|
||||
visible_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
|
||||
playsound(loc, O.hitsound, 25, 1, -1)
|
||||
else
|
||||
@@ -125,6 +128,9 @@
|
||||
seen_revived_enemy = TRUE
|
||||
raise_alert("[name] reports intruder [target] has returned from death!")
|
||||
depotarea.list_remove(target, depotarea.dead_list)
|
||||
if(!atoms_share_level(src, target) && prob(20))
|
||||
// This prevents someone from aggroing a depot mob, then hiding in a locker, perfectly safe, while the mob stands there getting killed by their friends.
|
||||
LoseTarget()
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/handle_automated_action()
|
||||
if(seen_enemy)
|
||||
@@ -134,6 +140,14 @@
|
||||
if(scan_cycles >= 15 && istype(depotarea))
|
||||
scan_cycles = 0
|
||||
if(!atoms_share_level(src, spawn_turf))
|
||||
if(istype(loc, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = loc
|
||||
forceMove(get_turf(src))
|
||||
visible_message("<span class='boldwarning'>[src] smashes their way out of [O]!</span>")
|
||||
qdel(O)
|
||||
raise_alert("[src] reported being trapped in a locker.")
|
||||
raised_alert = FALSE
|
||||
return
|
||||
if(alert_on_spacing)
|
||||
raise_alert("[src] lost in space.")
|
||||
death()
|
||||
@@ -196,19 +210,14 @@
|
||||
alert_on_timeout = TRUE
|
||||
alert_on_shield_breach = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/death()
|
||||
if(depotarea)
|
||||
depotarea.declare_finished()
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/LateInitialize()
|
||||
if(istype(depotarea))
|
||||
var/list/key_candidates = list()
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer/O in living_mob_list)
|
||||
if(O == src)
|
||||
continue
|
||||
key_candidates += O
|
||||
if(key_candidates.len)
|
||||
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer/O = pick(key_candidates)
|
||||
|
||||
@@ -171,8 +171,8 @@ var/global/list/ts_spiderling_list = list()
|
||||
visible_message("<span class='notice'>[src] harmlessly nuzzles [target].</span>")
|
||||
T.CheckFaction()
|
||||
CheckFaction()
|
||||
else if(istype(target, /obj/structure/spider/cocoon))
|
||||
to_chat(src, "Destroying our own cocoons would not help us.")
|
||||
else if(istype(target, /obj/structure/spider)) // Prevents destroying coccoons (exploit), eggs (horrible misclick), etc
|
||||
to_chat(src, "Destroying things created by fellow spiders would not help us.")
|
||||
else if(istype(target, /obj/machinery/door/firedoor))
|
||||
var/obj/machinery/door/firedoor/F = target
|
||||
if(F.density)
|
||||
|
||||
@@ -49,7 +49,14 @@
|
||||
|
||||
// Whether the mob is capable of talking
|
||||
/mob/living/can_speak()
|
||||
return !(silent || (disabilities & MUTE) || is_muzzled())
|
||||
if(!(silent || (disabilities & MUTE)))
|
||||
if(is_muzzled())
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
if(M.mute >= MUZZLE_MUTE_MUFFLE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
// Whether the mob is capable of standing or not
|
||||
/mob/living/proc/can_stand()
|
||||
|
||||
@@ -857,7 +857,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(machine && in_range(src, usr))
|
||||
show_inv(machine)
|
||||
|
||||
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
|
||||
if(!usr.incapacitated() && in_range(src, usr))
|
||||
if(href_list["item"])
|
||||
var/slot = text2num(href_list["item"])
|
||||
var/obj/item/what = get_item_by_slot(slot)
|
||||
|
||||
@@ -1307,6 +1307,11 @@
|
||||
name = "Rough-Cropped Mane"
|
||||
icon_state = "rough"
|
||||
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_raine
|
||||
name = "Raine"
|
||||
icon_state = "vulp_hair_raine"
|
||||
gender = FEMALE
|
||||
|
||||
/datum/sprite_accessory/hair/vox
|
||||
species_allowed = list("Vox")
|
||||
glasses_over = 1
|
||||
@@ -1425,6 +1430,42 @@
|
||||
name = "Wildflowers"
|
||||
icon_state = "diona_wildflower"
|
||||
|
||||
//Kidan Hairstyles, sprites by Travelling Merchant
|
||||
|
||||
/datum/sprite_accessory/hair/kidan
|
||||
species_allowed = list("Kidan")
|
||||
glasses_over = 1
|
||||
do_colouration = 0
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/hollow_horns
|
||||
name = "Hollow Horns"
|
||||
icon_state = "kidan_hollow_horns"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/wide_horns
|
||||
name = "Wide Horns"
|
||||
icon_state = "kidan_wide_horns"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/curled_horns
|
||||
name = "Curled Horns"
|
||||
icon_state = "kidan_curled_horns"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/hawk_horn
|
||||
name = "Hawk Horn"
|
||||
icon_state = "kidan_hawk_horn"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/kidan_bull_horns
|
||||
name = "Bull Horns"
|
||||
icon_state = "kidan_bull_horns"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/kidan_broken_bull_horns
|
||||
name = "Broken Bull Horns"
|
||||
icon_state = "kidan_broken_bull_horns"
|
||||
|
||||
/datum/sprite_accessory/hair/kidan/kidan_tall_horns
|
||||
name = "Tall Horns"
|
||||
icon_state = "kidan_tall_horns"
|
||||
|
||||
|
||||
// Apollo-specific
|
||||
|
||||
/datum/sprite_accessory/hair/wryn
|
||||
@@ -2532,6 +2573,17 @@
|
||||
name = "Moth Antennae"
|
||||
icon_state = "kidan_moth"
|
||||
|
||||
/datum/sprite_accessory/head_accessory/kidan/kidan_Mantie_Long
|
||||
name = "Mantie Long"
|
||||
icon_state = "kidan_Mantie_Long"
|
||||
|
||||
/datum/sprite_accessory/head_accessory/kidan/kidan_Mantie_Curled
|
||||
name = "Mantie Curled"
|
||||
icon_state = "kidan_Mantie_Curled"
|
||||
|
||||
/datum/sprite_accessory/head_accessory/kidan/kidan_very_short
|
||||
name = "Very Short"
|
||||
icon_state = "kidan_very_short"
|
||||
|
||||
/* BODY MARKINGS */
|
||||
|
||||
|
||||
@@ -282,21 +282,9 @@ obj/machinery/lapvend/attackby(obj/item/I, mob/user)
|
||||
atom_say("Insufficient funds in account.")
|
||||
return 0
|
||||
else
|
||||
var/paid = customer_account.charge(total_price,
|
||||
transaction_purpose = "Purchase of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"].",
|
||||
terminal_name = name,
|
||||
terminal_id = name,
|
||||
dest_name = vendor_account.owner_name)
|
||||
customer_account.charge(total_price, vendor_account,
|
||||
"Purchase of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"].",
|
||||
name, customer_account.owner_name, "Sale of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"].",
|
||||
customer_account.owner_name)
|
||||
|
||||
if(paid)
|
||||
vendor_account.money += total_price
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = customer_account.owner_name
|
||||
T.purpose = "Purchase of [(devtype == 1) ? "laptop computer" : "tablet microcomputer"]"
|
||||
T.amount = "[total_price]"
|
||||
T.source_terminal = name
|
||||
T.date = current_date_string
|
||||
T.time = station_time_timestamp()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -207,7 +207,7 @@ var/list/alldepartments = list()
|
||||
set name = "Eject ID Card"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.restrained())
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(scan)
|
||||
@@ -316,7 +316,7 @@ var/list/alldepartments = list()
|
||||
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/faxtype, var/obj/item/sent, font_colour="#9A04D1")
|
||||
var/msg = "<span class='boldnotice'><font color='[font_colour]'>[faxname]: </font> [key_name_admin(sender)] | REPLY: (<A HREF='?_src_=holder;CentcommReply=\ref[sender]'>RADIO</A>) (<a href='?_src_=holder;AdminFaxCreate=\ref[sender];originfax=\ref[src];faxtype=[faxtype];replyto=\ref[sent]'>FAX</a>) (<A HREF='?_src_=holder;subtlemessage=\ref[sender]'>SM</A>) | REJECT: (<A HREF='?_src_=holder;FaxReplyTemplate=\ref[sender];originfax=\ref[src]'>TEMPLATE</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[sender]'>BSA</A>) (<A HREF='?_src_=holder;EvilFax=\ref[sender];originfax=\ref[src]'>EVILFAX</A>) </span>: Receiving '[sent.name]' via secure connection... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
|
||||
var/msg = "<span class='boldnotice'><font color='[font_colour]'>[faxname]: </font> [key_name_admin(sender)] | REPLY: (<A HREF='?_src_=holder;[faxname == "SYNDICATE FAX" ? "SyndicateReply" : "CentcommReply"]=[sender.UID()]'>RADIO</A>) (<a href='?_src_=holder;AdminFaxCreate=\ref[sender];originfax=\ref[src];faxtype=[faxtype];replyto=\ref[sent]'>FAX</a>) (<A HREF='?_src_=holder;subtlemessage=\ref[sender]'>SM</A>) | REJECT: (<A HREF='?_src_=holder;FaxReplyTemplate=\ref[sender];originfax=\ref[src]'>TEMPLATE</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[sender]'>BSA</A>) (<A HREF='?_src_=holder;EvilFax=\ref[sender];originfax=\ref[src]'>EVILFAX</A>) </span>: Receiving '[sent.name]' via secure connection... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
|
||||
for(var/client/C in admins)
|
||||
if(check_rights(R_EVENT, 0, C.mob))
|
||||
to_chat(C, msg)
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
return
|
||||
|
||||
if(over_object == M)
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_hands(src)
|
||||
|
||||
else if(istype(over_object, /obj/screen))
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
var/image/img //and puts a matching
|
||||
for(var/j = 1, j <= temp_overlays.len, j++) //gray overlay onto the copy
|
||||
if(copy.ico.len)
|
||||
if(findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent"))
|
||||
if(findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent") || findtext(copy.ico[j], "rep"))
|
||||
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-circle")
|
||||
else if(findtext(copy.ico[j], "deny"))
|
||||
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-x")
|
||||
|
||||
@@ -72,8 +72,13 @@
|
||||
icon_state = "stamp-clown"
|
||||
item_color = "clown"
|
||||
|
||||
/obj/item/stamp/centcom
|
||||
/obj/item/stamp/rep
|
||||
name = "Nanotrasen Representative's rubber stamp"
|
||||
icon_state = "stamp-rep"
|
||||
item_color = "rep"
|
||||
|
||||
/obj/item/stamp/centcom
|
||||
name = "Central Command rubber stamp"
|
||||
icon_state = "stamp-cent"
|
||||
item_color = "centcom"
|
||||
|
||||
|
||||
+43
-17
@@ -1,3 +1,5 @@
|
||||
#define HEALPERCABLE 3
|
||||
#define MAXCABLEPERHEAL 8
|
||||
///////////////////////////////
|
||||
//CABLE STRUCTURE
|
||||
///////////////////////////////
|
||||
@@ -149,7 +151,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(c.d1 == 12 || c.d2 == 12)
|
||||
c.qdel()*/
|
||||
///// Z-Level Stuff
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [get_area(user)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires")
|
||||
investigate_log("was cut by [key_name(usr, 1)] in [get_area(user)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires")
|
||||
|
||||
qdel(src) // qdel
|
||||
return
|
||||
@@ -531,23 +533,44 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
|
||||
return ..()
|
||||
|
||||
if(S.burn_dam)
|
||||
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
if(H == user)
|
||||
if(!do_mob(user, H, 10))
|
||||
return 1
|
||||
var/cable_to_use = 0
|
||||
for(cable_to_use in 1 to 5)
|
||||
if(cable_to_use == amount || (cable_to_use * 3) >= S.burn_dam)
|
||||
break
|
||||
use(cable_to_use)
|
||||
S.heal_damage(0, (cable_to_use * 3), 0, 1)
|
||||
user.visible_message("<span class='alert'>\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open != 2)
|
||||
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
|
||||
return 1
|
||||
else if(S.open != 2)
|
||||
if(S.burn_dam > ROBOLIMB_SELF_REPAIR_CAP)
|
||||
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
|
||||
return
|
||||
|
||||
if(!S.burn_dam)
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
|
||||
if(H == user)
|
||||
if(!do_mob(user, H, 10))
|
||||
return 0
|
||||
var/cable_used = 0
|
||||
var/childlist
|
||||
if(!isnull(S.children))
|
||||
childlist = S.children.Copy()
|
||||
var/parenthealed = FALSE
|
||||
while(cable_used <= MAXCABLEPERHEAL && amount >= 1)
|
||||
var/obj/item/organ/external/E
|
||||
if(S.burn_dam)
|
||||
E = S
|
||||
else if(LAZYLEN(childlist))
|
||||
E = pick_n_take(childlist)
|
||||
if(!E.burn_dam || !E.is_robotic())
|
||||
continue
|
||||
else if(S.parent && !parenthealed)
|
||||
E = S.parent
|
||||
parenthealed = TRUE
|
||||
if(!E.burn_dam || !E.is_robotic())
|
||||
break
|
||||
else
|
||||
break
|
||||
while(cable_used <= MAXCABLEPERHEAL && E.burn_dam && amount >= 1)
|
||||
use(1)
|
||||
cable_used += 1
|
||||
E.heal_damage(0, HEALPERCABLE, 0, 1)
|
||||
user.visible_message("<span class='alert'>\The [user] repairs some burn damage on \the [M]'s [E.name] with \the [src].</span>")
|
||||
return 1
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -820,3 +843,6 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
var/cablecolor = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
color = cablecolor
|
||||
update_icon()
|
||||
|
||||
#undef MAXCABLEPERHEAL
|
||||
#undef HEALPERCABLE
|
||||
|
||||
@@ -172,7 +172,6 @@
|
||||
damage_type = BRUTE
|
||||
flag = "bomb"
|
||||
range = 3
|
||||
log_override = TRUE
|
||||
|
||||
var/pressure_decrease = 0.25
|
||||
var/turf_aoe = FALSE
|
||||
@@ -218,7 +217,9 @@
|
||||
for(var/mob/living/L in range(1, target_turf) - firer - target)
|
||||
var/armor = L.run_armor_check(def_zone, flag, "", "", armour_penetration)
|
||||
L.apply_damage(damage*mob_aoe, damage_type, def_zone, armor)
|
||||
to_chat(L, "<span class='userdanger'>You're struck by a [name]!</span>")
|
||||
L.visible_message("<span class='danger'>[L] is hit by \a [src]!</span>",
|
||||
"<span class='userdanger'>You are hit by \a [src]!</span>")
|
||||
add_attack_logs(firer, L, "Shot with a [type]")
|
||||
|
||||
|
||||
//Modkits
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(istype(A, /obj/item/pipe))
|
||||
unsaw(A, user)
|
||||
|
||||
/obj/item/gun/projectile/sawoff(mob/user)
|
||||
/obj/item/gun/projectile/shotgun/riot/sawoff(mob/user)
|
||||
if(sawn_state == SAWN_OFF)
|
||||
to_chat(user, "<span class='warning'>[src] has already been shortened!</span>")
|
||||
return
|
||||
@@ -124,7 +124,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/gun/projectile/proc/post_sawoff()
|
||||
/obj/item/gun/projectile/shotgun/riot/proc/post_sawoff()
|
||||
name = "assault shotgun"
|
||||
desc = sawn_desc
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -137,7 +137,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/gun/projectile/proc/unsaw(obj/item/A, mob/user)
|
||||
/obj/item/gun/projectile/shotgun/riot/proc/unsaw(obj/item/A, mob/user)
|
||||
if(sawn_state == SAWN_INTACT)
|
||||
to_chat(user, "<span class='warning'>[src] has not been shortened!</span>")
|
||||
return
|
||||
@@ -167,7 +167,7 @@
|
||||
post_unsaw(user)
|
||||
return 1
|
||||
|
||||
/obj/item/gun/projectile/proc/post_unsaw()
|
||||
/obj/item/gun/projectile/shotgun/riot/proc/post_unsaw()
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
w_class = initial(w_class)
|
||||
|
||||
@@ -202,6 +202,9 @@
|
||||
return
|
||||
name = reject_bad_text(name)
|
||||
while(count--)
|
||||
if(reagents.total_volume <= 0)
|
||||
to_chat(usr, "<span class='notice'>Not enough reagents to create these pills!</span>")
|
||||
return
|
||||
var/obj/item/reagent_containers/food/pill/P = new/obj/item/reagent_containers/food/pill(loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
P.name = "[name] pill"
|
||||
|
||||
@@ -302,13 +302,13 @@
|
||||
M.AdjustWeakened(-2.5)
|
||||
M.adjustStaminaLoss(-2)
|
||||
M.SetSleeping(0)
|
||||
M.status_flags |= GOTTAGOREALLYFAST
|
||||
M.status_flags |= GOTTAGOFAST_METH
|
||||
if(prob(50))
|
||||
M.adjustBrainLoss(1.0)
|
||||
..()
|
||||
|
||||
/datum/reagent/methamphetamine/on_mob_delete(mob/living/M)
|
||||
M.status_flags &= ~GOTTAGOREALLYFAST
|
||||
M.status_flags &= ~GOTTAGOFAST_METH
|
||||
..()
|
||||
|
||||
/datum/reagent/methamphetamine/overdose_process(mob/living/M, severity)
|
||||
@@ -590,7 +590,7 @@
|
||||
M.AdjustStunned(-2)
|
||||
M.AdjustWeakened(-2)
|
||||
M.adjustStaminaLoss(-2)
|
||||
M.status_flags |= GOTTAGOREALLYFAST
|
||||
M.status_flags |= GOTTAGOFAST_METH
|
||||
M.Jitter(3)
|
||||
M.adjustBrainLoss(0.5)
|
||||
if(prob(5))
|
||||
@@ -598,7 +598,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/lube/ultra/on_mob_delete(mob/living/M)
|
||||
M.status_flags &= ~GOTTAGOREALLYFAST
|
||||
M.status_flags &= ~GOTTAGOFAST_METH
|
||||
..()
|
||||
|
||||
/datum/reagent/lube/ultra/overdose_process(mob/living/M, severity)
|
||||
|
||||
@@ -69,10 +69,13 @@
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety
|
||||
name = "medical hypospray"
|
||||
desc = "A modified hypospray for quickly injecting safe medicinal chemicals."
|
||||
icon_state = "combat_hypo"
|
||||
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
|
||||
icon_state = "medivend_hypo"
|
||||
safety_hypo = TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety/ert
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
@@ -158,4 +161,4 @@
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
|
||||
@@ -258,6 +258,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/disposalconstruct/rpd_act(mob/user, obj/item/rpd/our_rpd)
|
||||
. = TRUE
|
||||
if(our_rpd.mode == RPD_ROTATE_MODE)
|
||||
rotate()
|
||||
else if(our_rpd.mode == RPD_FLIP_MODE)
|
||||
@@ -265,4 +266,4 @@
|
||||
else if(our_rpd.mode == RPD_DELETE_MODE)
|
||||
our_rpd.delete_single_pipe(user, src)
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -543,14 +543,22 @@
|
||||
build_path = /obj/item/assembly/timer
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/voice_analyser
|
||||
name = "Voice Analyser"
|
||||
id = "voice_analyser"
|
||||
/datum/design/voice_analyzer
|
||||
name = "Voice Analyzer"
|
||||
id = "voice_analyzer"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 50)
|
||||
build_path = /obj/item/assembly/voice
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/noise_analyser
|
||||
name = "Noise Analyser"
|
||||
id = "Noise_analyser"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 100, MAT_GLASS = 10)
|
||||
build_path = /obj/item/assembly/voice/noise
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/light_tube
|
||||
name = "Light Tube"
|
||||
id = "light_tube"
|
||||
@@ -904,4 +912,4 @@
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_GLASS = 2500) //1.25 glass sheets, broken mirrors will return a shard (1 sheet)
|
||||
build_path = /obj/item/mounted/mirror
|
||||
category = list("initial", "Miscellaneous")
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
@@ -323,6 +323,17 @@
|
||||
build_path = /obj/item/organ/internal/cyberimp/arm/toolset
|
||||
category = list("Misc", "Medical")
|
||||
|
||||
/datum/design/cyberimp_diagnostic_hud
|
||||
name = "Diagnostic HUD implant"
|
||||
desc = "These cybernetic eye implants will display a diagnostic HUD over everything you see. Wiggle eyes to control."
|
||||
id = "ci-diaghud"
|
||||
req_tech = list("materials" = 5, "engineering" = 4, "programming" = 4, "biotech" = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 50
|
||||
materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 500, MAT_GOLD = 500)
|
||||
build_path = /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic
|
||||
category = list("Misc", "Medical")
|
||||
|
||||
/datum/design/cyberimp_medical_hud
|
||||
name = "Medical HUD implant"
|
||||
desc = "These cybernetic eyes will display a medical HUD over everything you see. Wiggle eyes to control."
|
||||
@@ -345,6 +356,17 @@
|
||||
build_path = /obj/item/organ/internal/cyberimp/eyes/hud/security
|
||||
category = list("Misc", "Medical")
|
||||
|
||||
/datum/design/cyberimp_meson
|
||||
name = "Meson scanner implant"
|
||||
desc = "These cybernetic eyes will allow you to see the structural layout of the station, and, well, everything else."
|
||||
id = "ci-mesonhud"
|
||||
req_tech = list("materials" = 4, "biotech" = 4, "engineering" = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 50
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500, MAT_GOLD = 300)
|
||||
build_path = /obj/item/organ/internal/cyberimp/eyes/meson
|
||||
category = list("Misc", "Medical")
|
||||
|
||||
/datum/design/cyberimp_xray
|
||||
name = "X-Ray implant"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile."
|
||||
@@ -537,4 +559,4 @@
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500)
|
||||
build_path = /obj/item/organ/internal/lungs/cybernetic/upgraded
|
||||
category = list("Medical")
|
||||
category = list("Medical")
|
||||
|
||||
@@ -60,3 +60,23 @@
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 300)
|
||||
build_path = /obj/item/camera/digital
|
||||
category = list("Miscellaneous")
|
||||
|
||||
/datum/design/safety_muzzle
|
||||
name = "Safety Muzzle"
|
||||
desc = "Produce a lockable muzzle keyed to security ID cards"
|
||||
id = "safetymuzzle"
|
||||
req_tech = list("materials" = 1)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
build_path = /obj/item/clothing/mask/muzzle/safety
|
||||
category = list("Miscellaneous")
|
||||
|
||||
/datum/design/shock_muzzle
|
||||
name = "Shock Muzzle"
|
||||
desc = "Produce a modified safety muzzle that includes an electric shock pack and a slot for a trigger assembly."
|
||||
id = "shockmuzzle"
|
||||
req_tech = list("materials" = 1, "engineering" = 1)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
build_path = /obj/item/clothing/mask/muzzle/safety/shock
|
||||
category = list("Miscellaneous")
|
||||
|
||||
@@ -426,7 +426,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
var/key = usr.key //so we don't lose the info during the spawn delay
|
||||
if(!(being_built.build_type & PROTOLATHE))
|
||||
g2g = 0
|
||||
message_admins("Protolathe exploit attempted by [key_name(usr, usr.client)]!")
|
||||
message_admins("Protolathe exploit attempted by [key_name(usr, TRUE)]!")
|
||||
|
||||
if(g2g) //If input is incorrect, nothing happens
|
||||
var/new_coeff = coeff * being_built.lathe_time_factor
|
||||
@@ -502,7 +502,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
power = max(2000, power)
|
||||
if(!(being_built.build_type & IMPRINTER))
|
||||
g2g = 0
|
||||
message_admins("Circuit imprinter exploit attempted by [key_name(usr, usr.client)]!")
|
||||
message_admins("Circuit imprinter exploit attempted by [key_name(usr, TRUE)]!")
|
||||
|
||||
if(g2g) //Again, if input is wrong, do nothing
|
||||
add_wait_message("Imprinting Circuit. Please Wait...", IMPRINTER_DELAY)
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
But I like HTML, so back to no sanitizing.*/
|
||||
|
||||
var/message = interpreter.GetVar("$content")
|
||||
var/regex/bannedTags = new ("(<script|<iframe|<video|<audio|<embed)")
|
||||
var/regex/bannedTags = new ("(<script|<iframe|<video|<audio|<embed|<svg)")
|
||||
if(bannedTags.Find(message)) //uh oh
|
||||
message_admins("Warning: Current Telecomms script contains banned html. Stripping message.")
|
||||
log_admin("Warning: Current Telecomms script contains banned html. Stripping message.")
|
||||
|
||||
@@ -47,6 +47,16 @@
|
||||
to_chat(owner, "<span class='warning'>Static obfuscates your vision!</span>")
|
||||
owner.flash_eyes(visual = 1)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/meson
|
||||
name = "Meson scanner implant"
|
||||
desc = "These cybernetic eyes will allow you to see the structural layout of the station, and, well, everything else."
|
||||
eye_colour = "#199900"
|
||||
implant_color = "#AEFF00"
|
||||
origin_tech = "materials=4;engineering=4;biotech=4;magnets=4"
|
||||
vision_flags = SEE_TURFS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
aug_message = "Suddenly, you realize how much of a mess the station really is..."
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/xray
|
||||
name = "X-ray implant"
|
||||
desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile."
|
||||
@@ -96,6 +106,15 @@
|
||||
aug_message = "You suddenly see health bars floating above people's heads..."
|
||||
HUD_type = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/hud/diagnostic
|
||||
name = "Diagnostic HUD implant"
|
||||
desc = "These cybernetic eye implants will display a diagnostic HUD over everything you see."
|
||||
eye_colour = "#723E02"
|
||||
implant_color = "#ff9000"
|
||||
origin_tech = "materials=4;engineering=4;biotech=4"
|
||||
aug_message = "You see the diagnostic information of the synthetics around you..."
|
||||
HUD_type = DATA_HUD_DIAGNOSTIC
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/hud/security
|
||||
name = "Security HUD implant"
|
||||
desc = "These cybernetic eye implants will display a security HUD over everything you see."
|
||||
|
||||
@@ -311,7 +311,10 @@
|
||||
return
|
||||
|
||||
if(teles_left > 0)
|
||||
doteleport(user)
|
||||
if(!doteleport(user))
|
||||
telefail()
|
||||
temp_msg = "ERROR! Target destination unreachable due to interference."
|
||||
return
|
||||
else
|
||||
telefail()
|
||||
temp_msg = "ERROR!<BR>Calibration required."
|
||||
|
||||
Reference in New Issue
Block a user