mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into 6/25/2015_bay_sync
Conflicts: .travis.yml code/modules/clothing/spacesuits/rig/modules/combat.dm code/modules/clothing/spacesuits/rig/modules/utility.dm code/modules/mob/living/silicon/ai/ai.dm icons/mob/rig_back.dmi polaris.dme
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
// APC HULL
|
||||
|
||||
/obj/item/apc_frame
|
||||
/obj/item/frame/apc
|
||||
name = "\improper APC frame"
|
||||
desc = "Used for repairing or building APCs"
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "apc_frame"
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
|
||||
/obj/item/apc_frame/proc/try_build(turf/on_wall)
|
||||
/obj/item/frame/apc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
|
||||
@@ -1058,6 +1058,21 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
|
||||
new_message = 1
|
||||
|
||||
/obj/item/device/pda/verb/verb_reset_pda()
|
||||
set category = "Object"
|
||||
set name = "Reset PDA"
|
||||
set src in usr
|
||||
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
nanomanager.update_uis(src)
|
||||
usr << "<span class='notice'>You press the reset button on \the [src].</span>"
|
||||
else
|
||||
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
set name = "Remove id"
|
||||
@@ -1200,7 +1215,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
user.show_message("<span class='notice'>Analyzing Results for [C]:</span>")
|
||||
user.show_message("<span class='notice'> Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]</span>", 1)
|
||||
user.show_message(text("<span class='notice'> Damage Specifics: <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
|
||||
user.show_message(text("<span class='notice'> Damage Specifics:</span> <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
|
||||
(C.getOxyLoss() > 50) ? "warning" : "", C.getOxyLoss(),
|
||||
(C.getToxLoss() > 50) ? "warning" : "", C.getToxLoss(),
|
||||
(C.getFireLoss() > 50) ? "warning" : "", C.getFireLoss(),
|
||||
@@ -1216,7 +1231,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span>",
|
||||
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span></span>",
|
||||
capitalize(org.name), (org.brute_dam > 0) ? "warning" : "notice", org.brute_dam, (org.burn_dam > 0) ? "warning" : "notice", org.burn_dam),1)
|
||||
else
|
||||
user.show_message("<span class='notice'> Limbs are OK.</span>",1)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
/obj/item/device/aicard/proc/grab_ai(var/mob/living/silicon/ai/ai, var/mob/living/user)
|
||||
if(!ai.client)
|
||||
user << "<span class='danger'>ERROR:</span> [name] data core is offline. Unable to download."
|
||||
user << "<span class='danger'>ERROR:</span> AI [ai.name] is offline. Unable to download."
|
||||
return 0
|
||||
|
||||
if(carded_ai)
|
||||
@@ -112,7 +112,6 @@
|
||||
ai.cancel_camera()
|
||||
ai.control_disabled = 1
|
||||
ai.aiRestorePowerRoutine = 0
|
||||
ai.aiRadio.disabledAi = 1
|
||||
carded_ai = ai
|
||||
|
||||
if(ai.client)
|
||||
|
||||
@@ -48,38 +48,43 @@
|
||||
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") //don't have dexterity
|
||||
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
user << "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>"
|
||||
return
|
||||
if(istype(H))
|
||||
for(var/obj/item/clothing/C in list(H.head,H.wear_mask,H.glasses))
|
||||
if(istype(C) && C.flags & (HEADCOVERSEYES|MASKCOVERSEYES|GLASSESCOVERSEYES))
|
||||
user << "<span class='warning'>You're going to need to remove [C.name] first.</span>"
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
if(!M.blinded)
|
||||
flick("flash", M.flash)
|
||||
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
|
||||
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
|
||||
"<span class='notice'>You wave the light in front of your eyes.</span>")
|
||||
return
|
||||
var/obj/item/organ/vision
|
||||
if(H.species.vision_organ)
|
||||
vision = H.internal_organs_by_name[H.species.vision_organ]
|
||||
if(!vision)
|
||||
user << "<span class='warning'>You can't find any [H.species.vision_organ ? H.species.vision_organ : "eyes"] on [H]!</span>"
|
||||
|
||||
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
user.visible_message("<span class='notice'>\The [user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
if(H == user) //can't look into your own eyes buster
|
||||
if(M.stat == DEAD || M.blinded) //mob is dead or fully blind
|
||||
user << "<span class='warning'>\The [M]'s pupils do not react to the light!</span>"
|
||||
return
|
||||
if(XRAY in M.mutations)
|
||||
user << "<span class='notice'>\The [M] pupils give an eerie glow!</span>"
|
||||
if(vision.is_bruised())
|
||||
user << "<span class='warning'>There's visible damage to [M]'s [vision.name]!</span>"
|
||||
else if(M.eye_blurry)
|
||||
user << "<span class='notice'>\The [M]'s pupils react slower than normally.</span>"
|
||||
if(M.getBrainLoss() > 15)
|
||||
user << "<span class='notice'>There's visible lag between left and right pupils' reactions.</span>"
|
||||
|
||||
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
|
||||
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
flick("flash", M.flash) //Yes, you can still get flashed wit X-Ray.
|
||||
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(!M.blinded)
|
||||
flick("flash", M.flash) //flash the affected mob
|
||||
user << "<span class='notice'>[M]'s pupils narrow.</span>"
|
||||
var/list/pinpoint = list("oxycodone"=1,"tramadol"=5)
|
||||
var/list/dilating = list("space_drugs"=5,"mindbreaker"=1)
|
||||
if(M.reagents.has_any_reagent(pinpoint) || H.ingested.has_any_reagent(pinpoint))
|
||||
user << "<span class='notice'>\The [M]'s pupils are already pinpoint and cannot narrow any more.</span>"
|
||||
else if(M.reagents.has_any_reagent(dilating) || H.ingested.has_any_reagent(dilating))
|
||||
user << "<span class='notice'>\The [M]'s pupils narrow slightly, but are still very dilated.</span>"
|
||||
else
|
||||
user << "<span class='notice'>\The [M]'s pupils narrow.</span>"
|
||||
flick("flash", M.flash)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -89,6 +94,7 @@
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_EARS
|
||||
brightness_on = 2
|
||||
w_class = 1
|
||||
|
||||
|
||||
@@ -67,14 +67,10 @@
|
||||
user << "It has [uses] lights remaining."
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
|
||||
Emag()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
user << "<span class='warning'>[src.name] is full."
|
||||
user << "<span class='warning'>[src.name] is full.</span>"
|
||||
return
|
||||
else if(G.use(1))
|
||||
AddUses(5)
|
||||
@@ -173,14 +169,11 @@
|
||||
U << "There is a working [target.fitting] already inserted."
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "Shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
//Can you use it?
|
||||
|
||||
|
||||
@@ -46,10 +46,9 @@
|
||||
spamcheck = 0
|
||||
return
|
||||
|
||||
/obj/item/device/megaphone/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
/obj/item/device/megaphone/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
|
||||
emagged = 1
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
return
|
||||
return
|
||||
return 1
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
/obj/item/device/encryptionkey/
|
||||
name = "standard encrpytion key"
|
||||
name = "standard encryption key"
|
||||
desc = "An encryption key for a radio headset. Contains cypherkeys."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "cypherkey"
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
var/translate_binary = 0
|
||||
var/translate_hive = 0
|
||||
var/syndie = 0
|
||||
|
||||
@@ -173,14 +173,14 @@ REAGENT SCANNER
|
||||
if (ID in virusDB)
|
||||
var/datum/data/record/V = virusDB[ID]
|
||||
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
|
||||
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood."))
|
||||
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
|
||||
if (M.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message(text("<span class='danger'>Warning: [D.form] Detected</span><span class='warning'>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>"))
|
||||
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
|
||||
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.")
|
||||
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>")
|
||||
if (M.has_brain_worms())
|
||||
user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
|
||||
else if (M.getBrainLoss() >= 100 || !M.has_brain())
|
||||
@@ -221,7 +221,7 @@ REAGENT SCANNER
|
||||
if(blood_volume <= 500 && blood_volume > 336)
|
||||
user.show_message("<span class='danger'>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl.</span> <span class='notice'>Type: [blood_type]</span>")
|
||||
else if(blood_volume <= 336)
|
||||
user.show_message("<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl.</i></span> <span class='notice'>Type: [blood_type]")
|
||||
user.show_message("<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl.</i></span> <span class='notice'>Type: [blood_type]</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 1.0
|
||||
slot_flags = SLOT_EARS
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
|
||||
@@ -48,16 +48,15 @@
|
||||
timestamp += timerecorded
|
||||
storedinfo += "*\[[time2text(timerecorded*10,"mm:ss")]\] *[strip_html_properly(recordedtext)]*" //"*" at front as a marker
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(emagged == 0)
|
||||
emagged = 1
|
||||
recording = 0
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
else
|
||||
user << "<span class='warning'>It is already emagged!</span>"
|
||||
/obj/item/device/taperecorder/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(emagged == 0)
|
||||
emagged = 1
|
||||
recording = 0
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
return 1
|
||||
else
|
||||
user << "<span class='warning'>It is already emagged!</span>"
|
||||
|
||||
/obj/item/device/taperecorder/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
|
||||
+50
-172
@@ -6,159 +6,26 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
*/
|
||||
|
||||
/datum/uplink_item/
|
||||
var/name = ""
|
||||
var/cost = 0
|
||||
var/path = null
|
||||
var/reference = ""
|
||||
var/description = ""
|
||||
|
||||
datum/uplink_item/New(var/itemPath, var/itemCost, var/itemName, var/itemReference, var/itemDescription)
|
||||
cost = itemCost
|
||||
path = itemPath
|
||||
name = itemName
|
||||
reference = itemReference
|
||||
description = itemDescription
|
||||
|
||||
datum/uplink_item/proc/description()
|
||||
if(!description)
|
||||
// Fallback description
|
||||
var/obj/temp = src.path
|
||||
description = replacetext(initial(temp.desc), "\n", "<br>")
|
||||
return description
|
||||
|
||||
/datum/uplink_item/proc/generate_item(var/newloc)
|
||||
var/list/L = list()
|
||||
if(ispath(path))
|
||||
L += new path(newloc)
|
||||
else if(islist(path))
|
||||
for(var/item_path in path)
|
||||
L += new item_path(newloc)
|
||||
return L
|
||||
|
||||
datum/nano_item_lists
|
||||
var/list/items_nano
|
||||
var/list/items_reference
|
||||
|
||||
/obj/item/device/uplink
|
||||
var/welcome // Welcoming menu message
|
||||
var/uses // Numbers of crystals
|
||||
var/list/ItemsCategory // List of categories with lists of items
|
||||
var/list/ItemsReference // List of references with an associated item
|
||||
var/list/nanoui_items // List of items for NanoUI use
|
||||
var/nanoui_menu = 0 // The current menu we are in
|
||||
var/list/nanoui_data = new // Additional data for NanoUI use
|
||||
|
||||
var/list/purchase_log = new
|
||||
var/uplink_owner = null//text-only
|
||||
var/welcome = "Illegal Uplink Console" // Welcoming menu message
|
||||
var/uses = DEFAULT_TELECRYSTAL_AMOUNT // Numbers of crystals
|
||||
var/list/purchase_log
|
||||
var/datum/mind/owner = null
|
||||
var/used_TC = 0
|
||||
|
||||
/obj/item/device/uplink/nano_host()
|
||||
return loc
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
/obj/item/device/uplink/New(var/location, var/datum/mind/owner)
|
||||
..()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
uses = ticker.mode.uplink_uses
|
||||
ItemsCategory = ticker.mode.uplink_items
|
||||
|
||||
src.owner = owner
|
||||
purchase_log = list()
|
||||
world_uplinks += src
|
||||
|
||||
/obj/item/device/uplink/Destroy()
|
||||
world_uplinks -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/uplink/proc/generate_items()
|
||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||
nanoui_items = IL.items_nano
|
||||
ItemsReference = IL.items_reference
|
||||
|
||||
// BS12 no longer use this menu but there are forks that do, hency why we keep it
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
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>"
|
||||
|
||||
var/category_items = 1
|
||||
for(var/category in ItemsCategory)
|
||||
if(category_items < 1)
|
||||
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>[category]</b><br>"
|
||||
category_items = 0
|
||||
|
||||
for(var/datum/uplink_item/I in ItemsCategory[category])
|
||||
if(I.cost > uses)
|
||||
continue
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[I.reference];cost=[I.cost]'>[I.name]</A> ([I.cost])<BR>"
|
||||
category_items++
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
|
||||
dat += "<HR>"
|
||||
return dat
|
||||
|
||||
/*
|
||||
Built the item lists for use with NanoUI
|
||||
*/
|
||||
/obj/item/device/uplink/proc/generate_item_lists()
|
||||
var/list/nano = new
|
||||
var/list/reference = new
|
||||
|
||||
for(var/category in ItemsCategory)
|
||||
nano[++nano.len] = list("Category" = category, "items" = list())
|
||||
for(var/datum/uplink_item/I in ItemsCategory[category])
|
||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
|
||||
reference[I.reference] = I
|
||||
|
||||
var/datum/nano_item_lists/result = new
|
||||
result.items_nano = nano
|
||||
result.items_reference = reference
|
||||
return result
|
||||
|
||||
//If 'random' was selected
|
||||
/obj/item/device/uplink/proc/chooseRandomItem()
|
||||
if(uses <= 0)
|
||||
return
|
||||
|
||||
var/list/random_items = new
|
||||
for(var/IR in ItemsReference)
|
||||
var/datum/uplink_item/UI = ItemsReference[IR]
|
||||
if(UI.cost <= uses)
|
||||
random_items += UI
|
||||
return pick(random_items)
|
||||
|
||||
/obj/item/device/uplink/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["buy_item"] == "random")
|
||||
var/datum/uplink_item/UI = chooseRandomItem()
|
||||
href_list["buy_item"] = UI.reference
|
||||
return buy(UI, "RN")
|
||||
else
|
||||
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
|
||||
return buy(UI, UI ? UI.reference : "")
|
||||
return 0
|
||||
|
||||
/obj/item/device/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
|
||||
if(UI && UI.cost <= uses)
|
||||
uses -= UI.cost
|
||||
used_TC += UI.cost
|
||||
feedback_add_details("traitor_uplink_items_bought", reference)
|
||||
|
||||
var/list/L = UI.generate_item(get_turf(usr))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/A = usr
|
||||
for(var/obj/I in L)
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
|
||||
purchase_log[UI] = purchase_log[UI] + 1
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// 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!
|
||||
|
||||
@@ -175,6 +42,11 @@ datum/nano_item_lists
|
||||
name = "hidden uplink"
|
||||
desc = "There is something wrong if you're examining this."
|
||||
var/active = 0
|
||||
var/nanoui_menu = 0 // The current menu we are in
|
||||
var/datum/uplink_category/category = 0 // The current category we are in
|
||||
var/exploit_id // Id of the current exploit record we are viewing
|
||||
var/list/nanoui_data // Data for NanoUI use
|
||||
|
||||
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
@@ -182,6 +54,8 @@ datum/nano_item_lists
|
||||
if(!istype(src.loc, /obj/item))
|
||||
qdel(src)
|
||||
..()
|
||||
nanoui_data = list()
|
||||
update_nano_data()
|
||||
|
||||
// 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()
|
||||
@@ -212,20 +86,13 @@ datum/nano_item_lists
|
||||
data["welcome"] = welcome
|
||||
data["crystals"] = uses
|
||||
data["menu"] = nanoui_menu
|
||||
if(!nanoui_items)
|
||||
generate_items()
|
||||
data["nano_items"] = nanoui_items
|
||||
data += nanoui_data
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
if (!ui) // No auto-refresh
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
|
||||
@@ -235,43 +102,54 @@ datum/nano_item_lists
|
||||
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
if (usr.stat || usr.restrained())
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 1
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(..(href, href_list))
|
||||
return 1
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
ui.close()
|
||||
return 1
|
||||
if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
update_nano_data()
|
||||
if(href_list["menu"])
|
||||
nanoui_menu = text2num(href_list["menu"])
|
||||
update_nano_data(href_list["id"])
|
||||
if(href_list["buy_item"])
|
||||
var/datum/uplink_item/UI = (locate(href_list["buy_item"]) in uplink.items)
|
||||
UI.buy(src, usr)
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
else if(href_list["menu"])
|
||||
nanoui_menu = text2num(href_list["menu"])
|
||||
if(href_list["id"])
|
||||
exploit_id = href_list["id"]
|
||||
if(href_list["category"])
|
||||
category = locate(href_list["category"]) in uplink.categories
|
||||
|
||||
interact(usr)
|
||||
update_nano_data()
|
||||
return 1
|
||||
|
||||
/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
|
||||
if(nanoui_menu == 1)
|
||||
/obj/item/device/uplink/hidden/proc/update_nano_data()
|
||||
if(nanoui_menu == 0)
|
||||
var/categories[0]
|
||||
for(var/datum/uplink_category/category in uplink.categories)
|
||||
if(category.can_view(src))
|
||||
categories[++categories.len] = list("name" = category.name, "ref" = "\ref[category]")
|
||||
nanoui_data["categories"] = categories
|
||||
else if(nanoui_menu == 1)
|
||||
var/items[0]
|
||||
for(var/datum/uplink_item/item in category.items)
|
||||
if(item.can_view(src))
|
||||
var/cost = item.cost(uses)
|
||||
if(!cost) cost = "???"
|
||||
items[++items.len] = list("name" = item.name, "description" = replacetext(item.description(), "\n", "<br>"), "can_buy" = item.can_buy(src), "cost" = cost, "ref" = "\ref[item]")
|
||||
nanoui_data["items"] = items
|
||||
else if(nanoui_menu == 2)
|
||||
var/permanentData[0]
|
||||
for(var/datum/data/record/L in sortRecord(data_core.locked))
|
||||
permanentData[++permanentData.len] = list(Name = L.fields["name"],"id" = L.fields["id"])
|
||||
nanoui_data["exploit_records"] = permanentData
|
||||
|
||||
if(nanoui_menu == 11)
|
||||
else if(nanoui_menu == 21)
|
||||
nanoui_data["exploit_exists"] = 0
|
||||
|
||||
for(var/datum/data/record/L in data_core.locked)
|
||||
if(L.fields["id"] == id)
|
||||
if(L.fields["id"] == exploit_id)
|
||||
nanoui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
|
||||
// We trade off being able to automatically add shit for more control over what gets passed to json
|
||||
// and if it's sanitized for html.
|
||||
@@ -0,0 +1,40 @@
|
||||
/datum/uplink_category
|
||||
var/name = ""
|
||||
var/list/datum/uplink_item/items
|
||||
|
||||
/datum/uplink_category/New()
|
||||
..()
|
||||
items = list()
|
||||
|
||||
/datum/uplink_category/proc/can_view(obj/item/device/uplink/U)
|
||||
for(var/datum/uplink_item/item in items)
|
||||
if(item.can_view(U))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/uplink_category/ammunition
|
||||
name = "Ammunition"
|
||||
|
||||
/datum/uplink_category/visible_weapons
|
||||
name = "Highly Visible and Dangerous Weapons"
|
||||
|
||||
/datum/uplink_category/stealthy_weapons
|
||||
name = "Stealthy and Inconspicuous Weapons"
|
||||
|
||||
/datum/uplink_category/stealth_items
|
||||
name = "Stealth and Camouflage Items"
|
||||
|
||||
/datum/uplink_category/tools
|
||||
name = "Devices and Tools"
|
||||
|
||||
/datum/uplink_category/implants
|
||||
name = "Implants"
|
||||
|
||||
/datum/uplink_category/medical
|
||||
name = "Medical"
|
||||
|
||||
/datum/uplink_category/hardsuit_modules
|
||||
name = "Hardsuit Modules"
|
||||
|
||||
/datum/uplink_category/badassery
|
||||
name = "Badassery"
|
||||
@@ -0,0 +1,527 @@
|
||||
var/datum/uplink/uplink = new()
|
||||
|
||||
/datum/uplink
|
||||
var/list/items_assoc
|
||||
var/list/datum/uplink_item/items
|
||||
var/list/datum/uplink_category/categories
|
||||
|
||||
/datum/uplink/New()
|
||||
items_assoc = list()
|
||||
items = init_subtypes(/datum/uplink_item)
|
||||
categories = init_subtypes(/datum/uplink_category)
|
||||
|
||||
for(var/datum/uplink_item/item in items)
|
||||
if(!item.name)
|
||||
items -= item
|
||||
continue
|
||||
|
||||
items_assoc[item.type] = item
|
||||
|
||||
for(var/datum/uplink_category/category in categories)
|
||||
if(item.category == category.type)
|
||||
category.items += item
|
||||
|
||||
for(var/datum/uplink_category/category in categories)
|
||||
category.items = dd_sortedObjectList(category.items)
|
||||
|
||||
/datum/uplink_item
|
||||
var/name
|
||||
var/desc
|
||||
var/item_cost = 0
|
||||
var/datum/uplink_category/category // Item category
|
||||
var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all.
|
||||
|
||||
/datum/uplink_item/item
|
||||
var/path = null
|
||||
|
||||
/datum/uplink_item/New()
|
||||
..()
|
||||
antag_roles = list()
|
||||
|
||||
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
purchase_log(U)
|
||||
var/cost = cost(U.uses)
|
||||
var/goods = get_goods(U, get_turf(user))
|
||||
|
||||
U.uses -= cost
|
||||
U.used_TC += cost
|
||||
return goods
|
||||
|
||||
/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U)
|
||||
if(cost(U.uses) > U.uses)
|
||||
return 0
|
||||
|
||||
return can_view(U)
|
||||
|
||||
/datum/uplink_item/proc/can_view(obj/item/device/uplink/U)
|
||||
// Making the assumption that if no uplink was supplied, then we don't care about antag roles
|
||||
if(!U || !antag_roles.len)
|
||||
return 1
|
||||
|
||||
// With no owner, there's no need to check antag status.
|
||||
if(!U.owner)
|
||||
return 0
|
||||
|
||||
for(var/antag_role in antag_roles)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_role]
|
||||
if(antag.is_antagonist(U.owner))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/uplink_item/proc/cost(var/telecrystals)
|
||||
return item_cost
|
||||
|
||||
/datum/uplink_item/proc/description()
|
||||
return desc
|
||||
|
||||
// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying
|
||||
/datum/uplink_item/proc/get_goods(var/obj/item/device/uplink/U, var/loc)
|
||||
return 0
|
||||
|
||||
/datum/uplink_item/proc/log_icon()
|
||||
return
|
||||
|
||||
/datum/uplink_item/proc/purchase_log(obj/item/device/uplink/U)
|
||||
feedback_add_details("traitor_uplink_items_bought", "[src]")
|
||||
U.purchase_log[src] = U.purchase_log[src] + 1
|
||||
|
||||
datum/uplink_item/dd_SortValue()
|
||||
return cost(INFINITY)
|
||||
|
||||
/********************************
|
||||
* *
|
||||
* Physical Uplink Entires *
|
||||
* *
|
||||
********************************/
|
||||
/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
var/obj/item/I = ..()
|
||||
if(istype(I, /list))
|
||||
var/list/L = I
|
||||
if(L.len) I = L[1]
|
||||
|
||||
if(istype(I) && ishuman(user))
|
||||
var/mob/living/carbon/human/A = user
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
return I
|
||||
|
||||
/datum/uplink_item/item/get_goods(var/obj/item/device/uplink/U, var/loc)
|
||||
var/obj/item/I = new path(loc)
|
||||
return I
|
||||
|
||||
/datum/uplink_item/item/description()
|
||||
if(!desc)
|
||||
// Fallback description
|
||||
var/obj/temp = src.path
|
||||
desc = initial(temp.desc)
|
||||
return ..()
|
||||
|
||||
/datum/uplink_item/item/log_icon()
|
||||
var/obj/I = path
|
||||
return "\icon[I]"
|
||||
|
||||
/*************
|
||||
* Ammunition *
|
||||
*************/
|
||||
/datum/uplink_item/item/ammo
|
||||
item_cost = 2
|
||||
category = /datum/uplink_category/ammunition
|
||||
|
||||
/datum/uplink_item/item/ammo/a357
|
||||
name = ".357"
|
||||
path = /obj/item/ammo_magazine/a357
|
||||
|
||||
/datum/uplink_item/item/ammo/mc9mm
|
||||
name = ".9mm"
|
||||
path = /obj/item/ammo_magazine/mc9mm
|
||||
|
||||
/datum/uplink_item/item/ammo/darts
|
||||
name = "Darts"
|
||||
path = /obj/item/ammo_magazine/chemdart
|
||||
|
||||
/datum/uplink_item/item/ammo/sniperammo
|
||||
name = "14.5mm"
|
||||
path = /obj/item/weapon/storage/box/sniperammo
|
||||
|
||||
/***************************************
|
||||
* Highly Visible and Dangerous Weapons *
|
||||
***************************************/
|
||||
/datum/uplink_item/item/visible_weapons
|
||||
category = /datum/uplink_category/visible_weapons
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/emp
|
||||
name = "5xEMP Grenades"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/emps
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/energy_sword
|
||||
name = "Energy Sword"
|
||||
item_cost = 4
|
||||
path = /obj/item/weapon/melee/energy/sword
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/dartgun
|
||||
name = "Dart Gun"
|
||||
item_cost = 5
|
||||
path = /obj/item/weapon/gun/projectile/dartgun
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/crossbow
|
||||
name = "Energy Crossbow"
|
||||
item_cost = 5
|
||||
path = /obj/item/weapon/gun/energy/crossbow
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/g9mm
|
||||
name = "Silenced 9mm"
|
||||
item_cost = 5
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/g9mm
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/riggedlaser
|
||||
name = "Exosuit Rigged Laser"
|
||||
item_cost = 6
|
||||
path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/revolver
|
||||
name = "Revolver"
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/gun/projectile/revolver
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/heavysniper
|
||||
name = "Anti-materiel Rifle"
|
||||
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
|
||||
path = /obj/item/weapon/gun/projectile/heavysniper
|
||||
|
||||
/*************************************
|
||||
* Stealthy and Inconspicuous Weapons *
|
||||
*************************************/
|
||||
/datum/uplink_item/item/stealthy_weapons
|
||||
category = /datum/uplink_category/stealthy_weapons
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/soap
|
||||
name = "Subversive Soap"
|
||||
item_cost = 1
|
||||
path = /obj/item/weapon/soap/syndie
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/concealed_cane
|
||||
name = "Concealed Cane Sword"
|
||||
item_cost = 1
|
||||
path = /obj/item/weapon/cane/concealed
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/detomatix
|
||||
name = "Detomatix PDA Cartridge"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/cartridge/syndicate
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/parapen
|
||||
name = "Paralysis Pen"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/pen/reagent/paralysis
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/cigarette_kit
|
||||
name = "Cigarette Kit"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/cigarette
|
||||
|
||||
/datum/uplink_item/item/stealthy_weapons/random_toxin
|
||||
name = "Random Toxin - Beaker"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/toxin
|
||||
|
||||
/*******************************
|
||||
* Stealth and Camouflage Items *
|
||||
*******************************/
|
||||
/datum/uplink_item/item/stealth_items
|
||||
category = /datum/uplink_category/stealth_items
|
||||
|
||||
/datum/uplink_item/item/stealth_items/id
|
||||
name = "Agent ID card"
|
||||
item_cost = 2
|
||||
path = /obj/item/weapon/card/id/syndicate
|
||||
|
||||
/datum/uplink_item/item/stealth_items/syndigaloshes
|
||||
name = "No-Slip Shoes"
|
||||
item_cost = 2
|
||||
path = /obj/item/clothing/shoes/syndigaloshes
|
||||
|
||||
/datum/uplink_item/item/stealth_items/spy
|
||||
name = "Bug Kit"
|
||||
item_cost = 2
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/spy
|
||||
|
||||
/datum/uplink_item/item/stealth_items/chameleon_kit
|
||||
name = "Chameleon Kit"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/chameleon
|
||||
|
||||
/datum/uplink_item/item/stealth_items/chameleon_projector
|
||||
name = "Chameleon-Projector"
|
||||
item_cost = 4
|
||||
path = /obj/item/device/chameleon
|
||||
|
||||
/datum/uplink_item/item/stealth_items/chameleon_projector
|
||||
name = "Chameleon-Projector"
|
||||
item_cost = 4
|
||||
path = /obj/item/device/chameleon
|
||||
|
||||
/datum/uplink_item/item/stealth_items/voice
|
||||
name = "Voice Changer"
|
||||
item_cost = 4
|
||||
path = /obj/item/clothing/mask/gas/voice
|
||||
|
||||
/datum/uplink_item/item/stealth_items/camera_floppy
|
||||
name = "Camera Network Access - Floppy"
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/disk/file/cameras/syndicate
|
||||
|
||||
/********************
|
||||
* Devices and Tools *
|
||||
********************/
|
||||
/datum/uplink_item/item/tools
|
||||
category = /datum/uplink_category/tools
|
||||
|
||||
/datum/uplink_item/item/tools/toolbox
|
||||
name = "Fully Loaded Toolbox"
|
||||
item_cost = 1
|
||||
path = /obj/item/weapon/storage/toolbox/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/plastique
|
||||
name = "C-4 (Destroys walls)"
|
||||
item_cost = 2
|
||||
path = /obj/item/weapon/plastique
|
||||
|
||||
/datum/uplink_item/item/tools/encryptionkey_radio
|
||||
name = "Encrypted Radio Channel Key"
|
||||
item_cost = 2
|
||||
path = /obj/item/device/encryptionkey/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/encryptionkey_binary
|
||||
name = "Binary Translator Key"
|
||||
item_cost = 3
|
||||
path = /obj/item/device/encryptionkey/binary
|
||||
|
||||
/datum/uplink_item/item/tools/emag
|
||||
name = "Cryptographic Sequencer"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/card/emag
|
||||
|
||||
/datum/uplink_item/item/tools/clerical
|
||||
name = "Morphic Clerical Kit"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/clerical
|
||||
|
||||
/datum/uplink_item/item/tools/space_suit
|
||||
name = "Space Suit"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/space
|
||||
|
||||
/datum/uplink_item/item/tools/thermal
|
||||
name = "Thermal Imaging Glasses"
|
||||
item_cost = 3
|
||||
path = /obj/item/clothing/glasses/thermal/syndi
|
||||
|
||||
/datum/uplink_item/item/tools/heavy_vest
|
||||
name = "Heavy Armor Vest"
|
||||
item_cost = 4
|
||||
path = /obj/item/clothing/suit/storage/vest/heavy/merc
|
||||
|
||||
/datum/uplink_item/item/tools/powersink
|
||||
name = "Powersink (DANGER!)"
|
||||
item_cost = 5
|
||||
path = /obj/item/device/powersink
|
||||
|
||||
/datum/uplink_item/item/tools/ai_module
|
||||
name = "Hacked AI Upload Module"
|
||||
item_cost = 7
|
||||
path = /obj/item/weapon/aiModule/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/singularity_beacon
|
||||
name = "Singularity Beacon (DANGER!)"
|
||||
item_cost = 7
|
||||
path = /obj/item/device/radio/beacon/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/teleporter
|
||||
name = "Teleporter Circuit Board"
|
||||
item_cost = 20
|
||||
path = /obj/item/weapon/circuitboard/teleporter
|
||||
|
||||
/datum/uplink_item/item/tools/teleporter/New()
|
||||
..()
|
||||
antag_roles = list(MODE_MERCENARY)
|
||||
|
||||
/***********
|
||||
* Implants *
|
||||
***********/
|
||||
/datum/uplink_item/item/implants
|
||||
category = /datum/uplink_category/implants
|
||||
|
||||
/datum/uplink_item/item/implants/imp_freedom
|
||||
name = "Freedom Implant"
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom
|
||||
|
||||
/datum/uplink_item/item/implants/imp_compress
|
||||
name = "Compressed Matter Implant"
|
||||
item_cost = 4
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/imp_compress
|
||||
|
||||
/datum/uplink_item/item/implants/imp_explosive
|
||||
name = "Explosive Implant (DANGER!)"
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive
|
||||
|
||||
/datum/uplink_item/item/implants/imp_uplink
|
||||
name = "Uplink Implant (Contains 5 Telecrystals)"
|
||||
item_cost = 10
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/imp_uplink
|
||||
|
||||
/**********
|
||||
* Medical *
|
||||
**********/
|
||||
/datum/uplink_item/item/medical
|
||||
category = /datum/uplink_category/medical
|
||||
|
||||
/datum/uplink_item/item/medical/sinpockets
|
||||
name = "Box of Sin-Pockets"
|
||||
item_cost = 1
|
||||
path = /obj/item/weapon/storage/box/sinpockets
|
||||
|
||||
/datum/uplink_item/item/medical/surgery
|
||||
name = "Surgery kit"
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/storage/firstaid/surgery
|
||||
|
||||
/datum/uplink_item/item/medical/combat
|
||||
name = "Combat medical kit"
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/storage/firstaid/combat
|
||||
|
||||
/*******************
|
||||
* Hardsuit Modules *
|
||||
*******************/
|
||||
/datum/uplink_item/item/hardsuit_modules
|
||||
category = /datum/uplink_category/hardsuit_modules
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/thermal
|
||||
name = "Thermal Scanner"
|
||||
item_cost = 2
|
||||
path = /obj/item/rig_module/vision/thermal
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/energy_net
|
||||
name = "Net Projector"
|
||||
item_cost = 3
|
||||
path = /obj/item/rig_module/fabricator/energy_net
|
||||
|
||||
/datum/uplink_item/item/ewar_voice
|
||||
name = "Electrowarfare Suite and Voice Synthesiser"
|
||||
item_cost = 4
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/ewar_voice
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/maneuvering_jets
|
||||
name = "Maneuvering Jets"
|
||||
item_cost = 4
|
||||
path = /obj/item/rig_module/maneuvering_jets
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/egun
|
||||
name = "Mounted Energy Gun"
|
||||
item_cost = 6
|
||||
path = /obj/item/rig_module/mounted/egun
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/power_sink
|
||||
name = "Power Sink"
|
||||
item_cost = 6
|
||||
path = /obj/item/rig_module/power_sink
|
||||
|
||||
/datum/uplink_item/item/hardsuit_modules/laser_canon
|
||||
name = "Mounted Laser Cannon"
|
||||
item_cost = 8
|
||||
path = /obj/item/rig_module/mounted
|
||||
|
||||
/************
|
||||
* Badassery *
|
||||
************/
|
||||
/datum/uplink_item/item/badassery
|
||||
category = /datum/uplink_category/badassery
|
||||
|
||||
/datum/uplink_item/item/badassery/balloon
|
||||
name = "For showing that You Are The BOSS (Useless Balloon)"
|
||||
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
|
||||
path = /obj/item/toy/syndicateballoon
|
||||
|
||||
/datum/uplink_item/item/badassery/balloon/NT
|
||||
name = "For showing that you love NT SOO much (Useless Balloon)"
|
||||
path = /obj/item/toy/nanotrasenballoon
|
||||
|
||||
/**************
|
||||
* Random Item *
|
||||
**************/
|
||||
/datum/uplink_item/item/badassery/random_one
|
||||
name = "Random Item"
|
||||
desc = "Buys you one random item."
|
||||
|
||||
/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
var/datum/uplink_item/item = default_uplink_selection.get_random_item(U.uses)
|
||||
return item.buy(U, user)
|
||||
|
||||
/datum/uplink_item/item/badassery/random_one/can_buy(obj/item/device/uplink/U)
|
||||
return default_uplink_selection.get_random_item(U.uses, U) != null
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many
|
||||
name = "Random Items"
|
||||
desc = "Buys you as many random items you can afford. Convenient packaging NOT included."
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/cost(var/telecrystals)
|
||||
return max(1, telecrystals)
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc)
|
||||
var/list/bought_items = list()
|
||||
for(var/datum/uplink_item/UI in get_random_uplink_items(U, U.uses, loc))
|
||||
UI.purchase_log(U)
|
||||
var/obj/item/I = UI.get_goods(U, loc)
|
||||
if(istype(I))
|
||||
bought_items += I
|
||||
|
||||
return bought_items
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U)
|
||||
feedback_add_details("traitor_uplink_items_bought", "[src]")
|
||||
|
||||
/****************
|
||||
* Surplus Crate *
|
||||
****************/
|
||||
/datum/uplink_item/item/badassery/surplus
|
||||
name = "Surplus Crate"
|
||||
item_cost = 40
|
||||
var/item_worth = 60
|
||||
var/icon
|
||||
|
||||
/datum/uplink_item/item/badassery/surplus/New()
|
||||
..()
|
||||
antag_roles = list(MODE_MERCENARY)
|
||||
desc = "A crate containing [item_worth] telecrystal\s worth of surplus leftovers."
|
||||
|
||||
/datum/uplink_item/item/badassery/surplus/get_goods(var/obj/item/device/uplink/U, var/loc)
|
||||
var/obj/structure/largecrate/C = new(loc)
|
||||
var/random_items = get_random_uplink_items(null, item_worth, C)
|
||||
for(var/datum/uplink_item/I in random_items)
|
||||
I.purchase_log(U)
|
||||
I.get_goods(U, C)
|
||||
|
||||
return C
|
||||
|
||||
/datum/uplink_item/item/badassery/surplus/log_icon()
|
||||
if(!icon)
|
||||
var/obj/structure/largecrate/C = /obj/structure/largecrate
|
||||
icon = image(initial(C.icon), initial(C.icon_state))
|
||||
|
||||
return "\icon[icon]"
|
||||
|
||||
/****************
|
||||
* Support procs *
|
||||
****************/
|
||||
/proc/get_random_uplink_items(var/obj/item/device/uplink/U, var/remaining_TC, var/loc)
|
||||
var/list/bought_items = list()
|
||||
while(remaining_TC)
|
||||
var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items)
|
||||
if(!I)
|
||||
break
|
||||
bought_items += I
|
||||
remaining_TC -= I.cost(remaining_TC)
|
||||
|
||||
return bought_items
|
||||
@@ -0,0 +1,102 @@
|
||||
var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_random_selection/default()
|
||||
|
||||
/datum/uplink_random_item
|
||||
var/uplink_item // The uplink item
|
||||
var/keep_probability // The probability we'll decide to keep this item if selected
|
||||
var/reselect_probability // Probability that we'll decide to keep this item if previously selected.
|
||||
// Is done together with the keep_probability check. Being selected more than once does not affect this probability.
|
||||
|
||||
/datum/uplink_random_item/New(var/uplink_item, var/keep_probability = 100, var/reselect_propbability = 33)
|
||||
..()
|
||||
src.uplink_item = uplink_item
|
||||
src.keep_probability = keep_probability
|
||||
src.reselect_probability = reselect_probability
|
||||
|
||||
/datum/uplink_random_selection
|
||||
var/list/datum/uplink_random_item/items
|
||||
|
||||
/datum/uplink_random_selection/New()
|
||||
..()
|
||||
items = list()
|
||||
|
||||
/datum/uplink_random_selection/proc/get_random_item(var/telecrystals, obj/item/device/uplink/U, var/list/bought_items)
|
||||
var/const/attempts = 50
|
||||
|
||||
for(var/i = 0; i < attempts; i++)
|
||||
var/datum/uplink_random_item/RI = pick(items)
|
||||
if(!prob(RI.keep_probability))
|
||||
continue
|
||||
var/datum/uplink_item/I = uplink.items_assoc[RI.uplink_item]
|
||||
if(I.cost(telecrystals) > telecrystals)
|
||||
continue
|
||||
if(bought_items && (I in bought_items) && !prob(RI.reselect_probability))
|
||||
continue
|
||||
if(U && !I.can_buy(U))
|
||||
continue
|
||||
return I
|
||||
|
||||
/datum/uplink_random_selection/default/New()
|
||||
..()
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/g9mm)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/mc9mm)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/revolver)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysniper, 15, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/sniperammo, 15, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/emp, 50)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/crossbow, 33)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/energy_sword, 75)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/soap, 5, 100)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/concealed_cane, 50, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/detomatix, 20, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/parapen)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealthy_weapons/cigarette_kit)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/id)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/spy)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/chameleon_kit)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/chameleon_projector)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/voice)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/camera_floppy, 10, 0)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/toolbox, reselect_propbability = 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/plastique)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/encryptionkey_radio)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/encryptionkey_binary)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/emag, 100, 50)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/clerical)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/space_suit, 50, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/thermal)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/heavy_vest)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/powersink, 10, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/ai_module, 25, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/teleporter, 10, 0)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_freedom)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_compress)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/implants/imp_explosive)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/sinpockets, reselect_propbability = 20)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/surgery, reselect_propbability = 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/medical/combat, reselect_propbability = 10)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/thermal, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/energy_net, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/ewar_voice, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/maneuvering_jets, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/egun, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/power_sink, reselect_propbability = 15)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/laser_canon, reselect_propbability = 5)
|
||||
|
||||
#ifdef DEBUG
|
||||
/proc/debug_uplink_purchage_log()
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/A = all_antag_types[antag_type]
|
||||
A.print_player_summary()
|
||||
|
||||
/proc/debug_uplink_item_assoc_list()
|
||||
for(var/key in uplink.items_assoc)
|
||||
world << "[key] - [uplink.items_assoc[key]]"
|
||||
#endif
|
||||
@@ -47,12 +47,10 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
|
||||
spawn(20)
|
||||
spamcheck = 0
|
||||
|
||||
/obj/item/device/hailer/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag))
|
||||
if(isnull(insults))
|
||||
user << "<span class='danger'>You overload \the [src]'s voice synthesizer.</span>"
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
else
|
||||
user << "The hailer is fried. You can't even fit the sequencer into the input slot."
|
||||
/obj/item/device/hailer/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(isnull(insults))
|
||||
user << "<span class='danger'>You overload \the [src]'s voice synthesizer.</span>"
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
return 1
|
||||
else
|
||||
return .. ()
|
||||
user << "The hailer is fried. You can't even fit the sequencer into the input slot."
|
||||
|
||||
@@ -326,12 +326,10 @@
|
||||
user << "<span class='notice'>You insert the flash into the eye socket!</span>"
|
||||
|
||||
|
||||
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/card/emag))
|
||||
if(sabotaged)
|
||||
user << "<span class='warning'>[src] is already sabotaged!</span>"
|
||||
else
|
||||
user << "<span class='warning'>You slide [W] into the dataport on [src] and short out the safeties.</span>"
|
||||
sabotaged = 1
|
||||
return
|
||||
..()
|
||||
/obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(sabotaged)
|
||||
user << "<span class='warning'>[src] is already sabotaged!</span>"
|
||||
else
|
||||
user << "<span class='warning'>You short out the safeties.</span>"
|
||||
sabotaged = 1
|
||||
return 1
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
else if(O.reagents.total_volume >= 1)
|
||||
if(O.reagents.has_reagent("pacid", 1))
|
||||
user << "The acid chews through the balloon!"
|
||||
O.reagents.splash_mob(user, reagents.total_volume)
|
||||
O.reagents.splash(user, reagents.total_volume)
|
||||
qdel(src)
|
||||
else
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
@@ -314,6 +314,7 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "foamdart"
|
||||
w_class = 1.0
|
||||
slot_flags = SLOT_EARS
|
||||
|
||||
/obj/effect/foam_dart_dummy
|
||||
name = ""
|
||||
@@ -398,7 +399,7 @@
|
||||
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 << "<span class='warning'>You step on the snap pop!"
|
||||
M << "<span class='warning'>You step on the snap pop!</span>"
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 0, src)
|
||||
@@ -486,6 +487,8 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "bosunwhistle"
|
||||
var/cooldown = 0
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
|
||||
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 35)
|
||||
|
||||
@@ -69,59 +69,24 @@
|
||||
item_state = "card-id"
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
|
||||
var/uses = 10
|
||||
// List of devices that cost a use to emag.
|
||||
var/list/devices = list(
|
||||
/obj/item/robot_parts,
|
||||
/obj/item/weapon/storage/lockbox,
|
||||
/obj/item/weapon/storage/secure,
|
||||
/obj/item/weapon/circuitboard,
|
||||
/obj/item/weapon/rig,
|
||||
/obj/item/device/eftpos,
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
/obj/item/device/megaphone,
|
||||
/obj/item/clothing/accessory/badge/holo,
|
||||
/obj/structure/closet/crate/secure,
|
||||
/obj/structure/closet/secure_closet,
|
||||
/obj/machinery/librarycomp,
|
||||
/obj/machinery/computer,
|
||||
/obj/machinery/power,
|
||||
/obj/machinery/suspension_gen,
|
||||
/obj/machinery/shield_capacitor,
|
||||
/obj/machinery/shield_gen,
|
||||
/obj/machinery/clonepod,
|
||||
/obj/machinery/deployable,
|
||||
/obj/machinery/button/remote,
|
||||
/obj/machinery/porta_turret,
|
||||
/obj/machinery/shieldgen,
|
||||
/obj/machinery/turretid,
|
||||
/obj/machinery/vending,
|
||||
/mob/living/bot,
|
||||
/obj/machinery/door,
|
||||
/obj/machinery/telecomms,
|
||||
/obj/machinery/mecha_part_fabricator,
|
||||
/obj/machinery/gibber,
|
||||
/obj/vehicle
|
||||
)
|
||||
|
||||
/obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user)
|
||||
var/used_uses = A.emag_act(uses, user)
|
||||
if(used_uses < 0)
|
||||
return ..(A, user)
|
||||
|
||||
/obj/item/weapon/card/emag/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
|
||||
|
||||
for(var/type in devices)
|
||||
if(istype(O,type))
|
||||
uses--
|
||||
break
|
||||
uses -= used_uses
|
||||
A.add_fingerprint(user)
|
||||
log_and_message_admins("emagged \an [A].")
|
||||
|
||||
if(uses<1)
|
||||
user.visible_message("[src] fizzles and sparks - it seems it's been used once too often, and is now broken.")
|
||||
user.visible_message("<span class='warning'>\The [src] fizzles and sparks - it seems it's been used once too often, and is now spent.</span>")
|
||||
user.drop_item()
|
||||
var/obj/item/weapon/card/emag_broken/junk = new(user.loc)
|
||||
junk.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
..()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
|
||||
@@ -39,6 +39,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/smoketime = 5
|
||||
w_class = 1.0
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
slot_flags = SLOT_EARS
|
||||
attack_verb = list("burnt", "singed")
|
||||
|
||||
/obj/item/weapon/flame/match/process()
|
||||
@@ -55,8 +56,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
|
||||
/obj/item/weapon/flame/match/dropped(mob/user as mob)
|
||||
//If dropped, put ourselves out
|
||||
//not before lighting up the turf we land on, though.
|
||||
if(lit)
|
||||
burn_out()
|
||||
spawn(0)
|
||||
var/turf/location = src.loc
|
||||
if(istype(location))
|
||||
location.hotspot_expose(700, 5)
|
||||
burn_out()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/flame/match/proc/burn_out()
|
||||
@@ -199,6 +206,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
throw_speed = 0.5
|
||||
item_state = "cigoff"
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
attack_verb = list("burnt", "singed")
|
||||
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
icon_off = "cigoff"
|
||||
@@ -283,6 +291,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon = 'icons/obj/clothing/masks.dmi'
|
||||
icon_state = "cigbutt"
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/cigbutt/New()
|
||||
@@ -457,9 +466,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "[base_state]"
|
||||
item_state = "[base_state]"
|
||||
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
|
||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
|
||||
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
|
||||
|
||||
set_light(0)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -36,16 +36,18 @@
|
||||
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
|
||||
if (..(C))
|
||||
network = C.network
|
||||
|
||||
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(emagged)
|
||||
user << "Circuit lock is already removed."
|
||||
return
|
||||
user << "<span class='notice'>You override the circuit lock and open controls.</span>"
|
||||
emagged = 1
|
||||
locked = 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/circuitboard/security/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(emagged)
|
||||
user << "Circuit lock is already removed."
|
||||
return
|
||||
user << "<span class='notice'>You override the circuit lock and open controls.</span>"
|
||||
emagged = 1
|
||||
locked = 0
|
||||
else if(istype(I,/obj/item/weapon/card/id))
|
||||
if(istype(I,/obj/item/weapon/card/id))
|
||||
if(emagged)
|
||||
user << "<span class='warning'>Circuit lock does not respond.</span>"
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = 1.0
|
||||
slot_flags = SLOT_EARS
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
@@ -71,6 +72,7 @@
|
||||
name = "purple comb"
|
||||
desc = "A pristine purple comb made from flexible plastic."
|
||||
w_class = 1.0
|
||||
slot_flags = SLOT_EARS
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "purplecomb"
|
||||
item_state = "purplecomb"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
slot_flags = SLOT_EARS
|
||||
var/uses = 1
|
||||
var/nofail
|
||||
var/is_bullet = 0
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
|
||||
var/spray_particles = 6
|
||||
var/spray_amount = 2 //units of liquid per particle
|
||||
var/max_water = 120
|
||||
var/spray_amount = 8 //units of liquid per particle
|
||||
var/max_water = 240
|
||||
var/last_use = 1.0
|
||||
var/safety = 1
|
||||
var/sprite_name = "fire_extinguisher"
|
||||
@@ -30,7 +30,8 @@
|
||||
throwforce = 2
|
||||
w_class = 2.0
|
||||
force = 3.0
|
||||
max_water = 60
|
||||
max_water = 120
|
||||
spray_particles = 5
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
@@ -49,6 +50,24 @@
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/proc/propel_object(var/obj/O, mob/user, movementdirection)
|
||||
if(O.anchored) return
|
||||
|
||||
var/obj/structure/bed/chair/C
|
||||
if(istype(O, /obj/structure/bed/chair))
|
||||
C = O
|
||||
|
||||
var/list/move_speed = list(1, 1, 1, 2, 2, 3)
|
||||
for(var/i in 1 to 6)
|
||||
if(C) C.propelled = (6-i)
|
||||
O.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(move_speed[i])
|
||||
|
||||
//additional movement
|
||||
for(var/i in 1 to 3)
|
||||
O.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
|
||||
/obj/item/weapon/extinguisher/afterattack(var/atom/target, var/mob/user, var/flag)
|
||||
//TODO; Add support for reagents in water.
|
||||
|
||||
@@ -73,35 +92,9 @@
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
if(user.buckled && isobj(user.buckled) && !user.buckled.anchored )
|
||||
if(user.buckled && isobj(user.buckled))
|
||||
spawn(0)
|
||||
var/obj/structure/bed/chair/C = null
|
||||
if(istype(user.buckled, /obj/structure/bed/chair))
|
||||
C = user.buckled
|
||||
var/obj/B = user.buckled
|
||||
var/movementdirection = turn(direction,180)
|
||||
if(C) C.propelled = 4
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 3
|
||||
sleep(1)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 2
|
||||
sleep(2)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 1
|
||||
sleep(2)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 0
|
||||
sleep(3)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
propel_object(user.buckled, user, turn(direction,180))
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
@@ -111,19 +104,15 @@
|
||||
|
||||
for(var/a = 1 to spray_particles)
|
||||
spawn(0)
|
||||
if(!src || !reagents.total_volume) return
|
||||
|
||||
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(src))
|
||||
var/turf/my_target
|
||||
if(a == 1)
|
||||
my_target = T
|
||||
else if(a == 2)
|
||||
my_target = T1
|
||||
else if(a == 3)
|
||||
my_target = T2
|
||||
if(a <= the_targets.len)
|
||||
my_target = the_targets[a]
|
||||
else
|
||||
my_target = pick(the_targets)
|
||||
W.create_reagents(spray_amount)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(W, spray_amount)
|
||||
W.set_color()
|
||||
W.set_up(my_target)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
desc = "A hand made chemical grenade."
|
||||
w_class = 2.0
|
||||
force = 2.0
|
||||
det_time = null
|
||||
var/stage = 0
|
||||
var/state = 0
|
||||
var/path = 0
|
||||
@@ -25,6 +26,7 @@
|
||||
detonator.detached()
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
det_time = null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
@@ -60,6 +62,12 @@
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
@@ -70,7 +78,7 @@
|
||||
user << "<span class='notice'>You lock the assembly.</span>"
|
||||
name = "grenade"
|
||||
else
|
||||
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly."
|
||||
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>"
|
||||
user << "<span class='notice'>You lock the empty assembly.</span>"
|
||||
name = "fake grenade"
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
|
||||
@@ -142,6 +150,13 @@
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
spawn(0) //Otherwise det_time is erroneously set to 0 after this
|
||||
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
if(det_time > 1)
|
||||
user << "The timer is set to [det_time/10] seconds."
|
||||
return
|
||||
if(det_time == null)
|
||||
return
|
||||
user << "\The [src] is set for instant detonation."
|
||||
|
||||
|
||||
@@ -89,16 +91,16 @@
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
if (1)
|
||||
det_time = 10
|
||||
user << "<span class='notice'>You set the [name] for 1 second detonation time.</span>"
|
||||
if ("10")
|
||||
if (10)
|
||||
det_time = 30
|
||||
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
|
||||
if ("30")
|
||||
if (30)
|
||||
det_time = 50
|
||||
user << "<span class='notice'>You set the [name] for 5 second detonation time.</span>"
|
||||
if ("50")
|
||||
if (50)
|
||||
det_time = 1
|
||||
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -62,8 +62,8 @@ var/global/list/ashtray_cache = list()
|
||||
cig.transfer_fingerprints_to(butt)
|
||||
qdel(cig)
|
||||
W = butt
|
||||
spawn(1)
|
||||
TemperatureAct(150)
|
||||
//spawn(1)
|
||||
// TemperatureAct(150)
|
||||
else if (cig.lit == 0)
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
|
||||
|
||||
@@ -17,12 +17,22 @@
|
||||
var/thrown_force_divisor = 0.5
|
||||
var/default_material = DEFAULT_WALL_MATERIAL
|
||||
var/material/material
|
||||
var/drops_debris = 1
|
||||
|
||||
/obj/item/weapon/material/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
if(!material_key)
|
||||
material_key = default_material
|
||||
set_material(material_key)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
matter = material.get_matter()
|
||||
if(matter.len)
|
||||
for(var/material_type in matter)
|
||||
if(!isnull(matter[material_type]))
|
||||
matter[material_type] *= force_divisor // May require a new var instead.
|
||||
|
||||
/obj/item/weapon/material/proc/update_force()
|
||||
if(edge || sharp)
|
||||
@@ -61,33 +71,37 @@
|
||||
health--
|
||||
check_health()
|
||||
|
||||
/obj/item/weapon/material/proc/check_health()
|
||||
/obj/item/weapon/material/proc/check_health(var/consumed)
|
||||
if(health<=0)
|
||||
shatter()
|
||||
shatter(consumed)
|
||||
|
||||
/obj/item/weapon/material/proc/shatter()
|
||||
/obj/item/weapon/material/proc/shatter(var/consumed)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
material.place_shard(T)
|
||||
if(!consumed && drops_debris) material.place_shard(T)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
Commenting this out pending rebalancing of radiation based on small objects.
|
||||
/obj/item/weapon/material/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
L.apply_effect(round(material.radioactivity/30),IRRADIATE,0)
|
||||
*/
|
||||
|
||||
/*
|
||||
// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately.
|
||||
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
// This might need adjustment. Will work that out later.
|
||||
/obj/item/weapon/material/proc/TemperatureAct(temperature)
|
||||
health -= material.combustion_effect(get_turf(src), temperature, 0.1)
|
||||
check_health()
|
||||
check_health(1)
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
@@ -95,4 +109,5 @@
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
*/
|
||||
@@ -14,6 +14,7 @@
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
default_material = "glass"
|
||||
unbreakable = 1 //It's already broken.
|
||||
drops_debris = 0
|
||||
|
||||
/obj/item/weapon/material/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</span>",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
var/uses = 4.0
|
||||
w_class = 2.0
|
||||
w_class = 1
|
||||
item_state = "paper"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
@@ -214,8 +214,10 @@
|
||||
name = "captain's satchel"
|
||||
desc = "An exclusive satchel for Nanotrasen officers."
|
||||
icon_state = "satchel-cap"
|
||||
item_state = "captainpack"
|
||||
item_state_slots = null
|
||||
item_state_slots = list(
|
||||
slot_l_hand_str = "satchel-cap",
|
||||
slot_r_hand_str = "satchel-cap",
|
||||
)
|
||||
|
||||
//ERT backpacks.
|
||||
/obj/item/weapon/storage/backpack/ert
|
||||
|
||||
@@ -34,23 +34,13 @@
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message(text("<span class='warning'>The locker has been sliced open by [] with an energy blade!</span>", user), 1, text("<span class='warning'>You hear metal being sliced and sparks flying.</span>"), 2)
|
||||
else
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message(text("<span class='warning'>The locker has been broken by [] with an electromagnetic card!</span>", user), 1, text("You hear a faint electrical spark."), 2)
|
||||
|
||||
if(!locked)
|
||||
..()
|
||||
else
|
||||
@@ -65,6 +55,23 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback = "", var/audible_feedback = "")
|
||||
if(!broken)
|
||||
if(visual_feedback)
|
||||
visual_feedback = "<span class='warning'>[visual_feedback]</span>"
|
||||
else
|
||||
visual_feedback = "<span class='warning'>The locker has been sliced open by [user] with an electromagnetic card!</span>"
|
||||
if(audible_feedback)
|
||||
audible_feedback = "<span class='warning'>[audible_feedback]</span>"
|
||||
else
|
||||
audible_feedback = "<span class='warning'>You hear a faint electrical spark.</span>"
|
||||
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
visible_message(visual_feedback, audible_feedback)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/lockbox/loyalty
|
||||
name = "lockbox of loyalty implants"
|
||||
|
||||
@@ -33,22 +33,12 @@
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
|
||||
emagged = 1
|
||||
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
|
||||
sleep(6)
|
||||
src.overlays = null
|
||||
overlays += image('icons/obj/storage.dmi', icon_locking)
|
||||
locked = 0
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
user << "You slice through the lock on [src]."
|
||||
else
|
||||
user << "You short out the lock on [src]."
|
||||
if (emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
@@ -136,6 +126,17 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/secure/emag_act(var/remaining_charges, var/mob/user, var/feedback)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
|
||||
sleep(6)
|
||||
src.overlays = null
|
||||
overlays += image('icons/obj/storage.dmi', icon_locking)
|
||||
locked = 0
|
||||
user << (feedback ? feedback : "You short out the lock of \the [src].")
|
||||
return 1
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
@@ -157,7 +158,7 @@
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
usr << "<span class='warning'>[src] is locked and cannot be opened!"
|
||||
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
|
||||
else if ((src.loc == user) && (!src.locked))
|
||||
src.open(usr)
|
||||
else
|
||||
|
||||
@@ -139,8 +139,7 @@
|
||||
new /obj/item/clothing/gloves/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/clothing/glasses/chameleon(src)
|
||||
new /obj/item/weapon/gun/projectile/chameleon(src)
|
||||
new /obj/item/ammo_magazine/chameleon(src)
|
||||
new /obj/item/weapon/gun/energy/chameleon(src)
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/clerical
|
||||
name = "clerical kit"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
user << "span class='danger'>You accidentally hit yourself with the [src]!</span>"
|
||||
user << "<span class='danger'>You accidentally hit yourself with the [src]!</span>"
|
||||
user.Weaken(30)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
@@ -130,7 +130,7 @@
|
||||
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
|
||||
|
||||
if(!target_zone)
|
||||
L.visible_message(">span class='danger'>\The [user] misses [L] with \the [src]!</span>")
|
||||
L.visible_message("<span class='danger'>\The [user] misses [L] with \the [src]!</span>")
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = L
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
|
||||
@@ -268,19 +268,22 @@
|
||||
if(!istype(src.loc,/obj/item/device/transfer_valve))
|
||||
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
//world << "<span class='notice'>[x],[y] tank is exploding: [pressure] kPa"
|
||||
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
range = min(range, max_explosion_range) // was 8 - - - Changed to a configurable define -- TLE
|
||||
var/turf/epicenter = get_turf(loc)
|
||||
|
||||
//world << "<span class='notice'>Exploding Pressure: [pressure] kPa, intensity: [range]</span>"
|
||||
|
||||
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
|
||||
explosion(
|
||||
get_turf(loc),
|
||||
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
|
||||
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
|
||||
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
|
||||
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
|
||||
)
|
||||
qdel(src)
|
||||
|
||||
else if(pressure > TANK_RUPTURE_PRESSURE)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "screwdriver"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
force = 5.0
|
||||
w_class = 1.0
|
||||
throwforce = 5.0
|
||||
@@ -262,6 +262,8 @@
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
|
||||
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding)
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
if(M)
|
||||
@@ -292,7 +294,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
//If we're turning it on
|
||||
if(set_welding && !welding)
|
||||
if (remove_fuel(1))
|
||||
if (get_fuel() > 0)
|
||||
if(M)
|
||||
M << "<span class='notice'>You switch the [src] on.</span>"
|
||||
else if(T)
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
|
||||
/obj/item/weapon/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(deployed && can_use(user))
|
||||
if(!deployed && can_use(user))
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] starts to deploy \the [src].</span>",
|
||||
"<span class='danger'>You begin deploying \the [src]!</span>",
|
||||
"<span class='danger'>[user] starts to deploy \the [src].</span>",
|
||||
"<span class='danger'>You begin deploying \the [src]!</span>",
|
||||
"You hear the slow creaking of a spring."
|
||||
)
|
||||
|
||||
|
||||
if (do_after(user, 60))
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] has deployed \the [src].</span>",
|
||||
"<span class='danger'>[user] has deployed \the [src].</span>",
|
||||
"<span class='danger'>You have deployed \the [src]!</span>",
|
||||
"You hear a latch click loudly."
|
||||
)
|
||||
|
||||
|
||||
deployed = 1
|
||||
user.drop_from_inventory(src)
|
||||
update_icon()
|
||||
@@ -42,7 +42,7 @@
|
||||
/obj/item/weapon/beartrap/attack_hand(mob/user as mob)
|
||||
if(buckled_mob && can_use(user))
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] begins freeing [buckled_mob] from \the [src].</span>",
|
||||
"<span class='notice'>[user] begins freeing [buckled_mob] from \the [src].</span>",
|
||||
"<span class='notice'>You carefully begin to free [buckled_mob] from \the [src].</span>",
|
||||
)
|
||||
if(do_after(user, 60))
|
||||
@@ -51,13 +51,13 @@
|
||||
anchored = 0
|
||||
else if(deployed && can_use(user))
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] starts to disarm \the [src].</span>",
|
||||
"<span class='danger'>[user] starts to disarm \the [src].</span>",
|
||||
"<span class='notice'>You begin disarming \the [src]!</span>",
|
||||
"You hear a latch click followed by the slow creaking of a spring."
|
||||
)
|
||||
if(do_after(user, 60))
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] has disarmed \the [src].</span>",
|
||||
"<span class='danger'>[user] has disarmed \the [src].</span>",
|
||||
"<span class='notice'>You have disarmed \the [src]!</span>"
|
||||
)
|
||||
deployed = 0
|
||||
@@ -86,15 +86,18 @@
|
||||
//trap the victim in place
|
||||
if(!blocked)
|
||||
set_dir(L.dir)
|
||||
can_buckle = 1
|
||||
buckle_mob(L)
|
||||
L << "<span class='danger'>The steel jaws of \the [src] bite into you, trapping you in place!</span>"
|
||||
deployed = 0
|
||||
can_buckle = initial(can_buckle)
|
||||
|
||||
/obj/item/weapon/beartrap/Crossed(AM as mob|obj)
|
||||
if(isliving(AM))
|
||||
if(deployed && isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(L.m_intent == "run")
|
||||
L.visible_message(
|
||||
"<span class='danger'>[L] steps on \the [src].</span>",
|
||||
"<span class='danger'>[L] steps on \the [src].</span>",
|
||||
"<span class='danger'>You step on \the [src]!</span>",
|
||||
"<b>You hear a loud metallic snap!</b>"
|
||||
)
|
||||
|
||||
@@ -217,10 +217,6 @@
|
||||
health = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/energy_net/meteorhit()
|
||||
health = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/energy_net/attack_hand(var/mob/user)
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
Reference in New Issue
Block a user