Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor

This commit is contained in:
Aurorablade
2016-02-18 19:01:41 -05:00
124 changed files with 4935 additions and 3599 deletions
File diff suppressed because it is too large Load Diff
-612
View File
@@ -1,612 +0,0 @@
/obj/item/weapon/cartridge
name = "generic cartridge"
desc = "A data cartridge for portable microcomputers."
icon = 'icons/obj/pda.dmi'
icon_state = "cart"
item_state = "electronic"
w_class = 1
var/obj/item/radio/integrated/radio = null
var/access_security = 0
var/access_engine = 0
var/access_atmos = 0
var/access_medical = 0
var/access_clown = 0
var/access_mime = 0
var/access_janitor = 0
// var/access_flora = 0
var/access_reagent_scanner = 0
var/access_remote_door = 0 // Control some blast doors remotely!!
var/remote_door_id = ""
var/access_status_display = 0
var/access_quartermaster = 0
var/access_detonate_pda = 0
var/access_hydroponics = 0
var/charges = 0
var/mode = null
var/menu
var/datum/data/record/active1 = null //General
var/datum/data/record/active2 = null //Medical
var/datum/data/record/active3 = null //Security
var/obj/machinery/computer/monitor/powmonitor = null // Power Monitor
var/list/powermonitors = list()
var/message1 // used for status_displays
var/message2
var/list/stored_data = list()
/obj/item/weapon/cartridge/engineering
name = "Power-ON Cartridge"
icon_state = "cart-e"
access_engine = 1
/obj/item/weapon/cartridge/atmos
name = "BreatheDeep Cartridge"
icon_state = "cart-a"
access_atmos = 1
/obj/item/weapon/cartridge/medical
name = "Med-U Cartridge"
icon_state = "cart-m"
access_medical = 1
/obj/item/weapon/cartridge/chemistry
name = "ChemWhiz Cartridge"
icon_state = "cart-chem"
access_reagent_scanner = 1
/obj/item/weapon/cartridge/security
name = "R.O.B.U.S.T. Cartridge"
icon_state = "cart-s"
access_security = 1
/obj/item/weapon/cartridge/security/initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
..()
/obj/item/weapon/cartridge/detective
name = "D.E.T.E.C.T. Cartridge"
icon_state = "cart-s"
access_security = 1
access_medical = 1
/obj/item/weapon/cartridge/janitor
name = "CustodiPRO Cartridge"
desc = "The ultimate in clean-room design."
icon_state = "cart-j"
access_janitor = 1
/obj/item/weapon/cartridge/lawyer
name = "P.R.O.V.E. Cartridge"
icon_state = "cart-s"
access_security = 1
/obj/item/weapon/cartridge/clown
name = "Honkworks 5.0"
icon_state = "cart-clown"
access_clown = 1
charges = 5
/obj/item/weapon/cartridge/mime
name = "Gestur-O 1000"
icon_state = "cart-mi"
access_mime = 1
charges = 5
/*
/obj/item/weapon/cartridge/botanist
name = "Green Thumb v4.20"
icon_state = "cart-b"
access_flora = 1
*/
/obj/item/weapon/cartridge/signal
name = "generic signaler cartridge"
desc = "A data cartridge with an integrated radio signaler module."
/obj/item/weapon/cartridge/signal/toxins
name = "Signal Ace 2"
desc = "Complete with integrated radio signaler!"
icon_state = "cart-tox"
access_reagent_scanner = 1
access_atmos = 1
/obj/item/weapon/cartridge/signal/initialize()
radio = new /obj/item/radio/integrated/signal(src)
..()
/obj/item/weapon/cartridge/signal/Destroy()
qdel(radio)
return ..()
/obj/item/weapon/cartridge/quartermaster
name = "Space Parts & Space Vendors Cartridge"
desc = "Perfect for the Quartermaster on the go!"
icon_state = "cart-q"
access_quartermaster = 1
/obj/item/weapon/cartridge/quartermaster/initialize()
radio = new /obj/item/radio/integrated/mule(src)
..()
/obj/item/weapon/cartridge/head
name = "Easy-Record DELUXE"
icon_state = "cart-h"
access_status_display = 1
/obj/item/weapon/cartridge/hop
name = "HumanResources9001"
icon_state = "cart-h"
access_status_display = 1
access_quartermaster = 1
access_janitor = 1
access_security = 1
/obj/item/weapon/cartridge/hop/initialize()
radio = new /obj/item/radio/integrated/mule(src)
..()
/obj/item/weapon/cartridge/hos
name = "R.O.B.U.S.T. DELUXE"
icon_state = "cart-hos"
access_status_display = 1
access_security = 1
/obj/item/weapon/cartridge/hos/initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
..()
/obj/item/weapon/cartridge/ce
name = "Power-On DELUXE"
icon_state = "cart-ce"
access_status_display = 1
access_engine = 1
access_atmos = 1
/obj/item/weapon/cartridge/cmo
name = "Med-U DELUXE"
icon_state = "cart-cmo"
access_status_display = 1
access_reagent_scanner = 1
access_medical = 1
/obj/item/weapon/cartridge/rd
name = "Signal Ace DELUXE"
icon_state = "cart-rd"
access_status_display = 1
access_reagent_scanner = 1
access_atmos = 1
/obj/item/weapon/cartridge/rd/initialize()
radio = new /obj/item/radio/integrated/signal(src)
..()
/obj/item/weapon/cartridge/captain
name = "Value-PAK Cartridge"
desc = "Now with 200% more value!"
icon_state = "cart-c"
access_quartermaster = 1
access_janitor = 1
access_engine = 1
access_security = 1
access_medical = 1
access_reagent_scanner = 1
access_status_display = 1
access_atmos = 1
/obj/item/weapon/cartridge/captain/initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
..()
/obj/item/weapon/cartridge/supervisor
name = "Easy-Record DELUXE"
icon_state = "cart-h"
access_status_display = 1
access_security = 1
/obj/item/weapon/cartridge/centcom
name = "Value-PAK Cartridge"
desc = "Now with 200% more value!"
icon_state = "cart-c"
access_quartermaster = 1
access_janitor = 1
access_engine = 1
access_security = 1
access_medical = 1
access_reagent_scanner = 1
access_status_display = 1
access_atmos = 1
/obj/item/weapon/cartridge/centcom/initialize()
radio = new /obj/item/radio/integrated/beepsky(src)
..()
/obj/item/weapon/cartridge/syndicate
name = "Detomatix Cartridge"
icon_state = "cart"
access_remote_door = 1
access_detonate_pda = 1
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
charges = 4
/obj/item/weapon/cartridge/proc/post_status(var/command, var/data1, var/data2)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = 1
status_signal.data["command"] = command
switch(command)
if("message")
status_signal.data["msg1"] = data1
status_signal.data["msg2"] = data2
if(loc)
var/obj/item/PDA = loc
var/mob/user = PDA.fingerprintslast
if(istype(PDA.loc,/mob/living))
name = PDA.loc
log_admin("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
if("alert")
status_signal.data["picture_state"] = data1
frequency.post_signal(src, status_signal)
/*
This generates the nano values of the cart menus.
Because we close the UI when we insert a new cart
we don't have to worry about null values on items
the user can't access. Well, unless they are href hacking.
But in that case their UI will just lock up.
*/
/obj/item/weapon/cartridge/proc/create_NanoUI_values(mob/user as mob)
var/values[0]
/* Signaler (Mode: 40) */
if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
var/obj/item/radio/integrated/signal/R = radio
values["signal_freq"] = format_frequency(R.frequency)
values["signal_code"] = R.code
/* Station Display (Mode: 42) */
if(mode==42)
values["message1"] = message1 ? message1 : "(none)"
values["message2"] = message2 ? message2 : "(none)"
/* Power Monitor (Mode: 43 / 433) */
if(mode==43 || mode==433)
values["powermonitors"] = powermonitor_repository.powermonitor_data()
if (powmonitor && !isnull(powmonitor.powernet))
values["powerconnected"] = 1
values["poweravail"] = powmonitor.powernet.avail
values["powerload"] = num2text(powmonitor.powernet.viewload,10)
values["powerdemand"] = powmonitor.powernet.load
values["apcs"] = apc_repository.apc_data(powmonitor)
else
values["powerconnected"] = 0
/* General Records (Mode: 44 / 441 / 45 / 451) */
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
values["general"] = active1.fields
values["general_exists"] = 1
else
values["general_exists"] = 0
/* Medical Records (Mode: 44 / 441) */
if(mode == 44 || mode == 441)
var/medData[0]
for(var/datum/data/record/R in sortRecord(data_core.general))
medData[++medData.len] = list(Name = R.fields["name"],"ref" = "\ref[R]")
values["medical_records"] = medData
if(istype(active2, /datum/data/record) && (active2 in data_core.medical))
values["medical"] = active2.fields
values["medical_exists"] = 1
else
values["medical_exists"] = 0
/* Security Records (Mode:45 / 451) */
if(mode == 45 || mode == 451)
var/secData[0]
for (var/datum/data/record/R in sortRecord(data_core.general))
secData[++secData.len] = list(Name = R.fields["name"], "ref" = "\ref[R]")
values["security_records"] = secData
if(istype(active3, /datum/data/record) && (active3 in data_core.security))
values["security"] = active3.fields
values["security_exists"] = 1
else
values["security_exists"] = 0
/* Security Bot Control (Mode: 46) */
if(mode==46)
var/botsData[0]
var/beepskyData[0]
if(istype(radio,/obj/item/radio/integrated/beepsky))
var/obj/item/radio/integrated/beepsky/SC = radio
beepskyData["active"] = SC.active
if(SC.active && !isnull(SC.botstatus))
var/area/loca = SC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
beepskyData["botstatus"] = list("loca" = loca_name, "mode" = SC.botstatus["mode"])
else
beepskyData["botstatus"] = list("loca" = null, "mode" = -1)
var/botsCount=0
if(SC.botlist && SC.botlist.len)
for(var/obj/machinery/bot/B in SC.botlist)
botsCount++
if(B.loc)
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
if(!botsData.len)
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
beepskyData["bots"] = botsData
beepskyData["count"] = botsCount
else
beepskyData["active"] = 0
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
beepskyData["botstatus"] = list("loca" = null, "mode" = null)
beepskyData["bots"] = botsData
beepskyData["count"] = 0
values["beepsky"] = beepskyData
/* MULEBOT Control (Mode: 48) */
if(mode==48)
var/muleData[0]
var/mulebotsData[0]
if(istype(radio,/obj/item/radio/integrated/mule))
var/obj/item/radio/integrated/mule/QC = radio
muleData["active"] = QC.active
if(QC.active && !isnull(QC.botstatus))
var/area/loca = QC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
muleData["botstatus"] = list("loca" = loca_name, "mode" = QC.botstatus["mode"],"home"=QC.botstatus["home"],"powr" = QC.botstatus["powr"],"retn" =QC.botstatus["retn"], "pick"=QC.botstatus["pick"], "load" = QC.botstatus["load"], "dest" = sanitize(QC.botstatus["dest"]))
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
var/mulebotsCount=0
for(var/obj/machinery/bot/B in QC.botlist)
mulebotsCount++
if(B.loc)
mulebotsData[++mulebotsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
if(!mulebotsData.len)
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
muleData["count"] = mulebotsCount
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["active"] = 0
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
muleData["count"] = 0
values["mulebot"] = muleData
/* Supply Shuttle Requests Menu (Mode: 47) */
if(mode==47)
var/supplyData[0]
if(shuttle_master.supply.mode == SHUTTLE_CALL)
supplyData["shuttle_moving"] = 1
if(shuttle_master.supply.z != ZLEVEL_STATION)
supplyData["shuttle_loc"] = "station"
else
supplyData["shuttle_loc"] = "centcom"
supplyData["shuttle_time"] = "([shuttle_master.supply.timeLeft(600)] Mins)"
var/supplyOrderCount = 0
var/supplyOrderData[0]
for(var/S in shuttle_master.shoppinglist)
var/datum/supply_order/SO = S
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!supplyOrderData.len)
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
supplyData["approved"] = supplyOrderData
supplyData["approved_count"] = supplyOrderCount
var/requestCount = 0
var/requestData[0]
for(var/S in shuttle_master.requestlist)
var/datum/supply_order/SO = S
requestCount++
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!requestData.len)
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
supplyData["requests"] = requestData
supplyData["requests_count"] = requestCount
values["supply"] = supplyData
/* Janitor Supplies Locator (Mode: 49) */
if(mode==49)
var/JaniData[0]
var/turf/cl = get_turf(src)
if(cl)
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
else
JaniData["user_loc"] = list("x" = 0, "y" = 0)
var/MopData[0]
for(var/obj/item/weapon/mop/M in janitorial_equipment)
var/turf/ml = get_turf(M)
if(ml)
if(ml.z != cl.z)
continue
var/direction = get_dir(src, M)
MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry")
if(!MopData.len)
MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/BucketData[0]
for(var/obj/structure/mopbucket/B in janitorial_equipment)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
var/direction = get_dir(src,B)
BucketData[++BucketData.len] = list ("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if(!BucketData.len)
BucketData[++BucketData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/CbotData[0]
for(var/obj/machinery/bot/cleanbot/B in aibots)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
var/direction = get_dir(src,B)
CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline")
if(!CbotData.len)
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/CartData[0]
for(var/obj/structure/janitorialcart/B in janitorial_equipment)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
var/direction = get_dir(src,B)
CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if(!CartData.len)
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
JaniData["mops"] = MopData
JaniData["buckets"] = BucketData
JaniData["cleanbots"] = CbotData
JaniData["carts"] = CartData
values["janitor"] = JaniData
return values
/obj/item/weapon/cartridge/Topic(href, href_list)
..()
if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr.unset_machine()
usr << browse(null, "window=pda")
return
switch(href_list["choice"])
if("Medical Records")
var/datum/data/record/R = locate(href_list["target"])
var/datum/data/record/M = locate(href_list["target"])
loc:mode = 441
mode = 441
if (R in data_core.general)
for (var/datum/data/record/E in data_core.medical)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
M = E
break
active1 = R
active2 = M
if("Security Records")
var/datum/data/record/R = locate(href_list["target"])
var/datum/data/record/S = locate(href_list["target"])
loc:mode = 451
mode = 451
if (R in data_core.general)
for (var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
S = E
break
active1 = R
active3 = S
if("Send Signal")
spawn( 0 )
radio:send_signal("ACTIVATE")
return
if("Signal Frequency")
var/new_frequency = sanitize_frequency(radio:frequency + text2num(href_list["sfreq"]))
radio:set_frequency(new_frequency)
if("Signal Code")
radio:code += text2num(href_list["scode"])
radio:code = round(radio:code)
radio:code = min(100, radio:code)
radio:code = max(1, radio:code)
if("Status")
switch(href_list["statdisp"])
if("message")
post_status("message", message1, message2)
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = input("Line 1", "Enter Message Text", message1) as text|null
updateSelfDialog()
if("setmsg2")
message2 = input("Line 2", "Enter Message Text", message2) as text|null
updateSelfDialog()
else
post_status(href_list["statdisp"])
if("Power Select")
var/pref = href_list["target"]
powmonitor = locate(pref)
loc:mode = 433
mode = 433
return 1
@@ -1,16 +0,0 @@
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
@@ -1,267 +0,0 @@
/obj/item/radio/integrated
name = "\improper PDA radio module"
desc = "An electronic radio system of Nanotrasen origin."
icon = 'icons/obj/module.dmi'
icon_state = "power_mod"
var/obj/item/device/pda/hostpda = null
var/list/botlist = null // list of bots
var/obj/machinery/bot/active // the active bot; if null, show bot list
var/list/botstatus // the status signal sent by the bot
var/bot_type //The type of bot it is.
var/bot_filter //Determines which radio filter to use.
var/control_freq = 1447
var/on = 0 //Are we currently active??
var/menu_message = ""
/obj/item/radio/integrated/New()
..()
if (istype(loc.loc, /obj/item/device/pda))
hostpda = loc.loc
if (bot_filter)
spawn(5)
add_to_radio(bot_filter)
/obj/item/radio/integrated/Destroy()
if(radio_controller)
radio_controller.remove_object(src, control_freq)
return ..()
/obj/item/radio/integrated/proc/post_signal(var/freq, var/key, var/value, var/key2, var/value2, var/key3, var/value3,var/key4, var/value4, s_filter)
//world << "Post: [freq]: [key]=[value], [key2]=[value2]"
var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
if(!frequency)
return
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = 1
signal.data[key] = value
if(key2)
signal.data[key2] = value2
if(key3)
signal.data[key3] = value3
if(key4)
signal.data[key4] = value4
frequency.post_signal(src, signal, filter = s_filter)
return
/obj/item/radio/integrated/receive_signal(datum/signal/signal)
/*var/obj/item/device/pda/P = src.loc
world << "recvd:[P] : [signal.source]"
for(var/d in signal.data)
world << "- [d] = [signal.data[d]]"
*/
if (signal.data["type"] == bot_type)
if(!botlist)
botlist = new()
if(!(signal.source in botlist))
botlist += signal.source
if(active == signal.source)
var/list/b = signal.data
botstatus = b.Copy()
/obj/item/radio/integrated/Topic(href, href_list)
..()
var/obj/item/device/pda/PDA = src.hostpda
switch(href_list["op"])
if("control")
active = locate(href_list["bot"])
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
if("scanbots") // find all bots
botlist = null
post_signal(control_freq, "command", "bot_status", s_filter = bot_filter)
if("botlist")
active = null
if("stop", "go")
post_signal(control_freq, "command", href_list["op"], "active", active, s_filter = bot_filter)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
if("summon")
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , "useraccess", PDA.GetAccess(), s_filter = bot_filter)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
/obj/item/radio/integrated/proc/add_to_radio(bot_filter) //Master filter control for bots. Must be placed in the bot's local New() to support map spawned bots.
if(radio_controller)
radio_controller.add_object(src, control_freq, filter = bot_filter)
/obj/item/radio/integrated/beepsky
bot_filter = RADIO_SECBOT
bot_type = SEC_BOT
/obj/item/radio/integrated/medbot
bot_filter = RADIO_MEDBOT
bot_type = MED_BOT
/obj/item/radio/integrated/floorbot
bot_filter = RADIO_FLOORBOT
bot_type = FLOOR_BOT
/obj/item/radio/integrated/cleanbot
bot_filter = RADIO_CLEANBOT
bot_type = CLEAN_BOT
/obj/item/radio/integrated/mule
//var/list/botlist = null // list of bots
//var/obj/machinery/bot/mulebot/active // the active bot; if null, show bot list
//var/list/botstatus // the status signal sent by the bot
var/list/beacons
var/beacon_freq = 1400
control_freq = 1447
// create a new QM cartridge, and register to receive bot control & beacon message
/obj/item/radio/integrated/mule/New()
..()
spawn(5)
if(radio_controller)
radio_controller.add_object(src, control_freq, filter = RADIO_MULEBOT)
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
spawn(10)
post_signal(beacon_freq, "findbeacon", "delivery", s_filter = RADIO_NAVBEACONS)
/obj/item/radio/integrated/mule/Destroy()
if(radio_controller)
radio_controller.remove_object(src,beacon_freq)
return ..()
// receive radio signals
// can detect bot status signals
// and beacon locations
// create/populate lists as they are recvd
/obj/item/radio/integrated/mule/receive_signal(datum/signal/signal)
// var/obj/item/device/pda/P = src.loc
/*
world << "recvd:[P] : [signal.source]"
for(var/d in signal.data)
world << "- [d] = [signal.data[d]]"
*/
if(signal.data["type"] == MULE_BOT)
if(!botlist)
botlist = new()
if(!(signal.source in botlist))
botlist += signal.source
if(active == signal.source)
var/list/b = signal.data
botstatus = b.Copy()
else if(signal.data["beacon"])
if(!beacons)
beacons = new()
beacons[signal.data["beacon"] ] = signal.source
// if(istype(P)) P.updateSelfDialog()
/obj/item/radio/integrated/mule/Topic(href, href_list)
//..()
//var/obj/item/device/pda/PDA = src.hostpda
var/cmd = "command"
if(active)
cmd = "command [active.suffix]"
switch(href_list["op"])
if("control")
active = locate(href_list["bot"])
if("scanbots") // find all bots
botlist = null
if("botlist")
active = null
if("unload")
post_signal(control_freq, cmd, "unload", s_filter = RADIO_MULEBOT)
if("setdest")
if(beacons)
var/dest = input("Select Bot Destination", "Mulebot [active.suffix] Interlink", active.destination) as null|anything in beacons
if(dest)
post_signal(control_freq, cmd, "target", "destination", dest, s_filter = RADIO_MULEBOT)
if("retoff")
post_signal(control_freq, cmd, "autoret", "value", 0, s_filter = RADIO_MULEBOT)
if("reton")
post_signal(control_freq, cmd, "autoret", "value", 1, s_filter = RADIO_MULEBOT)
if("pickoff")
post_signal(control_freq, cmd, "autopick", "value", 0, s_filter = RADIO_MULEBOT)
if("pickon")
post_signal(control_freq, cmd, "autopick", "value", 1, s_filter = RADIO_MULEBOT)
if("stop", "go", "home")
post_signal(control_freq, cmd, href_list["op"], s_filter = RADIO_MULEBOT)
post_signal(control_freq, cmd, "bot_status", s_filter = RADIO_MULEBOT)
/*
* Radio Cartridge, essentially a signaler.
*/
/obj/item/radio/integrated/signal
var/frequency = 1457
var/code = 30.0
var/last_transmission
var/datum/radio_frequency/radio_connection
/obj/item/radio/integrated/signal/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
return ..()
/obj/item/radio/integrated/signal/initialize()
if(!radio_controller)
return
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
if(last_transmission && world.time < (last_transmission + 5))
return
last_transmission = world.time
var/time = time2text(world.realtime,"hh:mm:ss")
var/turf/T = get_turf(src)
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
var/datum/signal/signal = new
signal.source = src
signal.encryption = code
signal.data["message"] = message
radio_connection.post_signal(src, signal)
return
+13 -8
View File
@@ -36,17 +36,22 @@
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
new_item.add_to_stacks(user)
if(new_item.get_amount() <= 0)
// stack was moved into another one on the pile
new_item = locate() in user.loc
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
R.use(2)
if (!R && replace)
user.put_in_hands(new_item)
var/replace = user.get_inactive_hand() == src
use(2)
if (get_amount() <= 0 && replace)
user.unEquip(src, 1)
if(new_item)
user.put_in_hands(new_item)
return
..()
+198 -212
View File
@@ -51,9 +51,9 @@
if(!proximity) return
if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
A.reagents.trans_to(src, 10)
user << "\blue You fill the balloon with the contents of [A]."
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
src.update_icon()
user << "<span class='notice'>You fill the balloon with the contents of [A].</span>"
desc = "A translucent balloon with some form of liquid sloshing around in it."
update_icon()
return
/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob, params)
@@ -67,19 +67,19 @@
O.reagents.reaction(user)
qdel(src)
else
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
user << "\blue You fill the balloon with the contents of [O]."
desc = "A translucent balloon with some form of liquid sloshing around in it."
user << "<span class='notice'>You fill the balloon with the contents of [O].</span>"
O.reagents.trans_to(src, 10)
src.update_icon()
update_icon()
return
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
if(src.reagents.total_volume >= 1)
src.visible_message("\red The [src] bursts!","You hear a pop and a splash.")
src.reagents.reaction(get_turf(hit_atom))
if(reagents.total_volume >= 1)
visible_message("<span class='warning'>The [src] bursts!</span>","You hear a pop and a splash.")
reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
src.icon_state = "burst"
reagents.reaction(A)
icon_state = "burst"
spawn(5)
if(src)
qdel(src)
@@ -141,89 +141,84 @@
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
examine(mob/user)
..(user)
if (bullets)
user << "\blue It is loaded with [bullets] foam darts!"
/obj/item/toy/crossbow/examine(mob/user)
..(user)
if (bullets)
user << "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
user << "\blue You load the foam dart into the crossbow."
else
usr << "\red It's already fully loaded."
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
user << "<span class='notice'>You load the foam dart into the crossbow.</span>"
else
usr << "<span class='warning'>It's already fully loaded.</span>"
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
D.visible_message("<span class='danger'>[M] was hit by the foam dart!</span>")
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
D.visible_message("<span class='danger'>[M] was hit by the foam dart!</span>")
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
return
else if (bullets == 0)
user.Weaken(5)
user.visible_message("<span class='danger'>[] realized they were out of ammo and starting scrounging for some!</span>")
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
qdel(D)
return
else if (bullets == 0)
user.Weaken(5)
user.visible_message("<span class='danger'>[] realized they were out of ammo and starting scrounging for some!</span>")
attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'><B>[] casually lines up a shot with []'s head and pulls the trigger!</B></span>", user, M), 1, "<span class='danger'>You hear the sound of foam against skull.</span>", 2)
O.show_message(text("\red [] was hit in the head by the foam dart!", M), 1)
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'><B>[] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</B></span>", user, M), 1, "<span class='danger'>You hear someone fall.</span>", 2)
user.Weaken(5)
return
if (bullets > 0 && M.lying)
visible_message("<span class='danger'>[user] casually lines up a shot with [M]'s head and pulls the trigger!</span>", "<span class='danger'>You hear the sound of foam against skull.</span>")
M.visible_message("<span class='warning'>[M] was hit in the head by the foam dart!</span>")
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
bullets--
else if (M.lying && bullets == 0)
visible_message("<span class='danger'>[user] casually lines up a shot with [M]'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", "<span class='danger'>You hear someone fall.</span>")
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
@@ -279,27 +274,27 @@
flags = NOSHIELD
attack_verb = list("attacked", "struck", "hit")
attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue You extend the plastic blade with a quick flick of your wrist."
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
src.icon_state = "swordblue"
src.item_state = "swordblue"
src.w_class = 4
else
user << "\blue You push the plastic blade back down into the handle."
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
src.icon_state = "sword0"
src.item_state = "sword0"
src.w_class = 2
/obj/item/toy/sword/attack_self(mob/user as mob)
active = !(active)
if (active)
user << "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>"
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
icon_state = "swordblue"
item_state = "swordblue"
w_class = 4
else
user << "<span class='notice'>You push the plastic blade back down into the handle.</span>"
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
icon_state = "sword0"
item_state = "sword0"
w_class = 2
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
src.add_fingerprint(user)
return
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
// Copied from /obj/item/weapon/melee/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user, params)
@@ -374,21 +369,15 @@
w_class = 1
throw_impact(atom/hit_atom)
..()
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("\red The [src.name] explodes!","\red You hear a bang!")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/virus/throw_impact(atom/hit_atom)
..()
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
visible_message("<span class='warning'>The [name] explodes!</span>","<span class='warning'>You hear a bang!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/*
* Snap pops
@@ -400,27 +389,27 @@
icon_state = "snappop"
w_class = 1
throw_impact(atom/hit_atom)
..()
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("\red The [src.name] explodes!","\red You hear a snap!")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
..()
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
visible_message("<span class='warning'>The [src.name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/Crossed(H as mob|obj)
if((ishuman(H))) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
if(M.m_intent == "run")
M << "\red You step on the snap pop!"
M << "<span class='warning'>You step on the snap pop!</span>"
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(2, 0, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("\red The [src.name] explodes!","\red You hear a snap!")
visible_message("<span class='warning'>The [name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
@@ -450,13 +439,13 @@
return
..()
/obj/random/prize
/obj/random/mech
name = "Random Mech Prize"
desc = "This is a random prize"
icon = 'icons/obj/toy.dmi'
icon_state = "ripleytoy"
/obj/random/prize/item_to_spawn()
/obj/random/mech/item_to_spawn()
return pick(subtypesof(/obj/item/toy/prize)) //exclude the base type.
/obj/item/toy/prize/ripley
@@ -591,7 +580,7 @@ obj/item/toy/cards/deck/New()
obj/item/toy/cards/deck/attack_hand(mob/user as mob)
var/choice = null
if(cards.len == 0)
src.icon_state = "deck_[deckstyle]_empty"
icon_state = "deck_[deckstyle]_empty"
user << "<span class='notice'>There are no more cards to draw.</span>"
return
var/obj/item/toy/cards/singlecard/H = new/obj/item/toy/cards/singlecard(user.loc)
@@ -600,16 +589,16 @@ obj/item/toy/cards/deck/attack_hand(mob/user as mob)
H.parentdeck = src
var/O = src
H.apply_card_vars(H,O)
src.cards -= choice
cards -= choice
H.pickup(user)
user.put_in_active_hand(H)
src.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
if(cards.len > 26)
src.icon_state = "deck_[deckstyle]_full"
icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
src.icon_state = "deck_[deckstyle]_half"
icon_state = "deck_[deckstyle]_half"
else if(cards.len > 1)
src.icon_state = "deck_[deckstyle]_low"
icon_state = "deck_[deckstyle]_low"
obj/item/toy/cards/deck/attack_self(mob/user as mob)
if(cooldown < world.time - 50)
@@ -625,17 +614,17 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/singlecard/C, mob/living/use
if(!user.unEquip(C))
user << "<span class='notice'>The card is stuck to your hand, you can't add it to the deck!</span>"
return
src.cards += C.cardname
cards += C.cardname
user.visible_message("<span class='notice'>[user] adds a card to the bottom of the deck.</span>","<span class='notice'>You add the card to the bottom of the deck.</span>")
qdel(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
if(cards.len > 26)
src.icon_state = "deck_[deckstyle]_full"
icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
src.icon_state = "deck_[deckstyle]_half"
icon_state = "deck_[deckstyle]_half"
else if(cards.len > 1)
src.icon_state = "deck_[deckstyle]_low"
icon_state = "deck_[deckstyle]_low"
obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user, params)
@@ -645,17 +634,17 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user,
if(!user.unEquip(C))
user << "<span class='notice'>The hand of cards is stuck to your hand, you can't add it to the deck!</span>"
return
src.cards += C.currenthand
cards += C.currenthand
user.visible_message("<span class='notice'>[user] puts their hand of cards in the deck.</span>", "<span class='notice'>You put the hand of cards in the deck.</span>")
qdel(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
if(cards.len > 26)
src.icon_state = "deck_[deckstyle]_full"
icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
src.icon_state = "deck_[deckstyle]_half"
icon_state = "deck_[deckstyle]_half"
else if(cards.len > 1)
src.icon_state = "deck_[deckstyle]_low"
icon_state = "deck_[deckstyle]_low"
obj/item/toy/cards/deck/MouseDrop(atom/over_object)
var/mob/M = usr
@@ -718,7 +707,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
if (cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
var/choice = href_list["pick"]
var/obj/item/toy/cards/singlecard/C = new/obj/item/toy/cards/singlecard(cardUser.loc)
src.currenthand -= choice
currenthand -= choice
C.parentdeck = src.parentdeck
C.cardname = choice
C.apply_card_vars(C,O)
@@ -727,13 +716,13 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
cardUser.visible_message("<span class='notice'>[cardUser] draws a card from \his hand.</span>", "<span class='notice'>You take the [C.cardname] from your hand.</span>")
interact(cardUser)
if(src.currenthand.len < 3)
src.icon_state = "[deckstyle]_hand2"
if(currenthand.len < 3)
icon_state = "[deckstyle]_hand2"
else if(src.currenthand.len < 4)
src.icon_state = "[deckstyle]_hand3"
icon_state = "[deckstyle]_hand3"
else if(src.currenthand.len < 5)
src.icon_state = "[deckstyle]_hand4"
if(src.currenthand.len == 1)
icon_state = "[deckstyle]_hand4"
if(currenthand.len == 1)
var/obj/item/toy/cards/singlecard/N = new/obj/item/toy/cards/singlecard(src.loc)
N.parentdeck = src.parentdeck
N.cardname = src.currenthand[1]
@@ -748,17 +737,17 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living/user, params)
if(istype(C))
if(C.parentdeck == src.parentdeck)
src.currenthand += C.cardname
if(C.parentdeck == parentdeck)
currenthand += C.cardname
user.unEquip(C)
user.visible_message("<span class='notice'>[user] adds a card to their hand.</span>", "<span class='notice'>You add the [C.cardname] to your hand.</span>")
interact(user)
if(currenthand.len > 4)
src.icon_state = "[deckstyle]_hand5"
icon_state = "[deckstyle]_hand5"
else if(currenthand.len > 3)
src.icon_state = "[deckstyle]_hand4"
icon_state = "[deckstyle]_hand4"
else if(currenthand.len > 2)
src.icon_state = "[deckstyle]_hand3"
icon_state = "[deckstyle]_hand3"
qdel(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
@@ -803,33 +792,33 @@ obj/item/toy/cards/singlecard/verb/Flip()
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
return
if(!flipped)
src.flipped = 1
flipped = 1
if (cardname)
src.icon_state = "sc_[cardname]_[deckstyle]"
src.name = src.cardname
icon_state = "sc_[cardname]_[deckstyle]"
name = cardname
else
src.icon_state = "sc_Ace of Spades_[deckstyle]"
src.name = "What Card"
src.pixel_x = 5
icon_state = "sc_Ace of Spades_[deckstyle]"
name = "What Card"
pixel_x = 5
else if(flipped)
src.flipped = 0
src.icon_state = "singlecard_down_[deckstyle]"
src.name = "card"
src.pixel_x = -5
flipped = 0
icon_state = "singlecard_down_[deckstyle]"
name = "card"
pixel_x = -5
obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/toy/cards/singlecard/))
var/obj/item/toy/cards/singlecard/C = I
if(C.parentdeck == src.parentdeck)
if(C.parentdeck == parentdeck)
var/obj/item/toy/cards/cardhand/H = new/obj/item/toy/cards/cardhand(user.loc)
H.currenthand += C.cardname
H.currenthand += src.cardname
H.currenthand += cardname
H.parentdeck = C.parentdeck
H.apply_card_vars(H,C)
user.unEquip(C)
H.pickup(user)
user.put_in_active_hand(H)
user << "<span class='notice'>You combine the [C.cardname] and the [src.cardname] into a hand.</span>"
user << "<span class='notice'>You combine the [C.cardname] and the [cardname] into a hand.</span>"
qdel(C)
qdel(src)
else
@@ -923,54 +912,58 @@ obj/item/toy/cards/deck/syndicate/black
var/timeleft = (cooldown - world.time)
user << "<span class='alert'>Nothing happens, and '</span>[round(timeleft/10)]<span class='alert'>' appears on a small display.</span>"
/obj/item/toy/therapy_red
name = "red therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is red."
icon = 'icons/obj/weapons.dmi'
/obj/item/toy/therapy
name = "therapy doll"
desc = "A toy for therapeutic and recreational purposes."
icon_state = "therapyred"
item_state = "egg4"
w_class = 1
var/cooldown = 0
/obj/item/toy/therapy/New()
if(item_color)
name = "[item_color] therapy doll"
desc += " This one is [item_color]."
icon_state = "therapy[item_color]"
/obj/item/toy/therapy/attack_self(mob/user)
if(cooldown < world.time - 8)
user << "<span class='notice'>You relieve some stress with \the [src].</span>"
playsound(user, 'sound/items/squeaktoy.ogg', 20, 1)
cooldown = world.time
/obj/random/therapy
name = "Random Therapy Doll"
desc = "This is a random therapy doll."
icon = 'icons/obj/toy.dmi'
icon_state = "therapyred"
/obj/random/prize/item_to_spawn()
return pick(subtypesof(/obj/item/toy/therapy)) //exclude the base type.
/obj/item/toy/therapy/red
item_state = "egg4" // It's the red egg in items_left/righthand
w_class = 1
item_color = "red"
/obj/item/toy/therapy_purple
name = "purple therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is purple."
icon = 'icons/obj/weapons.dmi'
icon_state = "therapypurple"
/obj/item/toy/therapy/purple
item_state = "egg1" // It's the magenta egg in items_left/righthand
w_class = 1
item_color = "purple"
/obj/item/toy/therapy_blue
name = "blue therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is blue."
icon = 'icons/obj/weapons.dmi'
icon_state = "therapyblue"
/obj/item/toy/therapy/blue
item_state = "egg2" // It's the blue egg in items_left/righthand
w_class = 1
item_color = "blue"
/obj/item/toy/therapy_yellow
name = "yellow therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is yellow."
icon = 'icons/obj/weapons.dmi'
icon_state = "therapyyellow"
/obj/item/toy/therapy/yellow
item_state = "egg5" // It's the yellow egg in items_left/righthand
w_class = 1
item_color = "yellow"
/obj/item/toy/therapy_orange
name = "orange therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is orange."
icon = 'icons/obj/weapons.dmi'
icon_state = "therapyorange"
/obj/item/toy/therapy/orange
item_state = "egg4" // It's the red one again, lacking an orange item_state and making a new one is pointless
w_class = 1
item_color = "orange"
/obj/item/toy/therapy_green
name = "green therapy doll"
desc = "A toy for therapeutic and recreational purposes. This one is green."
icon = 'icons/obj/weapons.dmi'
icon_state = "therapygreen"
/obj/item/toy/therapy/green
item_state = "egg3" // It's the green egg in items_left/righthand
w_class = 1
item_color = "green"
/obj/item/weapon/toddler
icon_state = "toddler"
@@ -1264,7 +1257,7 @@ obj/item/toy/cards/deck/syndicate/black
var/message = generate_ion_law()
user << "<span class='notice'>You press the button on [src].</span>"
playsound(user, 'sound/machines/click.ogg', 20, 1)
src.loc.visible_message("<span class='danger'>\icon[src] [message]</span>")
visible_message("<span class='danger'>\icon[src] [message]</span>")
cooldown = 1
spawn(30) cooldown = 0
return
@@ -1283,7 +1276,7 @@ obj/item/toy/cards/deck/syndicate/black
var/message = pick("You won't get away this time, Griffin!", "Stop right there, criminal!", "Hoot! Hoot!", "I am the night!")
user << "<span class='notice'>You pull the string on the [src].</span>"
playsound(user, 'sound/misc/hoot.ogg', 25, 1)
src.loc.visible_message("<span class='danger'>\icon[src] [message]</span>")
visible_message("<span class='danger'>\icon[src] [message]</span>")
cooldown = 1
spawn(30) cooldown = 0
return
@@ -1302,7 +1295,7 @@ obj/item/toy/cards/deck/syndicate/black
var/message = pick("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!")
user << "<span class='notice'>You pull the string on the [src].</span>"
playsound(user, 'sound/misc/caw.ogg', 25, 1)
src.loc.visible_message("<span class='danger'>\icon[src] [message]</span>")
visible_message("<span class='danger'>\icon[src] [message]</span>")
cooldown = 1
spawn(30) cooldown = 0
return
@@ -1534,13 +1527,6 @@ obj/item/toy/cards/deck/syndicate/black
else
icon_state = "chainsaw0"
/obj/item/weapon/twohanded/toy/chainsaw/attack(mob/target as mob, mob/living/user as mob)
if(wielded)
playsound(loc, 'sound/weapons/chainsaw.ogg', 100, 1, -1)
else
playsound(loc, "swing_hit", 50, 1, -1)
..()
/*
* Action Figures
*/
@@ -83,7 +83,7 @@
/obj/item/toy/crossbow,
/obj/item/weapon/gun/projectile/revolver/capgun,
/obj/item/toy/katana,
/obj/random/prize,
/obj/random/mech,
/obj/item/toy/spinningtoy,
/obj/item/toy/sword,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
@@ -50,6 +50,11 @@
return ..()
if (reagents.total_volume > 0)
// Mouthless people cannot eat
if(!M.can_eat())
user << "<span class=warning>[M] cannot eat with a fork!</span>"
return
if(M == user)
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
reagents.trans_to(M, reagents.total_volume)
@@ -1,3 +1,6 @@
/obj/item/weapon/melee
needs_permit = 1
/obj/item/weapon/melee/chainofcommand
name = "chain of command"
desc = "A tool used by great men to placate the frothing masses."
@@ -673,4 +673,15 @@
new /obj/item/weapon/lipstick/black(src)
new /obj/item/weapon/lipstick/green(src)
new /obj/item/weapon/lipstick/blue(src)
new /obj/item/weapon/lipstick/white(src)
new /obj/item/weapon/lipstick/white(src)
/obj/item/weapon/storage/box/foam_darts
name = "Foam Dart Pack"
desc = "Extra ammo for foam dart launchers. Contains 10 darts."
storage_slots = 10
max_combined_w_class = 10
/obj/item/weapon/storage/box/foam_darts/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/toy/ammo/crossbow(src)
@@ -144,12 +144,11 @@
/obj/item/weapon/storage/box/syndie_kit/emp
name = "boxed EMP kit"
New()
..()
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/implanter/emp/(src)
new /obj/item/device/flashlight/emp/(src)
/obj/item/weapon/storage/box/syndie_kit/emp/New()
..()
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/implanter/emp/(src)
/obj/item/weapon/storage/box/syndie_kit/tabun
name = "Tabun Gas Grenades"
@@ -1,7 +1,8 @@
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
name = "leather wallet"
desc = "Made from genuine leather, it is of the highest quality."
storage_slots = 10
icon = 'icons/obj/wallets.dmi'
icon_state = "wallet"
w_class = 2
can_hold = list(
@@ -94,4 +95,62 @@
if(item2_type)
new item2_type(src)
if(item3_type)
new item3_type(src)
new item3_type(src)
//////////////////////////////////////
// Color Wallets //
//////////////////////////////////////
/obj/item/weapon/storage/wallet/color
name = "cheap wallet"
desc = "A cheap wallet from the arcade."
storage_slots = 5 //smaller storage than normal wallets
/obj/item/weapon/storage/wallet/color/New()
..()
if(!item_color)
var/color_wallet = pick(subtypesof(/obj/item/weapon/storage/wallet/color))
new color_wallet(src.loc)
qdel(src)
return
UpdateDesc()
/obj/item/weapon/storage/wallet/color/proc/UpdateDesc()
name = "cheap [item_color] wallet"
desc = "A cheap, [item_color] wallet from the arcade."
icon_state = "[item_color]_wallet"
/obj/item/weapon/storage/wallet/color/update_icon()
if(front_id)
switch(front_id.icon_state)
if("id")
icon_state = "[item_color]_walletid"
return
if("silver")
icon_state = "[item_color]_walletid_silver"
return
if("gold")
icon_state = "[item_color]_walletid_gold"
return
if("centcom")
icon_state = "[item_color]_walletid_centcom"
return
icon_state = "[item_color]_wallet"
/obj/item/weapon/storage/wallet/color/blue
item_color = "blue"
/obj/item/weapon/storage/wallet/color/red
item_color = "red"
/obj/item/weapon/storage/wallet/color/yellow
item_color = "yellow"
/obj/item/weapon/storage/wallet/color/green
item_color = "green"
/obj/item/weapon/storage/wallet/color/pink
item_color = "pink"
/obj/item/weapon/storage/waller/color/brown
item_color = "brown"
@@ -77,6 +77,7 @@
item_state = null
slot_flags = SLOT_BELT
w_class = 2
needs_permit = 0
force = 0
on = 0