mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Merge pull request #1374 from Erthilo/TGUpdates
TG Updates r3778 to r3752
This commit is contained in:
+29
-5
@@ -181,17 +181,23 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/getblockstring(input,block,subblock,blocksize)
|
||||
/proc/getblockstring(input,block,subblock,blocksize,src,ui) // src is probably used here just for urls; ui is 1 when requesting for the unique identifier screen, 0 for structural enzymes screen
|
||||
var/string
|
||||
var/subpos = 1 // keeps track of the current sub block
|
||||
var/blockpos = 1 // keeps track of the current block
|
||||
|
||||
|
||||
for(var/i = 1, i <= length(input), i++) // loop through each letter
|
||||
|
||||
var/pushstring = copytext(input, i, i+1)
|
||||
var/pushstring
|
||||
|
||||
if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
|
||||
pushstring = "</font color><b>[copytext(input, i, i+1)]</b><font color='blue'>"
|
||||
else
|
||||
if(ui) //This is for allowing block clicks to be differentiated
|
||||
pushstring = "<a href='?src=\ref[src];uimenuset=[num2text(blockpos)];uimenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
|
||||
else
|
||||
pushstring = "<a href='?src=\ref[src];semenuset=[num2text(blockpos)];semenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
|
||||
|
||||
string += pushstring // push the string to the return string
|
||||
|
||||
@@ -266,6 +272,8 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
if (temp2 >= 2050 + BLOCKADD)
|
||||
return 1
|
||||
else
|
||||
@@ -330,7 +338,7 @@
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
|
||||
/////////////////////////// DNA MISC-PROCS
|
||||
/proc/updateappearance(mob/M as mob,structure)
|
||||
/proc/updateappearance(mob/M as mob , structure)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
M.dna.check_integrity()
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -1032,7 +1040,7 @@
|
||||
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
|
||||
|
||||
// New way of displaying DNA blocks
|
||||
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3)]</FONT><br><br>")
|
||||
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3, src,1)]</FONT><br><br>")
|
||||
|
||||
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.uniblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];unimenuminus=1'><-</A> Block <A href='?src=\ref[];unimenuplus=1'>-></A><BR><BR>", src, src)
|
||||
@@ -1057,6 +1065,14 @@
|
||||
if (src.subblock > 1)
|
||||
src.subblock--
|
||||
dopage(src,"unimenu")
|
||||
if (href_list["uimenuset"] && href_list["uimenusubset"]) // This chunk of code updates selected block / sub-block based on click
|
||||
var/menuset = text2num(href_list["uimenuset"])
|
||||
var/menusubset = text2num(href_list["uimenusubset"])
|
||||
if ((menuset <= 27) && (menuset >= 1))
|
||||
src.uniblock = menuset
|
||||
if ((menusubset <= 3) && (menusubset >= 1))
|
||||
src.subblock = menusubset
|
||||
dopage(src, "unimenu")
|
||||
if (href_list["unipulse"])
|
||||
if(src.connected.occupant)
|
||||
var/block
|
||||
@@ -1119,7 +1135,7 @@
|
||||
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)
|
||||
|
||||
// New shit, it doesn't suck (as much)
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[getblockstring(src.connected.occupant.dna.struc_enzymes,strucblock,subblock,3)]</FONT><br><br>")
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[getblockstring(src.connected.occupant.dna.struc_enzymes,strucblock,subblock,3,src,0)]</FONT><br><br>")
|
||||
// SE of occupant, selected block, selected subblock, block size (3 subblocks)
|
||||
|
||||
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.strucblock)
|
||||
@@ -1153,6 +1169,14 @@
|
||||
if (src.subblock > 1)
|
||||
src.subblock--
|
||||
dopage(src,"strucmenu")
|
||||
if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
|
||||
var/menuset = text2num(href_list["semenuset"])
|
||||
var/menusubset = text2num(href_list["semenusubset"])
|
||||
if ((menuset <= 14) && (menuset >= 1))
|
||||
src.strucblock = menuset
|
||||
if ((menusubset <= 3) && (menusubset >= 1))
|
||||
src.subblock = menusubset
|
||||
dopage(src, "strucmenu")
|
||||
if (href_list["strucpulse"])
|
||||
var/block
|
||||
var/newblock
|
||||
|
||||
@@ -407,7 +407,8 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
|
||||
<td align='center'>
|
||||
<font size='5'><b>Changling Evolution Menu</b></font><br>
|
||||
Hover over a power to see more information<br>
|
||||
Current genomes left to evolve with: [usr.changeling.geneticpoints]
|
||||
Current evolution points left to evolve with: [usr.changeling.geneticpoints]<br>
|
||||
Absorb genomes to acquire more evolution points
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes)
|
||||
H.equip_if_possible(new /obj/item/device/pda/toxins(H), H.slot_belt)
|
||||
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/science(H), H.slot_wear_suit)
|
||||
H.equip_if_possible(new /obj/item/clothing/mask/gas(H), H.slot_wear_mask)
|
||||
H.equip_if_possible(new /obj/item/weapon/tank/oxygen(H), H.slot_l_hand)
|
||||
// H.equip_if_possible(new /obj/item/clothing/mask/gas(H), H.slot_wear_mask)
|
||||
// H.equip_if_possible(new /obj/item/weapon/tank/oxygen(H), H.slot_l_hand)
|
||||
return 1
|
||||
@@ -175,6 +175,7 @@ obj/machinery/access_button
|
||||
icon_state = "access_button_off"
|
||||
|
||||
attack_hand(mob/user)
|
||||
src.add_fingerprint(usr)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
var/frame_desc = null
|
||||
var/contain_parts = 1
|
||||
|
||||
/obj/item/weapon/circuitboard/message_monitor
|
||||
name = "Circuit board (Message Monitor)"
|
||||
build_path = "/obj/machinery/computer/message_monitor"
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/aicore
|
||||
name = "Circuit board (AI core)"
|
||||
origin_tech = "programming=4;biotech=2"
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
|
||||
// Allows you to monitor messages that passes the server.
|
||||
|
||||
/obj/machinery/computer/message_monitor
|
||||
name = "Message Monitor Console"
|
||||
desc = "Used to Monitor the crew's messages, that are sent via PDA."
|
||||
icon_state = "comm_monitor"
|
||||
circuit = "/obj/item/weapon/circuitboard/message_monitor"
|
||||
var/obj/machinery/message_server/linkedServer = null
|
||||
var/screen = 0 // 0 = Main menu, 1 = Message Logs
|
||||
var/hacking = 0 // Is it being hacked into by the AI/Cyborg
|
||||
|
||||
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if(istype(O,/obj/item/weapon/card/emag/))
|
||||
//Just brings up the Message Log without having to know the passcode.
|
||||
if(!hacking)
|
||||
usr << "<span class='warning'>BZZT.. The console beeps and brings up the Message Logs.</span>"
|
||||
screen = 1
|
||||
else
|
||||
usr << "<span class='notice'>It looks like the console is already being hacked into.</span>"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/process()
|
||||
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
|
||||
if(!linkedServer)
|
||||
if(message_servers && message_servers.len > 0)
|
||||
linkedServer = message_servers[1]
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_hand(var/mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(!istype(user, /mob/living))
|
||||
return
|
||||
var/dat = "<head><title>Message Monitor Console</title></head><body>"
|
||||
dat += "<center><h2>Message Monitor Console</h2></center><hr>"
|
||||
switch(screen)
|
||||
//Main menu
|
||||
if(0)
|
||||
if(hacking)
|
||||
screen = 2
|
||||
return src.attack_hand(user)
|
||||
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
dat += "1. ERROR: Server not found<br>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];active=1'>1. Toggle Power: [src.linkedServer.active ? "<font color='green'>\[On\]</font>":"<font color='red'>\[Off\]</font>"]</a><br>"
|
||||
dat += "<A href='?src=\ref[src];find=1'>2. Link To A Server</a><br>"
|
||||
dat += "<A href='?src=\ref[src];clear=1'>3. Clear Message Logs</a><hr>"
|
||||
dat += "<font color='red'> KEY REQUIRED</font><br>"
|
||||
dat += "<A href='?src=\ref[src];view=1'>4. View Message Logs </a><br>"
|
||||
dat += "<A href='?src=\ref[src];pass=1'>5. Set Custom Key</a><hr><br>"
|
||||
//Malf/Traitor AIs can bruteforce into the system to gain the Key.
|
||||
if((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user))
|
||||
dat += "<A href='?src=\ref[src];hack=1'><i><font color='Red'>*&@. Bruteforce Key</font></i></font></a><br>"
|
||||
//Message Logs
|
||||
if(1)
|
||||
if(hacking)
|
||||
screen = 2
|
||||
return src.attack_hand(user)
|
||||
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
screen = 0
|
||||
return src.attack_hand(user)
|
||||
|
||||
var/index = 0
|
||||
//var/recipient = "Unspecified" //name of the person
|
||||
//var/sender = "Unspecified" //name of the sender
|
||||
//var/message = "Blank" //transferred message
|
||||
dat += "<center><A href='?src=\ref[src];back=1'>Return</a> - <A href='?src=\ref[src];refresh=1'>Refresh</center><hr>"
|
||||
dat += "<table border='1' width='100%'><tr><th width='20%'>Sender</th><th width='20%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"
|
||||
for(var/list/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
|
||||
index++
|
||||
if(index > 3000)
|
||||
break
|
||||
dat += "<tr><td width='20%'>[pda.sender]</td><td width='20%'>[pda.recipient]</td><td width='80%'>[pda.message]</td></tr>"
|
||||
dat += "</table>"
|
||||
//Hacking screen.
|
||||
if(2)
|
||||
if(!hacking)
|
||||
screen = 0
|
||||
return src.attack_hand(user)
|
||||
if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot))
|
||||
dat += "Brute-forcing for server key.<br> This will take anywhere from two to five minutes."
|
||||
dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
|
||||
else
|
||||
//It's the same message as the one above but in binary. Because robots understand binary and humans don't... well I thought it was clever.
|
||||
dat += {"010101000110100001101001011100110010000001110111011010010110110
|
||||
0011011000010000001110100011000010110101101100101001000000110000101101110
|
||||
01111001011101110110100001100101011100100110010100100000011001100111001001
|
||||
10111101101101001000000111010001110111011011110010000001110100011011110010
|
||||
00000110011001101001011101100110010100100000011011010110100101101110011101
|
||||
01011101000110010101110011001011100010000001001001011011100010000001110100
|
||||
01101000011001010010000001101101011001010110000101101110001011010111010001
|
||||
10100101101101011001010010110000100000011101000110100001101001011100110010
|
||||
00000110001101101111011011100111001101101111011011000110010100100000011000
|
||||
11011000010110111000100000011100100110010101110110011001010110000101101100
|
||||
00100000011110010110111101110101011100100010000001110100011100100111010101
|
||||
10010100100000011010010110111001110100011001010110111001110100011010010110
|
||||
11110110111001110011001000000110100101100110001000000111100101101111011101
|
||||
01001000000110110001100101011101000010000001110011011011110110110101100101
|
||||
01101111011011100110010100100000011000010110001101100011011001010111001101
|
||||
11001100100000011010010111010000101110001000000100110101100001011010110110
|
||||
01010010000001110011011101010111001001100101001000000110111001101111001000
|
||||
00011010000111010101101101011000010110111001110011001000000110010101101110
|
||||
01110100011001010111001000100000011101000110100001100101001000000111001001
|
||||
10111101101111011011010010000001100100011101010111001001101001011011100110
|
||||
01110010000001110100011010000110000101110100001000000111010001101001011011
|
||||
010110010100101110"}
|
||||
|
||||
|
||||
dat += "</body>"
|
||||
user << browse(dat, "window=message;size=500x700")
|
||||
onclose(user, "message")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/message_monitor/proc/BruteForce(mob/user as mob)
|
||||
var/currentKey = src.linkedServer.decryptkey
|
||||
user << "<span class='warning'>Brute-force completed! The key is '[currentKey]'.</span>"
|
||||
src.hacking = 0
|
||||
src.screen = 0 // Return the screen back to normal
|
||||
|
||||
/obj/machinery/computer/message_monitor/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(!istype(usr, /mob/living))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
|
||||
if (href_list["active"])
|
||||
linkedServer.active = !linkedServer.active
|
||||
|
||||
if (href_list["find"])
|
||||
if(message_servers && message_servers.len > 1)
|
||||
src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
|
||||
usr << "Server selected.</span>"
|
||||
else if(message_servers && message_servers.len > 0)
|
||||
linkedServer = message_servers[1]
|
||||
usr << "<span class='notice'>Single Server Detected - Server selected.</span>"
|
||||
else
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
|
||||
if (href_list["view"])
|
||||
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
else
|
||||
var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
|
||||
if(dkey && dkey != "")
|
||||
if(src.linkedServer.decryptkey == dkey)
|
||||
src.screen = 1
|
||||
else
|
||||
usr << "<span class='warning'>ALERT: Incorrect password!</span>"
|
||||
|
||||
|
||||
if (href_list["clear"])
|
||||
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
else
|
||||
src.linkedServer.pda_msgs = list()
|
||||
usr << "<span class='notice'>Logs cleared.</span>"
|
||||
|
||||
if (href_list["pass"])
|
||||
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
usr << "<span class='notice'>No server detected.</span>"
|
||||
else
|
||||
var/dkey = trim(input(usr,"Please enter the decryption key.") as text|null)
|
||||
if(dkey && dkey != "")
|
||||
if(dkey == src.linkedServer.decryptkey)
|
||||
var/newkey = trim(input(usr,"Please enter the new key."))
|
||||
if(newkey && newkey != "")
|
||||
src.linkedServer.decryptkey = newkey
|
||||
usr << "<span class='notice'>Password set.</span>"
|
||||
else
|
||||
usr << "<span class='warning'>ALERT: Incorrect password!</span>"
|
||||
|
||||
if (href_list["hack"])
|
||||
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
|
||||
src.hacking = 1
|
||||
src.screen = 2
|
||||
//usr << "[src.linkedServer.decryptkey]"
|
||||
spawn((100*6)*rand(2, 4))
|
||||
if(src && src.linkedServer && usr)
|
||||
BruteForce(usr)
|
||||
|
||||
|
||||
if (href_list["back"])
|
||||
src.screen = 0
|
||||
|
||||
return src.attack_hand(usr)
|
||||
|
||||
|
||||
/obj/item/weapon/paper/monitorkey
|
||||
//..()
|
||||
name = "Monitor Decryption Key"
|
||||
var/obj/machinery/message_server/server = null
|
||||
|
||||
/obj/item/weapon/paper/monitorkey/New()
|
||||
..()
|
||||
if(message_servers && message_servers.len > 0)
|
||||
server = message_servers[1]
|
||||
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret.<br>If necessary, change the password to a more secure one."
|
||||
// info_links = info
|
||||
overlays += "paper_words"
|
||||
@@ -59,6 +59,7 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
@@ -69,6 +70,7 @@
|
||||
|
||||
use_power(5)
|
||||
icon_state = "doorctrl1"
|
||||
add_fingerprint(user)
|
||||
|
||||
if(normaldoorcontrol)
|
||||
for(var/obj/machinery/door/airlock/D in range(range))
|
||||
@@ -119,7 +121,6 @@
|
||||
spawn(15)
|
||||
if(!(stat & NOPOWER))
|
||||
icon_state = "doorctrl0"
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/door_control/power_change()
|
||||
..()
|
||||
@@ -142,10 +143,12 @@
|
||||
|
||||
/obj/machinery/driver_button/attack_hand(mob/user as mob)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
use_power(5)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_state = "comm_monitor"
|
||||
|
||||
var/screen = 0 // the screen number:
|
||||
var/list/t_machines = list() // the machines located by the computer
|
||||
var/list/machinelist = list() // the machines located by the computer
|
||||
var/obj/machinery/telecomms/SelectedMachine
|
||||
|
||||
var/network = "NULL" // the network to probe
|
||||
@@ -83,7 +83,7 @@
|
||||
switch(href_list["operation"])
|
||||
|
||||
if("release")
|
||||
t_machines = list()
|
||||
machinelist = list()
|
||||
screen = 0
|
||||
|
||||
if("mainmenu")
|
||||
@@ -116,7 +116,7 @@
|
||||
else
|
||||
network = newnet
|
||||
screen = 0
|
||||
t_machines = list()
|
||||
machinelist = list()
|
||||
temp = "<font color = #336699>- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -</font color>"
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
|
||||
//dat += "<li><a href='byond://?src=\red[src];choice=chatroom'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
|
||||
|
||||
if (cartridge)
|
||||
if (cartridge.access_clown)
|
||||
@@ -382,6 +383,17 @@
|
||||
dat += "OTHER: [round(unknown_level)]%<br>"
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
|
||||
if (5)
|
||||
dat += "<h4><img src=pda_chatroom.png> Nanotrasen Relay Chat</h4>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected Channels</h4>: <li>"
|
||||
for(var/datum/chatroom/C in chatrooms)
|
||||
dat += "<a href='byond://?src=\ref[src];pdachannel=[C.name]'>#[html_encode(lowertext(C.name))]"
|
||||
if(C.password != "")
|
||||
dat += " <img src=pda_locked.png>"
|
||||
dat += "</li>"
|
||||
|
||||
if (41) //crew manifest
|
||||
|
||||
dat += "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||
@@ -454,12 +466,14 @@
|
||||
mode = 2
|
||||
if("21")//Read messeges
|
||||
mode = 21
|
||||
if("41")//Read messeges
|
||||
if("41")//Check Manifest
|
||||
mode = 41
|
||||
if("3")//Atmos scan
|
||||
mode = 3
|
||||
if("4")//Redirects to hub
|
||||
mode = 0
|
||||
if("chatroom") // chatroom hub
|
||||
mode = 5
|
||||
|
||||
|
||||
//MAIN FUNCTIONS===================================
|
||||
@@ -555,70 +569,84 @@
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(useMS) // only send the message if it's stable
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
if(MS.active)
|
||||
AnsweringMS++
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
if(!AnsweringMS)
|
||||
return
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
if( P.loc && ishuman(P.loc) )
|
||||
var/mob/living/carbon/human/H = P.loc
|
||||
H << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
if( P.loc && ishuman(P.loc) )
|
||||
var/mob/living/carbon/human/H = P.loc
|
||||
H << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
else
|
||||
U << "ERROR: Server isn't responding."
|
||||
|
||||
// pAI Message
|
||||
else
|
||||
|
||||
var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P]","[src]","[t]")
|
||||
if(MS.active)
|
||||
AnsweringMS++
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(useMS) // only send the message if it's stable
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if(!AnsweringMS)
|
||||
return
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src
|
||||
if(prob(50))
|
||||
who = P
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
if( P.loc && ishuman(P.loc) )
|
||||
var/mob/living/carbon/human/H = P.loc
|
||||
H << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
else
|
||||
U << "ERROR: Server isn't responding."
|
||||
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src
|
||||
if(prob(50))
|
||||
who = P
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
|
||||
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
@@ -756,6 +784,37 @@
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/telecomms_process(var/receipent, var/originator, var/data)
|
||||
var/telecomms_intact = 0
|
||||
/* Make sure telecomms is intact */
|
||||
for (var/obj/machinery/telecomms/receiver/R in world)
|
||||
|
||||
if((1459 in R.freq_listening) && R.on)
|
||||
|
||||
for (var/obj/machinery/telecomms/bus/B in R.links)
|
||||
|
||||
if((1459 in B.freq_listening) && B.on)
|
||||
|
||||
for(var/obj/machinery/telecomms/server/S in B.links)
|
||||
|
||||
if((1459 in S.freq_listening) && S.on)
|
||||
// Add a log
|
||||
S.add_entry("[originator] sent to [receipent]: \"[data]\"", "PDA log")
|
||||
|
||||
for(var/obj/machinery/telecomms/broadcaster/C in S.links)
|
||||
|
||||
if(((1459 in C.freq_listening || C.freq_listening.len == 0)) && C.on)
|
||||
|
||||
telecomms_intact = 1
|
||||
break
|
||||
|
||||
break
|
||||
break
|
||||
break
|
||||
|
||||
return telecomms_intact
|
||||
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
set name = "Remove id"
|
||||
@@ -1017,17 +1076,28 @@
|
||||
|
||||
if (selected:toff)
|
||||
return
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(!isnull(message_servers))
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(!isnull(useMS)) // only send the message if it's stable
|
||||
useMS.send_pda_message("[selected:owner]","[usr.name]","[t]")
|
||||
|
||||
usr.show_message("<i>PDA message to <b>[selected:owner]</b>: [t]</i>")
|
||||
selected:tnote += "<i><b>← From (AI) [usr.name]:</b></i><br>[t]<br>"
|
||||
usr.show_message("<i>PDA message to <b>[selected:owner]</b>: [t]</i>")
|
||||
selected:tnote += "<i><b>← From (AI) [usr.name]:</b></i><br>[t]<br>"
|
||||
|
||||
if (!selected:silent)
|
||||
playsound(selected.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, selected.loc))
|
||||
O.show_message(text("\icon[selected] *[selected:ttone]*"))
|
||||
if (!selected:silent)
|
||||
playsound(selected.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, selected.loc))
|
||||
O.show_message(text("\icon[selected] *[selected:ttone]*"))
|
||||
|
||||
selected.overlays = null
|
||||
selected.overlays += image('pda.dmi', "pda-r")
|
||||
selected.overlays = null
|
||||
selected.overlays += image('pda.dmi', "pda-r")
|
||||
else
|
||||
usr << "ERROR: Server isn't responding."
|
||||
|
||||
|
||||
//Some spare PDAs in a box
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
var/list/chatrooms = list()
|
||||
|
||||
/datum/chatroom
|
||||
var/name = "Generic Chatroom"
|
||||
var/list/logged_in = list()
|
||||
var/list/logs = list() // chat logs
|
||||
var/list/banned = list() // banned users
|
||||
var/list/whitelist = list() // whitelisted users
|
||||
var/list/muted = list()
|
||||
var/topic = "" // topic message for the chatroom
|
||||
var/password = "" // blank for no password.
|
||||
var/operator = "" // name of the operator
|
||||
|
||||
/datum/chatroom/proc/attempt_connect(var/obj/item/device/pda/device, var/obj/password)
|
||||
if(!device)
|
||||
return
|
||||
@@ -221,7 +221,7 @@ obj/structure/door_assembly
|
||||
door_assembly_clown
|
||||
name = "Bananium Airlock Assembly"
|
||||
desc = "Honk"
|
||||
icon_state = "door_as_bananium1"
|
||||
icon_state = "door_as_clown1"
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red <B>[user] is trying to put handcuffs on [M]!</B>", 1)
|
||||
spawn(30)
|
||||
if(!M) return
|
||||
if(p_loc == user.loc && p_loc_m == M.loc)
|
||||
M.handcuffed = new /obj/item/weapon/handcuffs(M)
|
||||
M.update_clothing()
|
||||
|
||||
else
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
@@ -64,8 +66,10 @@
|
||||
M.requests += O
|
||||
spawn( 0 )
|
||||
if(istype(src, /obj/item/weapon/handcuffs/cable))
|
||||
// feedback_add_details("handcuffs","C")
|
||||
playsound(src.loc, 'cablecuff.ogg', 30, 1, -2)
|
||||
else
|
||||
// feedback_add_details("handcuffs","H")
|
||||
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
|
||||
O.process()
|
||||
return
|
||||
|
||||
@@ -122,9 +122,17 @@ ZIPPO
|
||||
var/icon_butt = "cigbutt"
|
||||
var/lastHolder = null
|
||||
var/smoketime = 300
|
||||
var/chem_volume = 15
|
||||
var/butt_count = 5 //count of butt sprite variations
|
||||
|
||||
/obj/item/clothing/mask/cigarette/New()
|
||||
..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Del()
|
||||
..()
|
||||
del(reagents)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -155,10 +163,37 @@ ZIPPO
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
|
||||
..()
|
||||
if(istype(glass)) // you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
if(transfered) // if reagents were transfered, show the message
|
||||
user << "\blue You dip \the [src] into \the [glass]."
|
||||
else // if not, either the beaker was empty, or the cigarette was full
|
||||
if(!glass.reagents.total_volume)
|
||||
user << "\red [glass] is empty."
|
||||
else
|
||||
user << "\red [src] is full."
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.damtype = "fire"
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round (src.reagents.get_reagent_amount("plasma")/2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
del(src)
|
||||
return
|
||||
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round (src.reagents.get_reagent_amount("fuel")/5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
del(src)
|
||||
return
|
||||
src.flags &= ~NOREACT // allowing reagents to react after being lit
|
||||
src.reagents.handle_reactions()
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
@@ -181,6 +216,14 @@ ZIPPO
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
if(reagents && reagents.total_volume) // check if it has any reagents at all
|
||||
if( iscarbon(src.loc) && (src == loc:wear_mask) ) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||
var/mob/living/carbon/C = loc
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
return
|
||||
|
||||
|
||||
@@ -214,6 +257,7 @@ ZIPPO
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 1500
|
||||
chem_volume = 20
|
||||
butt_count = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
@@ -230,6 +274,7 @@ ZIPPO
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 7200
|
||||
chem_volume = 30
|
||||
|
||||
/obj/item/weapon/cigbutt
|
||||
name = "cigarette butt"
|
||||
@@ -360,6 +405,14 @@ ZIPPO
|
||||
slot_flags = SLOT_BELT
|
||||
var/cigcount = 6
|
||||
|
||||
New()
|
||||
..()
|
||||
flags |= NOREACT
|
||||
create_reagents(15)//so people can inject cigarettes without opening a packet
|
||||
|
||||
Del()
|
||||
..()
|
||||
del(reagents)
|
||||
|
||||
update_icon()
|
||||
icon_state = "[initial(icon_state)][cigcount]"
|
||||
@@ -375,6 +428,7 @@ ZIPPO
|
||||
else
|
||||
cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
user.put_in_hand(W)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
CONTAINS:
|
||||
EMP GRENADE
|
||||
FLASHBANG
|
||||
CRITTER GRENADE
|
||||
|
||||
*/
|
||||
|
||||
@@ -289,7 +290,7 @@ FLASHBANG
|
||||
|
||||
/obj/item/weapon/flashbang/clusterbang
|
||||
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
|
||||
name = "Clusterbang"
|
||||
name = "clusterbang"
|
||||
icon = 'grenade.dmi'
|
||||
icon_state = "clusterbang"
|
||||
var/child = 0
|
||||
@@ -367,6 +368,159 @@ FLASHBANG
|
||||
|
||||
|
||||
|
||||
/****************************Critter Grenades***********************************************/
|
||||
|
||||
|
||||
/obj/item/weapon/spawnergrenade
|
||||
desc = "It is set to detonate in 3 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
|
||||
name = "delivery grenade"
|
||||
icon = 'grenade.dmi'
|
||||
icon_state = "delivery"
|
||||
w_class = 2.0
|
||||
item_state = "flashbang"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "materials=3;magnets=4"
|
||||
var/active = 0
|
||||
var/det_time = 30
|
||||
var/banglet = 0
|
||||
var/spawner_type = null // must be an object path
|
||||
var/deliveryamt = 1 // amount of type to deliver
|
||||
|
||||
|
||||
proc/prime()
|
||||
return
|
||||
|
||||
proc/clown_check(var/mob/living/user)
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (isscrewdriver(W))
|
||||
switch(src.det_time)
|
||||
if ("1")
|
||||
src.det_time = 30
|
||||
user.show_message("\blue You set the delivery grenade for 3 second detonation time.")
|
||||
src.desc = "It is set to detonate in 3 seconds."
|
||||
if ("30")
|
||||
src.det_time = 100
|
||||
user.show_message("\blue You set the delivery grenade for 10 second detonation time.")
|
||||
src.desc = "It is set to detonate in 10 seconds."
|
||||
if ("100")
|
||||
src.det_time = 1
|
||||
user.show_message("\blue You set the delivery grenade for instant detonation.")
|
||||
src.desc = "It is set to detonate instantly."
|
||||
src.add_fingerprint(user)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active)&&(clown_check(user)))
|
||||
user << "\red You prime the delivery grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(src.det_time)
|
||||
prime()
|
||||
return
|
||||
user.dir = get_dir(user, target)
|
||||
user.drop_item()
|
||||
var/t = (isturf(target) ? target : target.loc)
|
||||
walk_towards(src, t, 3)
|
||||
return
|
||||
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
|
||||
|
||||
if(spawner_type && deliveryamt)
|
||||
// Make a quick flash
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
x.loc = T
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(x, pick(NORTH,SOUTH,EAST,WEST))
|
||||
|
||||
// Spawn some hostile syndicate critters
|
||||
if(istype(x, /obj/effect/critter))
|
||||
var/obj/effect/critter/C = x
|
||||
|
||||
C.atkcarbon = 1
|
||||
C.atksilicon = 1
|
||||
C.atkmech = 0
|
||||
C.atksynd = 0
|
||||
C.aggressive = 1
|
||||
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "\red You prime the delivery grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
add_fingerprint(user)
|
||||
spawn( src.det_time )
|
||||
prime()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
clown_check(var/mob/living/user)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red Huh? How does this thing work?!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn( 5 )
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/spawnergrenade/manhacks
|
||||
name = "manhack delivery grenade"
|
||||
spawner_type = /obj/effect/critter/manhack
|
||||
deliveryamt = 5
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
/obj/item/weapon/spawnergrenade/spesscarp
|
||||
name = "carp delivery grenade"
|
||||
spawner_type = /obj/effect/critter/spesscarp
|
||||
deliveryamt = 5
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
/obj/item/weapon/spawnergrenade/elitespesscarp
|
||||
name = "elite carp delivery grenade"
|
||||
spawner_type = /obj/effect/critter/spesscarp/elite
|
||||
deliveryamt = 2
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/weapon/implant
|
||||
name = "implant"
|
||||
desc = "An implant. Not usually seen outside a body."
|
||||
@@ -240,6 +238,44 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
H << "\blue You feel a surge of loyalty towards NanoTrasen."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenalin"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
var/uses
|
||||
|
||||
get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Cybersun Industries Adrenalin Implant<BR>
|
||||
<b>Life:</b> Five days.<BR>
|
||||
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> Subjects injected with implant can activate a massive injection of adrenalin.<BR>
|
||||
<b>Function:</b> Contains nanobots to stimulate body to mass-produce Adrenalin.<BR>
|
||||
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
|
||||
<b>Integrity:</b> Implant can only be used three times before the nanobots are depleted."}
|
||||
return dat
|
||||
|
||||
|
||||
trigger(emote, mob/source as mob)
|
||||
if (src.uses < 1) return 0
|
||||
if (emote == "pale")
|
||||
src.uses--
|
||||
source << "\blue You feel a sudden surge of energy!"
|
||||
source.SetStunned(0)
|
||||
source.SetWeakened(0)
|
||||
source.SetParalysis(0)
|
||||
|
||||
return
|
||||
|
||||
|
||||
implanted(mob/source as mob)
|
||||
source.mind.store_memory("A implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted freedom implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate."
|
||||
return
|
||||
|
||||
|
||||
//BS12 Explosive
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "explosive implant"
|
||||
|
||||
@@ -74,6 +74,15 @@
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter-adrenalin"
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin/New()
|
||||
src.imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed
|
||||
name = "implanter (C)"
|
||||
icon_state = "cimplanter0"
|
||||
|
||||
@@ -397,11 +397,11 @@ WELDINGTOOOL
|
||||
|
||||
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
|
||||
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
|
||||
M.visible_message("You cut \the [M]'s restraints with \the [src]!",\
|
||||
"\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
"You cut \the [M]'s restraints with \the [src]!",\
|
||||
"You hear cable being cut.")
|
||||
M.handcuffed = null
|
||||
M.update_clothing()
|
||||
return
|
||||
else
|
||||
..()
|
||||
..()
|
||||
@@ -9,33 +9,33 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 21
|
||||
|
||||
proc/can_use()
|
||||
if(!ismob(loc)) return 0
|
||||
var/mob/M = loc
|
||||
if(src in M.get_equipped_items())
|
||||
return 1
|
||||
/obj/item/weapon/storage/belt/proc/can_use()
|
||||
if(!ismob(loc)) return 0
|
||||
var/mob/M = loc
|
||||
if(src in M.get_equipped_items())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow"))
|
||||
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/atmostech/New()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/item/weapon/storage/toolbox/electrical/New()
|
||||
..()
|
||||
var/color = pick("red","yellow","green","blue")
|
||||
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/t_scanner(src)
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/obj/item/weapon/storage/toolbox/syndicate/New()
|
||||
..()
|
||||
var/color = pick("red","yellow","green","blue")
|
||||
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
new /obj/item/weapon/wrench(src)
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
|
||||
+24
-22
@@ -188,7 +188,7 @@
|
||||
|
||||
var/text = "<HTML><HEAD><TITLE>Voting</TITLE></HEAD><BODY scroll=no>"
|
||||
|
||||
var/footer = "<HR><A href='?src=\ref[vote];voter=\ref[src];vclose=1'>Close</A></BODY></HTML>"
|
||||
var/footer = "<HR><A href='?src=\ref[vote];vclose=1'>Close</A></BODY></HTML>"
|
||||
|
||||
|
||||
if(config.vote_no_dead && usr.stat == 2)
|
||||
@@ -247,7 +247,7 @@
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];voter=\ref[src];vote=[md]'>[disp]</A>"
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
if(src.client.vote == md)
|
||||
text += "<LI><B>[disp]</B>"
|
||||
else
|
||||
text += "<LI><A href='?src=\ref[vote];voter=\ref[src];vote=[md]'>[disp]</A>"
|
||||
text += "<LI><A href='?src=\ref[vote];vote=[md]'>[disp]</A>"
|
||||
|
||||
text += "[votes[md]>0?" - [votes[md]] vote\s":null]<BR>"
|
||||
|
||||
@@ -315,10 +315,10 @@
|
||||
|
||||
else // voting can begin
|
||||
if(config.allow_vote_restart)
|
||||
text += "<A href='?src=\ref[vote];voter=\ref[src];vmode=1'>Begin restart vote.</A><BR>"
|
||||
text += "<A href='?src=\ref[vote];vmode=1'>Begin restart vote.</A><BR>"
|
||||
if(config.allow_vote_mode)
|
||||
if(!ticker || ticker.current_state == 1)
|
||||
text += "<A href='?src=\ref[vote];voter=\ref[src];vmode=2'>Begin change mode vote.</A><BR>"
|
||||
text += "<A href='?src=\ref[vote];vmode=2'>Begin change mode vote.</A><BR>"
|
||||
else
|
||||
text += "Change mode votes are disabled while a round is in progress, vote to restart first.<BR>"
|
||||
if(src.client.holder) //Strumpetplaya Add - Custom Votes for Admins
|
||||
@@ -337,14 +337,17 @@
|
||||
|
||||
/datum/vote/Topic(href, href_list)
|
||||
..()
|
||||
//world << "[usr] has activated the vote Topic"
|
||||
|
||||
var/mob/M = locate(href_list["voter"]) // mob of player that clicked link
|
||||
if(href_list["voter"])
|
||||
world << "[usr.ckey] has attempted to bypass the voting system." //ckey is easy key
|
||||
return
|
||||
|
||||
if(href_list["vclose"])
|
||||
|
||||
if(M)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
if(usr)
|
||||
usr << browse(null, "window=vote")
|
||||
usr.client.showvote = 0
|
||||
return
|
||||
|
||||
if(href_list["vmode"])
|
||||
@@ -384,7 +387,7 @@
|
||||
spawn(config.vote_period * 10)
|
||||
vote.endvote()
|
||||
|
||||
world << "\red<B>*** A custom vote has been initiated by [M.key].</B>"
|
||||
world << "\red<B>*** A custom vote has been initiated by [usr.key].</B>"
|
||||
world << "\red You have [vote.timetext(config.vote_period)] to vote."
|
||||
|
||||
//log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [M.name]/[M.key]")
|
||||
@@ -395,16 +398,16 @@
|
||||
else
|
||||
C.vote = "default"
|
||||
|
||||
if(M) M.vote()
|
||||
if(usr) usr.vote()
|
||||
return
|
||||
|
||||
if(vote.mode == 0)
|
||||
var/answer = alert(M,"Do you want to force an immediate restart? Only do this when there are round-breaking glitches, or risk being banned.","Immediate Reboot?","Yes","No")
|
||||
var/answer = alert(usr,"Do you want to force an immediate restart? Only do this when there are round-breaking glitches, or risk being banned.","Immediate Reboot?","Yes","No")
|
||||
|
||||
if(answer == "Yes")
|
||||
vote.instant_restart = 1
|
||||
log_admin("[M.key] has initiated an instant reboot vote! This may be banworthy!")
|
||||
message_admins("[M.key] has initiated an instant reboot vote! This may be banworthy!")
|
||||
log_admin("[usr.key] has initiated an instant reboot vote! This may be banworthy!")
|
||||
message_admins("[usr.key] has initiated an instant reboot vote! This may be banworthy!")
|
||||
else
|
||||
vote.instant_restart = 0
|
||||
|
||||
@@ -415,14 +418,13 @@
|
||||
vote.voting = 1 // now voting
|
||||
vote.votetime = world.timeofday + config.vote_period*10 // when the vote will end
|
||||
|
||||
|
||||
spawn(config.vote_period*10)
|
||||
vote.endvote()
|
||||
|
||||
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [M.key].</B>"
|
||||
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [usr.key].</B>"
|
||||
world << "\red You have [vote.timetext(config.vote_period)] to vote."
|
||||
|
||||
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [M.name]/[M.key]")
|
||||
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [usr.name]/[usr.key]")
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
@@ -431,17 +433,17 @@
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
if(M) M.vote()
|
||||
if(usr) usr.vote()
|
||||
return
|
||||
|
||||
|
||||
return
|
||||
|
||||
if(href_list["vote"] && vote.voting)
|
||||
if(M)
|
||||
M.client.vote = href_list["vote"]
|
||||
if(usr)
|
||||
usr.client.vote = href_list["vote"]
|
||||
|
||||
//world << "Setting client [M.key]'s vote to: [href_list["vote"]]."
|
||||
//world << "Setting client [usr.key]'s vote to: [href_list["vote"]]."
|
||||
|
||||
M.vote()
|
||||
usr.vote()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user