Merge remote-tracking branch 'upstream/master' into Memes

This commit is contained in:
Unknown
2018-08-29 19:23:06 +02:00
111 changed files with 983 additions and 987 deletions
+6 -6
View File
@@ -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)
+1 -22
View File
@@ -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))
+5 -5
View File
@@ -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 = "")
+54 -33
View File
@@ -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)
+2 -1
View File
@@ -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)
@@ -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
@@ -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
*/
+8 -8
View File
@@ -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
+5 -3
View File
@@ -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"
+9 -5
View File
@@ -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)
+3
View File
@@ -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**********************/
+10 -5
View File
@@ -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(!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")
@@ -128,8 +128,13 @@
hair += i
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>")
return
if(new_style)
H.change_hair(new_style)
H.change_hair(new_style)
if(new_color)
H.change_hair_color(new_color)
+3
View File
@@ -6,6 +6,7 @@
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
if(..())
return 1
used_radios += radio
if(message_mode)
if(!is_component_functioning("radio"))
to_chat(src, "<span class='warning'>Your radio isn't functional at this time.</span>")
@@ -17,6 +18,7 @@
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
if(..())
return 1
used_radios += aiRadio
if(message_mode == "department")
return holopad_talk(message, verb, speaking)
else if(message_mode)
@@ -36,6 +38,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)
@@ -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,12 +210,6 @@
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()
. = ..()
if(istype(depotarea))
@@ -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)
+8 -1
View File
@@ -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()
+1 -1
View File
@@ -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)
@@ -1292,6 +1292,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
+1 -1
View File
@@ -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)
+2
View File
@@ -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))
+1 -1
View File
@@ -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")
+6 -1
View File
@@ -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
View File
@@ -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
@@ -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"
@@ -69,8 +69,8 @@
/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
@@ -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 ..()
@@ -551,6 +551,14 @@
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"
@@ -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")
+2 -2
View File
@@ -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)
+4 -1
View File
@@ -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."