mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Massive traitor item overhaul
This commit is contained in:
@@ -637,9 +637,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, trim(lowertext(t)), trim(lowertext(lock_code))))
|
||||
U << "The PDA softly beeps."
|
||||
U << browse(null, "window=pda")
|
||||
src.mode = 0
|
||||
else
|
||||
t = copytext(sanitize(t), 1, 20)
|
||||
ttone = t
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/obj/item/device/handtv
|
||||
name = "handheld tv"
|
||||
desc = "A handheld tv meant for remote viewing."
|
||||
icon_state = "handtv"
|
||||
w_class = 1
|
||||
var/obj/machinery/camera/current = null
|
||||
|
||||
/obj/item/device/handtv/attack_self(mob/usr as mob)
|
||||
var/list/cameras = new/list()
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if (C.hasbug && C.status)
|
||||
cameras.Add(C)
|
||||
if (length(cameras) == 0)
|
||||
usr << "\red No bugged functioning cameras found."
|
||||
return
|
||||
|
||||
var/list/friendly_cameras = new/list()
|
||||
|
||||
for (var/obj/machinery/camera/C in cameras)
|
||||
friendly_cameras.Add(C.c_tag)
|
||||
|
||||
var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
|
||||
if (!target)
|
||||
usr.unset_machine()
|
||||
usr.reset_view(usr)
|
||||
src.in_use = 0
|
||||
return
|
||||
for (var/obj/machinery/camera/C in cameras)
|
||||
if (C.c_tag == target)
|
||||
target = C
|
||||
break
|
||||
if (usr.stat == 2) return
|
||||
if(target)
|
||||
usr.client.eye = target
|
||||
usr.set_machine(src)
|
||||
src.current = target
|
||||
src.in_use = 1
|
||||
else
|
||||
usr.unset_machine()
|
||||
src.in_use = 0
|
||||
return
|
||||
|
||||
/obj/item/device/handtv/check_eye(var/mob/usr as mob)
|
||||
if ( src.loc != usr || usr.get_active_hand() != src|| !usr.canmove || usr.blinded || !current || !current.status )
|
||||
return null
|
||||
usr.reset_view(current)
|
||||
return 1
|
||||
@@ -21,6 +21,11 @@
|
||||
origin_tech = "syndicate=3"
|
||||
syndie = 1//Signifies that it de-crypts Syndicate transmissions
|
||||
|
||||
/obj/item/device/encryptionkey/syndicate/hacked
|
||||
name = "Standard Encryption Key"
|
||||
desc = "An encryption key for a radio headset. Has no special codes in it. Looks more sophisticated than usual."
|
||||
channels = list("Command" = 0, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
|
||||
|
||||
/obj/item/device/encryptionkey/binary
|
||||
icon_state = "cypherkey"
|
||||
translate_binary = 1
|
||||
|
||||
@@ -8,252 +8,122 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
/obj/item/device/uplink
|
||||
var/welcome // Welcoming menu message
|
||||
var/items // List of items
|
||||
var/item_data // raw item text
|
||||
var/list/ItemList // Parsed list of items
|
||||
var/uses // Numbers of crystals
|
||||
// List of items not to shove in their hands.
|
||||
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
|
||||
var/list/purchase_log = list()
|
||||
var/show_description = null
|
||||
var/active = 0
|
||||
var/job = null
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
..()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
if(!item_data)
|
||||
items = replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
|
||||
else
|
||||
items = replacetext(item_data)
|
||||
ItemList = text2list(src.items, ";") // Parsing the items text string
|
||||
uses = ticker.mode.uplink_uses
|
||||
|
||||
//Let's build a menu!
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
|
||||
/obj/item/device/uplink/proc/generate_menu(mob/user as mob)
|
||||
if(!job)
|
||||
job = user.mind.assigned_role
|
||||
var/dat = "<B>[src.welcome]</B><BR>"
|
||||
dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Request item:</B><BR>"
|
||||
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
|
||||
|
||||
var/cost
|
||||
var/item
|
||||
var/name
|
||||
var/path_obj
|
||||
var/path_text
|
||||
var/category_items = 1 //To prevent stupid :P
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:26: dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += {"Tele-Crystals left: [src.uses]<BR>
|
||||
<HR>
|
||||
<B>Request item:</B><BR>
|
||||
<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"}
|
||||
// END AUTOFIX
|
||||
var/list/buyable_items = get_uplink_items()
|
||||
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len != 3) //If it is not an actual item, make a break in the menu.
|
||||
if(O.len == 1) //If there is one item, it's probably a title
|
||||
dat += "<b>[O[1]]</b><br>"
|
||||
category_items = 0
|
||||
else //Else, it's a white space.
|
||||
if(category_items < 1) //If there were no itens in the last category...
|
||||
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
|
||||
dat += "<br>"
|
||||
continue
|
||||
// Loop through categories
|
||||
var/index = 0
|
||||
for(var/category in buyable_items)
|
||||
|
||||
path_text = O[1]
|
||||
cost = text2num(O[2])
|
||||
index++
|
||||
dat += "<b>[category]</b><br>"
|
||||
|
||||
if(cost>uses)
|
||||
continue
|
||||
var/i = 0
|
||||
|
||||
path_obj = text2path(path_text)
|
||||
// Loop through items in category
|
||||
for(var/datum/uplink_item/item in buyable_items[category])
|
||||
i++
|
||||
|
||||
// Because we're using strings, this comes up if item paths change.
|
||||
// Failure to handle this error borks uplinks entirely. -Sayu
|
||||
if(!path_obj)
|
||||
error("Syndicate item is not a valid path: [path_text]")
|
||||
else
|
||||
item = new path_obj()
|
||||
name = O[3]
|
||||
del item
|
||||
var/cost_text = ""
|
||||
var/desc = "[item.desc]"
|
||||
if(item.job && item.job.len)
|
||||
if(!(item.job.Find(job)))
|
||||
//world.log << "Skipping job item that doesn't match"
|
||||
continue
|
||||
else
|
||||
//world.log << "Found matching job item"
|
||||
if(item.cost > 0)
|
||||
cost_text = "([item.cost])"
|
||||
if(item.cost <= uses)
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[category]:[i];'>[item.name]</A> [cost_text] "
|
||||
else
|
||||
dat += "<font color='grey'><i>[item.name] [cost_text] </i></font>"
|
||||
if(item.desc)
|
||||
if(show_description == 2)
|
||||
dat += "<A href='byond://?src=\ref[src];show_desc=1'><font size=2>\[-\]</font></A><BR><font size=2>[desc]</font>"
|
||||
else
|
||||
dat += "<A href='byond://?src=\ref[src];show_desc=2'><font size=2>\[?\]</font></A>"
|
||||
dat += "<BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
|
||||
category_items++
|
||||
// Break up the categories, if it isn't the last.
|
||||
if(buyable_items.len != index)
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
|
||||
dat += "<HR>"
|
||||
return dat
|
||||
|
||||
//If 'random' was selected
|
||||
/obj/item/device/uplink/proc/chooseRandomItem()
|
||||
var/list/randomItems = list()
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/interact(mob/user as mob)
|
||||
|
||||
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
||||
//Add only items the player can afford:
|
||||
if(uses > 19)
|
||||
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
|
||||
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
|
||||
dat += src.generate_menu(user)
|
||||
|
||||
if(uses > 9)
|
||||
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_uplink") //Uplink Implanter
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:72: dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
|
||||
dat += {"<A href='byond://?src=\ref[src];lock=1'>Lock</a>
|
||||
</font></body>"}
|
||||
// END AUTOFIX
|
||||
user << browse(dat, "window=hidden")
|
||||
onclose(user, "hidden")
|
||||
return
|
||||
|
||||
//if(uses > 8) //Nothing... yet.
|
||||
//if(uses > 7) //Nothing... yet.
|
||||
|
||||
if(uses > 6)
|
||||
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
|
||||
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
|
||||
|
||||
if(uses > 5)
|
||||
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
|
||||
|
||||
if(uses > 4)
|
||||
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
|
||||
randomItems.Add("/obj/item/device/powersink") //Powersink
|
||||
|
||||
if(uses > 3)
|
||||
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
|
||||
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
|
||||
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
|
||||
|
||||
if(uses > 2)
|
||||
randomItems.Add("/obj/item/weapon/storage/box/emps") //EMP Grenades
|
||||
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
|
||||
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
|
||||
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
|
||||
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
|
||||
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/space") //Syndicate Space Suit
|
||||
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_freedom") //Freedom Implant
|
||||
randomItems.Add("/obj/item/clothing/glasses/thermal/syndi") //Thermal Imaging Goggles
|
||||
|
||||
if(uses > 1)
|
||||
/*
|
||||
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
|
||||
var/hasRevolver = 0
|
||||
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
|
||||
if(istype(I,/obj/item/weapon/gun/projectile))
|
||||
hasRevolver = 1
|
||||
|
||||
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
*/
|
||||
randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
|
||||
randomItems.Add("/obj/item/weapon/plastique") //C4
|
||||
|
||||
if(uses > 0)
|
||||
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
|
||||
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
|
||||
|
||||
if(!randomItems.len)
|
||||
del(randomItems)
|
||||
return 0
|
||||
else
|
||||
var/buyItem = pick(randomItems)
|
||||
|
||||
switch(buyItem) //Ok, this gets a little messy, sorry.
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
uses -= 20
|
||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/box/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
||||
uses -= 10
|
||||
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
|
||||
uses -= 7
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
uses -= 6
|
||||
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
|
||||
uses -= 5
|
||||
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
|
||||
uses -= 4
|
||||
if("/obj/item/weapon/storage/box/emps" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
|
||||
"/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/box/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
|
||||
"/obj/item/weapon/storage/box/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
|
||||
uses -= 3
|
||||
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique", "/obj/item/weapon/card/id/syndicate")
|
||||
uses -= 2
|
||||
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
||||
uses -= 1
|
||||
del(randomItems)
|
||||
return buyItem
|
||||
|
||||
/obj/item/device/uplink/proc/handleStatTracking(var/boughtItem)
|
||||
//For stat tracking, sorry for making it so ugly
|
||||
if(!boughtItem) return
|
||||
|
||||
switch(boughtItem)
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
feedback_add_details("traitor_uplink_items_bought","TP")
|
||||
if("/obj/item/toy/syndicateballoon")
|
||||
feedback_add_details("traitor_uplink_items_bought","BS")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/imp_uplink")
|
||||
feedback_add_details("traitor_uplink_items_bought","UI")
|
||||
if("/obj/item/weapon/storage/box/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","BU")
|
||||
if("/obj/item/weapon/aiModule/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AI")
|
||||
if("/obj/item/device/radio/beacon/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","SB")
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
feedback_add_details("traitor_uplink_items_bought","RE")
|
||||
if("/obj/item/weapon/gun/energy/crossbow")
|
||||
feedback_add_details("traitor_uplink_items_bought","XB")
|
||||
if("/obj/item/device/powersink")
|
||||
feedback_add_details("traitor_uplink_items_bought","PS")
|
||||
if("/obj/item/weapon/melee/energy/sword")
|
||||
feedback_add_details("traitor_uplink_items_bought","ES")
|
||||
if("/obj/item/clothing/mask/gas/voice")
|
||||
feedback_add_details("traitor_uplink_items_bought","VC")
|
||||
if("/obj/item/device/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CP")
|
||||
if("/obj/item/weapon/storage/box/emps")
|
||||
feedback_add_details("traitor_uplink_items_bought","EM")
|
||||
if("/obj/item/weapon/pen/paralysis")
|
||||
feedback_add_details("traitor_uplink_items_bought","PP")
|
||||
if("/obj/item/weapon/cartridge/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","DC")
|
||||
if("/obj/item/clothing/under/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CJ")
|
||||
if("/obj/item/weapon/card/id/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AC")
|
||||
if("/obj/item/weapon/card/emag")
|
||||
feedback_add_details("traitor_uplink_items_bought","EC")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/space")
|
||||
feedback_add_details("traitor_uplink_items_bought","SS")
|
||||
if("/obj/item/device/encryptionkey/binary")
|
||||
feedback_add_details("traitor_uplink_items_bought","BT")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/imp_freedom")
|
||||
feedback_add_details("traitor_uplink_items_bought","FI")
|
||||
if("/obj/item/clothing/glasses/thermal/syndi")
|
||||
feedback_add_details("traitor_uplink_items_bought","TM")
|
||||
if("/obj/item/ammo_magazine/a357")
|
||||
feedback_add_details("traitor_uplink_items_bought","RA")
|
||||
if("/obj/item/clothing/shoes/syndigaloshes")
|
||||
feedback_add_details("traitor_uplink_items_bought","SH")
|
||||
if("/obj/item/weapon/plastique")
|
||||
feedback_add_details("traitor_uplink_items_bought","C4")
|
||||
if("/obj/item/weapon/soap/syndie")
|
||||
feedback_add_details("traitor_uplink_items_bought","SP")
|
||||
if("/obj/item/weapon/storage/toolbox/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","ST")
|
||||
|
||||
/obj/item/device/uplink/Topic(href, href_list)
|
||||
..()
|
||||
if(!active)
|
||||
return
|
||||
|
||||
if (href_list["buy_item"])
|
||||
if(href_list["buy_item"] == "random")
|
||||
var/boughtItem = chooseRandomItem()
|
||||
if(boughtItem)
|
||||
href_list["buy_item"] = boughtItem
|
||||
feedback_add_details("traitor_uplink_items_bought","RN")
|
||||
return 1
|
||||
|
||||
var/item = href_list["buy_item"]
|
||||
var/list/split = stringsplit(item, ":") // throw away variable
|
||||
|
||||
if(split.len == 2)
|
||||
// Collect category and number
|
||||
var/category = split[1]
|
||||
var/number = text2num(split[2])
|
||||
|
||||
var/list/buyable_items = get_uplink_items()
|
||||
|
||||
var/list/uplink = buyable_items[category]
|
||||
if(uplink && uplink.len >= number)
|
||||
var/datum/uplink_item/I = uplink[number]
|
||||
if(I)
|
||||
I.buy(src, usr)
|
||||
else
|
||||
return 0
|
||||
|
||||
else
|
||||
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
||||
return 0
|
||||
|
||||
//if(usr:mind && ticker.mode.traitors[usr:mind])
|
||||
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
|
||||
//info.spawnlist += href_list["buy_item"]
|
||||
|
||||
uses -= text2num(href_list["cost"])
|
||||
handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
|
||||
return 1
|
||||
|
||||
var/text = "[key_name(usr)] tried to purchase an uplink item that doesn't exist"
|
||||
var/textalt = "[key_name(usr)] tried to purchase an uplink item that doesn't exist [item]"
|
||||
message_admins(text)
|
||||
log_game(textalt)
|
||||
admin_log.Add(textalt)
|
||||
|
||||
else if(href_list["show_desc"])
|
||||
show_description = text2num(href_list["show_desc"])
|
||||
interact(usr)
|
||||
|
||||
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
|
||||
/* How to create an uplink in 3 easy steps!
|
||||
@@ -270,15 +140,13 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
/obj/item/device/uplink/hidden
|
||||
name = "Hidden Uplink."
|
||||
desc = "There is something wrong if you're examining this."
|
||||
var/active = 0
|
||||
var/list/purchase_log = list()
|
||||
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
spawn(2)
|
||||
if(!istype(src.loc, /obj/item))
|
||||
del(src)
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
return 1
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -299,43 +167,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/hidden/interact(mob/user as mob)
|
||||
|
||||
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
|
||||
dat += src.generate_menu()
|
||||
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
|
||||
dat += "</font></body>"
|
||||
user << browse(dat, "window=hidden")
|
||||
onclose(user, "hidden")
|
||||
return
|
||||
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 0
|
||||
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
return 1
|
||||
|
||||
if(..(href, href_list) == 1)
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
var/obj/I = new path_obj(get_turf(usr))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/A = usr
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
purchase_log += "[usr] ([usr.ckey]) bought [I]."
|
||||
interact(usr)
|
||||
return
|
||||
|
||||
// I placed this here because of how relevant it is.
|
||||
// You place this in your uplinkable item to check if an uplink is active or not.
|
||||
// If it is, it will display the uplink menu and return 1, else it'll return false.
|
||||
@@ -376,6 +207,3 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/obj/item/weapon/grenade/clown_grenade
|
||||
name = "Banana Grenade"
|
||||
desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas."
|
||||
icon_state = "chemg"
|
||||
item_state = "flashbang"
|
||||
w_class = 2.0
|
||||
force = 2.0
|
||||
var/stage = 0
|
||||
var/state = 0
|
||||
var/path = 0
|
||||
var/affected_area = 2
|
||||
|
||||
New()
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
prime()
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
|
||||
/*
|
||||
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
|
||||
if(prob(75))
|
||||
banana(T)
|
||||
*/
|
||||
var/i = 0
|
||||
var/number = 0
|
||||
for(var/direction in alldirs)
|
||||
for(i = 0; i < 2; i++)
|
||||
number++
|
||||
var/obj/item/weapon/bananapeel/traitorpeel/peel = new /obj/item/weapon/bananapeel/traitorpeel(get_turf(src.loc))
|
||||
/* var/direction = pick(alldirs)
|
||||
var/spaces = pick(1;150, 2)
|
||||
var/a = 0
|
||||
for(a = 0; a < spaces; a++)
|
||||
step(peel,direction)*/
|
||||
var/a = 1
|
||||
if(number & 2)
|
||||
for(a = 1; a <= 2; a++)
|
||||
step(peel,direction)
|
||||
else
|
||||
step(peel,direction)
|
||||
new /obj/item/weapon/bananapeel/traitorpeel(get_turf(src.loc))
|
||||
del(src)
|
||||
return
|
||||
/*
|
||||
proc/banana(turf/T as turf)
|
||||
if(!T || !istype(T))
|
||||
return
|
||||
if(locate(/obj/structure/grille) in T)
|
||||
return
|
||||
if(locate(/obj/structure/window) in T)
|
||||
return
|
||||
new /obj/item/weapon/bananapeel/traitorpeel(T)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/bananapeel/traitorpeel
|
||||
name = "banana peel"
|
||||
desc = "A peel from a banana."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banana_peel"
|
||||
item_state = "banana_peel"
|
||||
w_class = 1.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
HasEntered(AM as mob|obj)
|
||||
var/burned = rand(2,5)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
if(ishuman(M))
|
||||
if(isobj(M:shoes))
|
||||
if(M:shoes.flags&NOSLIP)
|
||||
return
|
||||
else
|
||||
M << "\red Your feet feel like they're on fire!"
|
||||
M.take_overall_damage(0, max(0, (burned - 2)))
|
||||
|
||||
if(!istype(M, /mob/living/carbon/slime) && !isrobot(M))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
spawn(1) step(M, M.dir)
|
||||
spawn(2) step(M, M.dir)
|
||||
spawn(3) step(M, M.dir)
|
||||
spawn(4) step(M, M.dir)
|
||||
M.take_organ_damage(2) // Was 5 -- TLE
|
||||
M << "\blue You slipped on \the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Weaken(10)
|
||||
M.take_overall_damage(0, burned)
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
var/burned = rand(1,3)
|
||||
if(istype(hit_atom ,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.take_organ_damage(0, burned)
|
||||
return ..()
|
||||
@@ -311,6 +311,60 @@ 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 1
|
||||
|
||||
/obj/item/weapon/implant/traitor
|
||||
name = "Greytide Implant"
|
||||
desc = "Greytide Station wide"
|
||||
icon_state = "implant_evil"
|
||||
|
||||
get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Greytide Mind-Slave Implant<BR>
|
||||
<b>Life:</b> ??? <BR>
|
||||
<b>Important Notes:</b> Any humanoid injected with this implant will become loyal to the injector and the greytide, unless of course the host is already loyal to someone else.<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
|
||||
<b>Special Features:</b> Glory to the Greytide!<BR>
|
||||
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
|
||||
return dat
|
||||
|
||||
implanted(mob/M, mob/user)
|
||||
var/list/implanters
|
||||
var/ref = "\ref[user.mind]"
|
||||
if(!ishuman(M)) return 0
|
||||
if(!M.mind) return 0
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(locate(/obj/item/weapon/implant/traitor) in H.contents || locate(/obj/item/weapon/implant/traitor) in H.contents)
|
||||
H.visible_message("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
|
||||
return 0
|
||||
else if(H.mind in ticker.mode.traitors)
|
||||
H.visible_message("[H] seems to resist the implant!", "You feel a familiar sensation in your head that quickly dissipates.")
|
||||
return 0
|
||||
H.implanting = 1
|
||||
H << "\blue You feel a surge of loyalty towards [user.name]."
|
||||
if(!(user.mind in ticker.mode:implanter))
|
||||
ticker.mode:implanter[ref] = list()
|
||||
implanters = ticker.mode:implanter[ref]
|
||||
implanters.Add(H.mind)
|
||||
ticker.mode.implanted.Add(H.mind)
|
||||
ticker.mode.implanted[H.mind] = user.mind
|
||||
//ticker.mode:implanter[user.mind] += H.mind
|
||||
ticker.mode:implanter[ref] = implanters
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
H << "<B>\red You've been shown the Greytide by [user.name]!</B> You now must lay down your life to protect them and assist in their goals at any cost."
|
||||
var/datum/objective/protect/p = new
|
||||
p.owner = H.mind
|
||||
p.target = user:mind
|
||||
p.explanation_text = "Protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]."
|
||||
H.mind.objectives += p
|
||||
for(var/datum/objective/objective in H.mind.objectives)
|
||||
H << "<B>Objective #1</B>: [objective.explanation_text]"
|
||||
ticker.mode.update_traitor_icons_added(H.mind)
|
||||
ticker.mode.update_traitor_icons_added(user.mind)
|
||||
log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].")
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenalin"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
msg_admin_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
user.show_message("\red You implanted the implant into [M].")
|
||||
if(src.imp.implanted(M))
|
||||
if(src.imp.implanted(M, user))
|
||||
src.imp.loc = M
|
||||
src.imp.imp_in = M
|
||||
src.imp.implanted = 1
|
||||
@@ -47,11 +47,20 @@
|
||||
affected.implants += src.imp
|
||||
imp.part = affected
|
||||
|
||||
M:implanting = 0
|
||||
src.imp = null
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/traitor
|
||||
name = "implanter-greytide"
|
||||
desc = "Greytide Stationwide."
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/traitor(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/loyalty
|
||||
name = "implanter-loyalty"
|
||||
|
||||
@@ -193,6 +193,13 @@
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/butch/meatcleaver
|
||||
name = "Meat Cleaver"
|
||||
icon_state = "mcleaver"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
|
||||
force = 25.0
|
||||
throwforce = 15.0
|
||||
|
||||
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
@@ -26,6 +26,21 @@
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/box/surveillance/
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "Dpacket"
|
||||
item_state = "Dpacket"
|
||||
w_class = 1
|
||||
foldable = null
|
||||
New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
for(var/i = 1 to 5)
|
||||
new /obj/item/device/camera_bug(src)
|
||||
|
||||
/obj/item/weapon/storage/box/survival/
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
new /obj/item/clothing/shoes/syndigaloshes(src)
|
||||
return
|
||||
|
||||
if ("stealth")
|
||||
if("stealth")
|
||||
new /obj/item/weapon/gun/energy/crossbow(src)
|
||||
new /obj/item/weapon/pen/paralysis(src)
|
||||
@@ -117,3 +116,42 @@
|
||||
new /obj/item/clothing/suit/space/syndicate(src)
|
||||
new /obj/item/clothing/head/helmet/space/syndicate(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/surveillance
|
||||
name = "box (S)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/surveillance/New()
|
||||
..()
|
||||
new /obj/item/device/handtv(src)
|
||||
new /obj/item/weapon/storage/box/surveillance(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/conversion
|
||||
name = "box (CK)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/conversion/New()
|
||||
..()
|
||||
new /obj/item/weapon/conversion_kit(src)
|
||||
new /obj/item/ammo_magazine/a357(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/greytide
|
||||
name = "box (GT)"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/implanter/O = new(src)
|
||||
O.imp = new /obj/item/weapon/implant/traitor(O)
|
||||
O.update()
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/boolets
|
||||
name = "Shotgun shells"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/fakebeanbag(src)
|
||||
@@ -9,6 +9,7 @@
|
||||
* Wirecutters
|
||||
* Welding Tool
|
||||
* Crowbar
|
||||
* Revolver Conversion Kit
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -460,3 +461,26 @@
|
||||
user << "Nothing to fix!"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/conversion_kit
|
||||
name = "\improper Revolver Conversion Kit"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "kit"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
w_class = 2.0
|
||||
origin_tech = "combat=2"
|
||||
var/open = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
icon_state = "[initial(icon_state)]_[open]"
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
open = !open
|
||||
user << "\blue You [open?"open" : "close"] the conversion kit."
|
||||
update_icon()
|
||||
Reference in New Issue
Block a user