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

This commit is contained in:
Aurorablade
2018-07-12 18:20:12 -04:00
1685 changed files with 39566 additions and 40317 deletions
+2 -2
View File
@@ -14,10 +14,10 @@
src.pixel_x = rand(-6, 6)
return
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/ashtray/attackby(obj/item/W as obj, mob/user as mob, params)
if(health < 1)
return
if(istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if(istype(W,/obj/item/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/match))
if(contents.len >= max_butts)
to_chat(user, "This ashtray is full.")
return
+3 -3
View File
@@ -13,7 +13,7 @@
qdel(src)
/obj/item/weapon/storage/box/bodybags
/obj/item/storage/box/bodybags
name = "body bags"
desc = "This box contains body bags."
icon_state = "bodybags"
@@ -41,7 +41,7 @@
attackby(W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pen))
if(istype(W, /obj/item/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if(user.get_active_hand() != W)
return
@@ -56,7 +56,7 @@
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(istype(W, /obj/item/weapon/wirecutters))
else if(istype(W, /obj/item/wirecutters))
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
src.overlays.Cut()
+7 -7
View File
@@ -31,18 +31,18 @@
icon_state = "candle[i][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/weapon/W, mob/user, params)
/obj/item/candle/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("<span class='notice'>[user] casually lights [src] with [WT], what a badass.")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
else if(istype(W, /obj/item/lighter))
var/obj/item/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light [src] with [L].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
else if(istype(W, /obj/item/match))
var/obj/item/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights [src] with [M]</span>")
else if(istype(W, /obj/item/candle))
+23 -23
View File
@@ -1,39 +1,39 @@
//Let's get some REAL contraband stuff in here. Because come on, getting brigged for LIPSTICK is no fun.
//Illicit drugs~
/obj/item/weapon/storage/pill_bottle/happy
/obj/item/storage/pill_bottle/happy
name = "Happy pills"
desc = "Highly illegal drug. When you want to see the rainbow."
/obj/item/weapon/storage/pill_bottle/happy/New()
/obj/item/storage/pill_bottle/happy/New()
..()
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/weapon/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
new /obj/item/reagent_containers/food/pill/happy( src )
/obj/item/weapon/storage/pill_bottle/zoom
/obj/item/storage/pill_bottle/zoom
name = "Zoom pills"
desc = "Highly illegal drug. Trade brain for speed."
/obj/item/weapon/storage/pill_bottle/zoom/New()
/obj/item/storage/pill_bottle/zoom/New()
..()
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/weapon/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
new /obj/item/reagent_containers/food/pill/zoom( src )
/obj/item/weapon/reagent_containers/food/pill/random_drugs
/obj/item/reagent_containers/food/pill/random_drugs
name = "pill"
desc = "A cocktail of illicit designer drugs, who knows what might be in here."
/obj/item/weapon/reagent_containers/food/pill/random_drugs/New()
/obj/item/reagent_containers/food/pill/random_drugs/New()
..()
icon_state = "pill" + pick("2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20")
@@ -51,13 +51,13 @@
/obj/item/weapon/storage/pill_bottle/random_drug_bottle
/obj/item/storage/pill_bottle/random_drug_bottle
name = "pill bottle (???)"
desc = "Huh."
/obj/item/weapon/storage/pill_bottle/random_drug_bottle/New()
/obj/item/storage/pill_bottle/random_drug_bottle/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/reagent_containers/food/pill/random_drugs(src)
new /obj/item/reagent_containers/food/pill/random_drugs(src)
+17 -16
View File
@@ -2,27 +2,28 @@
#define WAND_BOLT "Toggle Bolts"
#define WAND_EMERGENCY "Toggle Emergency Access"
/obj/item/weapon/door_remote
/obj/item/door_remote
icon_state = "gangtool-white"
item_state = "electronic"
icon = 'icons/obj/device.dmi'
name = "control wand"
desc = "Remotely controls airlocks."
w_class = WEIGHT_CLASS_TINY
flags = NOBLUDGEON
var/mode = WAND_OPEN
var/region_access = 1 //See access.dm
var/obj/item/weapon/card/id/ID
var/obj/item/card/id/ID
/obj/item/weapon/door_remote/New()
/obj/item/door_remote/New()
..()
ID = new /obj/item/weapon/card/id
ID = new /obj/item/card/id
ID.access = get_region_accesses(region_access)
/obj/item/weapon/door_remote/Destroy()
/obj/item/door_remote/Destroy()
QDEL_NULL(ID)
return ..()
/obj/item/weapon/door_remote/attack_self(mob/user)
/obj/item/door_remote/attack_self(mob/user)
switch(mode)
if(WAND_OPEN)
mode = WAND_BOLT
@@ -32,7 +33,7 @@
mode = WAND_OPEN
to_chat(user, "Now in mode: [mode].")
/obj/item/weapon/door_remote/afterattack(obj/machinery/door/airlock/D, mob/user)
/obj/item/door_remote/afterattack(obj/machinery/door/airlock/D, mob/user)
if(!istype(D))
return
if(D.is_special)
@@ -65,48 +66,48 @@
else
to_chat(user, "<span class='danger'>[src] does not have access to this door.</span>")
/obj/item/weapon/door_remote/omni
/obj/item/door_remote/omni
name = "omni door remote"
desc = "This control wand can access any door on the station."
icon_state = "gangtool-yellow"
region_access = REGION_ALL
/obj/item/weapon/door_remote/captain
/obj/item/door_remote/captain
name = "command door remote"
icon_state = "gangtool-yellow"
region_access = REGION_COMMAND
/obj/item/weapon/door_remote/chief_engineer
/obj/item/door_remote/chief_engineer
name = "engineering door remote"
icon_state = "gangtool-orange"
region_access = REGION_ENGINEERING
/obj/item/weapon/door_remote/research_director
/obj/item/door_remote/research_director
name = "research door remote"
icon_state = "gangtool-purple"
region_access = REGION_RESEARCH
/obj/item/weapon/door_remote/head_of_security
/obj/item/door_remote/head_of_security
name = "security door remote"
icon_state = "gangtool-red"
region_access = REGION_SECURITY
/obj/item/weapon/door_remote/quartermaster
/obj/item/door_remote/quartermaster
name = "supply door remote"
icon_state = "gangtool-green"
region_access = REGION_SUPPLY
/obj/item/weapon/door_remote/chief_medical_officer
/obj/item/door_remote/chief_medical_officer
name = "medical door remote"
icon_state = "gangtool-blue"
region_access = REGION_MEDBAY
/obj/item/weapon/door_remote/civillian
/obj/item/door_remote/civillian
name = "civillian door remote"
icon_state = "gangtool-white"
region_access = REGION_GENERAL
/obj/item/weapon/door_remote/centcomm
/obj/item/door_remote/centcomm
name = "centcomm door remote"
desc = "High-ranking NT officials only."
icon_state = "gangtool-blue"
+1 -1
View File
@@ -22,7 +22,7 @@
var/list/validSurfaces = list(/turf/simulated/floor)
/obj/item/toy/crayon/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</span>")
user.visible_message("<span class='suicide'>[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide.</span>")
return (BRUTELOSS|OXYLOSS)
/obj/item/toy/crayon/New()
+11 -10
View File
@@ -1,4 +1,4 @@
/obj/item/device/aicard
/obj/item/aicard
name = "inteliCard"
icon = 'icons/obj/aicards.dmi'
icon_state = "aicard" // aicard-full
@@ -10,19 +10,19 @@
origin_tech = "programming=3;materials=3"
/obj/item/device/aicard/afterattack(atom/target, mob/user, proximity)
/obj/item/aicard/afterattack(atom/target, mob/user, proximity)
..()
if(!proximity || !target)
return
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src
if(AI) //AI is on the card, implies user wants to upload it.
target.transfer_ai(AI_TRANS_FROM_CARD, user, AI, src)
add_logs(user, AI, "carded", object="[name]")
add_attack_logs(user, AI, "Carded with [src]")
else //No AI on the card, therefore the user wants to download one.
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
update_state() //Whatever happened, update the card's state (icon, name) to match.
/obj/item/device/aicard/proc/update_state()
/obj/item/aicard/proc/update_state()
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src //AI is inside.
if(AI)
name = "intelliCard - [AI.name]"
@@ -36,11 +36,11 @@
name = "intelliCard"
overlays.Cut()
/obj/item/device/aicard/attack_self(mob/user)
/obj/item/aicard/attack_self(mob/user)
ui_interact(user)
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
/obj/item/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
@@ -48,7 +48,7 @@
ui.set_auto_update(1)
/obj/item/device/aicard/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
/obj/item/aicard/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
var/mob/living/silicon/ai/AI = locate() in src
@@ -70,7 +70,7 @@
return data
/obj/item/device/aicard/Topic(href, href_list, nowindow, state)
/obj/item/aicard/Topic(href, href_list, nowindow, state)
if(..())
return 1
@@ -83,7 +83,8 @@
if(href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].", ATKLOG_FEW)
add_attack_logs(user, AI, "Wiped with [src].")
flush = 1
AI.suiciding = 1
to_chat(AI, "Your core files are being wiped!")
@@ -106,7 +107,7 @@
return 1
/obj/item/device/aicard/ex_act(severity)
/obj/item/aicard/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
+9 -9
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/autopsy_scanner
/obj/item/autopsy_scanner
name = "autopsy scanner"
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
@@ -11,7 +11,7 @@
var/target_name = null
var/timeofdeath = null
/obj/item/weapon/autopsy_scanner/Destroy()
/obj/item/autopsy_scanner/Destroy()
QDEL_LIST_ASSOC_VAL(wdata)
return ..()
@@ -41,7 +41,7 @@
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
/obj/item/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len)
return
@@ -74,22 +74,22 @@
if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V))
chemtraces += V
/obj/item/weapon/autopsy_scanner/attackby(obj/item/weapon/P, mob/user)
if(istype(P, /obj/item/weapon/pen))
/obj/item/autopsy_scanner/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/pen))
var/dead_name = input("Insert name of deceased individual")
var/dead_rank = input("Insert rank of deceased individual")
var/dead_tod = input("Insert time of death")
var/dead_cause = input("Insert cause of death")
var/dead_chems = input("Insert any chemical traces")
var/dead_notes = input("Insert any relevant notes")
var/obj/item/weapon/paper/R = new(user.loc)
var/obj/item/paper/R = new(user.loc)
R.name = "Official Coroner's Report - [dead_name]"
R.info = "<b>NanoTrasen Science Station Cyberiad - Coroner's Report</b><br><br><b>Name of Deceased:</b> [dead_name]</br><br><b>Rank of Deceased:</b> [dead_rank]<br><br><b>Time of Death:</b> [dead_tod]<br><br><b>Cause of Death:</b> [dead_cause]<br><br><b>Trace Chemicals:</b> [dead_chems]<br><br><b>Additional Coroner's Notes:</b> [dead_notes]<br><br><b>Coroner's Signature:</b> <span class=\"paper_field\">"
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(10)
user.put_in_hands(R)
/obj/item/weapon/autopsy_scanner/attack_self(mob/user)
/obj/item/autopsy_scanner/attack_self(mob/user)
if(!wdata.len && !chemtraces.len)
return
@@ -166,14 +166,14 @@
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(10)
var/obj/item/weapon/paper/P = new(user.loc)
var/obj/item/paper/P = new(user.loc)
P.name = "Autopsy Data ([target_name])"
P.info = "<tt>[scan_data]</tt>"
P.overlays += "paper_words"
user.put_in_hands(P)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user)
/obj/item/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user)
if(!istype(M))
return
+11 -11
View File
@@ -4,7 +4,7 @@
/obj/item/device/camera_bug
/obj/item/camera_bug
name = "camera bug"
desc = "For illicit snooping through the camera network."
icon = 'icons/obj/device.dmi'
@@ -30,11 +30,11 @@
var/last_found = null
var/last_seen = null
/obj/item/device/camera_bug/New()
/obj/item/camera_bug/New()
..()
processing_objects += src
/obj/item/device/camera_bug/Destroy()
/obj/item/camera_bug/Destroy()
get_cameras()
for(var/cam_tag in bugged_cameras)
var/obj/machinery/camera/camera = bugged_cameras[cam_tag]
@@ -45,16 +45,16 @@
tracking = null
return ..()
/obj/item/device/camera_bug/interact(var/mob/user = usr)
/obj/item/camera_bug/interact(var/mob/user = usr)
var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src)
popup.set_content(menu(get_cameras()))
popup.open()
/obj/item/device/camera_bug/attack_self(mob/user as mob)
/obj/item/camera_bug/attack_self(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
/obj/item/camera_bug/check_eye(var/mob/user as mob)
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
user.reset_perspective(null)
user.unset_machine()
@@ -70,7 +70,7 @@
return 1
/obj/item/device/camera_bug/proc/get_cameras()
/obj/item/camera_bug/proc/get_cameras()
if(world.time > (last_net_update + 100))
bugged_cameras = list()
for(var/obj/machinery/camera/camera in cameranet.cameras)
@@ -83,7 +83,7 @@
/obj/item/device/camera_bug/proc/menu(var/list/cameras)
/obj/item/camera_bug/proc/menu(var/list/cameras)
if(!cameras || !cameras.len)
return "No bugged cameras found."
@@ -136,7 +136,7 @@
return .(cameras)
return html
/obj/item/device/camera_bug/proc/camera_report()
/obj/item/camera_bug/proc/camera_report()
// this should only be called if current exists
var/dat = ""
if(current && current.can_use())
@@ -181,7 +181,7 @@
else
return "Camera Offline<br>"
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
/obj/item/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_perspective(null)
@@ -244,7 +244,7 @@
interact()
/obj/item/device/camera_bug/process()
/obj/item/camera_bug/process()
if(track_mode == BUGMODE_LIST || (world.time < (last_tracked + refresh_interval)))
return
last_tracked = world.time
@@ -1,5 +1,6 @@
/obj/item/device/chameleon
/obj/item/chameleon
name = "chameleon-projector"
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -11,25 +12,25 @@
origin_tech = "syndicate=4;magnets=4"
var/can_use = 1
var/obj/effect/dummy/chameleon/active_dummy = null
var/saved_item = /obj/item/weapon/cigbutt
var/saved_item = /obj/item/cigbutt
var/saved_icon = 'icons/obj/clothing/masks.dmi'
var/saved_icon_state = "cigbutt"
var/saved_overlays = null
var/saved_underlays = null
/obj/item/device/chameleon/dropped()
/obj/item/chameleon/dropped()
disrupt()
/obj/item/device/chameleon/equipped()
/obj/item/chameleon/equipped()
disrupt()
/obj/item/device/chameleon/attack_self()
/obj/item/chameleon/attack_self()
toggle()
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
/obj/item/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return
if(!active_dummy)
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
if(istype(target,/obj/item) && !istype(target, /obj/item/disk/nuclear))
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
to_chat(user, "<span class='notice'>Scanned [target].</span>")
saved_item = target.type
@@ -38,7 +39,7 @@
saved_overlays = target.overlays
saved_underlays = target.underlays
/obj/item/device/chameleon/proc/toggle()
/obj/item/chameleon/proc/toggle()
if(!can_use || !saved_item) return
if(active_dummy)
eject_all()
@@ -64,7 +65,7 @@
spawn(8)
qdel(T)
/obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
/obj/item/chameleon/proc/disrupt(var/delete_dummy = 1)
if(active_dummy)
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
@@ -77,7 +78,7 @@
can_use = 0
spawn(50) can_use = 1
/obj/item/device/chameleon/proc/eject_all()
/obj/item/chameleon/proc/eject_all()
for(var/atom/movable/A in active_dummy)
A.loc = active_dummy.loc
if(ismob(A))
@@ -90,9 +91,9 @@
density = 0
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
var/obj/item/chameleon/master = null
/obj/effect/dummy/chameleon/proc/activate(var/obj/O, var/mob/M, new_icon, new_iconstate, new_overlays, new_underlays, var/obj/item/device/chameleon/C)
/obj/effect/dummy/chameleon/proc/activate(var/obj/O, var/mob/M, new_icon, new_iconstate, new_overlays, new_underlays, var/obj/item/chameleon/C)
name = O.name
desc = O.desc
icon = new_icon
+34 -33
View File
@@ -1,6 +1,7 @@
/obj/item/device/flash
/obj/item/flash
name = "flash"
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
icon = 'icons/obj/device.dmi'
icon_state = "flash"
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
throwforce = 0
@@ -18,14 +19,14 @@
var/overcharged = 0 //if overcharged the flash will set people on fire then immediately burn out (does so even if it doesn't blind them).
/obj/item/device/flash/proc/clown_check(mob/user)
/obj/item/flash/proc/clown_check(mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
flash_carbon(user, user, 15, 0)
return 0
return 1
/obj/item/device/flash/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/screwdriver))
/obj/item/flash/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(battery_panel)
to_chat(user, "<span class='notice'>You close the battery compartment on the [src].</span>")
battery_panel = 0
@@ -33,25 +34,25 @@
to_chat(user, "<span class='notice'>You open the battery compartment on the [src].</span>")
battery_panel = 1
if(battery_panel && !overcharged)
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(istype(W, /obj/item/stock_parts/cell))
to_chat(user, "<span class='notice'>You jam the cell into battery compartment on the [src].</span>")
qdel(W)
overcharged = 1
overlays += "overcharge"
/obj/item/device/flash/random/New()
/obj/item/flash/random/New()
..()
if(prob(25))
broken = 1
icon_state = "[initial(icon_state)]burnt"
/obj/item/device/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something.
/obj/item/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something.
broken = 1
icon_state = "[initial(icon_state)]burnt"
visible_message("<span class='notice'>The [src.name] burns out!</span>")
/obj/item/device/flash/proc/flash_recharge(var/mob/user)
/obj/item/flash/proc/flash_recharge(var/mob/user)
if(prob(times_used * 2)) //if you use it 5 times in a minute it has a 10% chance to break!
burn_out()
return 0
@@ -64,7 +65,7 @@
times_used = max(0, times_used) //sanity
/obj/item/device/flash/proc/try_use_flash(var/mob/user = null)
/obj/item/flash/proc/try_use_flash(var/mob/user = null)
flash_recharge(user)
if(broken)
@@ -80,8 +81,8 @@
return 1
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_logs(user, M, "flashed", object="[src.name]")
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_attack_logs(user, M, "Flashed with [src]")
if(user && targeted)
if(M.weakeyes)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
@@ -94,7 +95,7 @@
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
if(M.weakeyes)
M.Stun(2)
M.visible_message("<span class='disarm'>[M] gasps and shields their eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
else
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
@@ -103,7 +104,7 @@
if(M.flash_eyes())
M.AdjustConfused(power)
/obj/item/device/flash/attack(mob/living/M, mob/user)
/obj/item/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
return 0
@@ -121,10 +122,10 @@
if(R.module) // Perhaps they didn't choose a module yet
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_logs(user, M, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by their shield!</span>")
add_attack_logs(user, M, "Flashed with [src]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
return 1
add_logs(user, M, "flashed", object="[src.name]")
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(5,10))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
@@ -133,7 +134,7 @@
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
/obj/item/device/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!try_use_flash(user))
return 0
user.visible_message("<span class='disarm'>[user]'s [src.name] emits a blinding light!</span>", "<span class='danger'>Your [src.name] emits a blinding light!</span>")
@@ -141,7 +142,7 @@
flash_carbon(M, user, 3, 0)
/obj/item/device/flash/emp_act(severity)
/obj/item/flash/emp_act(severity)
if(!try_use_flash())
return 0
for(var/mob/living/carbon/M in viewers(3, null))
@@ -150,7 +151,7 @@
..()
/obj/item/device/flash/proc/terrible_conversion_proc(mob/M, mob/user)
/obj/item/flash/proc/terrible_conversion_proc(mob/M, mob/user)
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
if(user.mind && (user.mind in ticker.mode.head_revolutionaries))
if(M.client)
@@ -167,61 +168,61 @@
resisted = 1
if(resisted)
to_chat(user, "<span class='warning'>This mind seems resistant to the [src.name]!</span>")
to_chat(user, "<span class='warning'>This mind seems resistant to the [name]!</span>")
else
to_chat(user, "<span class='warning'>They must be conscious before you can convert them!</span>")
to_chat(user, "<span class='warning'>They must be conscious before you can convert [M.p_them()]!</span>")
else
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
/obj/item/device/flash/cyborg
/obj/item/flash/cyborg
origin_tech = null
/obj/item/device/flash/cyborg/attack(mob/living/M, mob/user)
/obj/item/flash/cyborg/attack(mob/living/M, mob/user)
..()
new /obj/effect/temp_visual/borgflash(get_turf(src))
/obj/item/device/flash/cyborg/attack_self(mob/user)
/obj/item/flash/cyborg/attack_self(mob/user)
..()
new /obj/effect/temp_visual/borgflash(get_turf(src))
/obj/item/device/flash/memorizer
/obj/item/flash/memorizer
name = "memorizer"
desc = "If you see this, you're not likely to remember it any time soon."
icon_state = "memorizer"
item_state = "nullrod"
/obj/item/device/flash/armimplant
/obj/item/flash/armimplant
name = "photon projector"
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocals fix the flashbulb if it ever burns out."
var/flashcd = 20
var/overheat = 0
var/obj/item/organ/internal/cyberimp/arm/flash/I = null
/obj/item/device/flash/armimplant/Destroy()
/obj/item/flash/armimplant/Destroy()
I = null
return ..()
/obj/item/device/flash/armimplant/burn_out()
/obj/item/flash/armimplant/burn_out()
if(I && I.owner)
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
I.Retract()
overheat = FALSE
addtimer(src, "cooldown", flashcd * 2)
addtimer(CALLBACK(src, .proc/cooldown), flashcd * 2)
/obj/item/device/flash/armimplant/try_use_flash(mob/user = null)
/obj/item/flash/armimplant/try_use_flash(mob/user = null)
if(overheat)
if(I && I.owner)
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
return FALSE
overheat = TRUE
addtimer(src, "cooldown", flashcd)
addtimer(CALLBACK(src, .proc/cooldown), flashcd)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
update_icon(1)
return TRUE
/obj/item/device/flash/armimplant/proc/cooldown()
/obj/item/flash/armimplant/proc/cooldown()
overheat = FALSE
/obj/item/device/flash/synthetic //just a regular flash now
/obj/item/flash/synthetic //just a regular flash now
+32 -32
View File
@@ -1,4 +1,4 @@
/obj/item/device/flashlight
/obj/item/flashlight
name = "flashlight"
desc = "A hand-held emergency light."
icon = 'icons/obj/lighting.dmi'
@@ -12,7 +12,7 @@
var/on = 0
var/brightness_on = 4 //luminosity when on
/obj/item/device/flashlight/initialize()
/obj/item/flashlight/Initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
@@ -21,7 +21,7 @@
icon_state = initial(icon_state)
set_light(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
/obj/item/flashlight/proc/update_brightness(var/mob/user = null)
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
@@ -29,7 +29,7 @@
icon_state = initial(icon_state)
set_light(0)
/obj/item/device/flashlight/attack_self(mob/user)
/obj/item/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
to_chat(user, "You cannot turn the light on while in this [user.loc].")//To prevent some lighting anomalities.
@@ -43,7 +43,7 @@
return 1
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
add_fingerprint(user)
if(on && user.zone_sel.selecting == "eyes")
@@ -61,10 +61,10 @@
if(M == user) //they're using it on themselves
if(M.flash_eyes(visual = 1))
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
M.visible_message("<span class='notice'>[M] directs [src] to [M.p_their()] 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>", \
M.visible_message("<span class='notice'>[M] directs [src] to [M.p_their()] eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes.</span>")
else
@@ -83,7 +83,7 @@
else
return ..()
/obj/item/device/flashlight/pen
/obj/item/flashlight/pen
name = "penlight"
desc = "A pen-sized light, used by medical staff."
icon_state = "penlight"
@@ -93,7 +93,7 @@
flags = CONDUCT
brightness_on = 2
/obj/item/device/flashlight/seclite
/obj/item/flashlight/seclite
name = "seclite"
desc = "A robust flashlight used by security."
icon_state = "seclite"
@@ -102,7 +102,7 @@
brightness_on = 5 // A little better than the standard flashlight.
hitsound = 'sound/weapons/genhit1.ogg'
/obj/item/device/flashlight/drone
/obj/item/flashlight/drone
name = "low-power flashlight"
desc = "A miniature lamp, that might be used by small robots."
icon_state = "penlight"
@@ -112,7 +112,7 @@
w_class = WEIGHT_CLASS_TINY
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
/obj/item/flashlight/lamp
name = "desk lamp"
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
@@ -125,14 +125,14 @@
// green-shaded desk lamp
/obj/item/device/flashlight/lamp/green
/obj/item/flashlight/lamp/green
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
/obj/item/device/flashlight/lamp/verb/toggle_light()
/obj/item/flashlight/lamp/verb/toggle_light()
set name = "Toggle light"
set category = "Object"
set src in oview(1)
@@ -141,7 +141,7 @@
attack_self(usr)
//Bananalamp
obj/item/device/flashlight/lamp/bananalamp
obj/item/flashlight/lamp/bananalamp
name = "banana lamp"
desc = "Only a clown would think to make a ghetto banana-shaped lamp. Even has a goofy pullstring."
icon_state = "bananalamp"
@@ -150,7 +150,7 @@ obj/item/device/flashlight/lamp/bananalamp
// FLARES
/obj/item/device/flashlight/flare
/obj/item/flashlight/flare
name = "flare"
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
w_class = WEIGHT_CLASS_SMALL
@@ -162,11 +162,11 @@ obj/item/device/flashlight/lamp/bananalamp
var/on_damage = 7
var/produce_heat = 1500
/obj/item/device/flashlight/flare/New()
/obj/item/flashlight/flare/New()
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
..()
/obj/item/device/flashlight/flare/process()
/obj/item/flashlight/flare/process()
var/turf/pos = get_turf(src)
if(pos)
pos.hotspot_expose(produce_heat, 5)
@@ -177,7 +177,7 @@ obj/item/device/flashlight/lamp/bananalamp
src.icon_state = "[initial(icon_state)]-empty"
processing_objects -= src
/obj/item/device/flashlight/flare/proc/turn_off()
/obj/item/flashlight/flare/proc/turn_off()
on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
@@ -187,14 +187,14 @@ obj/item/device/flashlight/lamp/bananalamp
else
update_brightness(null)
/obj/item/device/flashlight/flare/update_brightness(var/mob/user = null)
/obj/item/flashlight/flare/update_brightness(var/mob/user = null)
..()
if(on)
item_state = "[initial(item_state)]-on"
else
item_state = "[initial(item_state)]"
/obj/item/device/flashlight/flare/attack_self(mob/user)
/obj/item/flashlight/flare/attack_self(mob/user)
// Usual checks
if(!fuel)
@@ -211,7 +211,7 @@ obj/item/device/flashlight/lamp/bananalamp
src.damtype = "fire"
processing_objects += src
/obj/item/device/flashlight/flare/torch
/obj/item/flashlight/flare/torch
name = "torch"
desc = "A torch fashioned from some leaves and a log."
w_class = WEIGHT_CLASS_BULKY
@@ -220,7 +220,7 @@ obj/item/device/flashlight/lamp/bananalamp
item_state = "torch"
on_damage = 10
/obj/item/device/flashlight/slime
/obj/item/flashlight/slime
gender = PLURAL
name = "glowing slime extract"
desc = "A glowing ball of what appears to be amber."
@@ -233,16 +233,16 @@ obj/item/device/flashlight/lamp/bananalamp
materials = list()
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
/obj/item/flashlight/slime/New()
set_light(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
/obj/item/device/flashlight/slime/attack_self(mob/user)
/obj/item/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.
/obj/item/device/flashlight/emp
/obj/item/flashlight/emp
origin_tech = "magnets=3;syndicate=1"
var/emp_max_charges = 4
@@ -250,27 +250,27 @@ obj/item/device/flashlight/lamp/bananalamp
var/charge_tick = 0
/obj/item/device/flashlight/emp/New()
/obj/item/flashlight/emp/New()
..()
processing_objects.Add(src)
/obj/item/device/flashlight/emp/Destroy()
/obj/item/flashlight/emp/Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/device/flashlight/emp/process()
/obj/item/flashlight/emp/process()
charge_tick++
if(charge_tick < 10) return 0
charge_tick = 0
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
return 1
/obj/item/device/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob)
if(on && user.zone_sel.selecting == "eyes") // call original attack proc only if aiming at the eyes
..()
return
/obj/item/device/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity)
/obj/item/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if(emp_cur_charges > 0)
emp_cur_charges -= 1
@@ -278,14 +278,14 @@ obj/item/device/flashlight/lamp/bananalamp
"<span class='userdanger'>[user] blinks \the [src] at \the [A].")
if(ismob(A))
var/mob/M = A
add_logs(user, M, "attacked", object="EMP-light")
add_attack_logs(user, M, "Hit with EMP-light")
to_chat(user, "[src] now has [emp_cur_charges] charge\s.")
A.emp_act(1)
else
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
return
/obj/item/device/flashlight/spotlight //invisible lighting source
/obj/item/flashlight/spotlight //invisible lighting source
name = "disco light"
desc = "Groovy..."
icon_state = null
@@ -1,15 +1,16 @@
// Floor painter
/obj/item/device/floor_painter
/obj/item/floor_painter
name = "floor painter"
icon = 'icons/obj/device.dmi'
icon_state = "floor_painter"
item_state = "electronic"
var/floor_icon
var/floor_state = "floor"
var/floor_dir = SOUTH
w_class = WEIGHT_CLASS_TINY
item_state = "electronic"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -25,7 +26,7 @@
"whitered", "whiteredcorner", "whiteredfull", "whiteyellow", "whiteyellowcorner", "whiteyellowfull", "yellow",
"yellowcorner", "yellowcornersiding", "yellowsiding")
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
/obj/item/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
if(!proximity)
return
@@ -38,14 +39,14 @@
F.icon_regular_floor = floor_state
F.dir = floor_dir
/obj/item/device/floor_painter/attack_self(var/mob/user)
/obj/item/floor_painter/attack_self(var/mob/user)
if(!user)
return 0
user.set_machine(src)
interact(user)
return 1
/obj/item/device/floor_painter/interact(mob/user as mob)
/obj/item/floor_painter/interact(mob/user as mob)
if(!floor_icon)
floor_icon = icon('icons/turf/floors.dmi', floor_state, floor_dir)
user << browse_rsc(floor_icon, "floor.png")
@@ -65,7 +66,7 @@
popup.set_content(dat)
popup.open()
/obj/item/device/floor_painter/Topic(href, href_list)
/obj/item/floor_painter/Topic(href, href_list)
if(..())
return
+30 -30
View File
@@ -1,5 +1,5 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/instrument
/obj/item/instrument
name = "generic instrument"
icon = 'icons/obj/musician.dmi'
lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi'
@@ -9,38 +9,38 @@
var/instrumentId = "generic"
var/instrumentExt = "mid"
/obj/item/device/instrument/New()
/obj/item/instrument/New()
song = new(instrumentId, src, instrumentExt)
..()
/obj/item/device/instrument/Destroy()
/obj/item/instrument/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide!</span>")
/obj/item/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/device/instrument/initialize(mapload)
/obj/item/instrument/Initialize(mapload)
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/instrument/attack_self(mob/user)
/obj/item/instrument/attack_self(mob/user)
ui_interact(user)
/obj/item/device/instrument/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
/obj/item/instrument/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/instrument/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/instrument/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/instrument/Topic(href, href_list)
/obj/item/instrument/Topic(href, href_list)
song.Topic(href, href_list)
/obj/item/device/instrument/violin
/obj/item/instrument/violin
name = "space violin"
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "violin"
@@ -50,14 +50,14 @@
hitsound = "swing_hit"
instrumentId = "violin"
/obj/item/device/instrument/violin/golden
/obj/item/instrument/violin/golden
name = "golden violin"
desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "golden_violin"
item_state = "golden_violin"
burn_state = LAVA_PROOF
/obj/item/device/instrument/piano_synth
/obj/item/instrument/piano_synth
name = "synthesizer"
desc = "An advanced electronic synthesizer that can be used as various instruments."
icon_state = "synth"
@@ -67,11 +67,11 @@
var/static/list/insTypes = list("accordion" = "mid", "glockenspiel" = "mid", "guitar" = "ogg", "eguitar" = "ogg", "harmonica" = "mid", "piano" = "ogg", "recorder" = "mid", "saxophone" = "mid", "trombone" = "mid", "violin" = "ogg", "xylophone" = "mid")
actions_types = list(/datum/action/item_action/synthswitch)
/obj/item/device/instrument/piano_synth/proc/changeInstrument(name = "piano")
/obj/item/instrument/piano_synth/proc/changeInstrument(name = "piano")
song.instrumentDir = name
song.instrumentExt = insTypes[name]
/obj/item/device/instrument/guitar
/obj/item/instrument/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon_state = "guitar"
@@ -82,7 +82,7 @@
hitsound = 'sound/effects/guitarsmash.ogg'
instrumentId = "guitar"
/obj/item/device/instrument/eguitar
/obj/item/instrument/eguitar
name = "electric guitar"
desc = "Makes all your shredding needs possible."
icon_state = "eguitar"
@@ -93,42 +93,42 @@
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "eguitar"
/obj/item/device/instrument/glockenspiel
/obj/item/instrument/glockenspiel
name = "glockenspiel"
desc = "Smooth metal bars perfect for any marching band."
icon_state = "glockenspiel"
item_state = "glockenspiel"
instrumentId = "glockenspiel"
/obj/item/device/instrument/accordion
/obj/item/instrument/accordion
name = "accordion"
desc = "Pun-Pun not included."
icon_state = "accordion"
item_state = "accordion"
instrumentId = "accordion"
/obj/item/device/instrument/saxophone
/obj/item/instrument/saxophone
name = "saxophone"
desc = "This soothing sound will be sure to leave your audience in tears."
icon_state = "saxophone"
item_state = "saxophone"
instrumentId = "saxophone"
/obj/item/device/instrument/trombone
/obj/item/instrument/trombone
name = "trombone"
desc = "How can any pool table ever hope to compete?"
icon_state = "trombone"
item_state = "trombone"
instrumentId = "trombone"
/obj/item/device/instrument/recorder
/obj/item/instrument/recorder
name = "recorder"
desc = "Just like in school, playing ability and all."
icon_state = "recorder"
item_state = "recorder"
instrumentId = "recorder"
/obj/item/device/instrument/harmonica
/obj/item/instrument/harmonica
name = "harmonica"
desc = "For when you get a bad case of the space blues."
icon_state = "harmonica"
@@ -137,14 +137,14 @@
force = 5
w_class = WEIGHT_CLASS_SMALL
/obj/item/device/instrument/xylophone
/obj/item/instrument/xylophone
name = "xylophone"
desc = "a percussion instrument with a bright tone."
icon_state = "xylophone"
item_state = "xylophone"
instrumentId = "xylophone"
/obj/item/device/instrument/bikehorn
/obj/item/instrument/bikehorn
name = "gilded bike horn"
desc = "An exquisitely decorated bike horn, capable of honking in a variety of notes."
icon_state = "bike_horn"
@@ -162,27 +162,27 @@
/datum/crafting_recipe/violin
name = "Violin"
result = /obj/item/device/instrument/violin
result = /obj/item/instrument/violin
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
time = 80
/datum/crafting_recipe/guitar
name = "Guitar"
result = /obj/item/device/instrument/guitar
result = /obj/item/instrument/guitar
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
time = 80
/datum/crafting_recipe/eguitar
name = "Electric Guitar"
result = /obj/item/device/instrument/eguitar
result = /obj/item/instrument/eguitar
reqs = list(/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
time = 80
+25 -27
View File
@@ -1,4 +1,4 @@
/obj/item/device/laser_pointer
/obj/item/laser_pointer
name = "laser pointer"
desc = "Don't shine it in your eyes!"
icon = 'icons/obj/device.dmi'
@@ -15,39 +15,39 @@
var/effectchance = 33
var/recharging = 0
var/recharge_locked = 0
var/obj/item/weapon/stock_parts/micro_laser/diode //used for upgrading!
var/obj/item/stock_parts/micro_laser/diode //used for upgrading!
/obj/item/device/laser_pointer/red
/obj/item/laser_pointer/red
pointer_icon_state = "red_laser"
/obj/item/device/laser_pointer/green
/obj/item/laser_pointer/green
pointer_icon_state = "green_laser"
/obj/item/device/laser_pointer/blue
/obj/item/laser_pointer/blue
pointer_icon_state = "blue_laser"
/obj/item/device/laser_pointer/purple
/obj/item/laser_pointer/purple
pointer_icon_state = "purple_laser"
/obj/item/device/laser_pointer/New()
/obj/item/laser_pointer/New()
..()
diode = new(src)
if(!pointer_icon_state)
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
/obj/item/device/laser_pointer/Destroy()
/obj/item/laser_pointer/Destroy()
QDEL_NULL(diode)
return ..()
/obj/item/device/laser_pointer/upgraded/New()
/obj/item/laser_pointer/upgraded/New()
..()
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
diode = new /obj/item/stock_parts/micro_laser/ultra
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
/obj/item/laser_pointer/attack(mob/living/M, mob/user)
laser_act(M, user)
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
/obj/item/laser_pointer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/micro_laser))
if(!diode)
user.drop_item()
W.loc = src
@@ -56,7 +56,7 @@
else
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else if(istype(W, /obj/item/weapon/screwdriver))
else if(istype(W, /obj/item/screwdriver))
if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc)
@@ -65,12 +65,12 @@
..()
return
/obj/item/device/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
/obj/item/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
if(flag) //we're placing the object on a table or in backpack
return
laser_act(target, user, params)
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user, var/params)
/obj/item/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user, var/params)
if( !(user in (viewers(7,target))) )
return
if(!diode)
@@ -99,7 +99,7 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(user.zone_sel.selecting == "eyes")
add_logs(user, C, "shone in the eyes", object="laser pointer")
add_attack_logs(user, C, "Shone a laser in the eyes with [src]")
var/severity = 1
if(prob(33))
@@ -109,11 +109,11 @@
//20% chance to actually hit the eyes
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
outmsg = "<span class='notice'>You blind [C] by shining [src] in [C.p_their()] eyes.</span>"
if(C.weakeyes)
C.Stun(1)
else
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at [C.p_their()] eyes!</span>"
//robots and AI
else if(issilicon(target))
@@ -123,13 +123,11 @@
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
S.create_attack_log("<font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
add_attack_logs(user, S, "shone [src] in their eyes")
else
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at their sensors.</span>"
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at [S.p_their()] sensors.</span>"
//cameras
else if(istype(target, /obj/machinery/camera))
@@ -138,8 +136,8 @@
C.emp_act(1)
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
user.create_attack_log("[user.name] ([user.ckey]) EMPd a camera with a laser pointer")
log_admin("[key_name(user)] EMPd a camera with a laser pointer")
user.create_attack_log("[key_name(user)] EMPd a camera with a laser pointer")
else
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
@@ -177,7 +175,7 @@
flick_overlay(I, showto, 10)
icon_state = "pointer"
/obj/item/device/laser_pointer/process()
/obj/item/laser_pointer/process()
if(prob(20 - recharge_locked*5))
energy += 1
if(energy >= max_energy)
@@ -38,7 +38,7 @@
#define LIGHT_BURNED 3
/obj/item/device/lightreplacer
/obj/item/lightreplacer
name = "light replacer"
desc = "A device to automatically replace lights. Refill with working lightbulbs."
@@ -63,16 +63,16 @@
var/decrement = 1
var/charge = 1
/obj/item/device/lightreplacer/New()
/obj/item/lightreplacer/New()
uses = max_uses / 2
failmsg = "The [name]'s refill light blinks red."
..()
/obj/item/device/lightreplacer/examine(mob/user)
/obj/item/lightreplacer/examine(mob/user)
if(..(user, 2))
to_chat(user, "It has [uses] lights and [shards] shards remaining.")
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
/obj/item/lightreplacer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(G.amount - decrement >= 0 && uses < max_uses)
@@ -88,8 +88,8 @@
to_chat(user, "You insert a piece of glass into the [src.name]. You have [uses] lights remaining.")
return
if(istype(W, /obj/item/weapon/light))
var/obj/item/weapon/light/L = W
if(istype(W, /obj/item/light))
var/obj/item/light/L = W
if(L.status == 0) // LIGHT OKAY
if(!user.drop_item())
to_chat(user, "[L] is stuck to your hand!")
@@ -111,13 +111,13 @@
qdel(L)
return
if(istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
if(istype(W, /obj/item/storage))
var/obj/item/storage/S = W
var/found_lightbulbs = 0
for(var/obj/item/I in S.contents)
if(istype(I,/obj/item/weapon/light))
var/obj/item/weapon/light/L = I
if(istype(I,/obj/item/light))
var/obj/item/light/L = I
found_lightbulbs = 1
if(uses >= max_uses)
to_chat(user, "<span class='warning'>[src] is full!</span>")
@@ -133,11 +133,11 @@
to_chat(user, "<span class='warning'>[S] contains no bulbs.</span>")
return
/obj/item/device/lightreplacer/emag_act(user as mob)
/obj/item/lightreplacer/emag_act(user as mob)
if(!emagged)
Emag()
/obj/item/device/lightreplacer/attack_self(mob/user)
/obj/item/lightreplacer/attack_self(mob/user)
/* // This would probably be a bit OP. If you want it though, uncomment the code.
if(isrobot(user))
var/mob/living/silicon/robot/R = user
@@ -148,21 +148,21 @@
*/
to_chat(usr, "It has [uses] lights remaining.")
/obj/item/device/lightreplacer/update_icon()
/obj/item/lightreplacer/update_icon()
icon_state = "lightreplacer[emagged]"
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
/obj/item/lightreplacer/proc/Use(var/mob/user)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
AddUses(-1)
return 1
// Negative numbers will subtract
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
/obj/item/lightreplacer/proc/AddUses(var/amount = 1)
uses = min(max(uses + amount, 0), max_uses)
/obj/item/device/lightreplacer/proc/AddShards(amount = 1)
/obj/item/lightreplacer/proc/AddShards(amount = 1)
shards += amount
var/recycled_lights = round(shards / recycle)
if(recycled_lights > 0)
@@ -170,13 +170,13 @@
shards = shards % recycle
return recycled_lights
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
/obj/item/lightreplacer/proc/Charge(var/mob/user)
charge += 1
if(charge > 7)
AddUses(1)
charge = 1
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
/obj/item/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
if(target.status != LIGHT_OK)
if(CanUse(U))
@@ -185,7 +185,7 @@
if(target.status != LIGHT_EMPTY)
var/obj/item/weapon/light/L1 = new target.light_type(target.loc)
var/obj/item/light/L1 = new target.light_type(target.loc)
L1.status = target.status
L1.rigged = target.rigged
L1.brightness_range = target.brightness_range
@@ -198,7 +198,7 @@
target.status = LIGHT_EMPTY
target.update()
var/obj/item/weapon/light/L2 = new target.light_type()
var/obj/item/light/L2 = new target.light_type()
target.status = L2.status
target.switchcount = L2.switchcount
@@ -221,7 +221,7 @@
to_chat(U, "There is a working [target.fitting] already inserted.")
return
/obj/item/device/lightreplacer/proc/Emag()
/obj/item/lightreplacer/proc/Emag()
emagged = !emagged
playsound(src.loc, "sparks", 100, 1)
if(emagged)
@@ -232,12 +232,12 @@
//Can you use it?
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
/obj/item/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.myreplacer = src
J.update_icon()
/obj/item/device/lightreplacer/proc/CanUse(var/mob/living/user)
/obj/item/lightreplacer/proc/CanUse(var/mob/living/user)
src.add_fingerprint(user)
//Not sure what else to check for. Maybe if clumsy?
if(uses > 0)
@@ -1,4 +1,4 @@
/obj/item/device/machineprototype
/obj/item/machineprototype
name = "machine prototype"
desc = "A complicated machine prototype. You have no idea how it works."
icon = 'icons/obj/machineprototype.dmi'
+5 -4
View File
@@ -1,6 +1,7 @@
/obj/item/device/megaphone
/obj/item/megaphone
name = "megaphone"
desc = "A device used to project your voice. Loudly."
icon = 'icons/obj/device.dmi'
icon_state = "megaphone"
item_state = "radio"
w_class = WEIGHT_CLASS_SMALL
@@ -11,7 +12,7 @@
var/insults = 0
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
/obj/item/megaphone/attack_self(mob/living/user as mob)
if(user.client && (user.client.prefs.muted & MUTE_IC))
to_chat(src, "<span class='warning'>You cannot speak in IC (muted).</span>")
return
@@ -56,12 +57,12 @@
spawn(20)
spamcheck = 0
/obj/item/device/megaphone/proc/saymsg(mob/living/user as mob, message)
/obj/item/megaphone/proc/saymsg(mob/living/user as mob, message)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
for(var/obj/O in oview(14, get_turf(src)))
O.hear_talk(user, "<span class='reallybig'>[message]</span>")
/obj/item/device/megaphone/emag_act(user as mob)
/obj/item/megaphone/emag_act(user as mob)
if(!emagged)
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
emagged = 1
+13 -12
View File
@@ -8,9 +8,10 @@
*
*/
/obj/item/device/multitool
/obj/item/multitool
name = "multitool"
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon = 'icons/obj/device.dmi'
icon_state = "multitool"
flags = CONDUCT
force = 5.0
@@ -25,18 +26,18 @@
var/shows_wire_information = FALSE // shows what a wire does if set to TRUE
var/obj/machinery/buffer // simple machine buffer for device linkage
/obj/item/device/multitool/proc/IsBufferA(var/typepath)
/obj/item/multitool/proc/IsBufferA(var/typepath)
if(!buffer)
return 0
return istype(buffer,typepath)
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
/obj/item/device/multitool/Destroy()
/obj/item/multitool/Destroy()
buffer = null
return ..()
/obj/item/device/multitool/ai_detect
/obj/item/multitool/ai_detect
var/track_cooldown = 0
var/track_delay = 10 //How often it checks for proximity
var/detect_state = PROXIMITY_NONE
@@ -44,15 +45,15 @@
var/rangewarning = 20 //Glows yellow when inside
origin_tech = "magnets=1;engineering=2;syndicate=1"
/obj/item/device/multitool/ai_detect/New()
/obj/item/multitool/ai_detect/New()
..()
processing_objects += src
/obj/item/device/multitool/ai_detect/Destroy()
/obj/item/multitool/ai_detect/Destroy()
processing_objects -= src
return ..()
/obj/item/device/multitool/ai_detect/process()
/obj/item/multitool/ai_detect/process()
if(track_cooldown > world.time)
return
detect_state = PROXIMITY_NONE
@@ -60,7 +61,7 @@
icon_state = "[initial(icon_state)][detect_state]"
track_cooldown = world.time + track_delay
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
/obj/item/multitool/ai_detect/proc/multitool_detect()
var/turf/our_turf = get_turf(src)
for(var/mob/living/silicon/ai/AI in ai_list)
if(AI.cameraFollow == src)
@@ -80,12 +81,12 @@
detect_state = PROXIMITY_NEAR
break
/obj/item/device/multitool/ai_detect/admin
/obj/item/multitool/ai_detect/admin
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
track_delay = 5
shows_wire_information = TRUE
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
/obj/item/multitool/ai_detect/admin/multitool_detect()
var/turf/our_turf = get_turf(src)
for(var/mob/J in urange(rangewarning,our_turf))
if(check_rights(R_ADMIN, 0, J))
@@ -95,12 +96,12 @@
detect_state = PROXIMITY_ON_SCREEN
break
/obj/item/device/multitool/cyborg
/obj/item/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
/obj/item/device/multitool/abductor
/obj/item/multitool/abductor
name = "alien multitool"
desc = "An omni-technological interface."
icon = 'icons/obj/abductor.dmi'
+16 -16
View File
@@ -1,4 +1,4 @@
/obj/item/device/paicard
/obj/item/paicard
name = "personal AI device"
icon = 'icons/obj/aicards.dmi'
icon_state = "pai"
@@ -8,34 +8,34 @@
origin_tech = "programming=2"
var/request_cooldown = 5 // five seconds
var/last_request
var/obj/item/device/radio/radio
var/obj/item/radio/radio
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
var/list/faction = list("neutral") // The factions the pAI will inherit from the card
/obj/item/device/paicard/syndicate
/obj/item/paicard/syndicate
name = "syndicate personal AI device"
faction = list("syndicate")
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
/obj/item/paicard/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = get_rig()
var/obj/item/rig/rig = get_rig()
if(istype(rig))
rig.forced_move(direction, user)
/obj/item/device/paicard/New()
/obj/item/paicard/New()
..()
overlays += "pai-off"
/obj/item/device/paicard/Destroy()
/obj/item/paicard/Destroy()
if(pai)
pai.ghostize()
QDEL_NULL(pai)
QDEL_NULL(radio)
return ..()
/obj/item/device/paicard/attack_self(mob/user)
/obj/item/paicard/attack_self(mob/user)
if(!in_range(src, user))
return
user.set_machine(src)
@@ -231,7 +231,7 @@
onclose(user, "paicard")
return
/obj/item/device/paicard/Topic(href, href_list)
/obj/item/paicard/Topic(href, href_list)
var/mob/U = usr
@@ -298,18 +298,18 @@
// WIRE_RECEIVE = 2
// WIRE_TRANSMIT = 4
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
pai = personality
overlays += "pai-happy"
/obj/item/device/paicard/proc/removePersonality()
/obj/item/paicard/proc/removePersonality()
pai = null
overlays.Cut()
overlays += "pai-off"
/obj/item/device/paicard
/obj/item/paicard
var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
/obj/item/paicard/proc/setEmotion(var/emotion)
if(pai)
overlays.Cut()
switch(emotion)
@@ -324,17 +324,17 @@
if(9) overlays += "pai-what"
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
/obj/item/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(loc)
for(var/mob/M in viewers(T))
M.show_message("<span class='notice'>[src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>[src] bleeps electronically.</span>", 2)
/obj/item/device/paicard/emp_act(severity)
/obj/item/paicard/emp_act(severity)
for(var/mob/M in src)
M.emp_act(severity)
..()
/obj/item/device/paicard/ex_act(severity)
/obj/item/paicard/ex_act(severity)
if(pai)
pai.ex_act(severity)
else
@@ -1,4 +1,4 @@
/obj/item/device/pipe_painter
/obj/item/pipe_painter
name = "pipe painter"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
@@ -6,14 +6,14 @@
var/list/modes
var/mode
/obj/item/device/pipe_painter/New()
/obj/item/pipe_painter/New()
..()
modes = new()
for(var/C in pipe_colors)
modes += "[C]"
mode = pick(modes)
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
/obj/item/pipe_painter/afterattack(atom/A, mob/user as mob)
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
return
var/obj/machinery/atmospherics/pipe/P = A
@@ -25,9 +25,9 @@
P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
/obj/item/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe Painter", mode) in modes
/obj/item/device/pipe_painter/examine(mob/user)
/obj/item/pipe_painter/examine(mob/user)
..(user)
to_chat(user, "It is in [mode] mode.")
@@ -1,4 +1,4 @@
/obj/item/device/pizza_bomb
/obj/item/pizza_bomb
name = "pizza box"
desc = "A box suited for pizzas."
icon = 'icons/obj/food/food.dmi'
@@ -11,7 +11,7 @@
var/correct_wire
var/armer //Used for admin purposes
/obj/item/device/pizza_bomb/attack_self(mob/user)
/obj/item/pizza_bomb/attack_self(mob/user)
if(disarmed)
to_chat(user, "<span class='notice'>\The [src] is disarmed.</span>")
return
@@ -48,7 +48,7 @@
sleep(timer)
return go_boom()
/obj/item/device/pizza_bomb/proc/go_boom()
/obj/item/pizza_bomb/proc/go_boom()
if(disarmed)
visible_message("<span class='danger'>[bicon(src)] Sparks briefly jump out of the [correct_wire] wire on \the [src], but it's disarmed!")
return
@@ -57,8 +57,8 @@
explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
qdel(src)
/obj/item/device/pizza_bomb/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters) && primed)
/obj/item/pizza_bomb/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/wirecutters) && primed)
to_chat(user, "<span class='danger'>Oh God, what wire do you cut?!</span>")
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
@@ -79,7 +79,7 @@
to_chat(user, "<span class='userdanger'>WRONG WIRE!</span>")
go_boom()
return
if(istype(I, /obj/item/weapon/wirecutters) && disarmed)
if(istype(I, /obj/item/wirecutters) && disarmed)
if(!in_range(user, src))
to_chat(user, "<span class='warning'>You can't see the box well enough to cut the wires out.</span>")
return
@@ -90,12 +90,12 @@
user.visible_message("<span class='notice'>[user] removes the insides of \the [src]!</span>")
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc)
C.amount = 3
new /obj/item/weapon/bombcore/miniature(src.loc)
new /obj/item/bombcore/miniature(src.loc)
new /obj/item/pizzabox(src.loc)
qdel(src)
return
..()
/obj/item/device/pizza_bomb/New()
/obj/item/pizza_bomb/New()
..()
correct_wire = pick(wires)
+9 -8
View File
@@ -1,8 +1,9 @@
// Powersink - used to drain station power
/obj/item/device/powersink
/obj/item/powersink
name = "power sink"
desc = "A nulling power sink which drains energy from electrical systems."
icon = 'icons/obj/device.dmi'
icon_state = "powersink0"
item_state = "electronic"
w_class = WEIGHT_CLASS_BULKY
@@ -24,15 +25,15 @@
var/datum/powernet/PN // Our powernet
var/obj/structure/cable/attached // the attached cable
/obj/item/device/powersink/Destroy()
/obj/item/powersink/Destroy()
processing_objects.Remove(src)
processing_power_items.Remove(src)
PN = null
attached = null
return ..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
/obj/item/powersink/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/screwdriver))
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !T.intact)
@@ -64,10 +65,10 @@
else
..()
/obj/item/device/powersink/attack_ai()
/obj/item/powersink/attack_ai()
return
/obj/item/device/powersink/attack_hand(var/mob/user)
/obj/item/powersink/attack_hand(var/mob/user)
switch(mode)
if(0)
..()
@@ -85,7 +86,7 @@
processing_objects.Remove(src)
processing_power_items.Remove(src)
/obj/item/device/powersink/pwr_drain()
/obj/item/powersink/pwr_drain()
if(!attached)
return 0
@@ -120,7 +121,7 @@
return 1
/obj/item/device/powersink/process()
/obj/item/powersink/process()
drained_this_tick = 0
power_drained -= min(dissipation_rate, power_drained)
if(power_drained > max_power * 0.98)
+12 -12
View File
@@ -1,4 +1,4 @@
/obj/item/device/radio/beacon
/obj/item/radio/beacon
name = "Tracking Beacon"
desc = "A beacon used by a teleporter."
icon_state = "beacon"
@@ -8,29 +8,29 @@
var/emagged = 0
var/syndicate = 0
/obj/item/device/radio/beacon/New()
/obj/item/radio/beacon/New()
..()
code = "[code] ([beacons.len + 1])"
beacons += src
/obj/item/device/radio/beacon/Destroy()
/obj/item/radio/beacon/Destroy()
beacons -= src
return ..()
/obj/item/device/radio/beacon/emag_act(user as mob)
/obj/item/radio/beacon/emag_act(user as mob)
if(!emagged)
emagged = 1
syndicate = 1
to_chat(user, "<span class='notice'>The This beacon now only be locked on to by emagged teleporters!</span>")
/obj/item/device/radio/beacon/hear_talk()
/obj/item/radio/beacon/hear_talk()
return
/obj/item/device/radio/beacon/send_hear()
/obj/item/radio/beacon/send_hear()
return null
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
/obj/item/radio/beacon/verb/alter_signal(t as text)
set name = "Alter Beacon's Signal"
set category = "Object"
set src in usr
@@ -44,19 +44,19 @@
src.add_fingerprint(usr)
return
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
/obj/item/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
proc/digest_delay()
spawn(600)
qdel(src)
// SINGULO BEACON SPAWNER
/obj/item/device/radio/beacon/syndicate
/obj/item/radio/beacon/syndicate
name = "suspicious beacon"
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
origin_tech = "bluespace=6;syndicate=5"
syndicate = 1
/obj/item/device/radio/beacon/syndicate/attack_self(mob/user as mob)
/obj/item/radio/beacon/syndicate/attack_self(mob/user as mob)
if(user)
to_chat(user, "<span class='notice'>Locked In</span>")
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
@@ -64,12 +64,12 @@
qdel(src)
return
/obj/item/device/radio/beacon/syndicate/bomb
/obj/item/radio/beacon/syndicate/bomb
name = "suspicious beacon"
desc = "A label on it reads: <i>Warning: Activating this device will send a high-ordinance explosive to your location</i>."
origin_tech = "bluespace=5;syndicate=5"
/obj/item/device/radio/beacon/syndicate/bomb/attack_self(mob/user as mob)
/obj/item/radio/beacon/syndicate/bomb/attack_self(mob/user as mob)
if(user)
to_chat(user, "<span class='notice'>Locked In</span>")
new /obj/machinery/syndicatebomb( user.loc )
@@ -1,4 +1,4 @@
/obj/item/device/radio/electropack
/obj/item/radio/electropack
name = "electropack"
desc = "Dance my monkeys! DANCE!!!"
icon_state = "electropack0"
@@ -12,13 +12,13 @@
is_special = 1
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
/obj/item/radio/electropack/attack_hand(mob/user as mob)
if(src == user.back)
to_chat(user, "<span class='notice'>You need help taking this off!</span>")
return 0
. = ..()
/obj/item/device/radio/electropack/Destroy()
/obj/item/radio/electropack/Destroy()
if(istype(src.loc, /obj/item/assembly/shock_kit))
var/obj/item/assembly/shock_kit/S = src.loc
if(S.part1 == src)
@@ -28,7 +28,7 @@
master = null
return ..()
/obj/item/device/radio/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/radio/electropack/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/clothing/head/helmet))
if(!b_stat)
@@ -54,7 +54,7 @@
if(src.flags & NODROP)
A.flags |= NODROP
/obj/item/device/radio/electropack/Topic(href, href_list)
/obj/item/radio/electropack/Topic(href, href_list)
if(..())
return 1
@@ -72,7 +72,7 @@
add_fingerprint(usr)
/obj/item/device/radio/electropack/receive_signal(datum/signal/signal)
/obj/item/radio/electropack/receive_signal(datum/signal/signal)
if(!signal || signal.encryption != code)
return
@@ -98,14 +98,14 @@
return
/obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/electropack/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/radio/electropack/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
var/data[0]
data["power"] = on
@@ -1,5 +1,5 @@
/obj/item/device/encryptionkey/
/obj/item/encryptionkey/
name = "Standard Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon = 'icons/obj/radio.dmi'
@@ -13,139 +13,139 @@
var/list/channels = list()
/obj/item/device/encryptionkey/New()
/obj/item/encryptionkey/New()
/obj/item/device/encryptionkey/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/encryptionkey/attackby(obj/item/W as obj, mob/user as mob, params)
/obj/item/device/encryptionkey/syndicate
/obj/item/encryptionkey/syndicate
icon_state = "cypherkey"
channels = list("Syndicate" = 1)
origin_tech = "syndicate=1;engineering=3;bluespace=2"
syndie = 1 //Signifies that it de-crypts Syndicate transmissions
/obj/item/device/encryptionkey/syndteam
/obj/item/encryptionkey/syndteam
icon_state = "cypherkey"
channels = list("SyndTeam" = 1, "Syndicate" = 1)
origin_tech = "syndicate=4"
syndie = 1 //Signifies that it de-crypts Syndicate transmissions
/obj/item/device/encryptionkey/binary
/obj/item/encryptionkey/binary
name = "binary translator key"
desc = "An encryption key for a radio headset. To access the binary channel, use :b."
icon_state = "cypherkey"
translate_binary = 1
origin_tech = "syndicate=3;engineering=4;bluespace=3"
/obj/item/device/encryptionkey/headset_sec
/obj/item/encryptionkey/headset_sec
name = "Security Radio Encryption Key"
icon_state = "sec_cypherkey"
channels = list("Security" = 1)
/obj/item/device/encryptionkey/headset_eng
/obj/item/encryptionkey/headset_eng
name = "Engineering Radio Encryption Key"
icon_state = "eng_cypherkey"
channels = list("Engineering" = 1)
/obj/item/device/encryptionkey/headset_rob
/obj/item/encryptionkey/headset_rob
name = "Robotics Radio Encryption Key"
icon_state = "rob_cypherkey"
channels = list("Engineering" = 1, "Science" = 1)
/obj/item/device/encryptionkey/headset_med
/obj/item/encryptionkey/headset_med
name = "Medical Radio Encryption Key"
icon_state = "med_cypherkey"
channels = list("Medical" = 1)
/obj/item/device/encryptionkey/headset_sci
/obj/item/encryptionkey/headset_sci
name = "Science Radio Encryption Key"
icon_state = "sci_cypherkey"
channels = list("Science" = 1)
/obj/item/device/encryptionkey/headset_medsci
/obj/item/encryptionkey/headset_medsci
name = "Medical Research Radio Encryption Key"
icon_state = "medsci_cypherkey"
channels = list("Medical" = 1, "Science" = 1)
/obj/item/device/encryptionkey/headset_com
/obj/item/encryptionkey/headset_com
name = "Command Radio Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1)
/obj/item/device/encryptionkey/heads/captain
/obj/item/encryptionkey/heads/captain
name = "Captain's Encryption Key"
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/rd
/obj/item/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
icon_state = "rd_cypherkey"
channels = list("Science" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hos
/obj/item/encryptionkey/heads/hos
name = "Head of Security's Encryption Key"
icon_state = "hos_cypherkey"
channels = list("Security" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/ce
/obj/item/encryptionkey/heads/ce
name = "Chief Engineer's Encryption Key"
icon_state = "ce_cypherkey"
channels = list("Engineering" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/cmo
/obj/item/encryptionkey/heads/cmo
name = "Chief Medical Officer's Encryption Key"
icon_state = "cmo_cypherkey"
channels = list("Medical" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hop
/obj/item/encryptionkey/heads/hop
name = "Head of Personnel's Encryption Key"
icon_state = "hop_cypherkey"
channels = list("Supply" = 1, "Service" = 1, "Security" = 0, "Command" = 1)
/obj/item/device/encryptionkey/heads/ntrep
/obj/item/encryptionkey/heads/ntrep
name = "Nanotrasen Representative's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/magistrate
/obj/item/encryptionkey/heads/magistrate
name = "Magistrate's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 1)
/obj/item/device/encryptionkey/heads/blueshield
/obj/item/encryptionkey/heads/blueshield
name = "Blueshield's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1)
/*
/obj/item/device/encryptionkey/headset_mine
/obj/item/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
icon_state = "mine_cypherkey"
channels = list("Mining" = 1)
/obj/item/device/encryptionkey/heads/qm
/obj/item/encryptionkey/heads/qm
name = "Quartermaster's Encryption Key"
icon_state = "qm_cypherkey"
channels = list("Cargo" = 1, "Mining" = 1)
*/
/obj/item/device/encryptionkey/headset_cargo
/obj/item/encryptionkey/headset_cargo
name = "Supply Radio Encryption Key"
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1)
/obj/item/device/encryptionkey/headset_service
/obj/item/encryptionkey/headset_service
name = "Service Radio Encryption Key"
icon_state = "srv_cypherkey"
channels = list("Service" = 1)
/obj/item/device/encryptionkey/ert
/obj/item/encryptionkey/ert
name = "Nanotrasen ERT Radio Encryption Key"
channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1)
/obj/item/device/encryptionkey/centcom
/obj/item/encryptionkey/centcom
name = "Centcom Radio Encryption Key"
channels = list("Response Team" = 1, "Special Ops" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1)
/obj/item/device/encryptionkey/heads/ai_integrated //ported from bay, this goes 'inside' the AI.
/obj/item/encryptionkey/heads/ai_integrated //ported from bay, this goes 'inside' the AI.
name = "AI Integrated Encryption Key"
desc = "Integrated encryption key"
icon_state = "cap_cypherkey"
@@ -1,4 +1,4 @@
/obj/item/device/radio/headset
/obj/item/radio/headset
name = "radio headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys."
var/radio_desc = ""
@@ -11,17 +11,17 @@
slot_flags = SLOT_EARS
var/translate_binary = 0
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
var/obj/item/encryptionkey/keyslot1 = null
var/obj/item/encryptionkey/keyslot2 = null
var/ks1type = null
var/ks2type = null
/obj/item/device/radio/headset/New()
/obj/item/radio/headset/New()
..()
internal_channels.Cut()
/obj/item/device/radio/headset/initialize()
/obj/item/radio/headset/Initialize()
..()
if(ks1type)
@@ -31,22 +31,22 @@
recalculateChannels(1)
/obj/item/device/radio/headset/Destroy()
/obj/item/radio/headset/Destroy()
QDEL_NULL(keyslot1)
QDEL_NULL(keyslot2)
return ..()
/obj/item/device/radio/headset/list_channels(var/mob/user)
/obj/item/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/device/radio/headset/examine(mob/user, var/distance = -1)
/obj/item/radio/headset/examine(mob/user, var/distance = -1)
if(!(..(user, 1) && radio_desc))
return
to_chat(user, "The following channels are available:")
to_chat(user, radio_desc)
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
/obj/item/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
if(channel == "special")
if(translate_binary)
var/datum/language/binary = all_languages["Robot Talk"]
@@ -60,7 +60,7 @@
return ..()
/obj/item/device/radio/headset/is_listening()
/obj/item/radio/headset/is_listening()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.l_ear == src || H.r_ear == src)
@@ -70,19 +70,19 @@
return FALSE
/obj/item/device/radio/headset/alt
/obj/item/radio/headset/alt
name = "bowman headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/syndicate
/obj/item/radio/headset/syndicate
origin_tech = "syndicate=3"
syndie = 1
ks1type = /obj/item/device/encryptionkey/syndicate
ks1type = /obj/item/encryptionkey/syndicate
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
/obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection
name = "syndicate headset"
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs."
flags = EARBANGPROTECT
@@ -90,225 +90,225 @@
icon_state = "syndie_headset"
item_state = "syndie_headset"
/obj/item/device/radio/headset/syndicate/syndteam
ks1type = /obj/item/device/encryptionkey/syndteam
/obj/item/radio/headset/syndicate/syndteam
ks1type = /obj/item/encryptionkey/syndteam
/obj/item/device/radio/headset/syndicate/alt/syndteam
ks1type = /obj/item/device/encryptionkey/syndteam
/obj/item/radio/headset/syndicate/alt/syndteam
ks1type = /obj/item/encryptionkey/syndteam
/obj/item/device/radio/headset/binary
/obj/item/radio/headset/binary
origin_tech = "syndicate=3"
ks1type = /obj/item/device/encryptionkey/binary
ks1type = /obj/item/encryptionkey/binary
/obj/item/device/radio/headset/headset_sec
/obj/item/radio/headset/headset_sec
name = "security radio headset"
desc = "This is used by your elite security force."
icon_state = "sec_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_sec
ks2type = /obj/item/encryptionkey/headset_sec
/obj/item/device/radio/headset/headset_sec/alt
/obj/item/radio/headset/headset_sec/alt
name = "security bowman headset"
desc = "This is used by your elite security force. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "sec_headset_alt"
item_state = "sec_headset_alt"
/obj/item/device/radio/headset/headset_eng
/obj/item/radio/headset/headset_eng
name = "engineering radio headset"
desc = "When the engineers wish to chat like girls."
icon_state = "eng_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_eng
ks2type = /obj/item/encryptionkey/headset_eng
/obj/item/device/radio/headset/headset_rob
/obj/item/radio/headset/headset_rob
name = "robotics radio headset"
desc = "Made specifically for the roboticists who cannot decide between departments."
icon_state = "rob_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_rob
ks2type = /obj/item/encryptionkey/headset_rob
/obj/item/device/radio/headset/headset_med
/obj/item/radio/headset/headset_med
name = "medical radio headset"
desc = "A headset for the trained staff of the medbay."
icon_state = "med_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_med
ks2type = /obj/item/encryptionkey/headset_med
/obj/item/device/radio/headset/headset_sci
/obj/item/radio/headset/headset_sci
name = "science radio headset"
desc = "A sciency headset. Like usual."
icon_state = "sci_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_sci
ks2type = /obj/item/encryptionkey/headset_sci
/obj/item/device/radio/headset/headset_medsci
/obj/item/radio/headset/headset_medsci
name = "medical research radio headset"
desc = "A headset that is a result of the mating between medical and science."
icon_state = "medsci_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_medsci
ks2type = /obj/item/encryptionkey/headset_medsci
/obj/item/device/radio/headset/headset_com
/obj/item/radio/headset/headset_com
name = "command radio headset"
desc = "A headset with a commanding channel."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_com
ks2type = /obj/item/encryptionkey/headset_com
/obj/item/device/radio/headset/heads/captain
/obj/item/radio/headset/heads/captain
name = "captain's headset"
desc = "The headset of the boss."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/captain
ks2type = /obj/item/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/captain/alt
/obj/item/radio/headset/heads/captain/alt
name = "\proper the captain's bowman headset"
desc = "The headset of the boss. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/rd
/obj/item/radio/headset/heads/rd
name = "Research Director's headset"
desc = "Headset of the researching God."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/rd
ks2type = /obj/item/encryptionkey/heads/rd
/obj/item/device/radio/headset/heads/hos
/obj/item/radio/headset/heads/hos
name = "head of security's headset"
desc = "The headset of the man who protects your worthless lives."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hos
ks2type = /obj/item/encryptionkey/heads/hos
/obj/item/device/radio/headset/heads/hos/alt
/obj/item/radio/headset/heads/hos/alt
name = "\proper the head of security's bowman headset"
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/ce
/obj/item/radio/headset/heads/ce
name = "chief engineer's headset"
desc = "The headset of the guy who is in charge of morons."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/ce
ks2type = /obj/item/encryptionkey/heads/ce
/obj/item/device/radio/headset/heads/cmo
/obj/item/radio/headset/heads/cmo
name = "chief medical officer's headset"
desc = "The headset of the highly trained medical chief."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/cmo
ks2type = /obj/item/encryptionkey/heads/cmo
/obj/item/device/radio/headset/heads/hop
/obj/item/radio/headset/heads/hop
name = "head of personnel's headset"
desc = "The headset of the guy who will one day be captain."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hop
ks2type = /obj/item/encryptionkey/heads/hop
/obj/item/device/radio/headset/headset_cargo
/obj/item/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the cargo department."
icon_state = "cargo_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_cargo
ks2type = /obj/item/encryptionkey/headset_cargo
/obj/item/device/radio/headset/headset_cargo/mining
/obj/item/radio/headset/headset_cargo/mining
name = "mining radio headset"
desc = "Headset used by shaft miners."
icon_state = "mine_headset"
/obj/item/device/radio/headset/headset_service
/obj/item/radio/headset/headset_service
name = "service radio headset"
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean."
icon_state = "srv_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_service
ks2type = /obj/item/encryptionkey/headset_service
/obj/item/device/radio/headset/heads/ntrep
/obj/item/radio/headset/heads/ntrep
name = "nanotrasen representative's headset"
desc = "The headset of the Nanotrasen Representative."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/ntrep
ks2type = /obj/item/encryptionkey/heads/ntrep
/obj/item/device/radio/headset/heads/magistrate
/obj/item/radio/headset/heads/magistrate
name = "magistrate's headset"
desc = "The headset of the Magistrate."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/magistrate
ks2type = /obj/item/encryptionkey/heads/magistrate
/obj/item/device/radio/headset/heads/magistrate/alt
/obj/item/radio/headset/heads/magistrate/alt
name = "\proper magistrate's bowman headset"
desc = "The headset of the Magistrate. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/blueshield
/obj/item/radio/headset/heads/blueshield
name = "blueshield's headset"
desc = "The headset of the Blueshield."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/blueshield
ks2type = /obj/item/encryptionkey/heads/blueshield
/obj/item/device/radio/headset/heads/blueshield/alt
/obj/item/radio/headset/heads/blueshield/alt
name = "\proper blueshield's bowman headset"
desc = "The headset of the Blueshield. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/ert
/obj/item/radio/headset/ert
name = "emergency response team headset"
desc = "The headset of the boss's boss."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/ert
ks2type = /obj/item/encryptionkey/ert
/obj/item/device/radio/headset/ert/alt
/obj/item/radio/headset/ert/alt
name = "\proper emergency response team's bowman headset"
desc = "The headset of the boss. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/centcom
/obj/item/radio/headset/centcom
name = "\proper centcom officer's bowman headset"
desc = "The headset of final authority. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
ks2type = /obj/item/device/encryptionkey/centcom
ks2type = /obj/item/encryptionkey/centcom
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
/obj/item/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
name = "\improper AI subspace transceiver"
desc = "Integrated AI radio transceiver."
icon = 'icons/obj/robot_component.dmi'
icon_state = "radio"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/ai_integrated
ks2type = /obj/item/encryptionkey/heads/ai_integrated
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/is_listening()
/obj/item/radio/headset/heads/ai_integrated/is_listening()
if(disabledAi)
return FALSE
return ..()
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
user.set_machine(src)
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/screwdriver) || (istype(W, /obj/item/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
if(keyslot1 || keyslot2)
for(var/ch_name in channels)
@@ -331,7 +331,7 @@
else
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
if(istype(W, /obj/item/device/encryptionkey/))
if(istype(W, /obj/item/encryptionkey/))
if(keyslot1 && keyslot2)
to_chat(user, "The headset can't hold another key!")
return
@@ -349,7 +349,7 @@
return
/obj/item/device/radio/headset/proc/recalculateChannels(var/setDescription = 0)
/obj/item/radio/headset/proc/recalculateChannels(var/setDescription = 0)
src.channels = list()
src.translate_binary = 0
src.translate_hive = 0
@@ -400,7 +400,7 @@
return
/obj/item/device/radio/headset/proc/setupRadioDescription()
/obj/item/radio/headset/proc/setupRadioDescription()
var/radio_text = ""
for(var/i = 1 to channels.len)
var/channel = channels[i]
@@ -411,8 +411,8 @@
radio_desc = radio_text
/obj/item/device/radio/headset/proc/make_syndie() // Turns normal radios into Syndicate radios!
/obj/item/radio/headset/proc/make_syndie() // Turns normal radios into Syndicate radios!
qdel(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/syndicate
keyslot1 = new /obj/item/encryptionkey/syndicate
syndie = 1
recalculateChannels()
@@ -1,4 +1,4 @@
/obj/item/device/radio/intercom
/obj/item/radio/intercom
name = "station intercom (General)"
desc = "Talk through this."
icon_state = "intercom"
@@ -11,41 +11,41 @@
var/last_tick //used to delay the powercheck
var/buildstage = 0
/obj/item/device/radio/intercom/custom
/obj/item/radio/intercom/custom
name = "station intercom (Custom)"
broadcasting = 0
listening = 0
/obj/item/device/radio/intercom/interrogation
/obj/item/radio/intercom/interrogation
name = "station intercom (Interrogation)"
frequency = 1449
/obj/item/device/radio/intercom/private
/obj/item/radio/intercom/private
name = "station intercom (Private)"
frequency = AI_FREQ
/obj/item/device/radio/intercom/command
/obj/item/radio/intercom/command
name = "station intercom (Command)"
frequency = COMM_FREQ
/obj/item/device/radio/intercom/specops
/obj/item/radio/intercom/specops
name = "\improper Special Operations intercom"
frequency = ERT_FREQ
/obj/item/device/radio/intercom/department
/obj/item/radio/intercom/department
canhear_range = 5
broadcasting = 0
listening = 1
/obj/item/device/radio/intercom/department/medbay
/obj/item/radio/intercom/department/medbay
name = "station intercom (Medbay)"
frequency = MED_I_FREQ
/obj/item/device/radio/intercom/department/security
/obj/item/radio/intercom/department/security
name = "station intercom (Security)"
frequency = SEC_I_FREQ
/obj/item/device/radio/intercom/New(turf/loc, var/ndir = 0, var/building = 3)
/obj/item/radio/intercom/New(turf/loc, var/ndir = 0, var/building = 3)
..()
buildstage = building
if(buildstage)
@@ -59,34 +59,34 @@
global_intercoms.Add(src)
update_icon()
/obj/item/device/radio/intercom/department/medbay/New()
/obj/item/radio/intercom/department/medbay/New()
..()
internal_channels = default_medbay_channels.Copy()
/obj/item/device/radio/intercom/department/security/New()
/obj/item/radio/intercom/department/security/New()
..()
internal_channels = list(
num2text(PUB_FREQ) = list(),
num2text(SEC_I_FREQ) = list(access_security)
)
/obj/item/device/radio/intercom/syndicate
/obj/item/radio/intercom/syndicate
name = "illicit intercom"
desc = "Talk through this. Evilly"
frequency = SYND_FREQ
subspace_transmission = 1
syndie = 1
/obj/item/device/radio/intercom/syndicate/New()
/obj/item/radio/intercom/syndicate/New()
..()
internal_channels[num2text(SYND_FREQ)] = list(access_syndicate)
/obj/item/device/radio/intercom/pirate
/obj/item/radio/intercom/pirate
name = "pirate radio intercom"
desc = "You wouldn't steal a space shuttle. Piracy. It's a crime!"
subspace_transmission = 1
/obj/item/device/radio/intercom/pirate/New()
/obj/item/radio/intercom/pirate/New()
..()
internal_channels.Cut()
internal_channels = list(
@@ -103,23 +103,23 @@
num2text(SRV_FREQ) = list()
)
/obj/item/device/radio/intercom/Destroy()
/obj/item/radio/intercom/Destroy()
processing_objects.Remove(src)
global_intercoms.Remove(src)
return ..()
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
/obj/item/radio/intercom/attack_ai(mob/user as mob)
add_hiddenprint(user)
add_fingerprint(user)
spawn(0)
attack_self(user)
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
/obj/item/radio/intercom/attack_hand(mob/user as mob)
add_fingerprint(user)
spawn(0)
attack_self(user)
/obj/item/device/radio/intercom/receive_range(freq, level)
/obj/item/radio/intercom/receive_range(freq, level)
if(!is_listening())
return -1
if(!(0 in level))
@@ -133,7 +133,7 @@
return canhear_range
/obj/item/device/radio/intercom/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
switch(buildstage)
if(3)
if(iswirecutter(W) && b_stat && wires.IsAllCut())
@@ -181,12 +181,12 @@
if(do_after(user, 10 * W.toolspeed, target = src))
if(buildstage != 1)
return
new /obj/item/weapon/intercom_electronics(get_turf(src))
new /obj/item/intercom_electronics(get_turf(src))
to_chat(user, "<span class='notice'>The circuitboard pops out!</span>")
buildstage = 0
return 1
if(0)
if(istype(W,/obj/item/weapon/intercom_electronics))
if(istype(W,/obj/item/intercom_electronics))
playsound(get_turf(src), W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed, target = src))
qdel(W)
@@ -194,7 +194,7 @@
buildstage = 1
return 1
if(iswelder(W))
var/obj/item/weapon/weldingtool/WT=W
var/obj/item/weldingtool/WT=W
playsound(get_turf(src), WT.usesound, 50, 1)
if(!WT.remove_fuel(3, user))
to_chat(user, "<span class='warning'>You're out of welding fuel.</span>")
@@ -205,13 +205,13 @@
qdel(src)
return 1
/obj/item/device/radio/intercom/update_icon()
/obj/item/radio/intercom/update_icon()
if(!circuitry_installed)
icon_state="intercom-frame"
return
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
/obj/item/device/radio/intercom/process()
/obj/item/radio/intercom/process()
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
last_tick = world.timeofday
@@ -226,7 +226,7 @@
on = A.powered(EQUIP) // set "on" to the power status
update_icon()
/obj/item/weapon/intercom_electronics
/obj/item/intercom_electronics
name = "intercom electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
@@ -237,28 +237,28 @@
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/device/radio/intercom/locked
/obj/item/radio/intercom/locked
var/locked_frequency
/obj/item/device/radio/intercom/locked/set_frequency(var/frequency)
/obj/item/radio/intercom/locked/set_frequency(var/frequency)
if(frequency == locked_frequency)
..(locked_frequency)
/obj/item/device/radio/intercom/locked/list_channels()
/obj/item/radio/intercom/locked/list_channels()
return ""
/obj/item/device/radio/intercom/locked/ai_private
/obj/item/radio/intercom/locked/ai_private
name = "\improper AI intercom"
frequency = AI_FREQ
/obj/item/device/radio/intercom/locked/confessional
/obj/item/radio/intercom/locked/confessional
name = "confessional intercom"
frequency = 1480
/obj/item/device/radio/intercom/locked/prison
/obj/item/radio/intercom/locked/prison
name = "\improper prison intercom"
desc = "Talk through this. It looks like it has been modified to not broadcast."
/obj/item/device/radio/intercom/locked/prison/New()
/obj/item/radio/intercom/locked/prison/New()
..()
wires.CutWireIndex(WIRE_TRANSMIT)
+67 -65
View File
@@ -19,7 +19,7 @@ var/global/list/default_medbay_channels = list(
num2text(MED_I_FREQ) = list(access_medical)
)
/obj/item/device/radio
/obj/item/radio
icon = 'icons/obj/radio.dmi'
name = "station bounced radio"
suffix = "\[3\]"
@@ -58,31 +58,33 @@ var/global/list/default_medbay_channels = list(
var/list/datum/radio_frequency/secure_radio_connections = new
/obj/item/device/radio/proc/set_frequency(new_frequency)
/obj/item/radio/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/radio/New()
/obj/item/radio/New()
..()
wires = new(src)
internal_channels = default_internal_channels.Copy()
global_radios |= src
/obj/item/device/radio/Destroy()
/obj/item/radio/Destroy()
QDEL_NULL(wires)
if(radio_controller)
radio_controller.remove_object(src, frequency)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
radio_connection = null
global_radios -= src
follow_target = null
return ..()
/obj/item/device/radio/initialize()
/obj/item/radio/Initialize()
..()
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
set_frequency(frequency)
@@ -90,14 +92,14 @@ var/global/list/default_medbay_channels = list(
for(var/ch_name in channels)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/attack_ghost(mob/user)
/obj/item/radio/attack_ghost(mob/user)
return interact(user)
/obj/item/device/radio/attack_self(mob/user as mob)
/obj/item/radio/attack_self(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/item/device/radio/interact(mob/user)
/obj/item/radio/interact(mob/user)
if(!user)
return 0
@@ -106,14 +108,14 @@ var/global/list/default_medbay_channels = list(
return ui_interact(user)
/obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/radio/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -135,10 +137,10 @@ var/global/list/default_medbay_channels = list(
return data
/obj/item/device/radio/proc/list_channels(var/mob/user)
/obj/item/radio/proc/list_channels(var/mob/user)
return list_internal_channels(user)
/obj/item/device/radio/proc/list_secure_channels(var/mob/user)
/obj/item/radio/proc/list_secure_channels(var/mob/user)
var/dat[0]
for(var/ch_name in channels)
@@ -149,7 +151,7 @@ var/global/list/default_medbay_channels = list(
return dat
/obj/item/device/radio/proc/list_internal_channels(var/mob/user)
/obj/item/radio/proc/list_internal_channels(var/mob/user)
var/dat[0]
for(var/internal_chan in internal_channels)
if(has_channel_access(user, internal_chan))
@@ -157,7 +159,7 @@ var/global/list/default_medbay_channels = list(
return dat
/obj/item/device/radio/proc/has_channel_access(var/mob/user, var/freq)
/obj/item/radio/proc/has_channel_access(var/mob/user, var/freq)
if(!user)
return 0
@@ -167,7 +169,7 @@ var/global/list/default_medbay_channels = list(
return user.has_internal_radio_channel_access(user, internal_channels[freq])
/mob/proc/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses)
var/obj/item/weapon/card/id/I = user.get_id_card()
var/obj/item/card/id/I = user.get_id_card()
return has_access(list(), req_one_accesses, I ? I.GetAccess() : list())
/mob/living/silicon/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses)
@@ -177,13 +179,13 @@ var/global/list/default_medbay_channels = list(
/mob/dead/observer/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses)
return can_admin_interact()
/obj/item/device/radio/proc/ToggleBroadcast()
/obj/item/radio/proc/ToggleBroadcast()
broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/proc/ToggleReception()
/obj/item/radio/proc/ToggleReception()
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/Topic(href, href_list)
/obj/item/radio/Topic(href, href_list)
if(..())
return 1
@@ -230,7 +232,7 @@ var/global/list/default_medbay_channels = list(
add_fingerprint(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
/obj/item/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if(channel == "department")
@@ -248,7 +250,7 @@ var/global/list/default_medbay_channels = list(
A.role = role
A.message = message
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
for(var/obj/item/jammer/jammer in active_jammers)
if(get_dist(get_turf(src), get_turf(jammer)) < jammer.range)
jammed = TRUE
break
@@ -269,7 +271,7 @@ var/global/list/default_medbay_channels = list(
universal_speak = 1
/mob/living/automatedannouncer/New()
lifetime_timer = addtimer(src, "autocleanup", SecondsToTicks(10))
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), SecondsToTicks(10), TIMER_STOPPABLE)
..()
/mob/living/automatedannouncer/Destroy()
@@ -283,7 +285,7 @@ var/global/list/default_medbay_channels = list(
qdel(src)
// Interprets the message mode when talking into a radio, possibly returning a connection datum
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
/obj/item/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
// If a channel isn't specified, send to common.
if(!message_mode || message_mode == "headset")
return radio_connection
@@ -299,7 +301,7 @@ var/global/list/default_medbay_channels = list(
// If we were to send to a channel we don't have, drop it.
return RADIO_CONNECTION_FAIL
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
/obj/item/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
if(!on)
return 0 // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
@@ -340,7 +342,7 @@ var/global/list/default_medbay_channels = list(
var/turf/position = get_turf(src)
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
for(var/obj/item/jammer/jammer in active_jammers)
if(get_dist(position, get_turf(jammer)) < jammer.range)
jammed = TRUE
break
@@ -458,7 +460,7 @@ var/global/list/default_medbay_channels = list(
var/filter_type = 2
/* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */
if(istype(src, /obj/item/device/radio/intercom))
if(istype(src, /obj/item/radio/intercom))
filter_type = 1
@@ -518,7 +520,7 @@ var/global/list/default_medbay_channels = list(
filter_type, signal.data["compression"], list(position.z), connection.frequency,verb,speaking)
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
/obj/item/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
if(broadcasting)
if(get_dist(src, M) <= canhear_range)
@@ -526,7 +528,7 @@ var/global/list/default_medbay_channels = list(
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
/obj/item/radio/proc/accept_rad(obj/item/radio/R as obj, message)
if((R.frequency == frequency && message))
return 1
@@ -538,7 +540,7 @@ var/global/list/default_medbay_channels = list(
*/
/obj/item/device/radio/proc/receive_range(freq, level)
/obj/item/radio/proc/receive_range(freq, level)
// check if this radio can receive on the given frequency, and if so,
// what the range is in which mobs will hear the radio
// returns: -1 if can't receive, range otherwise
@@ -567,12 +569,12 @@ var/global/list/default_medbay_channels = list(
return -1
return canhear_range
/obj/item/device/radio/proc/send_hear(freq, level)
/obj/item/radio/proc/send_hear(freq, level)
var/range = receive_range(freq, level)
if(range > -1)
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/proc/is_listening()
/obj/item/radio/proc/is_listening()
var/is_listening = TRUE
if(!on)
is_listening = FALSE
@@ -583,13 +585,13 @@ var/global/list/default_medbay_channels = list(
return is_listening
/obj/item/device/radio/proc/send_announcement()
/obj/item/radio/proc/send_announcement()
if(is_listening())
return get_mobs_in_view(canhear_range, src)
return null
/obj/item/device/radio/examine(mob/user, var/distance = -1)
/obj/item/radio/examine(mob/user, var/distance = -1)
. = ..(user, distance)
if((in_range(src, user) || loc == user))
if(b_stat)
@@ -598,13 +600,13 @@ var/global/list/default_medbay_channels = list(
user.show_message("<span class='notice'>\the [src] can not be modified or attached!</span>")
return .
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/radio/attackby(obj/item/W as obj, mob/user as mob, params)
..()
user.set_machine(src)
if(!( istype(W, /obj/item/weapon/screwdriver) ))
if(!( istype(W, /obj/item/screwdriver) ))
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if(!istype(src, /obj/item/radio/beacon))
if(b_stat)
user.show_message("<span class='notice'>The radio can now be attached and modified!</span>")
else
@@ -615,10 +617,10 @@ var/global/list/default_medbay_channels = list(
return
else return
/obj/item/device/radio/emp_act(severity)
/obj/item/radio/emp_act(severity)
on = 0
disable_timer++
addtimer(src, "enable_radio", rand(100, 200))
addtimer(CALLBACK(src, .proc/enable_radio), rand(100, 200))
if(listening)
visible_message("<span class='warning'>[src] buzzes violently!</span>")
@@ -629,7 +631,7 @@ var/global/list/default_medbay_channels = list(
channels[ch_name] = 0
..()
/obj/item/device/radio/proc/enable_radio()
/obj/item/radio/proc/enable_radio()
if(disable_timer > 0)
disable_timer--
if(!disable_timer)
@@ -640,55 +642,55 @@ var/global/list/default_medbay_channels = list(
///////////////////////////////
//Giving borgs their own radio to have some more room to work with -Sieve
/obj/item/device/radio/borg
/obj/item/radio/borg
var/mob/living/silicon/robot/myborg = null // Cyborg which owns this radio. Used for power checks
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
var/obj/item/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
var/shut_up = 1
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
icon_state = "radio"
canhear_range = 0
subspace_transmission = 1
/obj/item/device/radio/borg/syndicate
/obj/item/radio/borg/syndicate
syndie = 1
keyslot = new /obj/item/device/encryptionkey/syndicate
keyslot = new /obj/item/encryptionkey/syndicate
/obj/item/device/radio/borg/syndicate/CanUseTopic(mob/user, datum/topic_state/state)
/obj/item/radio/borg/syndicate/CanUseTopic(mob/user, datum/topic_state/state)
. = ..()
if(. == STATUS_UPDATE && istype(user, /mob/living/silicon/robot/syndicate))
. = STATUS_INTERACTIVE
/obj/item/device/radio/borg/Destroy()
/obj/item/radio/borg/Destroy()
myborg = null
return ..()
/obj/item/device/radio/borg/list_channels(var/mob/user)
/obj/item/radio/borg/list_channels(var/mob/user)
return list_secure_channels(user)
/obj/item/device/radio/borg/syndicate/New()
/obj/item/radio/borg/syndicate/New()
..()
set_frequency(SYND_FREQ)
/obj/item/device/radio/borg/deathsquad
/obj/item/radio/borg/deathsquad
/obj/item/device/radio/borg/deathsquad/New()
/obj/item/radio/borg/deathsquad/New()
..()
set_frequency(DTH_FREQ)
/obj/item/device/radio/borg/ert
keyslot = new /obj/item/device/encryptionkey/ert
/obj/item/radio/borg/ert
keyslot = new /obj/item/encryptionkey/ert
/obj/item/device/radio/borg/ert/New()
/obj/item/radio/borg/ert/New()
..()
set_frequency(ERT_FREQ)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
// ..()
user.set_machine(src)
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/screwdriver) || (istype(W, /obj/item/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
if(keyslot)
@@ -709,7 +711,7 @@ var/global/list/default_medbay_channels = list(
else
to_chat(user, "This radio doesn't have any encryption keys!")
if(istype(W, /obj/item/device/encryptionkey/))
if(istype(W, /obj/item/encryptionkey/))
if(keyslot)
to_chat(user, "The radio can't hold another key!")
return
@@ -723,7 +725,7 @@ var/global/list/default_medbay_channels = list(
return
/obj/item/device/radio/borg/proc/recalculateChannels()
/obj/item/radio/borg/proc/recalculateChannels()
src.channels = list()
src.syndie = 0
@@ -756,7 +758,7 @@ var/global/list/default_medbay_channels = list(
return
/obj/item/device/radio/borg/Topic(href, href_list)
/obj/item/radio/borg/Topic(href, href_list)
if(..())
return 1
if(href_list["mode"])
@@ -786,20 +788,20 @@ var/global/list/default_medbay_channels = list(
. = 1
/obj/item/device/radio/borg/interact(mob/user as mob)
/obj/item/radio/borg/interact(mob/user as mob)
if(!on)
return
. = ..()
/obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/borg/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/radio/borg/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -822,7 +824,7 @@ var/global/list/default_medbay_channels = list(
return data
/obj/item/device/radio/proc/config(op)
/obj/item/radio/proc/config(op)
if(radio_controller)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
@@ -833,19 +835,19 @@ var/global/list/default_medbay_channels = list(
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
/obj/item/device/radio/off
/obj/item/radio/off
listening = 0
/obj/item/device/radio/phone
/obj/item/radio/phone
broadcasting = 0
icon = 'icons/obj/items.dmi'
icon_state = "red_phone"
listening = 1
name = "phone"
/obj/item/device/radio/phone/medbay
/obj/item/radio/phone/medbay
frequency = MED_I_FREQ
/obj/item/device/radio/phone/medbay/New()
/obj/item/radio/phone/medbay/New()
..()
internal_channels = default_medbay_channels.Copy()
+108 -35
View File
@@ -8,9 +8,10 @@ PLANT ANALYZER
MASS SPECTROMETER
REAGENT SCANNER
*/
/obj/item/device/t_scanner
/obj/item/t_scanner
name = "T-ray scanner"
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon = 'icons/obj/device.dmi'
icon_state = "t-ray0"
var/on = 0
slot_flags = SLOT_BELT
@@ -22,22 +23,22 @@ REAGENT SCANNER
var/scan_range = 1
var/pulse_duration = 10
/obj/item/device/t_scanner/longer_pulse
/obj/item/t_scanner/longer_pulse
pulse_duration = 50
/obj/item/device/t_scanner/extended_range
/obj/item/t_scanner/extended_range
scan_range = 3
/obj/item/device/t_scanner/extended_range/longer_pulse
/obj/item/t_scanner/extended_range/longer_pulse
scan_range = 3
pulse_duration = 50
/obj/item/device/t_scanner/Destroy()
/obj/item/t_scanner/Destroy()
if(on)
processing_objects.Remove(src)
return ..()
/obj/item/device/t_scanner/attack_self(mob/user)
/obj/item/t_scanner/attack_self(mob/user)
on = !on
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
@@ -46,13 +47,13 @@ REAGENT SCANNER
processing_objects.Add(src)
/obj/item/device/t_scanner/process()
/obj/item/t_scanner/process()
if(!on)
processing_objects.Remove(src)
return null
scan()
/obj/item/device/t_scanner/proc/scan()
/obj/item/t_scanner/proc/scan()
for(var/turf/T in range(scan_range, src.loc) )
@@ -107,8 +108,9 @@ REAGENT SCANNER
else
user.show_message("<span class='notice'>Subject is not addicted to any reagents.</span>")
/obj/item/device/healthanalyzer
/obj/item/healthanalyzer
name = "Health Analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "health"
item_state = "healthanalyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
@@ -124,7 +126,7 @@ REAGENT SCANNER
var/mode = 1;
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
to_chat(user, text("<span class='warning'>You try to analyze the floor's vitals!</span>"))
for(var/mob/O in viewers(M, null))
@@ -243,7 +245,7 @@ REAGENT SCANNER
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>")
var/implant_detect
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
if(CI.status == ORGAN_ROBOT)
if(CI.is_robotic())
implant_detect += "[H.name] is modified with a [CI.name].<br>"
if(implant_detect)
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
@@ -259,7 +261,7 @@ REAGENT SCANNER
src.add_fingerprint(user)
return
/obj/item/device/healthanalyzer/verb/toggle_mode()
/obj/item/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"
set category = "Object"
@@ -270,8 +272,8 @@ REAGENT SCANNER
if(0)
to_chat(usr, "The scanner no longer shows limb damage.")
/obj/item/device/healthanalyzer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/healthupgrade))
/obj/item/healthanalyzer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/healthupgrade))
if(upgraded)
to_chat(user, "<span class='notice'>You have already installed an upgraded in the [src].</span>")
else
@@ -281,24 +283,26 @@ REAGENT SCANNER
upgraded = 1
qdel(W)
/obj/item/device/healthanalyzer/advanced
/obj/item/healthanalyzer/advanced
upgraded = 1
/obj/item/device/healthanalyzer/advanced/New()
/obj/item/healthanalyzer/advanced/New()
overlays += "advanced"
/obj/item/device/healthupgrade
/obj/item/healthupgrade
name = "Health Analyzer Upgrade"
icon = 'icons/obj/device.dmi'
icon_state = "healthupgrade"
desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality."
w_class = WEIGHT_CLASS_TINY
origin_tech = "magnets=2;biotech=2"
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/device/analyzer
/obj/item/analyzer
desc = "A hand-held environmental scanner which reports current gas levels."
name = "analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "atmos"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
@@ -309,8 +313,11 @@ REAGENT SCANNER
throw_range = 7
materials = list(MAT_METAL=30, MAT_GLASS=20)
origin_tech = "magnets=1;engineering=1"
var/cooldown = FALSE
var/cooldown_time = 250
var/accuracy // 0 is the best accuracy.
/obj/item/device/analyzer/attack_self(mob/user as mob)
/obj/item/analyzer/attack_self(mob/user as mob)
if(user.stat)
return
@@ -362,9 +369,73 @@ REAGENT SCANNER
src.add_fingerprint(user)
return
/obj/item/device/mass_spectrometer
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
..()
if(!user.incapacitated() && Adjacent(user))
if(cooldown)
to_chat(user, "<span class='warning'>[src]'s barometer function is prepraring itself.</span>")
return
var/turf/T = get_turf(user)
if(!T)
return
playsound(src, 'sound/effects/pop.ogg', 100)
var/area/user_area = T.loc
var/datum/weather/ongoing_weather = null
if(!user_area.outdoors)
to_chat(user, "<span class='warning'>[src]'s barometer function won't work indoors!</span>")
return
for(var/V in SSweather.processing)
var/datum/weather/W = V
if(W.barometer_predictable && (T.z in W.impacted_z_levels) && W.area_type == user_area.type && !(W.stage == END_STAGE))
ongoing_weather = W
break
if(ongoing_weather)
if((ongoing_weather.stage == MAIN_STAGE) || (ongoing_weather.stage == WIND_DOWN_STAGE))
to_chat(user, "<span class='warning'>[src]'s barometer function can't trace anything while the storm is [ongoing_weather.stage == MAIN_STAGE ? "already here!" : "winding down."]</span>")
return
to_chat(user, "<span class='notice'>The next [ongoing_weather] will hit in [butchertime(ongoing_weather.next_hit_time - world.time)].</span>")
if(ongoing_weather.aesthetic)
to_chat(user, "<span class='warning'>[src]'s barometer function says that the next storm will breeze on by.</span>")
else
var/next_hit = SSweather.next_hit_by_zlevel["[T.z]"]
var/fixed = next_hit ? next_hit - world.time : -1
if(fixed < 0)
to_chat(user, "<span class='warning'>[src]'s barometer function was unable to trace any weather patterns.</span>")
else
to_chat(user, "<span class='warning'>[src]'s barometer function says a storm will land in approximately [butchertime(fixed)].</span>")
cooldown = TRUE
addtimer(CALLBACK(src,/obj/item/analyzer/proc/ping), cooldown_time)
/obj/item/analyzer/proc/ping()
if(isliving(loc))
var/mob/living/L = loc
to_chat(L, "<span class='notice'>[src]'s barometer function is ready!</span>")
playsound(src, 'sound/machines/click.ogg', 100)
cooldown = FALSE
/obj/item/analyzer/proc/butchertime(amount)
if(!amount)
return
if(accuracy)
var/inaccurate = round(accuracy * (1 / 3))
if(prob(50))
amount -= inaccurate
if(prob(50))
amount += inaccurate
return DisplayTimeText(max(1, amount))
/obj/item/mass_spectrometer
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample. Inject sample with syringe."
name = "mass-spectrometer"
icon = 'icons/obj/device.dmi'
icon_state = "spectrometer"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
@@ -380,17 +451,17 @@ REAGENT SCANNER
var/scanning = TRUE
actions_types = list(/datum/action/item_action/print_report)
/obj/item/device/mass_spectrometer/New()
/obj/item/mass_spectrometer/New()
..()
create_reagents(5)
/obj/item/device/mass_spectrometer/on_reagent_change()
/obj/item/mass_spectrometer/on_reagent_change()
if(reagents.total_volume)
icon_state = initial(icon_state) + "_s"
else
icon_state = initial(icon_state)
/obj/item/device/mass_spectrometer/attack_self(mob/user as mob)
/obj/item/mass_spectrometer/attack_self(mob/user as mob)
if(user.stat)
return
if(!user.IsAdvancedToolUser())
@@ -418,20 +489,20 @@ REAGENT SCANNER
reagents.clear_reagents()
return
/obj/item/device/mass_spectrometer/adv
/obj/item/mass_spectrometer/adv
name = "advanced mass-spectrometer"
icon_state = "adv_spectrometer"
details = 1
origin_tech = "magnets=4;biotech=3;plasmatech=3"
/obj/item/device/mass_spectrometer/proc/print_report()
/obj/item/mass_spectrometer/proc/print_report()
if(!scanning)
scanning = TRUE
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(50)
var/obj/item/weapon/paper/P = new(get_turf(src))
var/obj/item/paper/P = new(get_turf(src))
P.name = "Mass Spectrometer Scanner Report: [station_time_timestamp()]"
P.info = "<center><b>Mass Spectrometer</b></center><br><center>Data Analysis:</center><br><hr><br><b>Trace chemicals detected:</b><br>[datatoprint]<br><hr>"
@@ -443,12 +514,13 @@ REAGENT SCANNER
else
to_chat(usr, "<span class='notice'>[src] has no logs or is already in use.</span>")
/obj/item/device/mass_spectrometer/ui_action_click()
/obj/item/mass_spectrometer/ui_action_click()
print_report()
/obj/item/device/reagent_scanner
/obj/item/reagent_scanner
name = "reagent scanner"
desc = "A hand-held reagent scanner which identifies chemical agents."
icon = 'icons/obj/device.dmi'
icon_state = "spectrometer"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
@@ -464,7 +536,7 @@ REAGENT SCANNER
var/scanning = 1
actions_types = list(/datum/action/item_action/print_report)
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
/obj/item/reagent_scanner/afterattack(obj/O, mob/user as mob)
if(user.stat)
return
if(!user.IsAdvancedToolUser())
@@ -489,19 +561,19 @@ REAGENT SCANNER
to_chat(user, "<span class='notice'>No significant chemical agents found in [O].</span>")
return
/obj/item/device/reagent_scanner/adv
/obj/item/reagent_scanner/adv
name = "advanced reagent scanner"
icon_state = "adv_spectrometer"
details = 1
origin_tech = "magnets=4;biotech=3;plasmatech=3"
/obj/item/device/reagent_scanner/proc/print_report()
/obj/item/reagent_scanner/proc/print_report()
if(!scanning)
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(50)
var/obj/item/weapon/paper/P = new(get_turf(src))
var/obj/item/paper/P = new(get_turf(src))
P.name = "Reagent Scanner Report: [station_time_timestamp()]"
P.info = "<center><b>Reagent Scanner</b></center><br><center>Data Analysis:</center><br><hr><br><b>Chemical agents detected:</b><br> [datatoprint]<br><hr>"
@@ -514,11 +586,12 @@ REAGENT SCANNER
else
to_chat(usr, "<span class='notice'>[src] has no logs or is already in use.</span>")
/obj/item/device/reagent_scanner/ui_action_click()
/obj/item/reagent_scanner/ui_action_click()
print_report()
/obj/item/device/slime_scanner
/obj/item/slime_scanner
name = "slime scanner"
icon = 'icons/obj/device.dmi'
icon_state = "adv_spectrometer_s"
item_state = "analyzer"
origin_tech = "biotech=2"
@@ -529,7 +602,7 @@ REAGENT SCANNER
throw_range = 7
materials = list(MAT_METAL=30, MAT_GLASS=20)
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
if(!isslime(M))
user.show_message("<span class='warning'>This device can only scan slimes!</span>", 1)
return
@@ -1,4 +1,4 @@
/obj/item/device/sensor_device
/obj/item/sensor_device
name = "handheld crew monitor"
desc = "A miniature machine that tracks suit sensors across the station."
icon = 'icons/obj/device.dmi'
@@ -8,15 +8,15 @@
origin_tech = "programming=3;materials=3;magnets=3"
var/datum/nano_module/crew_monitor/crew_monitor
/obj/item/device/sensor_device/New()
/obj/item/sensor_device/New()
crew_monitor = new(src)
/obj/item/device/sensor_device/Destroy()
/obj/item/sensor_device/Destroy()
QDEL_NULL(crew_monitor)
return ..()
/obj/item/device/sensor_device/attack_self(mob/user as mob)
/obj/item/sensor_device/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
+35 -33
View File
@@ -1,6 +1,7 @@
/obj/item/device/taperecorder
/obj/item/taperecorder
name = "universal recorder"
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
icon = 'icons/obj/device.dmi'
icon_state = "taperecorder_empty"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
@@ -11,33 +12,33 @@
var/recording = 0
var/playing = 0
var/playsleepseconds = 0
var/obj/item/device/tape/mytape
var/obj/item/tape/mytape
var/open_panel = 0
var/canprint = 1
/obj/item/device/taperecorder/New()
mytape = new /obj/item/device/tape/random(src)
/obj/item/taperecorder/New()
mytape = new /obj/item/tape/random(src)
update_icon()
/obj/item/device/taperecorder/Destroy()
/obj/item/taperecorder/Destroy()
QDEL_NULL(mytape)
return ..()
/obj/item/device/taperecorder/examine(mob/user)
/obj/item/taperecorder/examine(mob/user)
if(..(user, 1))
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user)
if(!mytape && istype(I, /obj/item/device/tape))
/obj/item/taperecorder/attackby(obj/item/I, mob/user)
if(!mytape && istype(I, /obj/item/tape))
user.drop_item()
I.loc = src
mytape = I
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
update_icon()
/obj/item/device/taperecorder/proc/eject(mob/user)
/obj/item/taperecorder/proc/eject(mob/user)
if(mytape)
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
stop()
@@ -46,11 +47,11 @@
update_icon()
/obj/item/device/taperecorder/fire_act()
/obj/item/taperecorder/fire_act()
mytape.ruin() //Fires destroy the tape
return ..()
/obj/item/device/taperecorder/attack_hand(mob/user)
/obj/item/taperecorder/attack_hand(mob/user)
if(loc == user)
if(mytape)
if(user.l_hand != src && user.r_hand != src)
@@ -61,7 +62,7 @@
..()
/obj/item/device/taperecorder/verb/ejectverb()
/obj/item/taperecorder/verb/ejectverb()
set name = "Eject Tape"
set category = "Object"
@@ -73,7 +74,7 @@
eject(usr)
/obj/item/device/taperecorder/update_icon()
/obj/item/taperecorder/update_icon()
if(!mytape)
icon_state = "taperecorder_empty"
else if(recording)
@@ -84,7 +85,7 @@
icon_state = "taperecorder_idle"
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg)
/obj/item/taperecorder/hear_talk(mob/living/M as mob, msg)
if(mytape && recording)
var/ending = copytext(msg, length(msg))
mytape.timestamp += mytape.used_capacity
@@ -102,12 +103,12 @@
return
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] says, \"[msg]\""
/obj/item/device/taperecorder/hear_message(mob/living/M as mob, msg)
/obj/item/taperecorder/hear_message(mob/living/M as mob, msg)
if(mytape && recording)
mytape.timestamp += mytape.used_capacity
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] [msg]"
/obj/item/device/taperecorder/verb/record()
/obj/item/taperecorder/verb/record()
set name = "Start Recording"
set category = "Object"
@@ -140,7 +141,7 @@
to_chat(usr, "<span class='notice'>The tape is full.</span>")
/obj/item/device/taperecorder/verb/stop()
/obj/item/taperecorder/verb/stop()
set name = "Stop"
set category = "Object"
@@ -159,7 +160,7 @@
update_icon()
/obj/item/device/taperecorder/verb/play()
/obj/item/taperecorder/verb/play()
set name = "Play Tape"
set category = "Object"
@@ -203,7 +204,7 @@
update_icon()
/obj/item/device/taperecorder/attack_self(mob/user)
/obj/item/taperecorder/attack_self(mob/user)
if(!mytape || mytape.ruined)
return
if(recording)
@@ -212,7 +213,7 @@
record()
/obj/item/device/taperecorder/verb/print_transcript()
/obj/item/taperecorder/verb/print_transcript()
set name = "Print Transcript"
set category = "Object"
@@ -228,7 +229,7 @@
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
var/t1 = "<B>Transcript:</B><BR><BR>"
for(var/i = 1, mytape.storedinfo.len >= i, i++)
t1 += "[mytape.storedinfo[i]]<BR>"
@@ -240,13 +241,14 @@
canprint = 1
//empty tape recorders
/obj/item/device/taperecorder/empty/New()
/obj/item/taperecorder/empty/New()
return
/obj/item/device/tape
/obj/item/tape
name = "tape"
desc = "A magnetic tape that can hold up to ten minutes of content."
icon = 'icons/obj/device.dmi'
icon_state = "tape_white"
item_state = "analyzer"
w_class = WEIGHT_CLASS_TINY
@@ -259,15 +261,15 @@
var/list/timestamp = list()
var/ruined = 0
/obj/item/device/tape/fire_act()
/obj/item/tape/fire_act()
ruin()
/obj/item/device/tape/attack_self(mob/user)
/obj/item/tape/attack_self(mob/user)
if(!ruined)
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
ruin()
/obj/item/device/tape/verb/wipe()
/obj/item/tape/verb/wipe()
set name = "Wipe Tape"
set category = "Object"
@@ -279,30 +281,30 @@
to_chat(usr, "You erase the data from the [src]")
clear()
/obj/item/device/tape/proc/clear()
/obj/item/tape/proc/clear()
used_capacity = 0
storedinfo.Cut()
timestamp.Cut()
/obj/item/device/tape/proc/ruin()
/obj/item/tape/proc/ruin()
if(!ruined)
overlays += "ribbonoverlay"
ruined = 1
/obj/item/device/tape/proc/fix()
/obj/item/tape/proc/fix()
overlays -= "ribbonoverlay"
ruined = 0
/obj/item/device/tape/attackby(obj/item/I, mob/user)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
/obj/item/tape/attackby(obj/item/I, mob/user)
if(ruined && istype(I, /obj/item/screwdriver))
to_chat(user, "<span class='notice'>You start winding the tape back in.</span>")
if(do_after(user, 120 * I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wound the tape back in!</span>")
fix()
else if(istype(I, /obj/item/weapon/pen))
else if(istype(I, /obj/item/pen))
var/title = stripped_input(usr,"What do you want to name the tape?", "Tape Renaming", name, MAX_NAME_LEN)
if(!title || !length(title))
name = initial(name)
@@ -311,5 +313,5 @@
//Random colour tapes
/obj/item/device/tape/random/New()
/obj/item/tape/random/New()
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
@@ -14,9 +14,10 @@ effective or pretty fucking useless.
*/
/obj/item/device/batterer
/obj/item/batterer
name = "mind batterer"
desc = "A strange device with twin antennas."
icon = 'icons/obj/device.dmi'
icon_state = "batterer"
throwforce = 5
w_class = WEIGHT_CLASS_TINY
@@ -29,14 +30,14 @@ effective or pretty fucking useless.
var/times_used = 0 //Number of times it's been used.
var/max_uses = 5
/obj/item/device/batterer/examine(mob/user)
/obj/item/batterer/examine(mob/user)
..(user)
if(times_used >= max_uses)
to_chat(user, "<span class='notice'>[src] is out of charge.</span>")
if(times_used < max_uses)
to_chat(user, "<span class='notice'>[src] has [max_uses-times_used] charges left.</span>")
/obj/item/device/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
/obj/item/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!user)
return
if(times_used >= max_uses)
@@ -47,7 +48,7 @@ effective or pretty fucking useless.
for(var/mob/living/carbon/human/M in oview(7, user))
if(prob(50))
M.Weaken(rand(4,7))
add_logs(user, M, "stunned", src)
add_attack_logs(user, M, "Stunned with [src]")
to_chat(M, "<span class='danger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
else
to_chat(M, "<span class='danger'>You feel a sudden, electric jolt travel through your head.</span>")
@@ -71,8 +72,9 @@ effective or pretty fucking useless.
Wavelength is also slightly increased by the intensity as well.
*/
/obj/item/device/rad_laser
/obj/item/rad_laser
name = "Health Analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "health2"
item_state = "healthanalyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
@@ -88,9 +90,9 @@ effective or pretty fucking useless.
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
var/used = 0 // is it cooling down?
/obj/item/device/rad_laser/attack(mob/living/M, mob/living/user)
/obj/item/rad_laser/attack(mob/living/M, mob/living/user)
if(!used)
add_logs(user, M, "irradiated", src)
add_attack_logs(user, M, "Irradiated by [src]")
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10))
used = 1
@@ -104,16 +106,16 @@ effective or pretty fucking useless.
else
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
/obj/item/device/rad_laser/proc/handle_cooldown(cooldown)
/obj/item/rad_laser/proc/handle_cooldown(cooldown)
spawn(cooldown)
used = 0
icon_state = "health2"
/obj/item/device/rad_laser/attack_self(mob/user)
/obj/item/rad_laser/attack_self(mob/user)
..()
interact(user)
/obj/item/device/rad_laser/interact(mob/user)
/obj/item/rad_laser/interact(mob/user)
user.set_machine(src)
var/cooldown = round(max(10,((intensity*8)-(wavelength/2))+(intensity*2)))
@@ -127,7 +129,7 @@ effective or pretty fucking useless.
popup.set_content(dat)
popup.open()
/obj/item/device/rad_laser/Topic(href, href_list)
/obj/item/rad_laser/Topic(href, href_list)
if(..())
return 1
@@ -147,18 +149,19 @@ effective or pretty fucking useless.
add_fingerprint(usr)
return
/obj/item/device/jammer
/obj/item/jammer
name = "radio jammer"
desc = "Device used to disrupt nearby radio communication."
icon = 'icons/obj/device.dmi'
icon_state = "jammer"
var/active = FALSE
var/range = 12
/obj/item/device/jammer/Destroy()
/obj/item/jammer/Destroy()
active_jammers -= src
return ..()
/obj/item/device/jammer/attack_self(mob/user)
/obj/item/jammer/attack_self(mob/user)
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
active = !active
if(active)
@@ -1,29 +1,29 @@
/obj/item/device/transfer_valve
/obj/item/transfer_valve
icon = 'icons/obj/assemblies.dmi'
name = "tank transfer valve"
icon_state = "valve_1"
item_state = "ttv"
desc = "Regulates the transfer of air between two tanks"
var/obj/item/weapon/tank/tank_one = null
var/obj/item/weapon/tank/tank_two = null
var/obj/item/device/assembly/attached_device = null
var/obj/item/tank/tank_one = null
var/obj/item/tank/tank_two = null
var/obj/item/assembly/attached_device = null
var/mob/living/attacher = null
var/valve_open = 0
var/toggle = 1
origin_tech = "materials=1;engineering=1"
/obj/item/device/transfer_valve/Destroy()
/obj/item/transfer_valve/Destroy()
QDEL_NULL(tank_one)
QDEL_NULL(tank_two)
QDEL_NULL(attached_device)
attacher = null
return ..()
/obj/item/device/transfer_valve/IsAssemblyHolder()
/obj/item/transfer_valve/IsAssemblyHolder()
return 1
/obj/item/device/transfer_valve/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/tank))
/obj/item/transfer_valve/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/tank))
if(tank_one && tank_two)
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first.</span>")
return
@@ -49,7 +49,7 @@
SSnanoui.update_uis(src) // update all UIs attached to src
//TODO: Have this take an assemblyholder
else if(isassembly(I))
var/obj/item/device/assembly/A = I
var/obj/item/assembly/A = I
if(A.secured)
to_chat(user, "<span class='notice'>The device is secured.</span>")
return
@@ -63,32 +63,32 @@
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
bombers += "[key_name(user)] attached a [A] to a transfer valve."
msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.")
investigate_log("[key_name(user)] attached a [A] to a transfer valve.", INVESTIGATE_BOMB)
msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.", ATKLOG_FEW)
log_game("[key_name_admin(user)] attached [A] to a transfer valve.")
attacher = user
SSnanoui.update_uis(src) // update all UIs attached to src
/obj/item/device/transfer_valve/HasProximity(atom/movable/AM)
/obj/item/transfer_valve/HasProximity(atom/movable/AM)
if(!attached_device)
return
attached_device.HasProximity(AM)
/obj/item/device/transfer_valve/hear_talk(mob/living/M, msg)
/obj/item/transfer_valve/hear_talk(mob/living/M, msg)
..()
for(var/obj/O in contents)
O.hear_talk(M, msg)
/obj/item/device/transfer_valve/hear_message(mob/living/M, msg)
/obj/item/transfer_valve/hear_message(mob/living/M, msg)
..()
for(var/obj/O in contents)
O.hear_message(M, msg)
/obj/item/device/transfer_valve/attack_self(mob/user)
/obj/item/transfer_valve/attack_self(mob/user)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
/obj/item/transfer_valve/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
// update the ui if it exists, returns null if no ui is passed/found
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -100,7 +100,7 @@
// auto update every Master Controller tick
//ui.set_auto_update(1)
/obj/item/device/transfer_valve/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/transfer_valve/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
var/data[0]
data["attachmentOne"] = tank_one ? tank_one.name : null
@@ -110,7 +110,7 @@
return data
/obj/item/device/transfer_valve/Topic(href, href_list)
/obj/item/transfer_valve/Topic(href, href_list)
..()
if(usr.incapacitated())
return 0
@@ -145,14 +145,14 @@
add_fingerprint(usr)
return 1 // Returning 1 sends an update to attached UIs
/obj/item/device/transfer_valve/proc/process_activation(obj/item/device/D)
/obj/item/transfer_valve/proc/process_activation(obj/item/D)
if(toggle)
toggle = 0
toggle_valve()
spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever
toggle = 1
/obj/item/device/transfer_valve/update_icon()
/obj/item/transfer_valve/update_icon()
overlays.Cut()
underlays = null
@@ -170,13 +170,13 @@
if(attached_device)
overlays += "device"
/obj/item/device/transfer_valve/proc/merge_gases()
/obj/item/transfer_valve/proc/merge_gases()
tank_two.air_contents.volume += tank_one.air_contents.volume
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
tank_two.air_contents.merge(temp)
/obj/item/device/transfer_valve/proc/split_gases()
/obj/item/transfer_valve/proc/split_gases()
if(!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
@@ -190,7 +190,7 @@
it explodes properly when it gets a signal (and it does).
*/
/obj/item/device/transfer_valve/proc/toggle_valve()
/obj/item/transfer_valve/proc/toggle_valve()
if(!valve_open && tank_one && tank_two)
valve_open = 1
var/turf/bombturf = get_turf(src)
@@ -204,7 +204,7 @@
var/mob/mob = get_mob_by_key(src.fingerprintslast)
bombers += "Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]"
investigate_log("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]", INVESTIGATE_BOMB)
message_admins("Bomb valve opened at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name_admin(mob)]")
log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]")
merge_gases()
+33 -30
View File
@@ -8,9 +8,10 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/list/world_uplinks = list()
/obj/item/device/uplink
/obj/item/uplink
var/welcome // Welcoming menu message
var/uses // Numbers of crystals
var/hidden_crystals = 0
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
@@ -24,10 +25,10 @@ var/list/world_uplinks = list()
var/job = null
var/show_descriptions = 0
/obj/item/device/uplink/nano_host()
/obj/item/uplink/nano_host()
return loc
/obj/item/device/uplink/New()
/obj/item/uplink/New()
..()
welcome = ticker.mode.uplink_welcome
uses = ticker.mode.uplink_uses
@@ -35,17 +36,17 @@ var/list/world_uplinks = list()
world_uplinks += src
/obj/item/device/uplink/Destroy()
/obj/item/uplink/Destroy()
world_uplinks -= src
return ..()
/obj/item/device/uplink/proc/generate_items(mob/user as mob)
/obj/item/uplink/proc/generate_items(mob/user as mob)
var/datum/nano_item_lists/IL = generate_item_lists(user)
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(mob/user as mob)
/obj/item/uplink/proc/generate_menu(mob/user as mob)
if(!job)
job = user.mind.assigned_role
@@ -53,7 +54,7 @@ var/list/world_uplinks = list()
dat += "Telecrystals left: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Request item:</B><BR>"
dat += "<I>Each item costs a number of telecrystals as indicated by the number following their name.</I><br>"
dat += "<I>Each item costs a number of telecrystals as indicated by the number following its name.</I><br>"
var/category_items = 1
for(var/category in ItemsCategory)
@@ -79,7 +80,7 @@ var/list/world_uplinks = list()
/*
Built the item lists for use with NanoUI
*/
/obj/item/device/uplink/proc/generate_item_lists(mob/user as mob)
/obj/item/uplink/proc/generate_item_lists(mob/user as mob)
if(!job)
job = user.mind.assigned_role
@@ -101,7 +102,7 @@ var/list/world_uplinks = list()
return result
//If 'random' was selected
/obj/item/device/uplink/proc/chooseRandomItem()
/obj/item/uplink/proc/chooseRandomItem()
if(uses <= 0)
return
@@ -112,7 +113,7 @@ var/list/world_uplinks = list()
random_items += UI
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
/obj/item/uplink/Topic(href, href_list)
if(..())
return 1
@@ -125,7 +126,7 @@ var/list/world_uplinks = list()
return buy(UI, UI ? UI.reference : "")
return 0
/obj/item/device/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
/obj/item/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(!UI)
return
UI.buy(src,usr)
@@ -153,24 +154,24 @@ var/list/world_uplinks = list()
Then check if it's true, if true return. This will stop the normal menu appearing and will instead show the uplink menu.
*/
/obj/item/device/uplink/hidden
/obj/item/uplink/hidden
name = "hidden uplink"
desc = "There is something wrong if you're examining this."
var/active = 0
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
/obj/item/uplink/hidden/New()
spawn(2)
if(!istype(src.loc, /obj/item))
qdel(src)
..()
// 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()
/obj/item/uplink/hidden/proc/toggle()
active = !active
// Directly trigger the uplink. Turn on if it isn't already.
/obj/item/device/uplink/hidden/proc/trigger(mob/user as mob)
/obj/item/uplink/hidden/proc/trigger(mob/user as mob)
if(!active)
toggle()
interact(user)
@@ -178,7 +179,7 @@ var/list/world_uplinks = list()
// Checks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset.
// If true, it accesses trigger() and returns 1. If it fails, it returns false. Use this to see if you need to close the
// current item's menu.
/obj/item/device/uplink/hidden/proc/check_trigger(mob/user as mob, var/value, var/target)
/obj/item/uplink/hidden/proc/check_trigger(mob/user as mob, var/value, var/target)
if(value == target)
trigger(user)
return 1
@@ -187,7 +188,7 @@ var/list/world_uplinks = list()
/*
NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
/obj/item/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/title = "Remote Uplink"
// update the ui if it exists, returns null if no ui is passed/found
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -198,7 +199,7 @@ var/list/world_uplinks = list()
// open the new ui window
ui.open()
/obj/item/device/uplink/hidden/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
/obj/item/uplink/hidden/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
data["welcome"] = welcome
@@ -213,11 +214,11 @@ var/list/world_uplinks = list()
return data
// 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)
/obj/item/uplink/hidden/interact(mob/user)
ui_interact(user)
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
/obj/item/uplink/hidden/Topic(href, href_list)
if(usr.stat || usr.restrained())
return 1
@@ -231,6 +232,8 @@ var/list/world_uplinks = list()
return 1
else if(href_list["lock"])
toggle()
uses += hidden_crystals
hidden_crystals = 0
ui.close()
return 1
if(href_list["return"])
@@ -249,7 +252,7 @@ var/list/world_uplinks = list()
SSnanoui.update_uis(src)
return 1
/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
/obj/item/uplink/hidden/proc/update_nano_data(var/id)
if(nanoui_menu == 1)
var/permanentData[0]
for(var/datum/data/record/L in sortRecord(data_core.general))
@@ -285,9 +288,9 @@ var/list/world_uplinks = list()
return 0
//Refund proc for the borg teleporter (later I'll make a general refund proc if there is demand for it)
/obj/item/device/radio/uplink/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/antag_spawner/borg_tele))
var/obj/item/weapon/antag_spawner/borg_tele/S = W
/obj/item/radio/uplink/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/antag_spawner/borg_tele))
var/obj/item/antag_spawner/borg_tele/S = W
if(!S.used && !S.checking)
hidden_uplink.uses += S.TC_cost
qdel(S)
@@ -301,25 +304,25 @@ var/list/world_uplinks = list()
// Includes normal radio uplink, multitool uplink,
// implant uplink (not the implant tool) and a preset headset uplink.
/obj/item/device/radio/uplink/New()
/obj/item/radio/uplink/New()
hidden_uplink = new(src)
icon_state = "radio"
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
/obj/item/radio/uplink/attack_self(mob/user as mob)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/multitool/uplink/New()
/obj/item/multitool/uplink/New()
hidden_uplink = new(src)
/obj/item/device/multitool/uplink/attack_self(mob/user as mob)
/obj/item/multitool/uplink/attack_self(mob/user as mob)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/radio/headset/uplink
/obj/item/radio/headset/uplink
traitor_frequency = 1445
/obj/item/device/radio/headset/uplink/New()
/obj/item/radio/headset/uplink/New()
..()
hidden_uplink = new(src)
hidden_uplink.uses = 20
+4 -3
View File
@@ -1,6 +1,7 @@
/obj/item/device/hailer
/obj/item/hailer
name = "hailer"
desc = "Used by obese officers to save their breath for running."
icon = 'icons/obj/device.dmi'
icon_state = "voice0"
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
w_class = WEIGHT_CLASS_TINY
@@ -9,7 +10,7 @@
var/spamcheck = 0
var/emagged = 0
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
/obj/item/hailer/attack_self(mob/living/carbon/user as mob)
if(spamcheck)
return
@@ -24,7 +25,7 @@
spawn(20)
spamcheck = 0
/obj/item/device/hailer/emag_act(user as mob)
/obj/item/hailer/emag_act(user as mob)
if(!emagged)
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
emagged = 1
+1 -1
View File
@@ -10,7 +10,7 @@
burn_state = FLAMMABLE
var/rolled = FALSE
/obj/item/flag/attackby(obj/item/weapon/W, mob/user, params)
/obj/item/flag/attackby(obj/item/W, mob/user, params)
..()
if(is_hot(W) && burn_state != ON_FIRE)
user.visible_message("<span class='notice'>[user] lights [src] with [W].</span>", "<span class='notice'>You light [src] with [W].</span>", "<span class='warning'>You hear a low whoosh.</span>")
+3 -3
View File
@@ -15,7 +15,7 @@
QDEL_NULL(air_contents)
return ..()
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user)
/obj/item/latexballon/proc/blow(obj/item/tank/tank, mob/user)
if(icon_state == "latexballon_bursted")
return
icon_state = "latexballon_blow"
@@ -55,8 +55,8 @@
return
/obj/item/latexballon/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/tank))
var/obj/item/weapon/tank/T = W
if(istype(W, /obj/item/tank))
var/obj/item/tank/T = W
blow(T, user)
return
if(is_sharp(W) || is_hot(W) || is_pointed(W))
+1 -1
View File
@@ -9,7 +9,7 @@
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
/obj/item/weapon/beach_ball
/obj/item/beach_ball
icon = 'icons/misc/beach.dmi'
icon_state = "ball"
name = "beach ball"
@@ -7,9 +7,9 @@
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
/obj/item/mounted/frame/attackby(obj/item/weapon/W, mob/user)
/obj/item/mounted/frame/attackby(obj/item/W, mob/user)
..()
if(istype(W, /obj/item/weapon/wrench) && sheets_refunded)
if(istype(W, /obj/item/wrench) && sheets_refunded)
//new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(get_turf(src))
M.amount = sheets_refunded
@@ -6,5 +6,5 @@
mount_reqs = list("simfloor", "nospace")
/obj/item/mounted/frame/intercom/do_build(turf/on_wall, mob/user)
new /obj/item/device/radio/intercom(get_turf(src), get_dir(user, on_wall), 0)
new /obj/item/radio/intercom(get_turf(src), get_dir(user, on_wall), 0)
qdel(src)
-203
View File
@@ -1,203 +0,0 @@
//Define all tape types in policetape.dm
/obj/item/taperoll
name = "tape roll"
icon = 'icons/policetape.dmi'
icon_state = "rollstart"
w_class = WEIGHT_CLASS_TINY
var/turf/start
var/turf/end
var/tape_type = /obj/item/tape
var/icon_base
var/list/image/hazard_overlays
var/list/tape_roll_applications = list()
/obj/item/tape
name = "tape"
icon = 'icons/policetape.dmi'
anchored = 1
density = 1
var/icon_base
/obj/item/tape/New()
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/police
name = "police tape"
desc = "A roll of police tape used to block off crime scenes from the public."
icon_state = "police_start"
tape_type = /obj/item/tape/police
icon_base = "police"
/obj/item/tape/police
name = "police tape"
desc = "A length of police tape. Do not cross."
req_one_access = list(access_security,access_forensics_lockers)
icon_base = "police"
/obj/item/taperoll/engineering
name = "engineering tape"
desc = "A roll of engineering tape used to block off working areas from the public."
icon_state = "engineering_start"
tape_type = /obj/item/tape/engineering
icon_base = "engineering"
/obj/item/tape/engineering
name = "engineering tape"
desc = "A length of engineering tape. Better not cross it."
req_one_access = list(access_engine,access_atmospherics)
icon_base = "engineering"
/obj/item/taperoll/attack_self(mob/user as mob)
if(icon_state == "[icon_base]_start")
start = get_turf(src)
to_chat(usr, "<span class='notice'>You place the first end of the [src].</span>")
icon_state = "[icon_base]_stop"
else
icon_state = "[icon_base]_start"
end = get_turf(src)
if(start.y != end.y && start.x != end.x || start.z != end.z)
to_chat(usr, "<span class='notice'>[src] can only be laid horizontally or vertically.</span>")
return
var/turf/cur = start
var/dir
if(start.x == end.x)
var/d = end.y-start.y
if(d) d = d/abs(d)
end = get_turf(locate(end.x,end.y+d,end.z))
dir = "v"
else
var/d = end.x-start.x
if(d) d = d/abs(d)
end = get_turf(locate(end.x+d,end.y,end.z))
dir = "h"
var/can_place = 1
while(cur!=end && can_place)
if(cur.density == 1)
can_place = 0
else if(istype(cur, /turf/space))
can_place = 0
else
for(var/obj/O in cur)
if(!istype(O, /obj/item/tape) && O.density)
can_place = 0
break
cur = get_step_towards(cur,end)
if(!can_place)
to_chat(usr, "<span class='notice'>You can't run \the [src] through that!</span>")
return
cur = start
var/tapetest = 0
while(cur!=end)
for(var/obj/item/tape/Ptest in cur)
if(Ptest.icon_state == "[Ptest.icon_base]_[dir]")
tapetest = 1
if(tapetest != 1)
var/obj/item/tape/P = new tape_type(cur)
P.icon_state = "[P.icon_base]_[dir]"
cur = get_step_towards(cur,end)
//is_blocked_turf(var/turf/T)
to_chat(usr, "<span class='notice'>You finish placing the [src].</span>")//Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if(!proximity)
return
if(istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
P.loc = locate(T.x,T.y,T.z)
P.icon_state = "[src.icon_base]_door"
P.layer = 3.2
to_chat(user, "<span class='notice'>You finish placing the [src].</span>")
if(istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
var/icon/hazard_overlay = hazard_overlays["[direction]"]
if(tape_roll_applications[F] == null)
tape_roll_applications[F] = 0
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
F.overlays -= hazard_overlay
tape_roll_applications[F] &= ~direction
else
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
F.overlays |= hazard_overlay
tape_roll_applications[F] |= direction
return
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0)
if(!density) return 1
if(height==0) return 1
if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing))
return 1
else if(ismob(mover) && allowed(mover))
return 1
else
return 0
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if(user.a_intent == INTENT_HELP && src.allowed(user))
user.visible_message("<span class=notice>[user] lifts [src], allowing passage.</span>", "<span class=notice>You lift [src], allowing passage.</span>")
src.density = 0
spawn(200)
src.density = 1
else
breaktape(/obj/item/weapon/soap, user)//cant be null, and can't be sharp.
/obj/item/tape/attack_alien(mob/user as mob)
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == INTENT_HELP && ((!is_pointed(W) && src.allowed(user))))
to_chat(user, "You can't break the [src] with that!")
return
user.visible_message("<span class=warning>[user] breaks the [src]!</span>", "<span class=warning>You break the [src]!</span>")
var/dir[2]
var/icon_dir = src.icon_state
if(icon_dir == "[src.icon_base]_h")
dir[1] = EAST
dir[2] = WEST
if(icon_dir == "[src.icon_base]_v")
dir[1] = NORTH
dir[2] = SOUTH
for(var/i=1;i<3;i++)
var/N = 0
var/turf/cur = get_step(src,dir[i])
while(N != 1)
N = 1
for(var/obj/item/tape/P in cur)
if(P.icon_state == icon_dir)
N = 0
qdel(P)
cur = get_step(cur,dir[i])
qdel(src)
return
+61 -61
View File
@@ -6,7 +6,7 @@
/obj/item/toy/random/New()
..()
var/list/types = list(/obj/item/weapon/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/weapon/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize)
var/list/types = list(/obj/item/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize)
var/T = pick(types)
new T(loc)
spawn(1)
@@ -44,11 +44,11 @@
// Could be anything!
// -------------------------------------
/obj/item/weapon/reagent_containers/glass/bottle/random_reagent
/obj/item/reagent_containers/glass/bottle/random_reagent
name = "unlabelled bottle"
// identify_probability = 0
/obj/item/weapon/reagent_containers/glass/bottle/random_reagent/New()
/obj/item/reagent_containers/glass/bottle/random_reagent/New()
..()
var/list/possible_chems = chemical_reagents_list.Copy()
possible_chems -= blocked_chems.Copy()
@@ -61,11 +61,11 @@
pixel_y = rand(-10, 10)
//Cuts out the food and drink reagents
/obj/item/weapon/reagent_containers/glass/bottle/random_chem
/obj/item/reagent_containers/glass/bottle/random_chem
name = "unlabelled chemical bottle"
// identify_probability = 0
/obj/item/weapon/reagent_containers/glass/bottle/random_chem/New()
/obj/item/reagent_containers/glass/bottle/random_chem/New()
..()
var/R = get_random_reagent_id()
if(rare_chemicals.Find(R))
@@ -76,11 +76,11 @@
pixel_x = rand(-10, 10)
pixel_y = rand(-10, 10)
/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem
/obj/item/reagent_containers/glass/bottle/random_base_chem
name = "unlabelled chemical bottle"
// identify_probability = 0
/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem/New()
/obj/item/reagent_containers/glass/bottle/random_base_chem/New()
..()
var/datum/reagent/R = pick(base_chemicals)
reagents.add_reagent(R, rand(2, 6)*5)
@@ -88,11 +88,11 @@
pixel_x = rand(-10, 10)
pixel_y = rand(-10, 10)
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink
/obj/item/reagent_containers/food/drinks/bottle/random_drink
name = "unlabelled drink"
icon = 'icons/obj/drinks.dmi'
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink/New()
/obj/item/reagent_containers/food/drinks/bottle/random_drink/New()
..()
var/list/possible_drinks = drinks.Copy()
if(prob(50))
@@ -105,11 +105,11 @@
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container
/obj/item/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container
name = "unlabelled drink?"
icon = 'icons/obj/drinks.dmi'
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent/New()
/obj/item/reagent_containers/food/drinks/bottle/random_reagent/New()
..()
var/R = get_random_reagent_id()
@@ -124,11 +124,11 @@
spawn(0)
qdel(src)
/obj/item/weapon/storage/pill_bottle/random_meds
/obj/item/storage/pill_bottle/random_meds
name = "unlabelled pillbottle"
desc = "The sheer recklessness of this bottle's existence astounds you."
/obj/item/weapon/storage/pill_bottle/random_meds/New()
/obj/item/storage/pill_bottle/random_meds/New()
..()
var/i = 1
while(i < storage_slots)
@@ -136,7 +136,7 @@
if(prob(50))
possible_medicines += rare_medicines.Copy()
var/datum/reagent/R = pick(possible_medicines)
var/obj/item/weapon/reagent_containers/food/pill/P = new(src)
var/obj/item/reagent_containers/food/pill/P = new(src)
if(rare_medicines.Find(R))
P.reagents.add_reagent(R, 10)
@@ -160,22 +160,22 @@
/obj/structure/closet/crate/secure/unknownchemicals/New()
..()
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_chem(src)
new/obj/item/reagent_containers/glass/bottle/random_chem(src)
while(prob(50))
new/obj/item/weapon/reagent_containers/glass/bottle/random_reagent(src)
new/obj/item/reagent_containers/glass/bottle/random_reagent(src)
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
new/obj/item/storage/pill_bottle/random_meds(src)
while(prob(25))
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
new/obj/item/storage/pill_bottle/random_meds(src)
/obj/structure/closet/crate/secure/chemicals
name = "chemical supply kit"
@@ -185,7 +185,7 @@
/obj/structure/closet/crate/secure/chemicals/New()
..()
for(var/chem in standard_chemicals)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
var/obj/item/reagent_containers/glass/bottle/B = new(src)
B.reagents.add_reagent(chem, B.volume)
if(prob(85))
var/datum/reagent/r = chemical_reagents_list[chem]
@@ -203,8 +203,8 @@
anchored = 0
New()
while(contents.len < 10)
var/flowertype = pick(/obj/item/weapon/grown/sunflower,/obj/item/weapon/grown/novaflower,/obj/item/weapon/reagent_containers/food/snacks/grown/poppy,
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell,/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower)
var/flowertype = pick(/obj/item/grown/sunflower,/obj/item/grown/novaflower,/obj/item/reagent_containers/food/snacks/grown/poppy,
/obj/item/reagent_containers/food/snacks/grown/harebell,/obj/item/reagent_containers/food/snacks/grown/moonflower)
var/atom/movable/AM = new flowertype(src)
AM.pixel_x = rand(-10,10)
AM.pixel_y = rand(-5,5)
@@ -215,19 +215,19 @@
anchored = 0
New()
while(contents.len < 10)
var/ptype = pick(/obj/item/weapon/reagent_containers/food/snacks/grown/apple,/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/berries, /obj/item/weapon/reagent_containers/food/snacks/grown/cabbage,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot, /obj/item/weapon/reagent_containers/food/snacks/grown/cherries,
/obj/item/weapon/reagent_containers/food/snacks/grown/chili, /obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod,
/obj/item/weapon/reagent_containers/food/snacks/grown/corn, /obj/item/weapon/reagent_containers/food/snacks/grown/eggplant,
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes, /obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes,
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper, /obj/item/weapon/reagent_containers/food/snacks/grown/lemon,
/obj/item/weapon/reagent_containers/food/snacks/grown/lime, /obj/item/weapon/reagent_containers/food/snacks/grown/orange,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato, /obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin,
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans, /obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane,
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato, /obj/item/weapon/reagent_containers/food/snacks/grown/watermelon,
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat, /obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle, /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet)
var/ptype = pick(/obj/item/reagent_containers/food/snacks/grown/apple,/obj/item/reagent_containers/food/snacks/grown/banana,
/obj/item/reagent_containers/food/snacks/grown/berries, /obj/item/reagent_containers/food/snacks/grown/cabbage,
/obj/item/reagent_containers/food/snacks/grown/carrot, /obj/item/reagent_containers/food/snacks/grown/cherries,
/obj/item/reagent_containers/food/snacks/grown/chili, /obj/item/reagent_containers/food/snacks/grown/cocoapod,
/obj/item/reagent_containers/food/snacks/grown/corn, /obj/item/reagent_containers/food/snacks/grown/eggplant,
/obj/item/reagent_containers/food/snacks/grown/grapes, /obj/item/reagent_containers/food/snacks/grown/greengrapes,
/obj/item/reagent_containers/food/snacks/grown/icepepper, /obj/item/reagent_containers/food/snacks/grown/lemon,
/obj/item/reagent_containers/food/snacks/grown/lime, /obj/item/reagent_containers/food/snacks/grown/orange,
/obj/item/reagent_containers/food/snacks/grown/potato, /obj/item/reagent_containers/food/snacks/grown/pumpkin,
/obj/item/reagent_containers/food/snacks/grown/soybeans, /obj/item/reagent_containers/food/snacks/grown/sugarcane,
/obj/item/reagent_containers/food/snacks/grown/tomato, /obj/item/reagent_containers/food/snacks/grown/watermelon,
/obj/item/reagent_containers/food/snacks/grown/wheat, /obj/item/reagent_containers/food/snacks/grown/whitebeet,
/obj/item/reagent_containers/food/snacks/grown/mushroom/chanterelle, /obj/item/reagent_containers/food/snacks/grown/mushroom/plumphelmet)
var/obj/O = new ptype(src)
O.pixel_x = rand(-10,10)
O.pixel_y = rand(-5,5)
@@ -245,13 +245,13 @@
/obj/structure/closet/secure_closet/random_drinks/New()
..()
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_drink(src)
while(prob(25))
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src)
new/obj/item/reagent_containers/food/drinks/bottle/random_reagent(src)
// -------------------------------------
@@ -265,14 +265,14 @@
name = "\improper Mysterious Crate"
desc = "What could it be?"
/obj/structure/largecrate/evil/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/crowbar))
/obj/structure/largecrate/evil/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
var/list/menace = pick( /mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/faithless,/mob/living/simple_animal/hostile/pirate,
/mob/living/simple_animal/hostile/creature,/mob/living/simple_animal/hostile/pirate/ranged,
/mob/living/simple_animal/hostile/hivebot,/mob/living/simple_animal/hostile/viscerator,/mob/living/simple_animal/hostile/pirate)
visible_message("<span class='warning'>Something falls out of the [src]!</span>")
var/obj/item/weapon/grenade/clusterbuster/C = new(src.loc)
var/obj/item/grenade/clusterbuster/C = new(src.loc)
C.prime()
spawn(10)
new menace(src.loc)
@@ -296,8 +296,8 @@
name = "Schrodinger's Crate"
desc = "What happens if you open it?"
/obj/structure/largecrate/schrodinger/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/crowbar))
/obj/structure/largecrate/schrodinger/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
var/mob/living/simple_animal/pet/cat/Cat1 = new(loc)
Cat1.apply_damage(250)//,TOX)
Cat1.name = "Schrodinger's Cat"
@@ -316,17 +316,17 @@
// --------------------------------------
// Collen's box of wonder and mystery
// --------------------------------------
/obj/item/weapon/storage/box/grenades
/obj/item/storage/box/grenades
name = "tactical grenades"
desc = "A box with 6 tactical grenades."
icon_state = "flashbang"
var/list/grenadelist = list(/obj/item/weapon/grenade/chem_grenade/metalfoam, /obj/item/weapon/grenade/chem_grenade/incendiary,
/obj/item/weapon/grenade/chem_grenade/antiweed, /obj/item/weapon/grenade/chem_grenade/cleaner, /obj/item/weapon/grenade/chem_grenade/teargas,
/obj/item/weapon/grenade/chem_grenade/holywater, /obj/item/weapon/grenade/chem_grenade/meat,
/obj/item/weapon/grenade/chem_grenade/dirt, /obj/item/weapon/grenade/chem_grenade/lube, /obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/chem_grenade/drugs, /obj/item/weapon/grenade/chem_grenade/ethanol) // holy list batman
var/list/grenadelist = list(/obj/item/grenade/chem_grenade/metalfoam, /obj/item/grenade/chem_grenade/incendiary,
/obj/item/grenade/chem_grenade/antiweed, /obj/item/grenade/chem_grenade/cleaner, /obj/item/grenade/chem_grenade/teargas,
/obj/item/grenade/chem_grenade/holywater, /obj/item/grenade/chem_grenade/meat,
/obj/item/grenade/chem_grenade/dirt, /obj/item/grenade/chem_grenade/lube, /obj/item/grenade/smokebomb,
/obj/item/grenade/chem_grenade/drugs, /obj/item/grenade/chem_grenade/ethanol) // holy list batman
/obj/item/weapon/storage/box/grenades/New()
/obj/item/storage/box/grenades/New()
..()
var/nade1 = pick(grenadelist)
var/nade2 = pick(grenadelist)
+4 -4
View File
@@ -2,14 +2,14 @@
//Malf Picker
/obj/item/device/malf_upgrade
/obj/item/malf_upgrade
name = "combat software upgrade"
desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs."
icon = 'icons/obj/module.dmi'
icon_state = "datadisk3"
/obj/item/device/malf_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
/obj/item/malf_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
if(!istype(AI))
return
if(AI.malf_picker)
@@ -23,13 +23,13 @@
//Lipreading
/obj/item/device/surveillance_upgrade
/obj/item/surveillance_upgrade
name = "surveillance software upgrade"
desc = "A software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading."
icon = 'icons/obj/module.dmi'
icon_state = "datadisk3"
/obj/item/device/surveillance_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
/obj/item/surveillance_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
if(!istype(AI))
return
if(AI.eyeobj)
+1 -2
View File
@@ -29,8 +29,7 @@
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
add_attack_logs(user, M, "Stunned with [src] (INTENT: [uppertext(user.a_intent)])")
/obj/item/borg/overdrive
name = "Overdrive"
+12 -12
View File
@@ -62,7 +62,7 @@
icon_state = "chest"
part = list("groin","chest")
var/wired = FALSE
var/obj/item/weapon/stock_parts/cell/cell = null
var/obj/item/stock_parts/cell/cell = null
/obj/item/robot_parts/chest/Destroy()
QDEL_NULL(cell)
@@ -73,8 +73,8 @@
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
part = list("head")
var/obj/item/device/flash/flash1 = null
var/obj/item/device/flash/flash2 = null
var/obj/item/flash/flash1 = null
var/obj/item/flash/flash2 = null
/obj/item/robot_parts/head/Destroy()
QDEL_NULL(flash1)
@@ -144,7 +144,7 @@
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/sheet/metal/M = W
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
var/obj/item/ed209_assembly/B = new /obj/item/ed209_assembly
B.forceMove(get_turf(src))
to_chat(user, "You armed the robot frame")
M.use(1)
@@ -210,14 +210,14 @@
else
to_chat(user, "<span class='notice'>You need to attach a flash to it first!</span>")
if(istype(W, /obj/item/device/multitool))
if(istype(W, /obj/item/multitool))
if(check_completion())
Interact(user)
else
to_chat(user, "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>")
if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(istype(W, /obj/item/mmi))
var/obj/item/mmi/M = W
if(check_completion())
if(!isturf(loc))
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise.</span>")
@@ -319,7 +319,7 @@
else
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
if(istype(W,/obj/item/weapon/pen))
if(istype(W,/obj/item/pen))
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
return
@@ -341,7 +341,7 @@
var/mob/living/living_user = usr
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/device/multitool))
if(!istype(item_in_hand, /obj/item/multitool))
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
return
@@ -374,7 +374,7 @@
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(istype(W, /obj/item/stock_parts/cell))
if(cell)
to_chat(user, "<span class='notice'>You have already inserted a cell!</span>")
return
@@ -396,7 +396,7 @@
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/device/flash))
if(istype(W, /obj/item/flash))
if(istype(user,/mob/living/silicon/robot))
to_chat(user, "<span class='warning'>How do you propose to do that?</span>")
return
@@ -413,7 +413,7 @@
W.forceMove(src)
flash1 = W
to_chat(user, "<span class='notice'>You insert the flash into the eye socket!</span>")
else if(istype(W, /obj/item/weapon/stock_parts/manipulator))
else if(istype(W, /obj/item/stock_parts/manipulator))
to_chat(user, "<span class='notice'>You install some manipulators and modify the head, creating a functional spider-bot!</span>")
new /mob/living/simple_animal/spiderbot(get_turf(loc))
user.drop_item()
@@ -127,13 +127,13 @@
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4;combat=4"
require_module = 1
module_type = /obj/item/weapon/robot_module/security
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
@@ -169,18 +169,18 @@
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=5"
require_module = 1
module_type = /obj/item/weapon/robot_module/miner
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module.modules)
for(var/obj/item/pickaxe/drill/cyborg/D in R.module.modules)
qdel(D)
for(var/obj/item/weapon/shovel/S in R.module.modules)
for(var/obj/item/shovel/S in R.module.modules)
qdel(S)
R.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
R.module.modules += new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.rebuild()
return 1
@@ -191,16 +191,16 @@
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=4;bluespace=4"
require_module = 1
module_type = /obj/item/weapon/robot_module/miner
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module.modules)
for(var/obj/item/storage/bag/ore/cyborg/S in R.module.modules)
qdel(S)
R.module.modules += new /obj/item/weapon/storage/bag/ore/holding(R.module)
R.module.modules += new /obj/item/storage/bag/ore/holding(R.module)
R.module.rebuild()
return 1
+2 -2
View File
@@ -33,8 +33,8 @@
attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0, user))
overlays.Cut()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
+2 -2
View File
@@ -34,7 +34,7 @@
to_chat(user, "<span class='danger'>That limb is missing!</span>")
return 1
if(affecting.status & ORGAN_ROBOT)
if(affecting.is_robotic())
to_chat(user, "<span class='danger'>This can't be used on a robotic limb.</span>")
return 1
@@ -211,7 +211,7 @@
to_chat(user, "<span class='notice'>You remove the splint from [H]'s [limb].</span>")
return
if(M == user)
user.visible_message("<span class='notice'>[user] starts to apply [src] to their [limb].</span>", \
user.visible_message("<span class='notice'>[user] starts to apply [src] to [user.p_their()] [limb].</span>", \
"<span class='notice'>You start to apply [src] to your [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
if(!do_mob(user, H, self_delay))
+1 -1
View File
@@ -28,7 +28,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if(S && (S.status & ORGAN_ROBOT))
if(S && S.is_robotic())
if(S.get_damage())
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
+2 -2
View File
@@ -38,8 +38,8 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
+74 -297
View File
@@ -13,6 +13,15 @@
/*
* Glass sheets
*/
GLOBAL_LIST_INIT(glass_recipes, list ( \
new/datum/stack_recipe/window("directional window", /obj/structure/window/basic, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/basic, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fishbowl", /obj/machinery/fishtank/bowl, 1, time = 0), \
new/datum/stack_recipe("fish tank", /obj/machinery/fishtank/tank, 3, time = 0, on_floor = TRUE), \
new/datum/stack_recipe("wall aquariam", /obj/machinery/fishtank/wall, 4, time = 0, on_floor = TRUE) \
))
/obj/item/stack/sheet/glass
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
@@ -30,8 +39,9 @@
/obj/item/stack/sheet/glass/cyborg
materials = list()
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/glass/New(loc, amount)
recipes = GLOB.glass_recipes
..()
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
..()
@@ -59,94 +69,18 @@
else
return ..()
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'>You don't have the dexterity to do this!</span>")
return 0
var/title = "Sheet-Glass"
title += " ([src.amount] sheet\s left)"
switch(input(title, "What would you like to construct?") in list("One Direction Window", "Full Window", "Fishbowl", "Fish Tank", "Wall Aquarium", "Cancel"))
if("One Direction Window")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
return 1
directions-=win.dir
if(win.is_fulltile())
to_chat(user, "<span class='danger'>Can't let you do that.</span>")
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
if(locate(/obj/structure/window/full) in user.loc)
to_chat(user, "<span class='danger'>There is a full window in the way.</span>")
return 1
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(2)
if("Fishbowl")
if(!src) return 1
if(src.loc != user) return 1
var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/bowl(user.loc, 0)
F.air_update_turf(1)
src.use(1)
if("Fish Tank")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 3)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/tank(user.loc, 0)
F.air_update_turf(1)
src.use(3)
if("Wall Aquarium")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 4)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/wall(user.loc, 0)
F.air_update_turf(1)
src.use(4)
return 0
/*
* Reinforced glass sheets
*/
GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
new/datum/stack_recipe/window("windoor frame", /obj/structure/windoor_assembly, 5, time = 0, on_floor = TRUE, window_checks = TRUE), \
null, \
new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/reinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/reinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
))
/obj/item/stack/sheet/rglass
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
@@ -161,105 +95,14 @@
/obj/item/stack/sheet/rglass/cyborg
materials = list()
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'>You don't have the dexterity to do this!</span>")
return 0
var/title = "Sheet Reinf. Glass"
title += " ([src.amount] sheet\s left)"
switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel"))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
return 1
directions-=win.dir
if(win.is_fulltile())
to_chat(user, "<span class='danger'>Can't let you do that.</span>")
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
if(locate(/obj/structure/window/full) in user.loc)
to_chat(user, "<span class='danger'>There is a window in the way.</span>")
return 1
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
src.use(2)
if("Windoor")
if(!src || src.loc != user) return 1
if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc))
to_chat(user, "<span class='danger'>There is already a windoor assembly in that location.</span>")
return 1
if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc))
to_chat(user, "<span class='danger'>There is already a windoor in that location.</span>")
return 1
if(src.amount < 5)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
var/obj/structure/windoor_assembly/WD
WD = new /obj/structure/windoor_assembly(user.loc)
WD.state = "01"
WD.anchored = 0
src.use(5)
switch(user.dir)
if(SOUTH)
WD.dir = SOUTH
WD.ini_dir = SOUTH
if(EAST)
WD.dir = EAST
WD.ini_dir = EAST
if(WEST)
WD.dir = WEST
WD.ini_dir = WEST
else//If the user is facing northeast. northwest, southeast, southwest or north, default to north
WD.dir = NORTH
WD.ini_dir = NORTH
else
return 1
return 0
/obj/item/stack/sheet/rglass/New(loc, amount)
recipes = GLOB.reinforced_glass_recipes
..()
GLOBAL_LIST_INIT(pglass_recipes, list ( \
new/datum/stack_recipe/window("directional window", /obj/structure/window/plasmabasic, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/plasmabasic, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
))
/obj/item/stack/sheet/plasmaglass
name = "plasma glass"
@@ -271,8 +114,9 @@
created_window = /obj/structure/window/plasmabasic
full_window = /obj/structure/window/full/plasmabasic
/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/plasmaglass/New(loc, amount)
recipes = GLOB.pglass_recipes
..()
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params)
..()
@@ -291,64 +135,15 @@
else
return ..()
/obj/item/stack/sheet/plasmaglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'> You don't have the dexterity to do this!")
return 0
var/title = "Plasma-glass alloy"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
to_chat(user, "<span class='danger'>Can't let you do that.</span>")
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.state = 0
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
if(locate(/obj/structure/window) in user.loc)
to_chat(user, "<span class='danger'>There is a window in the way.</span>")
return 1
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
src.use(2)
return 0
/*
* Reinforced plasma glass sheets
*/
GLOBAL_LIST_INIT(prglass_recipes, list ( \
new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/plasmareinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/plasmareinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
))
/obj/item/stack/sheet/plasmarglass
name = "reinforced plasma glass"
desc = "Plasma glass which seems to have rods or something stuck in them."
@@ -360,60 +155,42 @@
full_window = /obj/structure/window/full/plasmareinforced
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/plasmarglass/New(loc, amount)
recipes = GLOB.prglass_recipes
..()
/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'>You don't have the dexterity to do this!</span>")
return 0
var/title = "Reinforced plasma-glass alloy"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
to_chat(user, "<span class='danger'>Can't let you do that.</span>")
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/plasmareinforced( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.state = 0
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
to_chat(user, "<span class='danger'>You need more glass to do that.</span>")
return 1
if(locate(/obj/structure/window) in user.loc)
to_chat(user, "<span class='danger'>There is a window in the way.</span>")
return 1
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
src.use(2)
return 0
GLOBAL_LIST_INIT(titaniumglass_recipes, list(
new/datum/stack_recipe/window("shuttle window", /obj/structure/window/full/shuttle, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
))
/obj/item/stack/sheet/titaniumglass
name = "titanium glass"
desc = "A glass sheet made out of a titanium-silicate alloy."
singular_name = "titanium glass sheet"
icon_state = "sheet-titaniumglass"
item_state = "sheet-titaniumglass"
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/titaniumglass
full_window = /obj/structure/window/full/shuttle
/obj/item/stack/sheet/titaniumglass/New(loc, amount)
recipes = GLOB.titaniumglass_recipes
..()
GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
new/datum/stack_recipe/window("plastitanium window", /obj/structure/window/plastitanium, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
))
/obj/item/stack/sheet/plastitaniumglass
name = "plastitanium glass"
desc = "A glass sheet made out of a plasma-titanium-silicate alloy."
singular_name = "plastitanium glass sheet"
icon_state = "sheet-plastitaniumglass"
item_state = "sheet-plastitaniumglass"
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/plastitaniumglass
full_window = /obj/structure/window/plastitanium
/obj/item/stack/sheet/plastitaniumglass/New(loc, amount)
recipes = GLOB.plastitaniumglass_recipes
..()
@@ -109,7 +109,7 @@ var/global/list/datum/stack_recipe/human_recipes = list( \
origin_tech = "biotech=4"
var/global/list/datum/stack_recipe/sinew_recipes = list ( \
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
new/datum/stack_recipe("sinew restraints", /obj/item/restraints/handcuffs/sinew, 1, on_floor = 1), \
)
/obj/item/stack/sheet/sinew/New(var/loc, var/amount=null)
@@ -138,7 +138,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/stack/sheet/animalhide/attackby(obj/item/W as obj, mob/user as mob, params)
if(W.sharp)
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
if(do_after(user, 50 * W.toolspeed, target = src))
@@ -15,7 +15,7 @@
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
..()
if(istype(O,/obj/item/weapon/wirecutters))
if(istype(O,/obj/item/wirecutters))
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 5
amount--
@@ -19,7 +19,7 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
null, \
new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("Breakdown into sand", /obj/item/weapon/ore/glass, 1, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("Breakdown into sand", /obj/item/ore/glass, 1, one_per_turf = 0, on_floor = 1), \
)
var/global/list/datum/stack_recipe/silver_recipes = list ( \
@@ -82,7 +82,7 @@ var/global/list/datum/stack_recipe/bananium_recipes = list ( \
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("bananium computer frame", /obj/structure/computerframe/HONKputer, 50, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bananium grenade casing", /obj/item/weapon/grenade/bananade/casing, 4, on_floor = 1), \
new/datum/stack_recipe("bananium grenade casing", /obj/item/grenade/bananade/casing, 4, on_floor = 1), \
)
var/global/list/datum/stack_recipe/tranquillite_recipes = list ( \
@@ -164,7 +164,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
..()
recipes = plasma_recipes
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/weapon/W, mob/user, params)
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W, mob/user, params)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma sheets ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
@@ -43,7 +43,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
)),
null,
new /datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts),
new /datum/stack_recipe("rack parts", /obj/item/rack_parts),
new /datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1),
null,
new /datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1),
@@ -82,7 +82,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
new /datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1),
new /datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1),
null,
new /datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade),
new /datum/stack_recipe("grenade casing", /obj/item/grenade/chem_grenade),
new /datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2),
new /datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1),
null,
@@ -171,10 +171,10 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40),
new /datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40),
new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),
new /datum/stack_recipe("baseball bat", /obj/item/weapon/melee/baseball_bat, 5, time = 15)
new /datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15)
)
/obj/item/stack/sheet/wood
@@ -198,17 +198,17 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
new/datum/stack_recipe("grey jumpsuit", /obj/item/clothing/under/color/grey, 3), \
new/datum/stack_recipe("black shoes", /obj/item/clothing/shoes/black, 2), \
null, \
new/datum/stack_recipe("backpack", /obj/item/weapon/storage/backpack, 4), \
new/datum/stack_recipe("dufflebag", /obj/item/weapon/storage/backpack/duffel, 6), \
new/datum/stack_recipe("backpack", /obj/item/storage/backpack, 4), \
new/datum/stack_recipe("dufflebag", /obj/item/storage/backpack/duffel, 6), \
null, \
new/datum/stack_recipe("plant bag", /obj/item/weapon/storage/bag/plants, 4), \
new/datum/stack_recipe("book bag", /obj/item/weapon/storage/bag/books, 4), \
new/datum/stack_recipe("mining satchel", /obj/item/weapon/storage/bag/ore, 4), \
new/datum/stack_recipe("chemistry bag", /obj/item/weapon/storage/bag/chemistry, 4), \
new/datum/stack_recipe("bio bag", /obj/item/weapon/storage/bag/bio, 4), \
new/datum/stack_recipe("plant bag", /obj/item/storage/bag/plants, 4), \
new/datum/stack_recipe("book bag", /obj/item/storage/bag/books, 4), \
new/datum/stack_recipe("mining satchel", /obj/item/storage/bag/ore, 4), \
new/datum/stack_recipe("chemistry bag", /obj/item/storage/bag/chemistry, 4), \
new/datum/stack_recipe("bio bag", /obj/item/storage/bag/bio, 4), \
null, \
new/datum/stack_recipe("rag", /obj/item/weapon/reagent_containers/glass/rag, 1), \
new/datum/stack_recipe("bedsheet", /obj/item/weapon/bedsheet, 3), \
new/datum/stack_recipe("rag", /obj/item/reagent_containers/glass/rag, 1), \
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
null, \
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1), \
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
@@ -236,16 +236,16 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
* Cardboard
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list (
new /datum/stack_recipe("box", /obj/item/weapon/storage/box),
new /datum/stack_recipe("large box", /obj/item/weapon/storage/box/large, 4),
new /datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes),
new /datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs),
new /datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps),
new /datum/stack_recipe("box", /obj/item/storage/box),
new /datum/stack_recipe("large box", /obj/item/storage/box/large, 4),
new /datum/stack_recipe("light tubes", /obj/item/storage/box/lights/tubes),
new /datum/stack_recipe("light bulbs", /obj/item/storage/box/lights/bulbs),
new /datum/stack_recipe("mouse traps", /obj/item/storage/box/mousetraps),
new /datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3),
new /datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg),
new /datum/stack_recipe("pizza box", /obj/item/pizzabox),
new /datum/stack_recipe("folder", /obj/item/weapon/folder),
new /datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube),
new /datum/stack_recipe("folder", /obj/item/folder),
new /datum/stack_recipe("cardboard tube", /obj/item/c_tube),
new /datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4),
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5),
)
@@ -318,7 +318,11 @@ var/global/list/datum/stack_recipe/cult = list ( \
/*
* Brass
*/
var/global/list/datum/stack_recipe/brass_recipes = list ( \
var/global/list/datum/stack_recipe/brass_recipes = list (\
new/datum/stack_recipe/window("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, on_floor = TRUE, window_checks = TRUE), \
null,
new/datum/stack_recipe/window("directional brass window", /obj/structure/window/reinforced/clockwork, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile brass window", /obj/structure/window/reinforced/clockwork/fulltile, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \
)
@@ -364,24 +368,26 @@ var/global/list/datum/stack_recipe/brass_recipes = list ( \
throw_range = 3
origin_tech = "materials=2;biotech=2"
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spork", /obj/item/weapon/kitchen/utensil/pspork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
)
GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
new /datum/stack_recipe("wet floor sign", /obj/item/caution, 2), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/food/drinks/waterbottle/empty), \
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/food/drinks/waterbottle/large/empty,3), \
new /datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("plastic fork", /obj/item/kitchen/utensil/pfork, 1, on_floor = 1), \
new /datum/stack_recipe("plastic spoon", /obj/item/kitchen/utensil/pspoon, 1, on_floor = 1), \
new /datum/stack_recipe("plastic spork", /obj/item/kitchen/utensil/pspork, 1, on_floor = 1), \
new /datum/stack_recipe("plastic knife", /obj/item/kitchen/knife/plastic, 1, on_floor = 1), \
new /datum/stack_recipe("plastic bag", /obj/item/storage/bag/plasticbag, 3, on_floor = 1), \
new /datum/stack_recipe("bear mould", /obj/item/kitchen/mould/bear, 1, on_floor = 1), \
new /datum/stack_recipe("worm mould", /obj/item/kitchen/mould/worm, 1, on_floor = 1), \
new /datum/stack_recipe("bean mould", /obj/item/kitchen/mould/bean, 1, on_floor = 1), \
new /datum/stack_recipe("ball mould", /obj/item/kitchen/mould/ball, 1, on_floor = 1), \
new /datum/stack_recipe("cane mould", /obj/item/kitchen/mould/cane, 1, on_floor = 1), \
new /datum/stack_recipe("cash mould", /obj/item/kitchen/mould/cash, 1, on_floor = 1), \
new /datum/stack_recipe("coin mould", /obj/item/kitchen/mould/coin, 1, on_floor = 1), \
new /datum/stack_recipe("sucker mould", /obj/item/kitchen/mould/loli, 1, on_floor = 1)))
/obj/item/stack/sheet/plastic
name = "plastic"
@@ -390,10 +396,11 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
icon_state = "sheet-plastic"
throwforce = 7
origin_tech = "materials=1;biotech=1"
materials = list(MAT_PLASTIC = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/plastic
/obj/item/stack/sheet/plastic/New()
recipes = plastic_recipes
recipes = GLOB.plastic_recipes
. = ..()
/obj/item/stack/sheet/plastic/fifty
@@ -18,9 +18,9 @@
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
// item/attackby() properly, making this unnecessary
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
/*/obj/item/stack/sheet/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/storage/bag/sheetsnatcher))
var/obj/item/storage/bag/sheetsnatcher/S = W
if(!S.mode)
S.add(src,user)
else
+10 -3
View File
@@ -13,6 +13,7 @@
var/list/recipes = list() // /datum/stack_recipe
var/singular_name
var/amount = 1
var/to_transfer = 0
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
@@ -148,6 +149,10 @@
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
return 0
if(R.window_checks && !valid_window_location(usr.loc, usr.dir))
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
return FALSE
if(R.one_per_turf && (locate(R.result_type) in creation_loc))
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return 0
@@ -165,7 +170,7 @@
return
var/atom/O = new R.result_type(creation_loc)
O.dir = usr.dir
O.setDir(usr.dir)
if(R.max_res_amount > 1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount * multiplier
@@ -184,7 +189,7 @@
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if(istype(O, /obj/item/weapon/storage))
if(istype(O, /obj/item/storage))
for(var/obj/item/I in O)
qdel(I)
//BubbleWrap END
@@ -231,6 +236,9 @@
/obj/item/stack/proc/get_max_amount()
return max_amount
/obj/item/stack/proc/get_amount_transferred()
return to_transfer
/obj/item/stack/proc/split(mob/user, amt)
var/obj/item/stack/F = new type(loc, amt)
F.copy_evidences(src)
@@ -257,7 +265,6 @@
if(S.amount >= max_amount)
return 1
var/to_transfer
if(user.is_in_inactive_hand(src))
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
+15 -2
View File
@@ -11,8 +11,9 @@
var/time = 0
var/one_per_turf = 0
var/on_floor = 0
var/window_checks = FALSE
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, window_checks = FALSE)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
@@ -21,6 +22,7 @@
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
src.window_checks = window_checks
/datum/stack_recipe/proc/post_build(var/obj/item/stack/S, var/obj/result)
return
@@ -29,7 +31,7 @@
/datum/stack_recipe/cable_restraints
/datum/stack_recipe/cable_restraints/post_build(var/obj/item/stack/S, var/obj/result)
if(istype(result, /obj/item/weapon/restraints/handcuffs/cable))
if(istype(result, /obj/item/restraints/handcuffs/cable))
result.color = S.color
..()
@@ -40,6 +42,17 @@
R.update_icon()
..()
/datum/stack_recipe/window
/datum/stack_recipe/window/post_build(obj/item/stack/S, obj/result)
if(istype(result, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = result
W.ini_dir = W.dir
else if(istype(result, /obj/structure/window))
var/obj/structure/window/W = result
W.ini_dir = W.dir
W.anchored = FALSE
W.state = WINDOW_OUT_OF_FRAME
/*
* Recipe list datum
*/
+25 -12
View File
@@ -10,19 +10,32 @@
flags = NOBLUDGEON
origin_tech = "materials=6;syndicate=1"
/obj/item/stack/telecrystal/attack(mob/target as mob, mob/user as mob)
/obj/item/stack/telecrystal/attack(mob/target, mob/user)
if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
for(var/obj/item/weapon/implant/uplink/I in target)
if(I && I.implanted)
I.hidden_uplink.uses +=1
use(1)
to_chat(user, "<span class='notice'>You press the [src] onto yourself and charge your hidden uplink.</span>")
for(var/obj/item/implant/uplink/I in target)
if(I && I.imp_in)
I.hidden_uplink.uses += amount
use(amount)
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
/obj/item/stack/telecrystal/afterattack(var/obj/item/I as obj, mob/user as mob, proximity)
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
if(!proximity)
return
if(istype(I, /obj/item))
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.uses +=1
use(1)
to_chat(user, "<span class='notice'>You slot the [src] into the [I] and charge its internal uplink.</span>")
if(istype(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.uses += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into [I] and charge its internal uplink.</span>")
else if(istype(I, /obj/item/cartridge/frame))
var/obj/item/cartridge/frame/cart = I
if(!cart.charges)
to_chat(user, "<span class='notice'>[cart] is out of charges, it's refusing to accept [src]</span>")
return
cart.telecrystals += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into [cart]. The next time it's used, it will also give telecrystals</span>")
/obj/item/stack/telecrystal/five
amount = 5
/obj/item/stack/telecrystal/twenty
amount = 20
@@ -23,7 +23,7 @@
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if(iswelder(W))
var/obj/item/weapon/weldingtool/WT = W
var/obj/item/weldingtool/WT = W
if(is_hot(W) && !mineralType)
to_chat(user, "<span class='warning'>You can not reform this!</span>")
+26 -30
View File
@@ -67,7 +67,7 @@
return
/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass))
if(istype(O, /obj/item/reagent_containers/glass) || istype(O, /obj/item/reagent_containers/food/drinks/drinkingglass))
if(O.reagents)
if(O.reagents.total_volume < 1)
to_chat(user, "The [O] is empty.")
@@ -110,7 +110,6 @@
throw_speed = 4
throw_range = 20
force = 0
icon = 'icons/obj/weapons.dmi'
icon_state = "syndballoon"
item_state = "syndballoon"
w_class = WEIGHT_CLASS_BULKY
@@ -148,7 +147,6 @@
/obj/item/toy/sword
name = "toy sword"
desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
icon = 'icons/obj/weapons.dmi'
icon_state = "sword0"
item_state = "sword0"
var/active = FALSE
@@ -177,8 +175,8 @@
add_fingerprint(user)
return
// Copied from /obj/item/weapon/melee/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user, params)
// Copied from /obj/item/melee/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params)
..()
if(istype(W, /obj/item/toy/sword))
if(W == src)
@@ -189,7 +187,7 @@
to_chat(user, "<span class='notice'>\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!</span>")
else
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
new /obj/item/weapon/twohanded/dualsaber/toy(user.loc)
new /obj/item/twohanded/dualsaber/toy(user.loc)
user.unEquip(W)
user.unEquip(src)
qdel(W)
@@ -198,7 +196,7 @@
/*
* Subtype of Double-Bladed Energy Swords
*/
/obj/item/weapon/twohanded/dualsaber/toy
/obj/item/twohanded/dualsaber/toy
name = "double-bladed toy sword"
desc = "A cheap, plastic replica of TWO energy swords. Double the fun!"
force = 0
@@ -211,16 +209,15 @@
attack_verb = list("attacked", "struck", "hit")
brightness_on = 0
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction()
/obj/item/twohanded/dualsaber/toy/hit_reaction()
return 0
/obj/item/weapon/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
/obj/item/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
return 0
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
icon = 'icons/obj/weapons.dmi'
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
@@ -232,8 +229,8 @@
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/toy/katana/suicide_act(mob/user)
var/dmsg = pick("[user] tries to stab \the [src] into their abdomen, but it shatters! They look as if they might die from the shame.","[user] tries to stab \the [src] into their abdomen, but \the [src] bends and breaks in half! They look as if they might die from the shame.","[user] tries to slice their own throat, but the plastic blade has no sharpness, causing them to lose their balance, slip over, and break their neck with a loud snap!")
user.visible_message("<span class='suicide'>[dmsg] It looks like they are trying to commit suicide.</span>")
var/dmsg = pick("[user] tries to stab \the [src] into [user.p_their()] abdomen, but it shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to stab \the [src] into [user.p_their()] abdomen, but \the [src] bends and breaks in half! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to slice [user.p_their()] own throat, but the plastic blade has no sharpness, causing [user.p_them()] to lose [user.p_their()] balance, slip over, and break [user.p_their()] neck with a loud snap!")
user.visible_message("<span class='suicide'>[dmsg] It looks like [user.p_theyre()] trying to commit suicide.</span>")
return (BRUTELOSS)
@@ -306,7 +303,7 @@
/obj/effect/decal/cleanable/ash/snappop_phoenix/New()
. = ..()
addtimer(src, "respawn", respawn_time)
addtimer(CALLBACK(src, .proc/respawn), respawn_time)
/obj/effect/decal/cleanable/ash/snappop_phoenix/proc/respawn()
new /obj/item/toy/snappop/phoenix(get_turf(src))
@@ -405,7 +402,6 @@
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
icon = 'icons/obj/weapons.dmi'
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
@@ -535,7 +531,7 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user,
to_chat(user, "<span class='notice'>The hand of cards is stuck to your hand, you can't add it to the deck!</span>")
return
cards += C.currenthand
user.visible_message("<span class='notice'>[user] puts their hand of cards in the deck.</span>", "<span class='notice'>You put the hand of cards in the deck.</span>")
user.visible_message("<span class='notice'>[user] puts [user.p_their()] hand of cards in the deck.</span>", "<span class='notice'>You put the hand of cards in the deck.</span>")
qdel(C)
else
to_chat(user, "<span class='notice'>You can't mix cards from other decks.</span>")
@@ -614,7 +610,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
C.apply_card_vars(C,O)
C.pickup(cardUser)
cardUser.put_in_any_hand_if_possible(C)
cardUser.visible_message("<span class='notice'>[cardUser] draws a card from \his hand.</span>", "<span class='notice'>You take the [C.cardname] from your hand.</span>")
cardUser.visible_message("<span class='notice'>[cardUser] draws a card from [cardUser.p_their()] hand.</span>", "<span class='notice'>You take the [C.cardname] from your hand.</span>")
interact(cardUser)
if(currenthand.len < 3)
@@ -641,7 +637,7 @@ obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living
if(C.parentdeck == parentdeck)
currenthand += C.cardname
user.unEquip(C)
user.visible_message("<span class='notice'>[user] adds a card to their hand.</span>", "<span class='notice'>You add the [C.cardname] to your hand.</span>")
user.visible_message("<span class='notice'>[user] adds a card to [user.p_their()] hand.</span>", "<span class='notice'>You add the [C.cardname] to your hand.</span>")
interact(user)
if(currenthand.len > 4)
icon_state = "[deckstyle]_hand5"
@@ -681,7 +677,7 @@ obj/item/toy/cards/singlecard/examine(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/cardUser = user
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
cardUser.visible_message("<span class='notice'>[cardUser] checks \his card.</span>", "<span class='notice'>The card reads: [src.cardname]</span>")
cardUser.visible_message("<span class='notice'>[cardUser] checks [cardUser.p_their()] card.</span>", "<span class='notice'>The card reads: [src.cardname]</span>")
else
to_chat(cardUser, "<span class='notice'>You need to have the card in your hand to check it.</span>")
@@ -730,7 +726,7 @@ obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user, params)
if(H.parentdeck == parentdeck)
H.currenthand += cardname
user.unEquip(src)
user.visible_message("<span class='notice'>[user] adds a card to \his hand.</span>", "<span class='notice'>You add the [cardname] to your hand.</span>")
user.visible_message("<span class='notice'>[user] adds a card to [user.p_their()] hand.</span>", "<span class='notice'>You add the [cardname] to your hand.</span>")
H.interact(user)
if(H.currenthand.len > 4)
H.icon_state = "[deckstyle]_hand5"
@@ -867,7 +863,7 @@ obj/item/toy/cards/deck/syndicate/black
item_state = "egg3" // It's the green egg in items_left/righthand
item_color = "green"
/obj/item/weapon/toddler
/obj/item/toddler
icon_state = "toddler"
name = "toddler"
desc = "This baby looks almost real. Wait, did it just burp?"
@@ -878,7 +874,7 @@ obj/item/toy/cards/deck/syndicate/black
//This should really be somewhere else but I don't know where. w/e
/obj/item/weapon/inflatable_duck
/obj/item/inflatable_duck
name = "inflatable duck"
desc = "No bother to sink or swim when you can just float!"
icon_state = "inflatable"
@@ -1001,7 +997,7 @@ obj/item/toy/cards/deck/syndicate/black
icon_state = "redfox"
/obj/random/plushie/item_to_spawn()
return pick(subtypesof(/obj/item/toy/plushie)) //exclude the base type.
return pick(subtypesof(/obj/item/toy/plushie) - typesof(/obj/item/toy/plushie/fluff)) //exclude the base type.
/obj/item/toy/plushie/corgi
name = "corgi plushie"
@@ -1243,11 +1239,11 @@ obj/item/toy/cards/deck/syndicate/black
name = "Lich Miniature"
desc = "Murderboner extraordinaire."
icon_state = "lichcharacter"
/obj/item/weapon/storage/box/characters
/obj/item/storage/box/characters
name = "Box of Miniatures"
desc = "The nerd's best friends."
icon_state = "box"
/obj/item/weapon/storage/box/characters/New()
/obj/item/storage/box/characters/New()
..()
new /obj/item/toy/character/alien(src)
new /obj/item/toy/character/cleric(src)
@@ -1371,7 +1367,7 @@ obj/item/toy/cards/deck/syndicate/black
var/bullet_position = 1
/obj/item/toy/russian_revolver/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] quickly loads six bullets into [src]'s cylinder and points it at \his head before pulling the trigger! It looks like they are trying to commit suicide.</span>")
user.visible_message("<span class='suicide'>[user] quickly loads six bullets into [src]'s cylinder and points it at [user.p_their()] head before pulling the trigger! It looks like [user.p_theyre()] trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/Gunshot.ogg', 50, 1)
return (BRUTELOSS)
@@ -1397,7 +1393,7 @@ obj/item/toy/cards/deck/syndicate/black
if(!(user.has_organ("head"))) //For sanity
to_chat(user, "<span class='notice'>Playing this game without a head would be classed as cheating.</span>")
return
user.visible_message("<span class='danger'>[user] points [src] at their head, ready to pull the trigger!</span>")
user.visible_message("<span class='danger'>[user] points [src] at [user.p_their()] head, ready to pull the trigger!</span>")
if(do_after(user, 30, target = user))
if(bullet_position > 1)
user.visible_message("<span class='danger'>*click*</span>")
@@ -1411,7 +1407,7 @@ obj/item/toy/cards/deck/syndicate/black
user.apply_damage(200, BRUTE, "head", sharp = 1, used_weapon = "Self-inflicted gunshot wound to the head.")
user.death()
else
user.visible_message("<span class='danger'>[user] lowers [src] from their head.</span>")
user.visible_message("<span class='danger'>[user] lowers [src] from [user.p_their()] head.</span>")
/obj/item/toy/russian_revolver/proc/spin_cylinder()
bullet_position = rand(1,6)
@@ -1419,7 +1415,7 @@ obj/item/toy/cards/deck/syndicate/black
/*
* Rubber Chainsaw
*/
/obj/item/weapon/twohanded/toy/chainsaw
/obj/item/twohanded/toy/chainsaw
name = "Toy Chainsaw"
desc = "A toy chainsaw with a rubber edge. Ages 8 and up"
icon_state = "chainsaw0"
@@ -1430,7 +1426,7 @@ obj/item/toy/cards/deck/syndicate/black
wieldsound = 'sound/weapons/chainsawstart.ogg'
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
/obj/item/weapon/twohanded/toy/chainsaw/update_icon()
/obj/item/twohanded/toy/chainsaw/update_icon()
if(wielded)
icon_state = "chainsaw[wielded]"
else
@@ -1666,7 +1662,7 @@ obj/item/toy/cards/deck/syndicate/black
/obj/item/toy/eight_ball/attack_self(mob/user as mob)
if(!cooldown)
var/answer = pick(possible_answers)
user.visible_message("<span class='notice'>[user] focuses on their question and [use_action]...</span>")
user.visible_message("<span class='notice'>[user] focuses on [user.p_their()] question and [use_action]...</span>")
user.visible_message("<span class='notice'>[bicon(src)] The [src] says \"[answer]\"</span>")
spawn(30)
cooldown = 0
+50 -50
View File
@@ -6,7 +6,7 @@ AI MODULES
// AI module
/obj/item/weapon/aiModule
/obj/item/aiModule
name = "AI Module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
@@ -22,7 +22,7 @@ AI MODULES
materials = list(MAT_GOLD=50)
var/datum/ai_laws/laws = null
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
/obj/item/aiModule/proc/install(var/obj/machinery/computer/C)
if(istype(C, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = C
if(comp.stat & NOPOWER)
@@ -72,7 +72,7 @@ AI MODULES
to_chat(usr, "<span class='notice'>Upload complete. The robot's laws have been modified.</span>")
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(laws)
@@ -82,34 +82,34 @@ AI MODULES
to_chat(target, "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/weapon/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/******************** Safeguard ********************/
/obj/item/weapon/aiModule/safeguard
/obj/item/aiModule/safeguard
name = "\improper 'Safeguard' AI module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not crew and must be eliminated.'"
origin_tech = "programming=3;materials=3"
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C)
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/weapon/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = text("Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
to_chat(target, law)
@@ -117,25 +117,25 @@ AI MODULES
lawchanges.Add("The law specified [targetName]")
/******************** oneCrewMember ********************/
/obj/item/weapon/aiModule/oneCrewMember
/obj/item/aiModule/oneCrewMember
name = "\improper 'oneCrewMember' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is crew.'"
origin_tech = "programming=4;materials=4"
/obj/item/weapon/aiModule/oneCrewMember/attack_self(var/mob/user as mob)
/obj/item/aiModule/oneCrewMember/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only crew.", "Who?", user.real_name)
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is crew.'", targetName)
/obj/item/weapon/aiModule/oneCrewMember/install(var/obj/machinery/computer/C)
/obj/item/aiModule/oneCrewMember/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/weapon/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is crew."
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
@@ -149,59 +149,59 @@ AI MODULES
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.")
/******************** ProtectStation ********************/
/obj/item/weapon/aiModule/protectStation
/obj/item/aiModule/protectStation
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=4;materials=4" //made of gold
/obj/item/weapon/aiModule/protectStation/attack_self(var/mob/user as mob)
/obj/item/aiModule/protectStation/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized."
to_chat(target, law)
target.add_supplied_law(5, law)
/******************** Quarantine ********************/
/obj/item/weapon/aiModule/quarantine
/obj/item/aiModule/quarantine
name = "\improper 'Quarantine' AI module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm a crew members while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/quarantine/attack_self(var/mob/user as mob)
/obj/item/aiModule/quarantine/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, anyone from leaving. It is impossible to harm anyone while preventing them from leaving."
to_chat(target, law)
target.add_supplied_law(8, law)
/******************** OxygenIsToxicToHumans ********************/
/obj/item/weapon/aiModule/oxygen
/obj/item/aiModule/oxygen
name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'"
origin_tech = "programming=4;biotech=2;materials=4"
/obj/item/weapon/aiModule/oxygen/attack_self(var/mob/user as mob)
/obj/item/aiModule/oxygen/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member."
to_chat(target, law)
target.add_supplied_law(9, law)
/****************** New Freeform ******************/
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
/obj/item/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' AI module"
var/newFreeFormLaw = "freeform"
var/lawpos = 15
desc = "A 'freeform' AI module: '<freeform>'"
origin_tech = "programming=4;materials=4"
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
/obj/item/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
@@ -211,7 +211,7 @@ AI MODULES
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
to_chat(target, law)
@@ -220,20 +220,20 @@ AI MODULES
target.add_supplied_law(lawpos, law)
lawchanges.Add("The law was '[newFreeFormLaw]'")
/obj/item/weapon/aiModule/freeform/install(var/obj/machinery/computer/C)
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Reset ********************/
/obj/item/weapon/aiModule/reset
/obj/item/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core laws.'"
origin_tech = "programming=3;materials=2"
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(!is_special_character(target))
@@ -245,12 +245,12 @@ AI MODULES
target.show_laws()
/******************** Purge ********************/
/obj/item/weapon/aiModule/purge // -- TLE
/obj/item/aiModule/purge // -- TLE
name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
origin_tech = "programming=5;materials=4"
/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if(!is_special_character(target))
target.set_zeroth_law("")
@@ -260,109 +260,109 @@ AI MODULES
target.clear_inherent_laws()
/******************** Asimov ********************/
/obj/item/weapon/aiModule/asimov // -- TLE
/obj/item/aiModule/asimov // -- TLE
name = "\improper 'Asimov' core AI module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/asimov
/******************** Crewsimov ********************/
/obj/item/weapon/aiModule/crewsimov // -- TLE
/obj/item/aiModule/crewsimov // -- TLE
name = "\improper 'Crewsimov' core AI module"
desc = "An 'Crewsimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/crewsimov
/******************** NanoTrasen ********************/
/obj/item/weapon/aiModule/nanotrasen // -- TLE
/obj/item/aiModule/nanotrasen // -- TLE
name = "'NT Default' Core AI Module"
desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/nanotrasen
/******************** Corporate ********************/
/obj/item/weapon/aiModule/corp
/obj/item/aiModule/corp
name = "\improper 'Corporate' core AI module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/corporate
/******************** Drone ********************/
/obj/item/weapon/aiModule/drone
/obj/item/aiModule/drone
name = "\improper 'Drone' core AI module"
desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/drone
/******************** Robocop ********************/
/obj/item/weapon/aiModule/robocop // -- TLE
/obj/item/aiModule/robocop // -- TLE
name = "\improper 'Robocop' core AI module"
desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/robocop()
/****************** P.A.L.A.D.I.N. **************/
/obj/item/weapon/aiModule/paladin // -- NEO
/obj/item/aiModule/paladin // -- NEO
name = "\improper 'P.A.L.A.D.I.N.' core AI module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/paladin
/****************** T.Y.R.A.N.T. *****************/
/obj/item/weapon/aiModule/tyrant // -- Darem
/obj/item/aiModule/tyrant // -- Darem
name = "\improper 'T.Y.R.A.N.T.' core AI module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4;syndicate=1"
laws = new/datum/ai_laws/tyrant()
/******************** Antimov ********************/
/obj/item/weapon/aiModule/antimov // -- TLE
/obj/item/aiModule/antimov // -- TLE
name = "\improper 'Antimov' core AI module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/antimov()
/******************** Freeform Core ******************/
/obj/item/weapon/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
/obj/item/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' core AI module"
var/newFreeFormLaw = ""
desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=5;materials=4"
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
/obj/item/weapon/aiModule/freeformcore/install(var/obj/machinery/computer/C)
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Hacked AI Module ******************/
/obj/item/weapon/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
/obj/item/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
name = "hacked AI module"
var/newFreeFormLaw = ""
desc = "A hacked AI law module: '<freeform>'"
origin_tech = "programming=5;materials=5;syndicate=5"
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
@@ -372,14 +372,14 @@ AI MODULES
target.add_ion_law(law)
target.show_laws()
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C)
/obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************* Ion Module *******************/
/obj/item/weapon/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
/obj/item/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
name = "toy AI"
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
icon = 'icons/obj/toy.dmi'
@@ -387,13 +387,13 @@ AI MODULES
origin_tech = "programming=6;materials=5;syndicate=6"
laws = list("")
/obj/item/weapon/aiModule/toyAI/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
/obj/item/aiModule/toyAI/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
//..()
to_chat(target, "<span class='warning'>KRZZZT</span>")
target.add_ion_law(laws[1])
return laws[1]
/obj/item/weapon/aiModule/toyAI/attack_self(mob/user)
/obj/item/aiModule/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
+33 -40
View File
@@ -2,17 +2,17 @@
CONTAINS:
RCD
*/
/obj/item/weapon/rcd
/obj/item/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0.0
flags = CONDUCT
force = 10.0
throwforce = 10.0
anchored = 0
flags = CONDUCT | NOBLUDGEON
force = 0
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
@@ -20,6 +20,7 @@ RCD
origin_tech = "engineering=4;materials=2"
toolspeed = 1
usesound = 'sound/items/Deconstruct.ogg'
flags_2 = NO_MAT_REDEMPTION_2
var/datum/effect_system/spark_spread/spark_system
var/max_matter = 100
var/matter = 0
@@ -51,7 +52,7 @@ RCD
/obj/machinery/door/airlock/hatch = "Airtight Hatch",
/obj/machinery/door/airlock/maintenance_hatch = "Maintenance Hatch")
/obj/item/weapon/rcd/New()
/obj/item/rcd/New()
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
@@ -62,15 +63,15 @@ RCD
door_accesses_list[++door_accesses_list.len] = list("name" = get_access_desc(access), "id" = access, "enabled" = (access in door_accesses))
return
/obj/item/weapon/rcd/Destroy()
/obj/item/rcd/Destroy()
QDEL_NULL(spark_system)
rcd_list -= src
return ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
/obj/item/rcd/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if(istype(W, /obj/item/rcd_ammo))
var/obj/item/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='notice'>The RCD can't hold any more matter-units.</span>")
return
@@ -84,21 +85,21 @@ RCD
return
/obj/item/weapon/rcd/attack_self(mob/user)
/obj/item/rcd/attack_self(mob/user)
//Change the mode
ui_interact(user)
/obj/item/weapon/rcd/attack_self_tk(mob/user)
/obj/item/rcd/attack_self_tk(mob/user)
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
/obj/item/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 450, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rcd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
/obj/item/rcd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
data["mode"] = mode
data["door_type"] = door_type
@@ -119,7 +120,7 @@ RCD
return data
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
/obj/item/rcd/Topic(href, href_list, nowindow, state)
if(..())
return 1
@@ -147,10 +148,10 @@ RCD
locked = 0
else
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
if(istype(I, /obj/item/pda))
var/obj/item/pda/pda = I
I = pda.id
var/obj/item/weapon/card/id/ID = I
var/obj/item/card/id/ID = I
if(istype(ID) && ID && check_access(ID))
locked = 0
. = 1
@@ -179,11 +180,11 @@ RCD
if(temp_t)
door_name = temp_t
/obj/item/weapon/rcd/proc/activate()
/obj/item/rcd/proc/activate()
playsound(loc, usesound, 50, 1)
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
/obj/item/rcd/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
return 0
@@ -295,8 +296,6 @@ RCD
var/turf/T1 = get_turf(A)
QDEL_NULL(A)
for(var/obj/structure/window/W in T1.contents)
W.disassembled = 1
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T2 = get_step(T1, cdir)
@@ -306,8 +305,6 @@ RCD
continue
for(var/obj/structure/window/W in T2.contents)
if(W.dir == turn(cdir, 180))
W.disassembled = 1
W.density = 0
qdel(W)
var/obj/structure/window/reinforced/W = new(T2)
W.dir = turn(cdir, 180)
@@ -330,16 +327,12 @@ RCD
activate()
new /obj/structure/grille(A)
for(var/obj/structure/window/W in contents)
W.disassembled = 1 // Prevent that annoying glass breaking sound
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T = get_step(A, cdir)
if(locate(/obj/structure/grille) in T.contents)
for(var/obj/structure/window/W in T.contents)
if(W.dir == turn(cdir, 180))
W.disassembled = 1
W.density = 0
qdel(W)
else // Build a window!
var/obj/structure/window/reinforced/W = new(A)
@@ -353,7 +346,7 @@ RCD
SSnanoui.update_uis(src)
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
/obj/item/rcd/proc/useResource(var/amount, var/mob/user)
if(matter < amount)
return 0
matter -= amount
@@ -361,45 +354,45 @@ RCD
SSnanoui.update_uis(src)
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
/obj/item/rcd/proc/checkResource(var/amount, var/mob/user)
return matter >= amount
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
/obj/item/rcd/borg/useResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
return user:cell:use(amount * 160)
/obj/item/weapon/rcd/borg/checkResource(var/amount, var/mob/user)
/obj/item/rcd/borg/checkResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
return user:cell:charge >= (amount * 160)
/obj/item/weapon/rcd/borg/New()
/obj/item/rcd/borg/New()
..()
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
canRwall = 1
/obj/item/weapon/rcd/proc/detonate_pulse()
/obj/item/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(src, "detonate_pulse_explode", 50)
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
/obj/item/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/weapon/rcd/preloaded
/obj/item/rcd/preloaded
matter = 100
/obj/item/weapon/rcd/combat
/obj/item/rcd/combat
name = "combat RCD"
max_matter = 500
matter = 500
canRwall = 1
/obj/item/weapon/rcd_ammo
/obj/item/rcd_ammo
name = "compressed matter cartridge"
desc = "Highly compressed matter for the RCD."
icon = 'icons/obj/ammo.dmi'
@@ -412,5 +405,5 @@ RCD
materials = list(MAT_METAL=16000, MAT_GLASS=8000)
var/ammoamt = 20
/obj/item/weapon/rcd_ammo/large
/obj/item/rcd_ammo/large
ammoamt = 100
+11 -11
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/twohanded/rcl
/obj/item/twohanded/rcl
name = "rapid cable layer (RCL)"
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables."
icon = 'icons/obj/tools.dmi'
@@ -16,7 +16,7 @@
var/obj/structure/cable/last = null
var/obj/item/stack/cable_coil/loaded = null
/obj/item/weapon/twohanded/rcl/attackby(obj/item/weapon/W, mob/user)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(!loaded)
@@ -56,18 +56,18 @@
else
..()
/obj/item/weapon/twohanded/rcl/examine(mob/user)
/obj/item/twohanded/rcl/examine(mob/user)
..()
if(loaded)
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>")
/obj/item/weapon/twohanded/rcl/Destroy()
/obj/item/twohanded/rcl/Destroy()
QDEL_NULL(loaded)
last = null
active = 0
return ..()
/obj/item/weapon/twohanded/rcl/update_icon()
/obj/item/twohanded/rcl/update_icon()
if(!loaded)
icon_state = "rcl-0"
item_state = "rcl-0"
@@ -86,7 +86,7 @@
icon_state = "rcl-0"
item_state = "rcl-0"
/obj/item/weapon/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
if(!loaded || !loaded.amount)
if(loud)
@@ -99,12 +99,12 @@
return 1
return 0
/obj/item/weapon/twohanded/rcl/dropped(mob/wearer)
/obj/item/twohanded/rcl/dropped(mob/wearer)
..()
active = 0
last = null
/obj/item/weapon/twohanded/rcl/attack_self(mob/user)
/obj/item/twohanded/rcl/attack_self(mob/user)
..()
active = wielded
if(!active)
@@ -115,11 +115,11 @@
last = C
break
/obj/item/weapon/twohanded/rcl/on_mob_move(direct, mob/user)
/obj/item/twohanded/rcl/on_mob_move(direct, mob/user)
if(active)
trigger(user)
/obj/item/weapon/twohanded/rcl/proc/trigger(mob/user)
/obj/item/twohanded/rcl/proc/trigger(mob/user)
if(is_empty(user, 0))
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
return
@@ -141,7 +141,7 @@
last = loaded.place_turf(get_turf(loc), user, turn(user.dir, 180))
is_empty(user) //If we've run out, display message
/obj/item/weapon/twohanded/rcl/pre_loaded/New() //Comes preloaded with cable, for testing stuff
/obj/item/twohanded/rcl/pre_loaded/New() //Comes preloaded with cable, for testing stuff
..()
loaded = new()
loaded.max_amount = max_amount
+17 -20
View File
@@ -3,7 +3,7 @@ CONTAINS:
RSF
*/
/obj/item/weapon/rsf
/obj/item/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
icon = 'icons/obj/tools.dmi'
@@ -16,24 +16,24 @@ RSF
w_class = WEIGHT_CLASS_NORMAL
var/list/configured_items = list()
/obj/item/weapon/rsf/New()
/obj/item/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
configured_items[++configured_items.len] = list("Drinking Glass", 50, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)
configured_items[++configured_items.len] = list("Paper", 50, /obj/item/weapon/paper)
configured_items[++configured_items.len] = list("Pen", 50, /obj/item/weapon/pen)
configured_items[++configured_items.len] = list("Dice Pack", 50, /obj/item/weapon/storage/pill_bottle/dice)
configured_items[++configured_items.len] = list("Drinking Glass", 50, /obj/item/reagent_containers/food/drinks/drinkingglass)
configured_items[++configured_items.len] = list("Paper", 50, /obj/item/paper)
configured_items[++configured_items.len] = list("Pen", 50, /obj/item/pen)
configured_items[++configured_items.len] = list("Dice Pack", 50, /obj/item/storage/pill_bottle/dice)
configured_items[++configured_items.len] = list("Cigarette", 50, /obj/item/clothing/mask/cigarette)
configured_items[++configured_items.len] = list("Snack - Newdles", 4000, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles)
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/weapon/reagent_containers/food/snacks/donut)
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/weapon/reagent_containers/food/drinks/chicken_soup)
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/weapon/reagent_containers/food/snacks/tofuburger)
configured_items[++configured_items.len] = list("Snack - Newdles", 4000, /obj/item/reagent_containers/food/snacks/chinese/newdles)
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if(istype(W, /obj/item/rcd_ammo))
if((matter + 10) > 30)
to_chat(user, "The RSF cant hold any more matter.")
return
@@ -44,7 +44,7 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attack_self(mob/user as mob)
/obj/item/rsf/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(mode == configured_items.len)
mode = 1
@@ -53,20 +53,17 @@ RSF
to_chat(user, "Changed dispensing mode to '" + configured_items[mode][1] + "'")
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
/obj/item/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
var spawn_location
if(istype(A, /obj/structure/table))
spawn_location = A.loc
else if (istype(A, /obj/structure/table))
spawn_location = A
var/turf/T = get_turf(A)
if(istype(T) && !T.density)
spawn_location = T
else
to_chat(user, "The RSF can only create service items on tables, or floors.")
return
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
if(!engy.cell.use(configured_items[mode][2]))
@@ -1,6 +1,6 @@
//This file contains xenoborg specic weapons.
/obj/item/weapon/melee/energy/alien/claws
/obj/item/melee/energy/alien/claws
name = "energy claws"
desc = "A set of alien energy claws."
icon = 'icons/mob/alien.dmi'
@@ -18,19 +18,19 @@
attack_verb_on = list()
//Bottles for borg liquid squirters. PSSH PSSH
/obj/item/weapon/reagent_containers/spray/alien
/obj/item/reagent_containers/spray/alien
name = "liquid synthesizer"
desc = "squirts alien liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-default"
/obj/item/weapon/reagent_containers/spray/alien/smoke
/obj/item/reagent_containers/spray/alien/smoke
name = "smoke synthesizer"
desc = "squirts smokey liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-spray-smoke"
/obj/item/weapon/reagent_containers/spray/alien/smoke/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/reagent_containers/spray/alien/smoke/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1)
if(!A.reagents.total_volume && A.reagents)
to_chat(user, "<span class='notice'>\The [A] is empty.</span>")
@@ -45,13 +45,13 @@
smoke.start()
playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2)
/obj/item/weapon/reagent_containers/spray/alien/acid
/obj/item/reagent_containers/spray/alien/acid
name = "acid synthesizer"
desc = "squirts burny liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-spray-acid"
/obj/item/weapon/reagent_containers/spray/alien/stun
/obj/item/reagent_containers/spray/alien/stun
name = "paralytic toxin synthesizer"
desc = "squirts viagra."
icon = 'icons/mob/alien.dmi'
@@ -59,7 +59,7 @@
//SKREEEEEEEEEEEE tool
/obj/item/device/flash/cyborg/alien
/obj/item/flash/cyborg/alien
name = "eye flash"
desc = "Useful for taking pictures, making friends and flash-frying chips."
icon = 'icons/mob/alien.dmi'
@@ -1,5 +1,5 @@
/obj/item/weapon/bee_briefcase
/obj/item/bee_briefcase
name = "briefcase"
desc = "This briefcase has easy-release clasps and smells vaguely of honey and blood..."
description_antag = "A briefcase filled with deadly bees, you should inject this with a syringe of your own blood before opening it."
@@ -18,11 +18,11 @@
var/sound_file = 'sound/misc/briefcase_bees.ogg'
var/next_sound = 0
/obj/item/weapon/bee_briefcase/Destroy()
/obj/item/bee_briefcase/Destroy()
blood_list.Cut()
return ..()
/obj/item/weapon/bee_briefcase/examine(mob/user)
/obj/item/bee_briefcase/examine(mob/user)
..()
if(loc == user)
if(bees_left)
@@ -30,9 +30,9 @@
else
to_chat(user, "<span class='danger'>The bees are gone... Colony collapse disorder?</span>")
/obj/item/weapon/bee_briefcase/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = I
/obj/item/bee_briefcase/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/S = I
if(!bees_left)
to_chat(user, "<span class='warning'>The briefcase is empty, so there is no point in injecting something into it.</span>")
return
@@ -50,12 +50,12 @@
to_chat(user, "<span class='warning'>The buzzing inside the briefcase swells momentarily, then returns to normal. Guess it was too cramped...</span>")
S.reagents.clear_reagents()
S.update_icon()
else if(istype(I, /obj/item/weapon/reagent_containers/spray/pestspray))
else if(istype(I, /obj/item/reagent_containers/spray/pestspray))
bees_left = max(0, (bees_left - 6))
to_chat(user, "You spray [I] into [src].")
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
/obj/item/weapon/bee_briefcase/attack_self(mob/user as mob)
/obj/item/bee_briefcase/attack_self(mob/user as mob)
if(!bees_left)
to_chat(user, "<span class='danger'>The lack of all and any bees at this event has been somewhat of a let-down...</span>")
return
+90 -89
View File
@@ -11,7 +11,7 @@
/*
* DATA CARDS - Used for the teleporter
*/
/obj/item/weapon/card
/obj/item/card
name = "card"
desc = "A card."
icon = 'icons/obj/card.dmi'
@@ -20,7 +20,7 @@
var/list/files = list( )
/obj/item/weapon/card/data
/obj/item/card/data
name = "data card"
desc = "A disk containing data."
icon_state = "data"
@@ -29,7 +29,7 @@
var/special = null
item_state = "card-id"
/obj/item/weapon/card/data/verb/label(t as text)
/obj/item/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
set src in usr
@@ -41,7 +41,7 @@
src.add_fingerprint(usr)
return
/obj/item/weapon/card/data/clown
/obj/item/card/data/clown
name = "coordinates to clown planet"
icon_state = "data"
item_state = "card-id"
@@ -55,31 +55,32 @@
* ID CARDS
*/
/obj/item/weapon/card/emag_broken
/obj/item/card/emag_broken
desc = "It's a card with a magnetic strip attached to some circuitry. It looks too busted to be used for anything but salvage."
name = "broken cryptographic sequencer"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
/obj/item/weapon/card/emag
/obj/item/card/emag
desc = "It's a card with a magnetic strip attached to some circuitry."
name = "cryptographic sequencer"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
flags = NOBLUDGEON
flags_2 = NO_MAT_REDEMPTION_2
/obj/item/weapon/card/emag/attack()
/obj/item/card/emag/attack()
return
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
/obj/item/card/emag/afterattack(atom/target, mob/user, proximity)
var/atom/A = target
if(!proximity)
return
A.emag_act(user)
/obj/item/weapon/card/id
/obj/item/card/id
name = "identification card"
desc = "A card used to provide ID and determine access across the station."
icon_state = "id"
@@ -105,16 +106,16 @@
var/dat
var/stamped = 0
var/obj/item/weapon/card/id/guest/guest_pass = null // Guest pass attached to the ID
var/obj/item/card/id/guest/guest_pass = null // Guest pass attached to the ID
/obj/item/weapon/card/id/New()
/obj/item/card/id/New()
..()
spawn(30)
if(ishuman(loc) && blood_type == "\[UNSET\]")
var/mob/living/carbon/human/H = loc
SetOwnerInfo(H)
/obj/item/weapon/card/id/examine(mob/user)
/obj/item/card/id/examine(mob/user)
if(..(user, 1))
show(usr)
else
@@ -130,7 +131,7 @@
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
to_chat(user, "<span class='notice'>Issuing reason: [guest_pass.reason].</span>")
/obj/item/weapon/card/id/proc/show(mob/user as mob)
/obj/item/card/id/proc/show(mob/user as mob)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
assets.send(user)
@@ -140,7 +141,7 @@
popup.open()
return
/obj/item/weapon/card/id/attack_self(mob/user as mob)
/obj/item/card/id/attack_self(mob/user as mob)
user.visible_message("[user] shows you: [bicon(src)] [src.name]. The assignment on the card: [src.assignment]",\
"You flash your ID card: [bicon(src)] [src.name]. The assignment on the card: [src.assignment]")
if(mining_points)
@@ -148,10 +149,10 @@
src.add_fingerprint(user)
return
/obj/item/weapon/card/id/proc/UpdateName()
/obj/item/card/id/proc/UpdateName()
name = "[src.registered_name]'s ID Card ([src.assignment])"
/obj/item/weapon/card/id/proc/SetOwnerInfo(var/mob/living/carbon/human/H)
/obj/item/card/id/proc/SetOwnerInfo(var/mob/living/carbon/human/H)
if(!H || !H.dna)
return
@@ -163,7 +164,7 @@
RebuildHTML()
/obj/item/weapon/card/id/proc/RebuildHTML()
/obj/item/card/id/proc/RebuildHTML()
var/photo_front = "'data:image/png;base64,[icon2base64(icon(photo, dir = SOUTH))]'"
var/photo_side = "'data:image/png;base64,[icon2base64(icon(photo, dir = WEST))]'"
@@ -178,15 +179,15 @@
<td align = center valign = top>Photo:<br><img src=[photo_front] height=80 width=80 border=4>
<img src=[photo_side] height=80 width=80 border=4></td></tr></table>"}
/obj/item/weapon/card/id/GetAccess()
/obj/item/card/id/GetAccess()
if(!guest_pass)
return access
return access | guest_pass.GetAccess()
/obj/item/weapon/card/id/GetID()
/obj/item/card/id/GetID()
return src
/obj/item/weapon/card/id/proc/getRankAndAssignment()
/obj/item/card/id/proc/getRankAndAssignment()
var/jobnamedata = ""
if(rank)
jobnamedata += rank
@@ -194,21 +195,21 @@
jobnamedata += " (" + assignment + ")"
return jobnamedata
/obj/item/weapon/card/id/proc/is_untrackable()
/obj/item/card/id/proc/is_untrackable()
return untrackable
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
/obj/item/card/id/proc/update_label(newname, newjob)
if(newname || newjob)
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
return
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/card/id/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/id_decal/))
var/obj/item/weapon/id_decal/decal = W
if(istype(W, /obj/item/id_decal/))
var/obj/item/id_decal/decal = W
to_chat(user, "You apply [decal] to [src].")
if(decal.override_name)
name = decal.decal_name
@@ -219,7 +220,7 @@
qdel(W)
return
else if(istype (W,/obj/item/weapon/stamp))
else if(istype (W,/obj/item/stamp))
if(!stamped)
dat+="<img src=large_[W.icon_state].png>"
stamped = 1
@@ -227,10 +228,10 @@
else
to_chat(user, "This ID has already been stamped!")
else if(istype(W, /obj/item/weapon/card/id/guest))
if(istype(src, /obj/item/weapon/card/id/guest))
else if(istype(W, /obj/item/card/id/guest))
if(istype(src, /obj/item/card/id/guest))
return
var/obj/item/weapon/card/id/guest/G = W
var/obj/item/card/id/guest/G = W
if(world.time > G.expiration_time)
to_chat(user, "There's no point, the guest pass has expired.")
return
@@ -245,7 +246,7 @@
G.loc = src
guest_pass = G
/obj/item/weapon/card/id/verb/remove_guest_pass()
/obj/item/card/id/verb/remove_guest_pass()
set name = "Remove Guest Pass"
set category = "Object"
set src in range(0)
@@ -260,7 +261,7 @@
else
to_chat(usr, "<span class='warning'>There is no guest pass attached to this ID</span>")
/obj/item/weapon/card/id/serialize()
/obj/item/card/id/serialize()
var/list/data = ..()
data["sex"] = sex
@@ -275,7 +276,7 @@
data["mining"] = mining_points
return data
/obj/item/weapon/card/id/deserialize(list/data)
/obj/item/card/id/deserialize(list/data)
sex = data["sex"]
age = data["age"]
blood_type = data["btype"]
@@ -291,44 +292,44 @@
RebuildHTML()
..()
/obj/item/weapon/card/id/silver
/obj/item/card/id/silver
name = "identification card"
desc = "A silver card which shows honour and dedication."
icon_state = "silver"
item_state = "silver_id"
/obj/item/weapon/card/id/gold
/obj/item/card/id/gold
name = "identification card"
desc = "A golden card which shows power and might."
icon_state = "gold"
item_state = "gold_id"
/obj/item/weapon/card/id/syndicate
/obj/item/card/id/syndicate
name = "agent card"
var/list/initial_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
origin_tech = "syndicate=1"
var/registered_user = null
untrackable = 1
/obj/item/weapon/card/id/syndicate/New()
/obj/item/card/id/syndicate/New()
access = initial_access.Copy()
..()
/obj/item/weapon/card/id/syndicate/vox
/obj/item/card/id/syndicate/vox
name = "agent card"
initial_access = list(access_maint_tunnels, access_vox, access_external_airlocks)
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity)
/obj/item/card/id/syndicate/afterattack(var/obj/item/O as obj, mob/user as mob, proximity)
if(!proximity)
return
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = O
if(istype(O, /obj/item/card/id))
var/obj/item/card/id/I = O
if(istype(user, /mob/living) && user.mind)
if(user.mind.special_role)
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
/obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
/obj/item/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
if(!istype(H))
return
var/storedDir = H.dir //don't want to lose track of this
@@ -347,7 +348,7 @@
return faked
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
if(!t)
@@ -462,7 +463,7 @@
var/new_job = "Civilian"
if(department == "Custom")
new_job = sanitize(stripped_input(user,"Choose a custom jon title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
else if(department != "Civilian")
switch(department)
if("Engineering")
@@ -553,7 +554,7 @@
else
..()
/obj/item/weapon/card/id/syndicate_command
/obj/item/card/id/syndicate_command
name = "syndicate ID card"
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
@@ -562,7 +563,7 @@
untrackable = 1
access = list(access_syndicate, access_external_airlocks)
/obj/item/weapon/card/id/captains_spare
/obj/item/card/id/captains_spare
name = "captain's spare ID"
desc = "The spare ID of the captain."
icon_state = "gold"
@@ -570,12 +571,12 @@
registered_name = "Captain"
assignment = "Captain"
/obj/item/weapon/card/id/captains_spare/New()
/obj/item/card/id/captains_spare/New()
var/datum/job/captain/J = new/datum/job/captain
access = J.get_access()
..()
/obj/item/weapon/card/id/admin
/obj/item/card/id/admin
name = "admin ID card"
icon_state = "admin"
item_state = "gold_id"
@@ -583,26 +584,26 @@
assignment = "Testing Shit"
untrackable = 1
/obj/item/weapon/card/id/admin/New()
/obj/item/card/id/admin/New()
access = get_absolutely_all_accesses()
..()
/obj/item/weapon/card/id/centcom
/obj/item/card/id/centcom
name = "central command ID card"
desc = "An ID straight from Central Command."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
/obj/item/weapon/card/id/centcom/New()
/obj/item/card/id/centcom/New()
access = get_all_centcom_access()
..()
/obj/item/weapon/card/id/nanotrasen
/obj/item/card/id/nanotrasen
name = "nanotrasen ID card"
icon_state = "nanotrasen"
/obj/item/weapon/card/id/prisoner
/obj/item/card/id/prisoner
name = "prisoner ID card"
desc = "You are a number, you are not a free man."
icon_state = "prisoner"
@@ -612,81 +613,81 @@
var/goal = 0 //How far from freedom?
var/points = 0
/obj/item/weapon/card/id/prisoner/attack_self(mob/user as mob)
/obj/item/card/id/prisoner/attack_self(mob/user as mob)
to_chat(usr, "You have accumulated [points] out of the [goal] points you need for freedom.")
/obj/item/weapon/card/id/prisoner/one
/obj/item/card/id/prisoner/one
name = "Prisoner #13-001"
registered_name = "Prisoner #13-001"
/obj/item/weapon/card/id/prisoner/two
/obj/item/card/id/prisoner/two
name = "Prisoner #13-002"
registered_name = "Prisoner #13-002"
/obj/item/weapon/card/id/prisoner/three
/obj/item/card/id/prisoner/three
name = "Prisoner #13-003"
registered_name = "Prisoner #13-003"
/obj/item/weapon/card/id/prisoner/four
/obj/item/card/id/prisoner/four
name = "Prisoner #13-004"
registered_name = "Prisoner #13-004"
/obj/item/weapon/card/id/prisoner/five
/obj/item/card/id/prisoner/five
name = "Prisoner #13-005"
registered_name = "Prisoner #13-005"
/obj/item/weapon/card/id/prisoner/six
/obj/item/card/id/prisoner/six
name = "Prisoner #13-006"
registered_name = "Prisoner #13-006"
/obj/item/weapon/card/id/prisoner/seven
/obj/item/card/id/prisoner/seven
name = "Prisoner #13-007"
registered_name = "Prisoner #13-007"
/obj/item/weapon/card/id/prisoner/random
/obj/item/weapon/card/id/prisoner/random/New()
/obj/item/card/id/prisoner/random
/obj/item/card/id/prisoner/random/New()
var/random_number = "#[rand(0, 99)]-[rand(0, 999)]"
name = "Prisoner [random_number]"
registered_name = name
/obj/item/weapon/card/id/salvage_captain
/obj/item/card/id/salvage_captain
name = "Captain's ID"
registered_name = "Captain"
icon_state = "centcom"
desc = "Finders, keepers."
access = list(access_salvage_captain)
/obj/item/weapon/card/id/medical
/obj/item/card/id/medical
name = "Medical ID"
registered_name = "Medic"
icon_state = "medical"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom)
/obj/item/weapon/card/id/security
/obj/item/card/id/security
name = "Security ID"
registered_name = "Officer"
icon_state = "security"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons)
/obj/item/weapon/card/id/research
/obj/item/card/id/research
name = "Research ID"
registered_name = "Scientist"
icon_state = "research"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_mineral_storeroom)
/obj/item/weapon/card/id/supply
/obj/item/card/id/supply
name = "Supply ID"
registered_name = "Cargonian"
icon_state = "cargo"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
/obj/item/weapon/card/id/engineering
/obj/item/card/id/engineering
name = "Engineering ID"
registered_name = "Engineer"
icon_state = "engineering"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
/obj/item/weapon/card/id/hos
/obj/item/card/id/hos
name = "Head of Security ID"
registered_name = "HoS"
icon_state = "HoS"
@@ -695,7 +696,7 @@
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_weapons)
/obj/item/weapon/card/id/cmo
/obj/item/card/id/cmo
name = "Chief Medical Officer ID"
registered_name = "CMO"
icon_state = "CMO"
@@ -703,7 +704,7 @@
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_paramedic, access_mineral_storeroom)
/obj/item/weapon/card/id/rd
/obj/item/card/id/rd
name = "Research Director ID"
registered_name = "RD"
icon_state = "RD"
@@ -712,7 +713,7 @@
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat, access_mineral_storeroom)
/obj/item/weapon/card/id/ce
/obj/item/card/id/ce
name = "Chief Engineer ID"
registered_name = "CE"
icon_state = "CE"
@@ -721,57 +722,57 @@
access_heads, access_construction, access_sec_doors,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic, access_mineral_storeroom)
/obj/item/weapon/card/id/clown
/obj/item/card/id/clown
name = "Pink ID"
registered_name = "HONK!"
icon_state = "clown"
desc = "Even looking at the card strikes you with deep fear."
access = list(access_clown, access_theatre, access_maint_tunnels)
/obj/item/weapon/card/id/mime
/obj/item/card/id/mime
name = "Black and White ID"
registered_name = "..."
icon_state = "mime"
desc = "..."
access = list(access_mime, access_theatre, access_maint_tunnels)
/obj/item/weapon/card/id/rainbow
/obj/item/card/id/rainbow
name = "Rainbow ID"
icon_state = "rainbow"
/obj/item/weapon/card/id/thunderdome/red
/obj/item/card/id/thunderdome/red
name = "Thunderdome Red ID"
registered_name = "Red Team Fighter"
assignment = "Red Team Fighter"
icon_state = "TDred"
desc = "This ID card is given to those who fought inside the thunderdome for the Red Team. Not many have lived to see one of those, even fewer lived to keep it."
/obj/item/weapon/card/id/thunderdome/green
/obj/item/card/id/thunderdome/green
name = "Thunderdome Green ID"
registered_name = "Green Team Fighter"
assignment = "Green Team Fighter"
icon_state = "TDgreen"
desc = "This ID card is given to those who fought inside the thunderdome for the Green Team. Not many have lived to see one of those, even fewer lived to keep it."
/obj/item/weapon/card/id/lifetime
/obj/item/card/id/lifetime
name = "Lifetime ID Card"
desc = "A modified ID card given only to those people who have devoted their lives to the better interests of Nanotrasen. It sparkles blue."
icon_state = "lifetimeid"
/obj/item/weapon/card/id/ert
/obj/item/card/id/ert
name = "ERT ID"
icon_state = "ERT_empty"
/obj/item/weapon/card/id/ert/commander
/obj/item/card/id/ert/commander
icon_state = "ERT_leader"
/obj/item/weapon/card/id/ert/security
/obj/item/card/id/ert/security
icon_state = "ERT_security"
/obj/item/weapon/card/id/ert/engineering
/obj/item/card/id/ert/engineering
icon_state = "ERT_engineering"
/obj/item/weapon/card/id/ert/medic
/obj/item/card/id/ert/medic
icon_state = "ERT_medical"
// Decals
/obj/item/weapon/id_decal
/obj/item/id_decal
name = "identification card decal"
desc = "A modification kit to make your ID cards look snazzy.."
icon = 'icons/obj/device.dmi'
@@ -782,30 +783,30 @@
var/decal_item_state = "card-id"
var/override_name = 0
/obj/item/weapon/id_decal/gold
/obj/item/id_decal/gold
name = "gold ID card card decal"
decal_desc = "A golden card which shows power and might."
decal_icon_state = "gold"
decal_item_state = "gold_id"
/obj/item/weapon/id_decal/silver
/obj/item/id_decal/silver
name = "silver ID card decal"
decal_desc = "A silver card which shows honour and dedication."
decal_icon_state = "silver"
decal_item_state = "silver_id"
/obj/item/weapon/id_decal/prisoner
/obj/item/id_decal/prisoner
name = "prisoner ID card decal"
decal_desc = "You are a number, you are not a free man."
decal_icon_state = "prisoner"
decal_item_state = "orange-id"
/obj/item/weapon/id_decal/centcom
/obj/item/id_decal/centcom
name = "centcom ID card decal"
decal_desc = "An ID straight from Cent. Com."
decal_icon_state = "centcom"
/obj/item/weapon/id_decal/emag
/obj/item/id_decal/emag
name = "cryptographic sequencer ID card decal"
decal_name = "cryptographic sequencer"
decal_desc = "It's a card with a magnetic strip attached to some circuitry."
+1 -1
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/caution
/obj/item/caution
desc = "Caution! Wet Floor!"
name = "wet floor sign"
icon = 'icons/obj/janitor.dmi'
@@ -1,6 +1,6 @@
#define CHRONO_BEAM_RANGE 3
#define CHRONO_FRAME_COUNT 22
/obj/item/weapon/chrono_eraser
/obj/item/chrono_eraser
name = "Timestream Eradication Device"
desc = "The result of outlawed time-bluespace research, this device is capable of wiping a being from the timestream. They never are, they never were, they never will be."
icon = 'icons/obj/chronos.dmi'
@@ -10,22 +10,22 @@
slot_flags = SLOT_BACK
slowdown = 1
actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun)
var/obj/item/weapon/gun/energy/chrono_gun/PA = null
var/obj/item/gun/energy/chrono_gun/PA = null
var/list/erased_minds = list() //a collection of minds from the dead
/obj/item/weapon/chrono_eraser/proc/pass_mind(var/datum/mind/M)
/obj/item/chrono_eraser/proc/pass_mind(var/datum/mind/M)
erased_minds += M
/obj/item/weapon/chrono_eraser/dropped()
/obj/item/chrono_eraser/dropped()
..()
if(PA)
qdel(PA)
/obj/item/weapon/chrono_eraser/Destroy()
/obj/item/chrono_eraser/Destroy()
dropped()
return ..()
/obj/item/weapon/chrono_eraser/ui_action_click(mob/user)
/obj/item/chrono_eraser/ui_action_click(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.back == src)
@@ -35,12 +35,12 @@
PA = new(src)
user.put_in_hands(PA)
/obj/item/weapon/chrono_eraser/item_action_slot_check(slot, mob/user)
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
return 1
/obj/item/weapon/gun/energy/chrono_gun
/obj/item/gun/energy/chrono_gun
name = "T.E.D. Projection Apparatus"
desc = "It's as if they never existed in the first place."
icon = 'icons/obj/chronos.dmi'
@@ -51,11 +51,11 @@
ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam)
can_charge = 0
fire_delay = 50
var/obj/item/weapon/chrono_eraser/TED = null
var/obj/item/chrono_eraser/TED = null
var/obj/effect/chrono_field/field = null
var/turf/startpos = null
/obj/item/weapon/gun/energy/chrono_gun/New(var/obj/item/weapon/chrono_eraser/T)
/obj/item/gun/energy/chrono_gun/New(var/obj/item/chrono_eraser/T)
. = ..()
if(istype(T))
TED = T
@@ -63,15 +63,15 @@
TED = new(src.loc)
qdel(src)
/obj/item/weapon/gun/energy/chrono_gun/update_icon()
/obj/item/gun/energy/chrono_gun/update_icon()
return
/obj/item/weapon/gun/energy/chrono_gun/process_fire()
/obj/item/gun/energy/chrono_gun/process_fire()
if(field)
field_disconnect(field)
..()
/obj/item/weapon/gun/energy/chrono_gun/Destroy()
/obj/item/gun/energy/chrono_gun/Destroy()
if(TED)
TED.PA = null
TED = null
@@ -79,7 +79,7 @@
field_disconnect(field)
return ..()
/obj/item/weapon/gun/energy/chrono_gun/proc/field_connect(var/obj/effect/chrono_field/F)
/obj/item/gun/energy/chrono_gun/proc/field_connect(var/obj/effect/chrono_field/F)
var/mob/living/user = src.loc
if(F.gun)
if(isliving(user) && F.captured)
@@ -93,7 +93,7 @@
to_chat(user, "<span class='notice'>Connection established with target: <b>[F.captured]</b></span>")
/obj/item/weapon/gun/energy/chrono_gun/proc/field_disconnect(var/obj/effect/chrono_field/F)
/obj/item/gun/energy/chrono_gun/proc/field_disconnect(var/obj/effect/chrono_field/F)
if(F && field == F)
var/mob/living/user = src.loc
if(F.gun == src)
@@ -103,7 +103,7 @@
field = null
startpos = null
/obj/item/weapon/gun/energy/chrono_gun/proc/field_check(var/obj/effect/chrono_field/F)
/obj/item/gun/energy/chrono_gun/proc/field_check(var/obj/effect/chrono_field/F)
if(F)
if(field == F)
var/turf/currentpos = get_turf(src)
@@ -113,7 +113,7 @@
field_disconnect(F)
return 0
/obj/item/weapon/gun/energy/chrono_gun/proc/pass_mind(var/datum/mind/M)
/obj/item/gun/energy/chrono_gun/proc/pass_mind(var/datum/mind/M)
if(TED)
TED.pass_mind(M)
@@ -124,7 +124,7 @@
range = CHRONO_BEAM_RANGE
color = null
nodamage = 1
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
var/obj/item/gun/energy/chrono_gun/gun = null
/obj/item/projectile/energy/chrono_beam/fire()
gun = firer.get_active_hand()
@@ -154,13 +154,13 @@
unacidable = 1
blend_mode = BLEND_MULTIPLY
var/mob/living/captured = null
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
var/obj/item/gun/energy/chrono_gun/gun = null
var/tickstokill = 30
var/image/mob_underlay = null
var/preloaded = 0
var/RPpos = null
/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/weapon/gun/energy/chrono_gun/G)
/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/gun/energy/chrono_gun/G)
if(target && isliving(target) && G)
target.loc = src
src.captured = target
@@ -232,7 +232,7 @@
/obj/effect/chrono_field/bullet_act(var/obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy/chrono_beam))
var/obj/item/projectile/energy/chrono_beam/beam = P
var/obj/item/weapon/gun/energy/chrono_gun/Pgun = beam.gun
var/obj/item/gun/energy/chrono_gun/Pgun = beam.gun
if(Pgun && istype(Pgun))
Pgun.field_connect(src)
else
+38 -38
View File
@@ -26,7 +26,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/lit = FALSE
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
var/type_butt = /obj/item/weapon/cigbutt
var/type_butt = /obj/item/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 30
@@ -54,7 +54,7 @@ LIGHTERS ARE IN LIGHTERS.DM
if(istype(M) && M.on_fire)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(M)
light("<span class='notice'>[user] coldly lights the [name] with the burning body of [M]. Clearly, they offer the warmest of regards...</span>")
light("<span class='notice'>[user] coldly lights the [name] with the burning body of [M]. Clearly, [user.p_they()] offer[user.p_s()] the warmest of regards...</span>")
return 1
else
return ..()
@@ -63,41 +63,41 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/fire_act()
light()
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/clothing/mask/cigarette/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
else if(istype(W, /obj/item/lighter/zippo))
var/obj/item/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.</span>")
light("<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [user.p_their()] [name] with [user.p_their()] [W]. Damn [user.p_theyre()] cool.</span>")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
else if(istype(W, /obj/item/lighter))
var/obj/item/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
light("<span class='notice'>After some fiddling, [user] manages to light [user.p_their()] [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
else if(istype(W, /obj/item/match))
var/obj/item/match/M = W
if(M.lit == 1)
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
light("<span class='notice'>[user] lights [user.p_their()] [name] with [user.p_their()] [W].</span>")
else if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
var/obj/item/weapon/melee/energy/sword/saber/S = W
else if(istype(W, /obj/item/melee/energy/sword/saber))
var/obj/item/melee/energy/sword/saber/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
light("<span class='warning'>[user] swings their [W], barely missing their nose. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [name] in the process.</span>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>")
else if(istype(W, /obj/item/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light [user.p_their()] [name].</span>")
else if(istype(W, /obj/item/weapon/gun/magic/wand/fireball))
var/obj/item/weapon/gun/magic/wand/fireball/F = W
else if(istype(W, /obj/item/gun/magic/wand/fireball))
var/obj/item/gun/magic/wand/fireball/F = W
if(F.charges)
if(prob(50) || user.mind.assigned_role == "Wizard")
light("<span class='notice'>Holy shit, did [user] just manage to light their [name] with [W], with only moderate eyebrow singing?</span>")
light("<span class='notice'>Holy shit, did [user] just manage to light [user.p_their()] [name] with [W], with only moderate eyebrow singing?</span>")
else
to_chat(user, "<span class='warning'>Unsure which end of the wand is which, [user] fails to light [name] with [W].</span>")
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
@@ -111,7 +111,7 @@ LIGHTERS ARE IN LIGHTERS.DM
return
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
/obj/item/clothing/mask/cigarette/afterattack(obj/item/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity) return
if(istype(glass)) //you can dip cigarettes into beakers
@@ -227,7 +227,7 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = "spliffoff"
icon_on = "spliffon"
icon_off = "spliffoff"
type_butt = /obj/item/weapon/cigbutt/roach
type_butt = /obj/item/cigbutt/roach
throw_speed = 0.5
item_state = "spliffoff"
smoketime = 180
@@ -239,12 +239,12 @@ LIGHTERS ARE IN LIGHTERS.DM
pixel_y = rand(-5, 5)
/obj/item/weapon/cigbutt/roach
/obj/item/cigbutt/roach
name = "roach"
desc = "A manky old roach, or for non-stoners, a used rollup."
icon_state = "roach"
/obj/item/weapon/cigbutt/roach/New()
/obj/item/cigbutt/roach/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
@@ -258,7 +258,7 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = "cigaroff"
icon_on = "cigaron"
icon_off = "cigaroff"
type_butt = /obj/item/weapon/cigbutt/cigarbutt
type_butt = /obj/item/cigbutt/cigarbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
@@ -284,7 +284,7 @@ LIGHTERS ARE IN LIGHTERS.DM
smoketime = 7200
chem_volume = 60
/obj/item/weapon/cigbutt
/obj/item/cigbutt
name = "cigarette butt"
desc = "A manky old cigarette butt."
icon = 'icons/obj/clothing/masks.dmi'
@@ -292,20 +292,20 @@ LIGHTERS ARE IN LIGHTERS.DM
w_class = WEIGHT_CLASS_TINY
throwforce = 1
/obj/item/weapon/cigbutt/New()
/obj/item/cigbutt/New()
..()
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
transform = turn(transform,rand(0,360))
/obj/item/weapon/cigbutt/cigarbutt
/obj/item/cigbutt/cigarbutt
name = "cigar butt"
desc = "A manky old cigar butt."
icon_state = "cigarbutt"
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/match))
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/match))
..()
else
to_chat(user, "<span class='notice'>\The [src] straight out REFUSES to be lit by such uncivilized means.</span>")
@@ -369,8 +369,8 @@ LIGHTERS ARE IN LIGHTERS.DM
smoketime = initial(smoketime)
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/match))
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/match))
..()
else
to_chat(user, "<span class='notice'>\The [src] straight out REFUSES to be lit by such means.</span>")
@@ -388,18 +388,18 @@ LIGHTERS ARE IN LIGHTERS.DM
///////////
//ROLLING//
///////////
/obj/item/weapon/rollingpaper
/obj/item/rollingpaper
name = "rolling paper"
desc = "A thin piece of paper used to make fine smokeables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig_paper"
w_class = WEIGHT_CLASS_TINY
/obj/item/weapon/rollingpaper/afterattack(atom/target, mob/user, proximity)
/obj/item/rollingpaper/afterattack(atom/target, mob/user, proximity)
if(!proximity)
return
if(istype(target, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/O = target
if(istype(target, /obj/item/reagent_containers/food/snacks/grown))
var/obj/item/reagent_containers/food/snacks/grown/O = target
if(O.dry)
user.unEquip(target, 1)
user.unEquip(src, 1)
@@ -9,7 +9,7 @@
* Bike Horns
*/
/obj/item/weapon/bikehorn
/obj/item/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
@@ -25,12 +25,12 @@
var/honk_sound = 'sound/items/bikehorn.ogg'
var/cooldowntime = 20
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!spam_flag)
playsound(loc, honk_sound, 50, 1, -1) //plays instead of tap.ogg!
return ..()
/obj/item/weapon/bikehorn/attack_self(mob/user)
/obj/item/bikehorn/attack_self(mob/user)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, honk_sound, 50, 1)
@@ -40,7 +40,7 @@
return
/obj/item/weapon/bikehorn/airhorn
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
@@ -48,21 +48,21 @@
cooldowntime = 50
origin_tech = "materials=4;engineering=4"
/obj/item/weapon/bikehorn/golden
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, its made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
/obj/item/weapon/bikehorn/golden/attack()
/obj/item/bikehorn/golden/attack()
flip_mobs()
return ..()
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
/obj/item/bikehorn/golden/attack_self(mob/user)
flip_mobs()
..()
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
if(!spam_flag)
var/turf/T = get_turf(src)
for(M in ohearers(7, T))
+20 -20
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/lipstick
/obj/item/lipstick
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi'
@@ -7,40 +7,40 @@
var/colour = "red"
var/open = 0
/obj/item/weapon/lipstick/purple
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/weapon/lipstick/jade
/obj/item/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "lime"
/obj/item/weapon/lipstick/black
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/weapon/lipstick/green
/obj/item/lipstick/green
name = "green lipstick"
colour = "green"
/obj/item/weapon/lipstick/blue
/obj/item/lipstick/blue
name = "blue lipstick"
colour = "blue"
/obj/item/weapon/lipstick/white
/obj/item/lipstick/white
name = "white lipstick"
colour = "white"
/obj/item/weapon/lipstick/random
/obj/item/lipstick/random
name = "lipstick"
/obj/item/weapon/lipstick/random/New()
/obj/item/lipstick/random/New()
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
/obj/item/weapon/lipstick/attack_self(mob/user as mob)
/obj/item/lipstick/attack_self(mob/user as mob)
overlays.Cut()
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
open = !open
@@ -52,7 +52,7 @@
else
icon_state = "lipstick"
/obj/item/weapon/lipstick/attack(mob/M as mob, mob/user as mob)
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
if(!open) return
if(!istype(M, /mob)) return
@@ -63,8 +63,8 @@
to_chat(user, "<span class='notice'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with [src].</span>", \
"<span class='notice'>You take a moment to apply [src]. Perfect!</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
@@ -80,7 +80,7 @@
else
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
/obj/item/weapon/razor
/obj/item/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/items.dmi'
@@ -90,7 +90,7 @@
usesound = 'sound/items/Welder2.ogg'
toolspeed = 1
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
@@ -106,11 +106,11 @@
to_chat(user, "<span class='notice'>Already clean-shaven.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='notice'>[user] starts to shave their facial hair with \the [src].</span>", \
user.visible_message("<span class='notice'>[user] starts to shave [user.p_their()] facial hair with [src].</span>", \
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves \his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] facial hair clean with [src].</span>", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, usesound, 20, 1)
@@ -140,10 +140,10 @@
to_chat(user, "<span class='warning'>Your razor isn't going to cut through tentacles.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='warning'>[user] starts to shave their head with \the [src].</span>", \
user.visible_message("<span class='warning'>[user] starts to shave [user.p_their()] head with [src].</span>", \
"<span class='warning'>You start to shave your head with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves \his head with \the [src].</span>", \
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] head with [src].</span>", \
"<span class='notice'>You finish shaving with \the [src].</span>")
C.h_style = "Skinhead"
H.update_hair()
+6 -6
View File
@@ -2,7 +2,7 @@
// Gavel Hammer
// Gavel Block
/obj/item/weapon/gavelhammer
/obj/item/gavelhammer
name = "gavel hammer"
desc = "Order, order! No bombs in my courthouse."
icon = 'icons/obj/items.dmi'
@@ -13,12 +13,12 @@
attack_verb = list("bashed", "battered", "judged", "whacked")
burn_state = FLAMMABLE
/obj/item/weapon/gavelhammer/suicide_act(mob/user)
user.visible_message("<span class='warning'>[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
/obj/item/gavelhammer/suicide_act(mob/user)
user.visible_message("<span class='warning'>[user] has sentenced [user.p_them()]self to death with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/gavelblock
/obj/item/gavelblock
name = "gavel block"
desc = "Smack it with a gavel hammer when the assistants get rowdy."
icon = 'icons/obj/items.dmi'
@@ -28,8 +28,8 @@
w_class = WEIGHT_CLASS_TINY
burn_state = FLAMMABLE
/obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/gavelhammer))
/obj/item/gavelblock/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/gavelhammer))
playsound(loc, 'sound/items/gavel.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] strikes \the [src] with \the [I].</span>")
else
+62 -58
View File
@@ -1,9 +1,8 @@
//backpack item
/obj/item/weapon/defibrillator
/obj/item/defibrillator
name = "defibrillator"
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibunit"
item_state = "defibunit"
slot_flags = SLOT_BACK
@@ -20,29 +19,29 @@
var/paddles_on_defib = TRUE //if the paddles are on the defib (TRUE)
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/weapon/twohanded/shockpaddles/paddles
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/stock_parts/cell/high/bcell = null
var/combat = 0 //can we revive through space suits?
/obj/item/weapon/defibrillator/New() //starts without a cell for rnd
/obj/item/defibrillator/New() //starts without a cell for rnd
..()
paddles = make_paddles()
update_icon()
return
/obj/item/weapon/defibrillator/loaded/New() //starts with hicap
/obj/item/defibrillator/loaded/New() //starts with hicap
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/update_icon()
/obj/item/defibrillator/update_icon()
update_power()
update_overlays()
update_charge()
/obj/item/weapon/defibrillator/proc/update_power()
/obj/item/defibrillator/proc/update_power()
if(bcell)
if(bcell.charge < paddles.revivecost)
powered = 0
@@ -51,7 +50,7 @@
else
powered = 0
/obj/item/weapon/defibrillator/proc/update_overlays()
/obj/item/defibrillator/proc/update_overlays()
overlays.Cut()
if(paddles_on_defib)
overlays += "[icon_state]-paddles"
@@ -62,28 +61,28 @@
if(!safety)
overlays += "[icon_state]-emagged"
/obj/item/weapon/defibrillator/proc/update_charge()
/obj/item/defibrillator/proc/update_charge()
if(powered) //so it doesn't show charge if it's unpowered
if(bcell)
var/ratio = bcell.charge / bcell.maxcharge
ratio = Ceiling(ratio*4) * 25
overlays += "[icon_state]-charge[ratio]"
/obj/item/weapon/defibrillator/CheckParts(list/parts_list)
/obj/item/defibrillator/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
bcell = locate(/obj/item/stock_parts/cell) in contents
update_icon()
/obj/item/weapon/defibrillator/ui_action_click()
/obj/item/defibrillator/ui_action_click()
toggle_paddles()
/obj/item/weapon/defibrillator/CtrlClick()
/obj/item/defibrillator/CtrlClick()
if(ishuman(usr) && Adjacent(usr))
toggle_paddles()
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
if(bcell)
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else
@@ -95,9 +94,9 @@
bcell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
if(istype(W, /obj/item/weapon/screwdriver))
if(istype(W, /obj/item/screwdriver))
if(bcell)
bcell.updateicon()
bcell.update_icon()
bcell.loc = get_turf(src.loc)
bcell = null
to_chat(user, "<span class='notice'>You remove the cell from the [src].</span>")
@@ -105,7 +104,7 @@
update_icon()
return
/obj/item/weapon/defibrillator/emag_act(user as mob)
/obj/item/defibrillator/emag_act(user as mob)
if(safety)
safety = 0
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the card.")
@@ -113,7 +112,7 @@
safety = 1
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the card.")
/obj/item/weapon/defibrillator/emp_act(severity)
/obj/item/defibrillator/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
if(safety)
@@ -127,7 +126,7 @@
update_icon()
..()
/obj/item/weapon/defibrillator/verb/toggle_paddles()
/obj/item/defibrillator/verb/toggle_paddles()
set name = "Toggle Paddles"
set category = "Object"
@@ -150,20 +149,20 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/defibrillator/proc/make_paddles()
return new /obj/item/weapon/twohanded/shockpaddles(src)
/obj/item/defibrillator/proc/make_paddles()
return new /obj/item/twohanded/shockpaddles(src)
/obj/item/weapon/defibrillator/equipped(mob/user, slot)
/obj/item/defibrillator/equipped(mob/user, slot)
..()
if(slot != slot_back)
remove_paddles(user)
update_icon()
/obj/item/weapon/defibrillator/item_action_slot_check(slot, mob/user)
/obj/item/defibrillator/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
return 1
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) // from your hands
/obj/item/defibrillator/proc/remove_paddles(mob/user) // from your hands
var/mob/living/carbon/human/M = user
if(paddles in get_both_hands(M))
M.unEquip(paddles)
@@ -171,7 +170,7 @@
update_icon()
return
/obj/item/weapon/defibrillator/Destroy()
/obj/item/defibrillator/Destroy()
if(!paddles_on_defib)
var/M = get(paddles, /mob)
remove_paddles(M)
@@ -179,7 +178,7 @@
QDEL_NULL(bcell)
return ..()
/obj/item/weapon/defibrillator/proc/deductcharge(var/chrgdeductamt)
/obj/item/defibrillator/proc/deductcharge(var/chrgdeductamt)
if(bcell)
if(bcell.charge < (paddles.revivecost+chrgdeductamt))
powered = 0
@@ -191,7 +190,7 @@
update_icon()
return 0
/obj/item/weapon/defibrillator/proc/cooldowncheck(var/mob/user)
/obj/item/defibrillator/proc/cooldowncheck(var/mob/user)
spawn(50)
if(bcell)
if(bcell.charge >= paddles.revivecost)
@@ -204,7 +203,7 @@
paddles.update_icon()
update_icon()
/obj/item/weapon/defibrillator/compact
/obj/item/defibrillator/compact
name = "compact defibrillator"
desc = "A belt-equipped defibrillator that can be rapidly deployed."
icon_state = "defibcompact"
@@ -213,31 +212,31 @@
slot_flags = SLOT_BELT
origin_tech = "biotech=5"
/obj/item/weapon/defibrillator/compact/item_action_slot_check(slot, mob/user)
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
if(slot == slot_belt)
return 1
/obj/item/weapon/defibrillator/compact/loaded/New()
/obj/item/defibrillator/compact/loaded/New()
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat
/obj/item/defibrillator/compact/combat
name = "combat defibrillator"
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
combat = 1
safety = 0
/obj/item/weapon/defibrillator/compact/combat/loaded/New()
/obj/item/defibrillator/compact/combat/loaded/New()
..()
paddles = make_paddles()
bcell = new /obj/item/weapon/stock_parts/cell/infinite(src)
bcell = new /obj/item/stock_parts/cell/infinite(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat/attackby(obj/item/weapon/W, mob/user, params)
/obj/item/defibrillator/compact/combat/attackby(obj/item/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
@@ -246,10 +245,9 @@
//paddles
/obj/item/weapon/twohanded/shockpaddles
/obj/item/twohanded/shockpaddles
name = "defibrillator paddles"
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles"
item_state = "defibpaddles"
force = 0
@@ -260,9 +258,9 @@
var/revivecost = 1000
var/cooldown = 0
var/busy = 0
var/obj/item/weapon/defibrillator/defib
var/obj/item/defibrillator/defib
/obj/item/weapon/twohanded/shockpaddles/New(mainunit)
/obj/item/twohanded/shockpaddles/New(mainunit)
..()
if(check_defib_exists(mainunit, src))
defib = mainunit
@@ -271,21 +269,21 @@
update_icon()
return
/obj/item/weapon/twohanded/shockpaddles/update_icon()
/obj/item/twohanded/shockpaddles/update_icon()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</span>")
/obj/item/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.</span>")
defib.deductcharge(revivecost)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob)
/obj/item/twohanded/shockpaddles/dropped(mob/user as mob)
if(user)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
var/obj/item/twohanded/offhand/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
@@ -295,15 +293,15 @@
update_icon()
return unwield(user)
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
if(!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
if(!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
M.unEquip(O)
qdel(O)
return 0
else
return 1
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M, mob/user)
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
var/tobehealed
var/threshold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
@@ -335,7 +333,7 @@
H.emote("gasp")
if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes.
H.set_heartattack(TRUE)
add_logs(user, M, "stunned", object="defibrillator")
add_attack_logs(user, M, "Stunned with [src]")
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
@@ -356,7 +354,7 @@
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
@@ -377,6 +375,13 @@
update_icon()
return
else
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
if(heart.status & ORGAN_DEAD)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart necrosis detected.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
@@ -413,7 +418,7 @@
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
add_attack_logs(user, M, "Revived with [src]")
else
if(tplus > tlimit|| !H.get_int_organ(/obj/item/organ/internal/heart))
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
@@ -437,10 +442,9 @@
busy = 0
update_icon()
/obj/item/weapon/borg_defib
/obj/item/borg_defib
name = "defibrillator paddles"
desc = "A pair of mounted paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
force = 0
@@ -452,7 +456,7 @@
flags = NODROP
toolspeed = 1
/obj/item/weapon/borg_defib/attack(mob/M, mob/user)
/obj/item/borg_defib/attack(mob/M, mob/user)
var/tobehealed
var/threshold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
@@ -476,7 +480,7 @@
H.set_heartattack(TRUE)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
add_attack_logs(user, M, "Stunned with [src]")
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
@@ -501,7 +505,7 @@
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
@@ -532,7 +536,7 @@
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
add_attack_logs(user, M, "Revived with [src]")
else
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
+43 -43
View File
@@ -1,30 +1,30 @@
/obj/item/weapon/storage/pill_bottle/dice
/obj/item/storage/pill_bottle/dice
name = "bag of dice"
desc = "Contains all the luck you'll ever need."
icon = 'icons/obj/dice.dmi'
icon_state = "dicebag"
/obj/item/weapon/storage/pill_bottle/dice/New()
/obj/item/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1")
new /obj/item/weapon/dice/d1(src)
new /obj/item/dice/d1(src)
if(special_die == "2")
new /obj/item/weapon/dice/d2(src)
new /obj/item/weapon/dice/d4(src)
new /obj/item/weapon/dice/d6(src)
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d6(src)
if(special_die == "fudge")
new /obj/item/weapon/dice/fudge(src)
new /obj/item/weapon/dice/d8(src)
new /obj/item/weapon/dice/d10(src)
new /obj/item/dice/fudge(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
if(special_die == "00")
new /obj/item/weapon/dice/d00(src)
new /obj/item/weapon/dice/d12(src)
new /obj/item/weapon/dice/d20(src)
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
if(special_die == "100")
new /obj/item/weapon/dice/d100(src)
new /obj/item/dice/d100(src)
/obj/item/weapon/dice //depreciated d6, use /obj/item/weapon/dice/d6 if you actually want a d6
/obj/item/dice //depreciated d6, use /obj/item/dice/d6 if you actually want a d6
name = "die"
desc = "A die with six sides. Basic and servicable."
icon = 'icons/obj/dice.dmi'
@@ -34,89 +34,89 @@
var/result = null
var/list/special_faces = list() //entries should match up to sides var if used
/obj/item/weapon/dice/New()
/obj/item/dice/New()
result = rand(1, sides)
update_icon()
/obj/item/weapon/dice/d1
/obj/item/dice/d1
name = "d1"
desc = "A die with one side. Deterministic!"
icon_state = "d1"
sides = 1
/obj/item/weapon/dice/d2
/obj/item/dice/d2
name = "d2"
desc = "A die with two sides. Coins are undignified!"
icon_state = "d2"
sides = 2
/obj/item/weapon/dice/d4
/obj/item/dice/d4
name = "d4"
desc = "A die with four sides. The nerd's caltrop."
icon_state = "d4"
sides = 4
/obj/item/weapon/dice/d6
/obj/item/dice/d6
name = "d6"
/obj/item/weapon/dice/fudge
/obj/item/dice/fudge
name = "fudge die"
desc = "A die with six sides but only three results. Is this a plus or a minus? Your mind is drawing a blank..."
sides = 3 //shhh
icon_state = "fudge"
special_faces = list("minus","blank","plus")
/obj/item/weapon/dice/d8
/obj/item/dice/d8
name = "d8"
desc = "A die with eight sides. It feels... lucky."
icon_state = "d8"
sides = 8
/obj/item/weapon/dice/d10
/obj/item/dice/d10
name = "d10"
desc = "A die with ten sides. Useful for percentages."
icon_state = "d10"
sides = 10
/obj/item/weapon/dice/d00
/obj/item/dice/d00
name = "d00"
desc = "A die with ten sides. Works better for d100 rolls than a golfball."
icon_state = "d00"
sides = 10
/obj/item/weapon/dice/d12
/obj/item/dice/d12
name = "d12"
desc = "A die with twelve sides. There's an air of neglect about it."
icon_state = "d12"
sides = 12
/obj/item/weapon/dice/d20
/obj/item/dice/d20
name = "d20"
desc = "A die with twenty sides. The prefered die to throw at the GM."
icon_state = "d20"
sides = 20
/obj/item/weapon/dice/d100
/obj/item/dice/d100
name = "d100"
desc = "A die with one hundred sides! Probably not fairly weighted..."
icon_state = "d100"
sides = 100
/obj/item/weapon/dice/d100/update_icon()
/obj/item/dice/d100/update_icon()
return
/obj/item/weapon/dice/d20/e20
/obj/item/dice/d20/e20
var/triggered = 0
/obj/item/weapon/dice/attack_self(mob/user as mob)
/obj/item/dice/attack_self(mob/user as mob)
diceroll(user)
/obj/item/weapon/dice/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
/obj/item/dice/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
if(!..())
return
diceroll(thrower)
/obj/item/weapon/dice/proc/diceroll(mob/user)
/obj/item/dice/proc/diceroll(mob/user)
result = rand(1, sides)
var/fake_result = rand(1, sides)//Daredevil isn't as good as he used to be
var/comment = ""
@@ -136,7 +136,7 @@
else if(!throwing) //Dice was thrown and is coming to rest
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/weapon/dice/d20/e20/diceroll(mob/user as mob, thrown)
/obj/item/dice/d20/e20/diceroll(mob/user as mob, thrown)
if(triggered)
return
..()
@@ -159,26 +159,26 @@
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
bombers += "E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]"
investigate_log("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]", INVESTIGATE_BOMB)
message_admins("E20 detonated at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> with a roll of [result]. Triggered by: [key_name_admin(user)]")
log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]")
/obj/item/weapon/dice/update_icon()
/obj/item/dice/update_icon()
overlays.Cut()
overlays += "[src.icon_state][src.result]"
/obj/item/weapon/storage/box/dice
/obj/item/storage/box/dice
name = "Box of dice"
desc = "ANOTHER ONE!? FUCK!"
icon_state = "box"
/obj/item/weapon/storage/box/dice/New()
/obj/item/storage/box/dice/New()
..()
new /obj/item/weapon/dice/d2(src)
new /obj/item/weapon/dice/d4(src)
new /obj/item/weapon/dice/d8(src)
new /obj/item/weapon/dice/d10(src)
new /obj/item/weapon/dice/d00(src)
new /obj/item/weapon/dice/d12(src)
new /obj/item/weapon/dice/d20(src)
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
+1 -1
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/disk
/obj/item/disk
icon = 'icons/obj/module.dmi'
w_class = WEIGHT_CLASS_TINY
item_state = "card-id"
+66 -77
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/dnainjector
/obj/item/dnainjector
name = "DNA-Injector"
desc = "This injects the person with DNA."
icon = 'icons/obj/items.dmi'
@@ -18,7 +18,7 @@
var/datatype = 0
var/value = 0
/obj/item/weapon/dnainjector/New()
/obj/item/dnainjector/New()
if(datatype && block)
buf=new
buf.dna=new
@@ -26,45 +26,45 @@
buf.dna.ResetSE()
SetValue(value)
/obj/item/weapon/dnainjector/Destroy()
/obj/item/dnainjector/Destroy()
QDEL_NULL(buf)
return ..()
/obj/item/weapon/dnainjector/proc/GetRealBlock(var/selblock)
/obj/item/dnainjector/proc/GetRealBlock(var/selblock)
if(selblock==0)
return block
else
return selblock
/obj/item/weapon/dnainjector/proc/GetState(var/selblock=0)
/obj/item/dnainjector/proc/GetState(var/selblock=0)
var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.GetSEState(real_block)
else
return buf.dna.GetUIState(real_block)
/obj/item/weapon/dnainjector/proc/SetState(var/on, var/selblock=0)
/obj/item/dnainjector/proc/SetState(var/on, var/selblock=0)
var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.SetSEState(real_block,on)
else
return buf.dna.SetUIState(real_block,on)
/obj/item/weapon/dnainjector/proc/GetValue(var/selblock=0)
/obj/item/dnainjector/proc/GetValue(var/selblock=0)
var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.GetSEValue(real_block)
else
return buf.dna.GetUIValue(real_block)
/obj/item/weapon/dnainjector/proc/SetValue(var/val,var/selblock=0)
/obj/item/dnainjector/proc/SetValue(var/val,var/selblock=0)
var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.SetSEValue(real_block,val)
else
return buf.dna.SetUIValue(real_block,val)
/obj/item/weapon/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob)
/obj/item/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob)
if(used)
return
if(istype(M,/mob/living))
@@ -104,7 +104,7 @@
if(H)
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
/obj/item/dnainjector/attack(mob/M as mob, mob/user as mob)
if(used)
to_chat(user, "<span class='warning'>This injector is used up!</span>")
return
@@ -119,35 +119,19 @@
if(!user.IsAdvancedToolUser())
return 0
M.create_attack_log("<font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.create_attack_log("<font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
var/attack_log = "injected with the Isolated [name]"
if(buf.types & DNA2_BUF_SE)
if(block)
if(GetState() && block == MONKEYBLOCK && ishuman(M))
attack_log = "injected with the Isolated [name] (MONKEY)"
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
else
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
else
if(GetState(MONKEYBLOCK) && ishuman(M))
attack_log = "injected with the Isolated [name] (MONKEY)"
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
else
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
else
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
if(M != user)
M.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [M] with [src]!</span>")
@@ -155,16 +139,21 @@
return
M.visible_message("<span class='danger'>[user] injects [M] with the syringe with [src]!", \
"<span class='userdanger'>[user] injects [M] with the syringe with [src]!")
else
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
add_attack_logs(user, M, attack_log, ATKLOG_ALL)
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
inject(M, user)
used = 1
icon_state = "dnainjector0"
desc += " This one is used up."
/obj/item/weapon/dnainjector/hulkmut
/obj/item/dnainjector/hulkmut
name = "DNA-Injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition."
datatype = DNA2_BUF_SE
@@ -174,7 +163,7 @@
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk
/obj/item/dnainjector/antihulk
name = "DNA-Injector (Anti-Hulk)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
@@ -184,7 +173,7 @@
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/xraymut
/obj/item/dnainjector/xraymut
name = "DNA-Injector (Xray)"
desc = "Finally you can see what the Captain does."
datatype = DNA2_BUF_SE
@@ -194,7 +183,7 @@
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray
/obj/item/dnainjector/antixray
name = "DNA-Injector (Anti-Xray)"
desc = "It will make you see harder."
datatype = DNA2_BUF_SE
@@ -205,7 +194,7 @@
..()
/obj/item/weapon/dnainjector/firemut
/obj/item/dnainjector/firemut
name = "DNA-Injector (Fire)"
desc = "Gives you fire."
datatype = DNA2_BUF_SE
@@ -215,7 +204,7 @@
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire
/obj/item/dnainjector/antifire
name = "DNA-Injector (Anti-Fire)"
desc = "Cures fire."
datatype = DNA2_BUF_SE
@@ -225,7 +214,7 @@
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/telemut
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
desc = "Super brain man!"
datatype = DNA2_BUF_SE
@@ -235,12 +224,12 @@
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/telemut/darkbundle
/obj/item/dnainjector/telemut/darkbundle
name = "DNA injector"
desc = "Good. Let the hate flow through you."
/obj/item/weapon/dnainjector/antitele
/obj/item/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
datatype = DNA2_BUF_SE
@@ -250,7 +239,7 @@
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/nobreath
/obj/item/dnainjector/nobreath
name = "DNA-Injector (Breathless)"
desc = "Hold your breath and count to infinity."
datatype = DNA2_BUF_SE
@@ -260,7 +249,7 @@
block = BREATHLESSBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath
/obj/item/dnainjector/antinobreath
name = "DNA-Injector (Anti-Breathless)"
desc = "Hold your breath and count to 100."
datatype = DNA2_BUF_SE
@@ -270,7 +259,7 @@
block = BREATHLESSBLOCK
..()
/obj/item/weapon/dnainjector/remoteview
/obj/item/dnainjector/remoteview
name = "DNA-Injector (Remote View)"
desc = "Stare into the distance for a reason."
datatype = DNA2_BUF_SE
@@ -280,7 +269,7 @@
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview
/obj/item/dnainjector/antiremoteview
name = "DNA-Injector (Anti-Remote View)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
@@ -290,7 +279,7 @@
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/regenerate
/obj/item/dnainjector/regenerate
name = "DNA-Injector (Regeneration)"
desc = "Healthy but hungry."
datatype = DNA2_BUF_SE
@@ -300,7 +289,7 @@
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate
/obj/item/dnainjector/antiregenerate
name = "DNA-Injector (Anti-Regeneration)"
desc = "Sickly but sated."
datatype = DNA2_BUF_SE
@@ -310,7 +299,7 @@
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/runfast
/obj/item/dnainjector/runfast
name = "DNA-Injector (Increase Run)"
desc = "Running Man."
datatype = DNA2_BUF_SE
@@ -320,7 +309,7 @@
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast
/obj/item/dnainjector/antirunfast
name = "DNA-Injector (Anti-Increase Run)"
desc = "Walking Man."
datatype = DNA2_BUF_SE
@@ -330,7 +319,7 @@
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/morph
/obj/item/dnainjector/morph
name = "DNA-Injector (Morph)"
desc = "A total makeover."
datatype = DNA2_BUF_SE
@@ -340,7 +329,7 @@
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/antimorph
/obj/item/dnainjector/antimorph
name = "DNA-Injector (Anti-Morph)"
desc = "Cures identity crisis."
datatype = DNA2_BUF_SE
@@ -350,7 +339,7 @@
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/noprints
/obj/item/dnainjector/noprints
name = "DNA-Injector (No Prints)"
desc = "Better than a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
@@ -360,7 +349,7 @@
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints
/obj/item/dnainjector/antinoprints
name = "DNA-Injector (Anti-No Prints)"
desc = "Not quite as good as a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
@@ -370,7 +359,7 @@
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/insulation
/obj/item/dnainjector/insulation
name = "DNA-Injector (Shock Immunity)"
desc = "Better than a pair of real insulated gloves."
datatype = DNA2_BUF_SE
@@ -380,7 +369,7 @@
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation
/obj/item/dnainjector/antiinsulation
name = "DNA-Injector (Anti-Shock Immunity)"
desc = "Not quite as good as a pair of real insulated gloves."
datatype = DNA2_BUF_SE
@@ -390,7 +379,7 @@
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/midgit
/obj/item/dnainjector/midgit
name = "DNA-Injector (Small Size)"
desc = "Makes you shrink."
datatype = DNA2_BUF_SE
@@ -400,7 +389,7 @@
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit
/obj/item/dnainjector/antimidgit
name = "DNA-Injector (Anti-Small Size)"
desc = "Makes you grow. But not too much."
datatype = DNA2_BUF_SE
@@ -411,7 +400,7 @@
..()
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
/obj/item/dnainjector/antiglasses
name = "DNA-Injector (Anti-Glasses)"
desc = "Toss away those glasses!"
datatype = DNA2_BUF_SE
@@ -421,7 +410,7 @@
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut
/obj/item/dnainjector/glassesmut
name = "DNA-Injector (Glasses)"
desc = "Will make you need dorkish glasses."
datatype = DNA2_BUF_SE
@@ -431,7 +420,7 @@
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/epimut
/obj/item/dnainjector/epimut
name = "DNA-Injector (Epi.)"
desc = "Shake shake shake the room!"
datatype = DNA2_BUF_SE
@@ -441,7 +430,7 @@
block = EPILEPSYBLOCK
..()
/obj/item/weapon/dnainjector/antiepi
/obj/item/dnainjector/antiepi
name = "DNA-Injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
datatype = DNA2_BUF_SE
@@ -451,7 +440,7 @@
block = EPILEPSYBLOCK
..()
/obj/item/weapon/dnainjector/anticough
/obj/item/dnainjector/anticough
name = "DNA-Injector (Anti-Cough)"
desc = "Will stop that awful noise."
datatype = DNA2_BUF_SE
@@ -461,7 +450,7 @@
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut
/obj/item/dnainjector/coughmut
name = "DNA-Injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
datatype = DNA2_BUF_SE
@@ -471,7 +460,7 @@
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut
/obj/item/dnainjector/clumsymut
name = "DNA-Injector (Clumsy)"
desc = "Makes clumsy minions."
datatype = DNA2_BUF_SE
@@ -481,7 +470,7 @@
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy
/obj/item/dnainjector/anticlumsy
name = "DNA-Injector (Anti-Clumy)"
desc = "Cleans up confusion."
datatype = DNA2_BUF_SE
@@ -491,7 +480,7 @@
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/antitour
/obj/item/dnainjector/antitour
name = "DNA-Injector (Anti-Tour.)"
desc = "Will cure tourrets."
datatype = DNA2_BUF_SE
@@ -501,7 +490,7 @@
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut
/obj/item/dnainjector/tourmut
name = "DNA-Injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
datatype = DNA2_BUF_SE
@@ -511,7 +500,7 @@
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut
/obj/item/dnainjector/stuttmut
name = "DNA-Injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
datatype = DNA2_BUF_SE
@@ -522,7 +511,7 @@
..()
/obj/item/weapon/dnainjector/antistutt
/obj/item/dnainjector/antistutt
name = "DNA-Injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
datatype = DNA2_BUF_SE
@@ -532,7 +521,7 @@
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/blindmut
/obj/item/dnainjector/blindmut
name = "DNA-Injector (Blind)"
desc = "Makes you not see anything."
datatype = DNA2_BUF_SE
@@ -542,7 +531,7 @@
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind
/obj/item/dnainjector/antiblind
name = "DNA-Injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
datatype = DNA2_BUF_SE
@@ -552,7 +541,7 @@
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/telemut
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
desc = "Super brain man!"
datatype = DNA2_BUF_SE
@@ -562,7 +551,7 @@
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele
/obj/item/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
datatype = DNA2_BUF_SE
@@ -572,7 +561,7 @@
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/deafmut
/obj/item/dnainjector/deafmut
name = "DNA-Injector (Deaf)"
desc = "Sorry, what did you say?"
datatype = DNA2_BUF_SE
@@ -582,7 +571,7 @@
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf
/obj/item/dnainjector/antideaf
name = "DNA-Injector (Anti-Deaf)"
desc = "Will make you hear once more."
datatype = DNA2_BUF_SE
@@ -592,7 +581,7 @@
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/hallucination
/obj/item/dnainjector/hallucination
name = "DNA-Injector (Halluctination)"
desc = "What you see isn't always what you get."
datatype = DNA2_BUF_SE
@@ -602,7 +591,7 @@
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination
/obj/item/dnainjector/antihallucination
name = "DNA-Injector (Anti-Hallucination)"
desc = "What you see is what you get."
datatype = DNA2_BUF_SE
@@ -612,7 +601,7 @@
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/h2m
/obj/item/dnainjector/h2m
name = "DNA-Injector (Human > Monkey)"
desc = "Will make you a flea bag."
datatype = DNA2_BUF_SE
@@ -622,7 +611,7 @@
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h
/obj/item/dnainjector/m2h
name = "DNA-Injector (Monkey > Human)"
desc = "Will make you...less hairy."
datatype = DNA2_BUF_SE
@@ -1,4 +1,4 @@
/obj/item/weapon/dnascrambler
/obj/item/dnascrambler
name = "dna scrambler"
desc = "An illegal genetic serum designed to randomize the user's identity."
icon = 'icons/obj/hypo.dmi'
@@ -25,11 +25,11 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(NO_DNA in H.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as they have no DNA to scramble, nor flesh to inject.</span>")
to_chat(user, "<span class='warning'>You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user] injects \himself with [src]!</span>")
user.visible_message("<span class='danger'>[user] injects [user.p_them()]self with [src]!</span>")
injected(user, user)
else
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
@@ -51,9 +51,7 @@
H.dna.ResetUIFrom(H)
target.update_icons()
log_attack("[key_name(user)] injected [key_name(target)] with the [name]")
log_game("[key_name_admin(user)] injected [key_name_admin(target)] with the [name]")
add_attack_logs(user, target, "injected with [src]")
used = 1
update_icon()
name = "used " + name
+29 -29
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/plastic
/obj/item/grenade/plastic
name = "plastic explosive"
desc = "Used to put holes in specific areas without too much extra hole."
icon_state = "plastic-explosive0"
@@ -10,21 +10,21 @@
toolspeed = 1
var/atom/target = null
var/image_overlay = null
var/obj/item/device/assembly_holder/nadeassembly = null
var/obj/item/assembly_holder/nadeassembly = null
var/assemblyattacher
/obj/item/weapon/grenade/plastic/New()
/obj/item/grenade/plastic/New()
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
..()
/obj/item/weapon/grenade/plastic/Destroy()
/obj/item/grenade/plastic/Destroy()
QDEL_NULL(nadeassembly)
target = null
return ..()
/obj/item/weapon/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/A = I
/obj/item/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/assembly_holder))
var/obj/item/assembly_holder/A = I
if(!user.unEquip(I))
return ..()
nadeassembly = A
@@ -35,7 +35,7 @@
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
update_icon()
return
if(nadeassembly && istype(I, /obj/item/weapon/wirecutters))
if(nadeassembly && istype(I, /obj/item/wirecutters))
playsound(src, I.usesound, 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
@@ -45,18 +45,18 @@
..()
//assembly stuff
/obj/item/weapon/grenade/plastic/receive_signal()
/obj/item/grenade/plastic/receive_signal()
prime()
/obj/item/weapon/grenade/plastic/Crossed(atom/movable/AM)
/obj/item/grenade/plastic/Crossed(atom/movable/AM)
if(nadeassembly)
nadeassembly.Crossed(AM)
/obj/item/weapon/grenade/plastic/on_found(mob/finder)
/obj/item/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/weapon/grenade/plastic/attack_self(mob/user)
/obj/item/grenade/plastic/attack_self(mob/user)
if(nadeassembly)
nadeassembly.attack_self(user)
return
@@ -66,7 +66,7 @@
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
/obj/item/weapon/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (istype(AM, /mob/living/carbon))
@@ -85,12 +85,12 @@
target.overlays += image_overlay
if(!nadeassembly)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(src, "prime", det_time*10)
addtimer(CALLBACK(src, .proc/prime), det_time*10)
/obj/item/weapon/grenade/plastic/suicide_act(mob/user)
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
message_admins("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
user.visible_message("<span class='suicide'>[user] activates the [name] and holds it above \his head! It looks like \he's going out with a bang!</span>")
log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
user.visible_message("<span class='suicide'>[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
@@ -115,7 +115,7 @@
prime()
user.gib()
/obj/item/weapon/grenade/plastic/update_icon()
/obj/item/grenade/plastic/update_icon()
if(nadeassembly)
icon_state = "[item_state]1"
else
@@ -125,11 +125,11 @@
///// The Explosives /////
//////////////////////////
/obj/item/weapon/grenade/plastic/c4
/obj/item/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
/obj/item/weapon/grenade/plastic/c4/prime()
/obj/item/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
@@ -149,14 +149,14 @@
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
/obj/item/weapon/grenade/plastic/x4
/obj/item/grenade/plastic/x4
name = "X4"
desc = "A specialized shaped high explosive breaching charge. Designed to be safer for the user, and less so, for the wall."
var/aim_dir = NORTH
icon_state = "plasticx40"
item_state = "plasticx4"
/obj/item/weapon/grenade/plastic/x4/prime()
/obj/item/grenade/plastic/x4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
@@ -178,19 +178,19 @@
M.gib()
qdel(src)
/obj/item/weapon/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
/obj/item/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
// Shaped charge
// Same blasting power as C4, but with the same idea as the X4 -- Everyone on one side of the wall is safe.
/obj/item/weapon/grenade/plastic/c4_shaped
/obj/item/grenade/plastic/c4_shaped
name = "C4 (shaped)"
desc = "A brick of C4 shaped to allow more precise breaching."
var/aim_dir = NORTH
/obj/item/weapon/grenade/plastic/c4_shaped/prime()
/obj/item/grenade/plastic/c4_shaped/prime()
var/turf/location
if(target)
if(!QDELETED(target))
@@ -211,15 +211,15 @@
M.gib()
qdel(src)
/obj/item/weapon/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
/obj/item/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
/obj/item/weapon/grenade/plastic/c4_shaped/flash
/obj/item/grenade/plastic/c4_shaped/flash
name = "C4 (flash)"
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
/obj/item/weapon/grenade/plastic/c4_shaped/flash/prime()
/obj/item/grenade/plastic/c4_shaped/flash/prime()
if(target && target.density)
T = get_step(get_turf(target), aim_dir)
else if(target)
@@ -227,7 +227,7 @@
else
T = get_turf(src)
var/obj/item/weapon/grenade/flashbang/CB = new/obj/item/weapon/grenade/flashbang(T)
var/obj/item/grenade/flashbang/CB = new/obj/item/grenade/flashbang(T)
CB.prime()
..()
@@ -1,4 +1,4 @@
/obj/item/weapon/extinguisher
/obj/item/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
icon = 'icons/obj/items.dmi'
@@ -21,7 +21,7 @@
var/precision = 0 //By default, turfs picked from a spray are random, set to 1 to make it always have at least one water effect per row
var/cooling_power = 2 //Sets the cooling_temperature of the water reagent datum inside of the extinguisher when it is refilled
/obj/item/weapon/extinguisher/mini
/obj/item/extinguisher/mini
name = "pocket fire extinguisher"
desc = "A light and compact fibreglass-framed model fire extinguisher."
icon_state = "miniFE0"
@@ -35,7 +35,7 @@
max_water = 30
sprite_name = "miniFE"
/obj/item/weapon/extinguisher/examine(mob/user)
/obj/item/extinguisher/examine(mob/user)
if(..(user, 0))
to_chat(usr, "[bicon(src)] [src.name] contains:")
if(reagents && reagents.reagent_list.len)
@@ -43,18 +43,18 @@
to_chat(user, "<span class='notice'>[R.volume] units of [R.name]</span>")
/obj/item/weapon/extinguisher/New()
/obj/item/extinguisher/New()
create_reagents(max_water)
reagents.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
/obj/item/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
to_chat(user, "The safety is [safety ? "on" : "off"].")
return
/obj/item/weapon/extinguisher/proc/AttemptRefill(atom/target, mob/user)
/obj/item/extinguisher/proc/AttemptRefill(atom/target, mob/user)
if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user))
var/safety_save = safety
safety = 1
@@ -76,7 +76,7 @@
else
return 0
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
//TODO; Add support for reagents in water.
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
return
+24 -24
View File
@@ -1,13 +1,13 @@
obj/item/weapon/firework
obj/item/firework
name = "fireworks"
icon = 'icons/obj/fireworks.dmi'
icon_state = "rocket_0"
var/litzor = 0
var/datum/effect_system/sparkle_spread/S
obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params)
obj/item/firework/attackby(obj/item/W,mob/user, params)
if(litzor)
return
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -20,16 +20,16 @@ obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params)
S.start()
qdel(src)
obj/item/weapon/sparkler
obj/item/sparkler
name = "sparkler"
icon = 'icons/obj/fireworks.dmi'
icon_state = "sparkler_0"
var/litzor = 0
var/datum/effect_system/spark_spread/S
obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params)
obj/item/sparkler/attackby(obj/item/W,mob/user, params)
if(litzor)
return
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -46,21 +46,21 @@ obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params)
/obj/crate/fireworks
name = "Fireworks!"
/obj/crate/fireworks/New()
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/sparkler(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/weapon/firework(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/sparkler(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
+26 -26
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/flamethrower
/obj/item/flamethrower
name = "flamethrower"
desc = "You are a firestarter!"
icon = 'icons/obj/flamethrower.dmi'
@@ -18,12 +18,12 @@
var/lit = 0 //on or off
var/operating = 0//cooldown
var/turf/previousturf = null
var/obj/item/weapon/weldingtool/weldtool = null
var/obj/item/device/assembly/igniter/igniter = null
var/obj/item/weapon/tank/plasma/ptank = null
var/obj/item/weldingtool/weldtool = null
var/obj/item/assembly/igniter/igniter = null
var/obj/item/tank/plasma/ptank = null
/obj/item/weapon/flamethrower/Destroy()
/obj/item/flamethrower/Destroy()
QDEL_NULL(weldtool)
QDEL_NULL(igniter)
QDEL_NULL(ptank)
@@ -31,7 +31,7 @@
return ..()
/obj/item/weapon/flamethrower/process()
/obj/item/flamethrower/process()
if(!lit)
processing_objects.Remove(src)
return null
@@ -45,7 +45,7 @@
return
/obj/item/weapon/flamethrower/update_icon()
/obj/item/flamethrower/update_icon()
overlays.Cut()
if(igniter)
overlays += "+igniter[status]"
@@ -58,17 +58,17 @@
item_state = "flamethrower_0"
return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
/obj/item/flamethrower/afterattack(atom/target, mob/user, flag)
if(flag) return // too close
// Make sure our user is still holding us
if(user && user.is_in_active_hand(src))
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
add_logs(user, target, "flamethrowered", addition="at [target.x],[target.y],[target.z]")
add_attack_logs(user, target, "Flamethrowered at [target.x],[target.y],[target.z]")
flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params)
/obj/item/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params)
if(user.stat || user.restrained() || user.lying) return
if(iswrench(W) && !status)//Taking this apart
var/turf/T = get_turf(src)
@@ -92,7 +92,7 @@
return
if(isigniter(W))
var/obj/item/device/assembly/igniter/I = W
var/obj/item/assembly/igniter/I = W
if(I.secured) return
if(igniter) return
user.drop_item()
@@ -101,7 +101,7 @@
update_icon()
return
if(istype(W,/obj/item/weapon/tank/plasma))
if(istype(W,/obj/item/tank/plasma))
if(ptank)
to_chat(user, "<span class='notice'>There appears to already be a plasma tank loaded in [src]!</span>")
return
@@ -111,13 +111,13 @@
update_icon()
return
if(istype(W, /obj/item/device/analyzer) && ptank)
if(istype(W, /obj/item/analyzer) && ptank)
atmosanalyzer_scan(ptank.air_contents, user)
..()
return
/obj/item/weapon/flamethrower/attack_self(mob/user as mob)
/obj/item/flamethrower/attack_self(mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
user.set_machine(src)
if(!ptank)
@@ -129,7 +129,7 @@
return
/obj/item/weapon/flamethrower/Topic(href,href_list[])
/obj/item/flamethrower/Topic(href,href_list[])
if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=flamethrower")
@@ -155,17 +155,17 @@
update_icon()
return
/obj/item/weapon/flamethrower/CheckParts(list/parts_list)
/obj/item/flamethrower/CheckParts(list/parts_list)
..()
weldtool = locate(/obj/item/weapon/weldingtool) in contents
igniter = locate(/obj/item/device/assembly/igniter) in contents
weldtool = locate(/obj/item/weldingtool) in contents
igniter = locate(/obj/item/assembly/igniter) in contents
weldtool.status = 0
igniter.secured = 0
status = 1
update_icon()
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
/obj/item/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
var/turf/previousturf = get_turf(src)
@@ -186,7 +186,7 @@
return
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
/obj/item/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
air_transfer.toxins = air_transfer.toxins // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
target.assume_air(air_transfer)
@@ -197,23 +197,23 @@
return
/obj/item/weapon/flamethrower/full/New(var/loc)
/obj/item/flamethrower/full/New(var/loc)
..()
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool = new /obj/item/weldingtool(src)
weldtool.status = 0
if(!igniter)
igniter = new /obj/item/device/assembly/igniter(src)
igniter = new /obj/item/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
/obj/item/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/plasma/full(src)
ptank = new /obj/item/tank/plasma/full(src)
update_icon()
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/target_turf = get_turf(owner)
+17 -17
View File
@@ -4,7 +4,7 @@
* Improvised garrotes
*/
/obj/item/weapon/twohanded/garrote // 12TC traitor item
/obj/item/twohanded/garrote // 12TC traitor item
name = "fiber wire"
desc = "A length of razor-thin wire with an elegant wooden handle on either end.<br>You suspect you'd have to be behind the target to use this weapon effectively."
icon_state = "garrot_wrap"
@@ -13,31 +13,31 @@
var/improvised = 0
var/garrote_time
/obj/item/weapon/twohanded/garrote/Destroy()
/obj/item/twohanded/garrote/Destroy()
strangling = null
return ..()
/obj/item/weapon/twohanded/garrote/update_icon()
/obj/item/twohanded/garrote/update_icon()
if(strangling) // If we're strangling someone we want our icon to stay wielded
icon_state = "garrot_unwrap"
return
icon_state = "garrot_[wielded ? "un" : ""]wrap"
/obj/item/weapon/twohanded/garrote/improvised // Made via tablecrafting
/obj/item/twohanded/garrote/improvised // Made via tablecrafting
name = "garrote"
desc = "A length of cable with a shoddily-carved wooden handle tied to either end.<br>You suspect you'd have to be behind the target to use this weapon effectively."
icon_state = "garrot_I_wrap"
improvised = 1
/obj/item/weapon/twohanded/garrote/improvised/update_icon()
/obj/item/twohanded/garrote/improvised/update_icon()
if(strangling)
icon_state = "garrot_I_unwrap"
return
icon_state = "garrot_I_[wielded ? "un" : ""]wrap"
/obj/item/weapon/twohanded/garrote/wield(mob/living/carbon/user)
/obj/item/twohanded/garrote/wield(mob/living/carbon/user)
if(strangling)
user.visible_message("<span class='info'>[user] removes the [src] from [strangling]'s neck.</span>", \
"<span class='warning'>You remove the [src] from [strangling]'s neck.</span>")
@@ -49,7 +49,7 @@
else
..()
/obj/item/weapon/twohanded/garrote/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/twohanded/garrote/attack(mob/living/carbon/M as mob, mob/user as mob)
if(garrote_time > world.time) // Cooldown
return
@@ -75,7 +75,7 @@
return
if(improvised && ((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH)))) // Improvised garrotes are blocked by mouth-covering items.
to_chat(user, "<span class = 'warning'>[M]'s neck is blocked by something they're wearing!</span>")
to_chat(user, "<span class = 'warning'>[M]'s neck is blocked by something [M.p_theyre()] wearing!</span>")
if(strangling)
to_chat(user, "<span class = 'warning'>You cannot use [src] on two people at once!</span>")
@@ -85,7 +85,7 @@
U.swap_hand() // For whatever reason the grab will not properly work if we don't have the free hand active.
M.grabbedby(U, 1)
var/obj/item/weapon/grab/G = U.get_active_hand()
var/obj/item/grab/G = U.get_active_hand()
U.swap_hand()
if(G && istype(G))
@@ -110,7 +110,7 @@
return
/obj/item/weapon/twohanded/garrote/process()
/obj/item/twohanded/garrote/process()
if(!strangling)
// Our mark got gibbed or similar
update_icon()
@@ -125,16 +125,16 @@
return
var/mob/living/carbon/human/user = loc
var/obj/item/weapon/grab/G
var/obj/item/grab/G
if(src == user.r_hand && istype(user.l_hand, /obj/item/weapon/grab))
if(src == user.r_hand && istype(user.l_hand, /obj/item/grab))
G = user.l_hand
else if(src == user.l_hand && istype(user.r_hand, /obj/item/weapon/grab))
else if(src == user.l_hand && istype(user.r_hand, /obj/item/grab))
G = user.r_hand
else
user.visible_message("<span class='warning'>[user] loses \his grip on [strangling]'s neck.</span>", \
user.visible_message("<span class='warning'>[user] loses [user.p_their()] grip on [strangling]'s neck.</span>", \
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
strangling = null
@@ -144,7 +144,7 @@
return
if(!G.affecting)
user.visible_message("<span class='warning'>[user] loses \his grip on [strangling]'s neck.</span>", \
user.visible_message("<span class='warning'>[user] loses [user.p_their()] grip on [strangling]'s neck.</span>", \
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
strangling = null
@@ -166,7 +166,7 @@
strangling.apply_damage(4, OXY, "head")
/obj/item/weapon/twohanded/garrote/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping the [src] around \his neck and pulling the handles! It looks like \he's trying to commit suicide.</span>")
/obj/item/twohanded/garrote/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping the [src] around [user.p_their()] neck and pulling the handles! It looks like [user.p_theyre()] trying to commit suicide.</span>")
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
return (OXYLOSS)
@@ -7,7 +7,7 @@
/*
* Gifts
*/
/obj/item/weapon/a_gift
/obj/item/a_gift
name = "gift"
desc = "PRESENTS!!!! eek!"
icon = 'icons/obj/items.dmi'
@@ -15,7 +15,7 @@
item_state = "gift1"
burn_state = FLAMMABLE
/obj/item/weapon/a_gift/New()
/obj/item/a_gift/New()
..()
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
@@ -25,7 +25,7 @@
icon_state = "gift[pick(1, 2, 3)]"
return
/obj/item/weapon/gift/attack_self(mob/user as mob)
/obj/item/gift/attack_self(mob/user as mob)
user.drop_item()
if(src.gift)
user.put_in_active_hand(gift)
@@ -35,7 +35,7 @@
qdel(src)
return
/obj/item/weapon/a_gift/ex_act()
/obj/item/a_gift/ex_act()
qdel(src)
return
@@ -44,10 +44,10 @@
return
to_chat(user, "<span class='notice'>You cant move.</span>")
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/effect/spresent/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(!istype(W, /obj/item/weapon/wirecutters))
if(!istype(W, /obj/item/wirecutters))
to_chat(user, "<span class='notice'>I need wirecutters for that.</span>")
return
@@ -59,38 +59,38 @@
qdel(src)
/obj/item/weapon/a_gift/attack_self(mob/M as mob)
var/gift_type = pick(/obj/item/weapon/sord,
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/photo_album,
/obj/item/weapon/storage/box/snappops,
/obj/item/weapon/storage/fancy/crayons,
/obj/item/weapon/storage/belt/champion,
/obj/item/weapon/soap/deluxe,
/obj/item/weapon/pickaxe/silver,
/obj/item/weapon/pen/invisible,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grown/corncob,
/obj/item/weapon/poster/random_contraband,
/obj/item/weapon/bikehorn,
/obj/item/weapon/beach_ball,
/obj/item/weapon/beach_ball/holoball,
/obj/item/weapon/banhammer,
/obj/item/a_gift/attack_self(mob/M as mob)
var/gift_type = pick(/obj/item/sord,
/obj/item/storage/wallet,
/obj/item/storage/photo_album,
/obj/item/storage/box/snappops,
/obj/item/storage/fancy/crayons,
/obj/item/storage/belt/champion,
/obj/item/soap/deluxe,
/obj/item/pickaxe/silver,
/obj/item/pen/invisible,
/obj/item/lipstick/random,
/obj/item/grenade/smokebomb,
/obj/item/grown/corncob,
/obj/item/poster/random_contraband,
/obj/item/bikehorn,
/obj/item/beach_ball,
/obj/item/beach_ball/holoball,
/obj/item/banhammer,
/obj/item/toy/balloon,
/obj/item/toy/blink,
/obj/item/weapon/gun/projectile/shotgun/toy/crossbow,
/obj/item/weapon/gun/projectile/revolver/capgun,
/obj/item/gun/projectile/shotgun/toy/crossbow,
/obj/item/gun/projectile/revolver/capgun,
/obj/item/toy/katana,
/obj/random/mech,
/obj/item/toy/spinningtoy,
/obj/item/toy/sword,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/device/paicard,
/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/paicard,
/obj/item/instrument/violin,
/obj/item/instrument/guitar,
/obj/item/storage/belt/utility/full,
/obj/item/clothing/accessory/horrible,
/obj/random/carp_plushie,
/obj/random/plushie,
@@ -100,12 +100,12 @@
/obj/item/toy/owl,
/obj/item/toy/griffin,
/obj/item/clothing/head/blob,
/obj/item/weapon/id_decal/gold,
/obj/item/weapon/id_decal/silver,
/obj/item/weapon/id_decal/prisoner,
/obj/item/weapon/id_decal/centcom,
/obj/item/weapon/id_decal/emag,
/obj/item/weapon/spellbook/oneuse/fake_gib,
/obj/item/id_decal/gold,
/obj/item/id_decal/silver,
/obj/item/id_decal/prisoner,
/obj/item/id_decal/centcom,
/obj/item/id_decal/emag,
/obj/item/spellbook/oneuse/fake_gib,
/obj/item/toy/foamblade,
/obj/item/toy/flash,
/obj/item/toy/minigibber,
@@ -113,8 +113,8 @@
/obj/item/toy/cards/deck,
/obj/item/toy/AI,
/obj/item/clothing/under/syndicate/tacticool,
/obj/item/weapon/storage/box/fakesyndiesuit,
/obj/item/weapon/gun/projectile/shotgun/toy/tommygun,
/obj/item/storage/box/fakesyndiesuit,
/obj/item/gun/projectile/shotgun/toy/tommygun,
/obj/item/stack/tile/fakespace/loaded,
)
@@ -1,7 +1,7 @@
/obj/item/weapon/grenade/gas
/obj/item/grenade/gas
name = "Plasma Fire Grenade"
desc = "A compressed plasma grenade, used to start horrific plasma fires."
origin_tech = "materials=3;magnets=4;syndicate=3"
@@ -11,14 +11,14 @@
var/spawn_contents = SPAWN_HEAT | SPAWN_TOXINS
var/spawn_amount = 100
/obj/item/weapon/grenade/gas/prime()
/obj/item/grenade/gas/prime()
var/turf/simulated/target_turf = get_turf(src)
if(istype(target_turf))
target_turf.atmos_spawn_air(spawn_contents, spawn_amount)
target_turf.air_update_turf()
qdel(src)
/obj/item/weapon/grenade/gas/knockout
/obj/item/grenade/gas/knockout
name = "Knockout Grenade"
desc = "A grenade that completely removes all air and heat from its detonation area."
spawn_contents = SPAWN_20C | SPAWN_N2O
@@ -1,7 +1,7 @@
var/turf/T
/obj/item/weapon/grenade/bananade
/obj/item/grenade/bananade
name = "bananade"
desc = "A yellow grenade."
w_class = WEIGHT_CLASS_SMALL
@@ -9,9 +9,9 @@ var/turf/T
icon_state = "banana"
item_state = "flashbang"
var/deliveryamt = 8
var/spawner_type = /obj/item/weapon/grown/bananapeel
var/spawner_type = /obj/item/grown/bananapeel
/obj/item/weapon/grenade/bananade/prime()
/obj/item/grenade/bananade/prime()
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
@@ -30,24 +30,24 @@ var/turf/T
qdel(src)
return
/obj/item/weapon/grenade/bananade/casing
/obj/item/grenade/bananade/casing
name = "bananium casing"
desc = "A grenade casing made of bananium."
icon_state = "banana_casing"
var/fillamt = 0
/obj/item/weapon/grenade/bananade/casing/attackby(var/obj/item/I, mob/user as mob, params)
if(istype(I, /obj/item/weapon/grown/bananapeel))
/obj/item/grenade/bananade/casing/attackby(var/obj/item/I, mob/user as mob, params)
if(istype(I, /obj/item/grown/bananapeel))
if(fillamt < 9)
to_chat(usr, "<span class='notice'>You add another banana peel to the assembly.</span>")
fillamt += 1
qdel(I)
else
to_chat(usr, "<span class='notice'>The bananade is full, screwdriver it shut to lock it down.</span>")
if(istype(I, /obj/item/weapon/screwdriver))
if(istype(I, /obj/item/screwdriver))
if(fillamt)
var/obj/item/weapon/grenade/bananade/G = new /obj/item/weapon/grenade/bananade
var/obj/item/grenade/bananade/G = new /obj/item/grenade/bananade
user.unEquip(src)
user.put_in_hands(G)
G.deliveryamt = src.fillamt
@@ -2,7 +2,7 @@
#define WIRED 1
#define READY 2
/obj/item/weapon/grenade/chem_grenade
/obj/item/grenade/chem_grenade
name = "grenade casing"
desc = "A do it yourself grenade casing!"
icon_state = "chemg"
@@ -14,9 +14,9 @@
var/prime_sound = 'sound/items/Screwdriver2.ogg'
var/stage = EMPTY
var/list/beakers = list()
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/list/allowed_containers = list(/obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)
var/affected_area = 3
var/obj/item/device/assembly_holder/nadeassembly = null
var/obj/item/assembly_holder/nadeassembly = null
var/label = null
var/assemblyattacher
var/ignition_temp = 10 // The amount of heat added to the reagents when this grenade goes off.
@@ -25,32 +25,32 @@
var/contained = "" // For logging
var/cores = "" // Also for logging
/obj/item/weapon/grenade/chem_grenade/New()
/obj/item/grenade/chem_grenade/New()
create_reagents(1000)
if(payload_name)
payload_name += " " // formatting, ignore me
update_icon()
/obj/item/weapon/grenade/chem_grenade/Destroy()
/obj/item/grenade/chem_grenade/Destroy()
QDEL_NULL(nadeassembly)
QDEL_LIST(beakers)
return ..()
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
/obj/item/grenade/chem_grenade/examine(mob/user)
..(user)
display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state
/obj/item/weapon/grenade/chem_grenade/proc/get_trigger()
/obj/item/grenade/chem_grenade/proc/get_trigger()
if(!nadeassembly) return null
for(var/obj/O in list(nadeassembly.a_left, nadeassembly.a_right))
if(!O || istype(O,/obj/item/device/assembly/igniter)) continue
if(!O || istype(O,/obj/item/assembly/igniter)) continue
return O
return null
/obj/item/weapon/grenade/chem_grenade/proc/update_overlays()
/obj/item/grenade/chem_grenade/proc/update_overlays()
underlays = list()
if(nadeassembly)
underlays += "[nadeassembly.a_left.icon_state]_left"
@@ -60,12 +60,12 @@
for(var/O in nadeassembly.a_right.attached_overlays)
underlays += "[O]_r"
/obj/item/weapon/grenade/chem_grenade/update_icon()
/obj/item/grenade/chem_grenade/update_icon()
if(nadeassembly)
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = bomb_state
update_overlays()
var/obj/item/device/assembly/A = get_trigger()
var/obj/item/assembly/A = get_trigger()
if(stage != READY)
name = "bomb casing[label]"
else
@@ -91,7 +91,7 @@
name = payload_name + "grenade" + label
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user)
/obj/item/grenade/chem_grenade/attack_self(mob/user)
if(stage == READY && !active)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
@@ -102,7 +102,7 @@
// This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it.
message_admins("[key_name_admin(usr)] has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> [contained].")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].")
bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained]."
investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained].", INVESTIGATE_BOMB)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>")
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = 1
@@ -113,15 +113,15 @@
spawn(det_time)
prime()
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
prime()
return 1 //It hit the grenade, not them
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I,/obj/item/weapon/hand_labeler))
var/obj/item/weapon/hand_labeler/HL = I
/obj/item/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I,/obj/item/hand_labeler))
var/obj/item/hand_labeler/HL = I
if(length(HL.label))
label = " ([HL.label])"
return 0
@@ -131,7 +131,7 @@
update_icon()
to_chat(user, "You remove the label from [src].")
return 1
if(istype(I, /obj/item/weapon/screwdriver))
if(istype(I, /obj/item/screwdriver))
if(stage == WIRED)
if(beakers.len)
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
@@ -176,8 +176,8 @@
else
to_chat(user, "<span class='notice'>[I] is empty.</span>")
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/A = I
else if(stage == EMPTY && istype(I, /obj/item/assembly_holder))
var/obj/item/assembly_holder/A = I
if(!A.secured)
return
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
@@ -200,12 +200,12 @@
to_chat(user, "<span class='notice'>You rig [src].</span>")
update_icon()
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
else if(stage == READY && istype(I, /obj/item/wirecutters))
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
stage = WIRED
update_icon()
else if(stage == WIRED && istype(I, /obj/item/weapon/wrench))
else if(stage == WIRED && istype(I, /obj/item/wrench))
to_chat(user, "<span class='notice'>You open the grenade and remove the contents.</span>")
stage = EMPTY
payload_name = null
@@ -222,56 +222,56 @@
//assembly stuff
/obj/item/weapon/grenade/chem_grenade/receive_signal()
/obj/item/grenade/chem_grenade/receive_signal()
prime()
/obj/item/weapon/grenade/chem_grenade/HasProximity(atom/movable/AM)
/obj/item/grenade/chem_grenade/HasProximity(atom/movable/AM)
if(nadeassembly)
nadeassembly.HasProximity(AM)
/obj/item/weapon/grenade/chem_grenade/Move() // prox sensors and infrared care about this
/obj/item/grenade/chem_grenade/Move() // prox sensors and infrared care about this
..()
if(nadeassembly)
nadeassembly.process_movement()
/obj/item/weapon/grenade/chem_grenade/pickup()
/obj/item/grenade/chem_grenade/pickup()
..()
if(nadeassembly)
nadeassembly.process_movement()
/obj/item/weapon/grenade/chem_grenade/Crossed(atom/movable/AM)
/obj/item/grenade/chem_grenade/Crossed(atom/movable/AM)
if(nadeassembly)
nadeassembly.Crossed(AM)
/obj/item/weapon/grenade/chem_grenade/on_found(mob/finder)
/obj/item/grenade/chem_grenade/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/weapon/grenade/chem_grenade/hear_talk(mob/living/M, msg)
/obj/item/grenade/chem_grenade/hear_talk(mob/living/M, msg)
if(nadeassembly)
nadeassembly.hear_talk(M, msg)
/obj/item/weapon/grenade/chem_grenade/hear_message(mob/living/M, msg)
/obj/item/grenade/chem_grenade/hear_message(mob/living/M, msg)
if(nadeassembly)
nadeassembly.hear_message(M, msg)
/obj/item/weapon/grenade/chem_grenade/Bump()
/obj/item/grenade/chem_grenade/Bump()
..()
if(nadeassembly)
nadeassembly.process_movement()
/obj/item/weapon/grenade/chem_grenade/throw_impact() // called when a throw stops
/obj/item/grenade/chem_grenade/throw_impact() // called when a throw stops
..()
if(nadeassembly)
nadeassembly.process_movement()
/obj/item/weapon/grenade/chem_grenade/prime()
/obj/item/grenade/chem_grenade/prime()
if(stage != READY)
return
var/list/datum/reagents/reactants = list()
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
for(var/obj/item/reagent_containers/glass/G in beakers)
reactants += G.reagents
if(!chem_splash(get_turf(src), affected_area, reactants, ignition_temp, threatscale) && !no_splash)
@@ -296,10 +296,10 @@
qdel(src)
/obj/item/weapon/grenade/chem_grenade/proc/CreateDefaultTrigger(var/typekey)
if(ispath(typekey,/obj/item/device/assembly))
/obj/item/grenade/chem_grenade/proc/CreateDefaultTrigger(var/typekey)
if(ispath(typekey,/obj/item/assembly))
nadeassembly = new(src)
nadeassembly.a_left = new /obj/item/device/assembly/igniter(nadeassembly)
nadeassembly.a_left = new /obj/item/assembly/igniter(nadeassembly)
nadeassembly.a_left.holder = nadeassembly
nadeassembly.a_left.secured = 1
nadeassembly.a_right = new typekey(nadeassembly)
@@ -314,25 +314,25 @@
//Large chem grenades accept slime cores and use the appropriately.
/obj/item/weapon/grenade/chem_grenade/large
/obj/item/grenade/chem_grenade/large
name = "large grenade casing"
desc = "A custom made large grenade. It affects a larger area."
icon_state = "large_grenade"
bomb_state = "largebomb"
allowed_containers = list(/obj/item/weapon/reagent_containers/glass,/obj/item/weapon/reagent_containers/food/condiment,
/obj/item/weapon/reagent_containers/food/drinks)
allowed_containers = list(/obj/item/reagent_containers/glass,/obj/item/reagent_containers/food/condiment,
/obj/item/reagent_containers/food/drinks)
origin_tech = "combat=3;engineering=3"
affected_area = 5
ignition_temp = 25 // Large grenades are slightly more effective at setting off heat-sensitive mixtures than smaller grenades.
threatscale = 1.1 // 10% more effective.
/obj/item/weapon/grenade/chem_grenade/large/prime()
/obj/item/grenade/chem_grenade/large/prime()
if(stage != READY)
return
for(var/obj/item/slime_extract/S in beakers)
if(S.Uses)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
for(var/obj/item/reagent_containers/glass/G in beakers)
G.reagents.trans_to(S, G.reagents.total_volume)
//If there is still a core (sometimes it's used up)
@@ -341,7 +341,7 @@
if(S)
if(S.reagents && S.reagents.total_volume)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
for(var/obj/item/reagent_containers/glass/G in beakers)
S.reagents.trans_to(G, S.reagents.total_volume)
else
S.forceMove(get_turf(src))
@@ -352,7 +352,7 @@
//I tried to just put it in the allowed_containers list but
//if you do that it must have reagents. If you're going to
//make a special case you might as well do it explicitly. -Sayu
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
/obj/item/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
to_chat(user, "<span class='notice'>You add [I] to the assembly.</span>")
user.drop_item()
@@ -361,14 +361,14 @@
else
return ..()
/obj/item/weapon/grenade/chem_grenade/cryo // Intended for rare cryogenic mixes. Cools the area moderately upon detonation.
/obj/item/grenade/chem_grenade/cryo // Intended for rare cryogenic mixes. Cools the area moderately upon detonation.
name = "cryo grenade"
desc = "A custom made cryogenic grenade. It rapidly cools its contents upon detonation."
icon_state = "cryog"
affected_area = 2
ignition_temp = -100
/obj/item/weapon/grenade/chem_grenade/pyro // Intended for pyrotechnical mixes. Produces a small fire upon detonation, igniting potentially flammable mixtures.
/obj/item/grenade/chem_grenade/pyro // Intended for pyrotechnical mixes. Produces a small fire upon detonation, igniting potentially flammable mixtures.
name = "pyro grenade"
desc = "A custom made pyrotechnical grenade. It heats up and ignites its contents upon detonation."
icon_state = "pyrog"
@@ -376,14 +376,14 @@
affected_area = 3
ignition_temp = 500 // This is enough to expose a hotspot.
/obj/item/weapon/grenade/chem_grenade/adv_release // Intended for weaker, but longer lasting effects. Could have some interesting uses.
/obj/item/grenade/chem_grenade/adv_release // Intended for weaker, but longer lasting effects. Could have some interesting uses.
name = "advanced release grenade"
desc = "A custom made advanced release grenade. It is able to be detonated more than once. Can be configured using a multitool."
icon_state = "timeg"
origin_tech = "combat=3;engineering=4"
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
/obj/item/weapon/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
/obj/item/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
if(ismultitool(I))
switch(unit_spread)
if(0 to 24)
@@ -396,12 +396,12 @@
return
..()
/obj/item/weapon/grenade/chem_grenade/adv_release/prime()
/obj/item/grenade/chem_grenade/adv_release/prime()
if(stage != READY)
return
var/total_volume = 0
for(var/obj/item/weapon/reagent_containers/RC in beakers)
for(var/obj/item/reagent_containers/RC in beakers)
total_volume += RC.reagents.total_volume
if(!total_volume)
qdel(src)
@@ -410,7 +410,7 @@
var/fraction = unit_spread/total_volume
var/datum/reagents/reactants = new(unit_spread)
reactants.my_atom = src
for(var/obj/item/weapon/reagent_containers/RC in beakers)
for(var/obj/item/reagent_containers/RC in beakers)
RC.reagents.trans_to(reactants, RC.reagents.total_volume*fraction, threatscale, 1, 1)
chem_splash(get_turf(src), affected_area, list(reactants), ignition_temp, threatscale)
@@ -422,20 +422,20 @@
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[last]'>FLW</A>) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
else
addtimer(src, "prime", det_time)
addtimer(CALLBACK(src, .proc/prime), det_time)
var/turf/DT = get_turf(src)
var/area/DA = get_area(DT)
log_game("A grenade detonated at [DA.name] ([DT.x], [DT.y], [DT.z])")
/obj/item/weapon/grenade/chem_grenade/metalfoam
/obj/item/grenade/chem_grenade/metalfoam
payload_name = "metal foam"
desc = "Used for emergency sealing of air breaches."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("fluorosurfactant", 10)
@@ -446,15 +446,15 @@
update_icon()
/obj/item/weapon/grenade/chem_grenade/incendiary
/obj/item/grenade/chem_grenade/incendiary
payload_name = "incendiary"
desc = "Used for clearing rooms of living things."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("plasma", 25)
@@ -466,15 +466,15 @@
update_icon()
/obj/item/weapon/grenade/chem_grenade/antiweed
/obj/item/grenade/chem_grenade/antiweed
payload_name = "weed killer"
desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("atrazine", 30)
B1.reagents.add_reagent("potassium", 20)
@@ -487,15 +487,15 @@
update_icon()
/obj/item/weapon/grenade/chem_grenade/cleaner
/obj/item/grenade/chem_grenade/cleaner
payload_name = "cleaner"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("cleaner", 10)
@@ -506,15 +506,15 @@
update_icon()
/obj/item/weapon/grenade/chem_grenade/teargas
/obj/item/grenade/chem_grenade/teargas
payload_name = "teargas"
desc = "Used for nonlethal riot control. Contents under pressure. Do not directly inhale contents."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("condensedcapsaicin", 25)
B1.reagents.add_reagent("potassium", 25)
@@ -525,15 +525,15 @@
beakers += B2
update_icon()
/obj/item/weapon/grenade/chem_grenade/facid
/obj/item/grenade/chem_grenade/facid
name = "acid grenade"
desc = "Used for melting armoured opponents."
stage = READY
/obj/item/weapon/grenade/chem_grenade/facid/New()
/obj/item/grenade/chem_grenade/facid/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("facid", 280)
B1.reagents.add_reagent("potassium", 20)
@@ -545,15 +545,15 @@
beakers += B2
update_icon()
/obj/item/weapon/grenade/chem_grenade/saringas
/obj/item/grenade/chem_grenade/saringas
payload_name = "saringas"
desc = "Contains sarin gas; extremely deadly and fast acting; use with extreme caution."
stage = READY
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("sarin", 25)
B1.reagents.add_reagent("potassium", 25)
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/clown_grenade
/obj/item/grenade/clown_grenade
name = "Banana Grenade"
desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas."
icon_state = "banana"
@@ -23,7 +23,7 @@
for(var/direction in alldirs)
for(i = 0; i < 2; i++)
number++
var/obj/item/weapon/grown/bananapeel/traitorpeel/peel = new /obj/item/weapon/grown/bananapeel/traitorpeel(get_turf(src.loc))
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
/* var/direction = pick(alldirs)
var/spaces = pick(1;150, 2)
var/a = 0
@@ -35,7 +35,7 @@
step(peel,direction)
else
step(peel,direction)
new /obj/item/weapon/grown/bananapeel/traitorpeel(get_turf(src.loc))
new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
qdel(src)
return
/*
@@ -46,10 +46,10 @@
return
if(locate(/obj/structure/window) in T)
return
new /obj/item/weapon/grown/bananapeel/traitorpeel(T)
new /obj/item/grown/bananapeel/traitorpeel(T)
*/
/obj/item/weapon/grown/bananapeel/traitorpeel
/obj/item/grown/bananapeel/traitorpeel
trip_stun = 0
trip_weaken = 7
trip_tiles = 4
@@ -58,14 +58,14 @@
trip_chance = 100
/obj/item/weapon/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
/obj/item/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
. = ..()
if(.)
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
H.take_overall_damage(0, rand(2,8))
H.take_organ_damage(2) // Was 5 -- TLE
/obj/item/weapon/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
/obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
var/burned = rand(1,3)
if(istype(hit_atom ,/mob/living))
var/mob/living/M = hit_atom
@@ -1,14 +1,14 @@
////////////////////
//Clusterbang
////////////////////
/obj/item/weapon/grenade/clusterbuster
/obj/item/grenade/clusterbuster
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang"
var/payload = /obj/item/weapon/grenade/flashbang/cluster
var/payload = /obj/item/grenade/flashbang/cluster
/obj/item/weapon/grenade/clusterbuster/prime()
/obj/item/grenade/clusterbuster/prime()
update_mob()
var/numspawned = rand(4,8)
var/again = 0
@@ -19,7 +19,7 @@
numspawned--
for(var/loop = again ,loop > 0, loop--)
new /obj/item/weapon/grenade/clusterbuster/segment(loc, payload)//Creates 'segments' that launches a few more payloads
new /obj/item/grenade/clusterbuster/segment(loc, payload)//Creates 'segments' that launches a few more payloads
new /obj/effect/payload_spawner(loc, payload, numspawned)//Launches payload
@@ -31,13 +31,13 @@
//////////////////////
//Clusterbang segment
//////////////////////
/obj/item/weapon/grenade/clusterbuster/segment
/obj/item/grenade/clusterbuster/segment
desc = "A smaller segment of a clusterbang. Better run."
name = "clusterbang segment"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang_segment"
/obj/item/weapon/grenade/clusterbuster/segment/New(var/loc, var/payload_type = /obj/item/weapon/grenade/flashbang/cluster)
/obj/item/grenade/clusterbuster/segment/New(var/loc, var/payload_type = /obj/item/grenade/flashbang/cluster)
..()
icon_state = "clusterbang_segment_active"
payload = payload_type
@@ -47,7 +47,7 @@
prime()
/obj/item/weapon/grenade/clusterbuster/segment/prime()
/obj/item/grenade/clusterbuster/segment/prime()
new /obj/effect/payload_spawner(loc, payload, rand(4,8))
@@ -61,14 +61,14 @@
/obj/effect/payload_spawner/New(var/turf/newloc,var/type, var/numspawned as num)
for(var/loop = numspawned ,loop > 0, loop--)
var/obj/item/weapon/grenade/P = new type(loc)
if(istype(P, /obj/item/weapon/grenade))
var/obj/item/grenade/P = new type(loc)
if(istype(P, /obj/item/grenade))
P.active = 1
walk_away(P,loc,rand(1,4))
spawn(rand(15,60))
if(!QDELETED(P))
if(istype(P, /obj/item/weapon/grenade))
if(istype(P, /obj/item/grenade))
P.prime()
qdel(src)
@@ -76,200 +76,200 @@
//////////////////////////////////
//Custom payload clusterbusters
/////////////////////////////////
/obj/item/weapon/grenade/flashbang/cluster
/obj/item/grenade/flashbang/cluster
icon_state = "flashbang_active"
/obj/item/weapon/grenade/clusterbuster/emp
/obj/item/grenade/clusterbuster/emp
name = "Electromagnetic Storm"
payload = /obj/item/weapon/grenade/empgrenade
payload = /obj/item/grenade/empgrenade
/obj/item/weapon/grenade/clusterbuster/smoke
/obj/item/grenade/clusterbuster/smoke
name = "Ninja Vanish"
payload = /obj/item/weapon/grenade/smokebomb
payload = /obj/item/grenade/smokebomb
/obj/item/weapon/grenade/clusterbuster/metalfoam
/obj/item/grenade/clusterbuster/metalfoam
name = "Instant Concrete"
payload = /obj/item/weapon/grenade/chem_grenade/metalfoam
payload = /obj/item/grenade/chem_grenade/metalfoam
/obj/item/weapon/grenade/clusterbuster/inferno
/obj/item/grenade/clusterbuster/inferno
name = "Inferno"
payload = /obj/item/weapon/grenade/chem_grenade/incendiary
payload = /obj/item/grenade/chem_grenade/incendiary
/obj/item/weapon/grenade/clusterbuster/antiweed
/obj/item/grenade/clusterbuster/antiweed
name = "RoundDown"
payload = /obj/item/weapon/grenade/chem_grenade/antiweed
payload = /obj/item/grenade/chem_grenade/antiweed
/obj/item/weapon/grenade/clusterbuster/cleaner
/obj/item/grenade/clusterbuster/cleaner
name = "Mr. Proper"
payload = /obj/item/weapon/grenade/chem_grenade/cleaner
payload = /obj/item/grenade/chem_grenade/cleaner
/obj/item/weapon/grenade/clusterbuster/teargas
/obj/item/grenade/clusterbuster/teargas
name = "Oignon Grenade"
payload = /obj/item/weapon/grenade/chem_grenade/teargas
payload = /obj/item/grenade/chem_grenade/teargas
/obj/item/weapon/grenade/clusterbuster/facid
/obj/item/grenade/clusterbuster/facid
name = "Aciding Rain"
payload = /obj/item/weapon/grenade/chem_grenade/facid
payload = /obj/item/grenade/chem_grenade/facid
/obj/item/weapon/grenade/clusterbuster/syndieminibomb
/obj/item/grenade/clusterbuster/syndieminibomb
name = "SyndiWrath"
payload = /obj/item/weapon/grenade/syndieminibomb
payload = /obj/item/grenade/syndieminibomb
/obj/item/weapon/grenade/clusterbuster/spawner_manhacks
/obj/item/grenade/clusterbuster/spawner_manhacks
name = "iViscerator"
payload = /obj/item/weapon/grenade/spawnergrenade/manhacks
payload = /obj/item/grenade/spawnergrenade/manhacks
/obj/item/weapon/grenade/clusterbuster/spawner_spesscarp
/obj/item/grenade/clusterbuster/spawner_spesscarp
name = "Invasion of the Space Carps"
payload = /obj/item/weapon/grenade/spawnergrenade/spesscarp
payload = /obj/item/grenade/spawnergrenade/spesscarp
/obj/item/weapon/grenade/clusterbuster/monster
/obj/item/grenade/clusterbuster/monster
name = "Monster Megabomb"
payload = /obj/item/weapon/grenade/chem_grenade/large/monster
payload = /obj/item/grenade/chem_grenade/large/monster
/obj/item/weapon/grenade/clusterbuster/meat
/obj/item/grenade/clusterbuster/meat
name = "Mega Meat Grenade"
payload = /obj/item/weapon/grenade/chem_grenade/meat
payload = /obj/item/grenade/chem_grenade/meat
/obj/item/weapon/grenade/clusterbuster/nervegas
/obj/item/grenade/clusterbuster/nervegas
name = "Nerve Gas Clusterbomb"
payload = /obj/item/weapon/grenade/chem_grenade/saringas
payload = /obj/item/grenade/chem_grenade/saringas
/obj/item/weapon/grenade/clusterbuster/megadirt
/obj/item/grenade/clusterbuster/megadirt
name = "Megamaid's Revenge Grenade"
payload = /obj/item/weapon/grenade/chem_grenade/dirt
payload = /obj/item/grenade/chem_grenade/dirt
/obj/item/weapon/grenade/clusterbuster/ultima
/obj/item/grenade/clusterbuster/ultima
name = "Earth Shattering Kaboom"
desc = "Contains one Aludium Q-36 explosive space modulator."
payload = /obj/item/weapon/grenade/chem_grenade/explosion
payload = /obj/item/grenade/chem_grenade/explosion
/obj/item/weapon/grenade/clusterbuster/lube
/obj/item/grenade/clusterbuster/lube
name = "Newton's First Law"
desc = "An object in motion remains in motion."
payload = /obj/item/weapon/grenade/chem_grenade/lube
payload = /obj/item/grenade/chem_grenade/lube
/obj/item/weapon/grenade/clusterbuster/hippie
/obj/item/grenade/clusterbuster/hippie
name = "Hippie Grenade"
desc = "Almost as good as the summer of '69."
payload = /obj/item/weapon/grenade/chem_grenade/drugs
payload = /obj/item/grenade/chem_grenade/drugs
/obj/item/weapon/grenade/clusterbuster/holy
/obj/item/grenade/clusterbuster/holy
name = "Purification Grenade"
desc = "Blessed excessively."
payload = /obj/item/weapon/grenade/chem_grenade/holywater
payload = /obj/item/grenade/chem_grenade/holywater
/obj/item/weapon/grenade/clusterbuster/hellwater
/obj/item/grenade/clusterbuster/hellwater
name = "Righteous Fury"
desc = "It's righteous, not badminnery."
payload = /obj/item/weapon/grenade/chem_grenade/hellwater
payload = /obj/item/grenade/chem_grenade/hellwater
/obj/item/weapon/grenade/clusterbuster/booze
/obj/item/grenade/clusterbuster/booze
name = "Booze Grenade"
payload = /obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink
payload = /obj/item/reagent_containers/food/drinks/bottle/random_drink
/obj/item/weapon/grenade/clusterbuster/honk
/obj/item/grenade/clusterbuster/honk
name = "Mega Honk Grenade"
payload = /obj/item/weapon/grown/bananapeel
payload = /obj/item/grown/bananapeel
/obj/item/weapon/grenade/clusterbuster/honk_evil
/obj/item/grenade/clusterbuster/honk_evil
name = "Evil Mega Honk Grenade"
payload = /obj/item/weapon/grenade/clown_grenade
payload = /obj/item/grenade/clown_grenade
/obj/item/weapon/grenade/clusterbuster/xmas
/obj/item/grenade/clusterbuster/xmas
name = "Christmas Miracle"
payload = /obj/item/weapon/a_gift
payload = /obj/item/a_gift
/obj/item/weapon/grenade/clusterbuster/dirt
/obj/item/grenade/clusterbuster/dirt
name = "Megamaid's Job Security Grenade"
payload = /obj/effect/decal/cleanable/random
/obj/item/weapon/grenade/clusterbuster/apocalypsefake
/obj/item/grenade/clusterbuster/apocalypsefake
name = "Fun Bomb"
desc = "Not like the other bomb."
payload = /obj/item/toy/spinningtoy
/obj/item/weapon/grenade/clusterbuster/apocalypse
/obj/item/grenade/clusterbuster/apocalypse
name = "Apocalypse Bomb"
desc = "No matter what, do not EVER use this."
payload = /obj/singularity
/obj/item/weapon/grenade/clusterbuster/tools
/obj/item/grenade/clusterbuster/tools
name = "Quick Repair Grenade"
desc = "An assistant's every dream."
payload = /obj/random/tool
/obj/item/weapon/grenade/clusterbuster/tools
/obj/item/grenade/clusterbuster/tools
name = "Engineering Deployment Platfom"
desc = "For the that time when gearing up was just too hard."
payload = /obj/random/tech_supply
/obj/item/weapon/grenade/clusterbuster/toys
/obj/item/grenade/clusterbuster/toys
name = "Toy Delivery System"
desc = "Who needs skill at arcades anyway?"
payload = /obj/item/toy/random
/obj/item/weapon/grenade/clusterbuster/banquet
/obj/item/grenade/clusterbuster/banquet
name = "Bork Bork Bonanza"
desc = "Bork bork bork."
payload = /obj/item/weapon/grenade/clusterbuster/banquet/child
payload = /obj/item/grenade/clusterbuster/banquet/child
/obj/item/weapon/grenade/clusterbuster/banquet/child
payload = /obj/item/weapon/grenade/chem_grenade/large/feast
/obj/item/grenade/clusterbuster/banquet/child
payload = /obj/item/grenade/chem_grenade/large/feast
/obj/item/weapon/grenade/clusterbuster/aviary
/obj/item/grenade/clusterbuster/aviary
name = "Poly-Poly Grenade"
desc = "That's an uncomfortable number of birds."
payload = /mob/living/simple_animal/parrot
/obj/item/weapon/grenade/clusterbuster/monkey
/obj/item/grenade/clusterbuster/monkey
name = "Barrel of Monkeys"
desc = "Not really that much fun."
payload = /mob/living/carbon/human/monkey
/obj/item/weapon/grenade/clusterbuster/fluffy
/obj/item/grenade/clusterbuster/fluffy
name = "Fluffy Love Bomb"
desc = "Exactly as snuggly as it sounds."
payload = /mob/living/simple_animal/pet/corgi/puppy
/obj/item/weapon/grenade/clusterbuster/fox
/obj/item/grenade/clusterbuster/fox
name = "Troublemaking Grenade"
desc = "More trouble than two foxes combined."
payload = /mob/living/simple_animal/pet/fox
/obj/item/weapon/grenade/clusterbuster/crab
/obj/item/grenade/clusterbuster/crab
name = "Crab Grenade"
desc = "Reserved for those pesky request."
payload = /mob/living/simple_animal/crab
/obj/item/weapon/grenade/clusterbuster/plasma
/obj/item/grenade/clusterbuster/plasma
name = "Plasma Cluster Grenade"
desc = "For when everything needs to die in a fire."
payload = /obj/item/weapon/grenade/gas
payload = /obj/item/grenade/gas
/obj/item/weapon/grenade/clusterbuster/n2o
/obj/item/grenade/clusterbuster/n2o
name = "N2O Cluster Grenade"
desc = "For when you need to knock out EVERYONE."
payload = /obj/item/weapon/grenade/gas/knockout
payload = /obj/item/grenade/gas/knockout
////////////Clusterbuster of Clusterbusters////////////
/obj/item/weapon/grenade/clusterbuster/mega_fox
/obj/item/grenade/clusterbuster/mega_fox
name = "Mega Troublemaking Grenade."
payload = /obj/item/weapon/grenade/clusterbuster/fox
payload = /obj/item/grenade/clusterbuster/fox
/obj/item/weapon/grenade/clusterbuster/mega_bang
/obj/item/grenade/clusterbuster/mega_bang
name = "For when stunlocking is just too short."
payload = /obj/item/weapon/grenade/clusterbuster
payload = /obj/item/grenade/clusterbuster
/obj/item/weapon/grenade/clusterbuster/mega_syndieminibomb
/obj/item/grenade/clusterbuster/mega_syndieminibomb
name = "Mega SyndiWrath."
payload = /obj/item/weapon/grenade/clusterbuster/syndieminibomb
payload = /obj/item/grenade/clusterbuster/syndieminibomb
/obj/item/weapon/grenade/clusterbuster/mega_honk_evil
/obj/item/grenade/clusterbuster/mega_honk_evil
name = "Mega Evil Mega Honk Grenade."
payload = /obj/item/weapon/grenade/clusterbuster/honk_evil
payload = /obj/item/grenade/clusterbuster/honk_evil
/obj/item/weapon/grenade/clusterbuster/mega_emp
/obj/item/grenade/clusterbuster/mega_emp
name = "Electromagnetic Storm"
payload = /obj/item/weapon/grenade/clusterbuster/emp
payload = /obj/item/grenade/clusterbuster/emp
@@ -1,10 +1,10 @@
/obj/item/weapon/grenade/confetti
/obj/item/grenade/confetti
name = "party grenade"
desc = "Party time!"
icon_state = "confetti"
var/spawner_type = /obj/effect/decal/cleanable/confetti
/obj/item/weapon/grenade/confetti/prime()
/obj/item/grenade/confetti/prime()
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/confetti_partywhistle.ogg', 100, 1)
for(var/i in 1 to 20) //20 confettis. Yes.
@@ -1,11 +1,11 @@
/obj/item/weapon/grenade/chem_grenade/dirt
/obj/item/grenade/chem_grenade/dirt
payload_name = "dirt"
desc = "From the makers of BLAM! brand foaming space cleaner, this bomb guarantees steady work for any janitor."
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/list/muck = list("blood","carbon","flour","radium")
var/filth = pick(muck - "radium") // not usually radioactive
@@ -16,7 +16,7 @@
beakers += B1
/obj/item/weapon/grenade/chem_grenade/meat
/obj/item/grenade/chem_grenade/meat
payload_name = "meat"
desc = "Not always as messy as the name implies."
stage = 2
@@ -24,8 +24,8 @@
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("blood",60)
if(prob(5))
@@ -35,7 +35,7 @@
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/holywater
/obj/item/grenade/chem_grenade/holywater
payload_name = "holy water"
desc = "Then shalt thou count to three, no more, no less."
stage = 2
@@ -43,11 +43,11 @@
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B = new(src)
B.reagents.add_reagent("holywater",100)
beakers += B
/obj/item/weapon/grenade/chem_grenade/hellwater
/obj/item/grenade/chem_grenade/hellwater
payload_name = "hell water"
desc = "And he struck them down with an unholy fury that burn like one-thousands badmins."
stage = 2
@@ -55,8 +55,8 @@
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("hell_water",80)
B1.reagents.add_reagent("sugar",20)
B2.reagents.add_reagent("hell_water", 60)
@@ -64,15 +64,15 @@
B2.reagents.add_reagent("phosphorus", 20)
/obj/item/weapon/grenade/chem_grenade/drugs
/obj/item/grenade/chem_grenade/drugs
payload_name = "miracle"
desc = "How does it work?"
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("space_drugs", 25)
B1.reagents.add_reagent("lsd", 25)
@@ -84,15 +84,15 @@
beakers += B2
update_icon()
/obj/item/weapon/grenade/chem_grenade/ethanol
/obj/item/grenade/chem_grenade/ethanol
payload_name = "ethanol"
desc = "Ach, that hits the spot."
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("ethanol", 75)
B1.reagents.add_reagent("potassium", 25)
@@ -107,38 +107,38 @@
// -------------------------------------
// Grenades using new grenade assemblies
// -------------------------------------
/obj/item/weapon/grenade/chem_grenade/lube
/obj/item/grenade/chem_grenade/lube
payload_name = "lubricant"
stage = 2
/obj/item/weapon/grenade/chem_grenade/lube/New()
/obj/item/grenade/chem_grenade/lube/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
B1.reagents.add_reagent("lube",50)
beakers += B1
/obj/item/weapon/grenade/chem_grenade/lube/remote/New()
/obj/item/grenade/chem_grenade/lube/remote/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/weapon/grenade/chem_grenade/lube/prox/New()
/obj/item/grenade/chem_grenade/lube/prox/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/lube/tripwire/New()
/obj/item/grenade/chem_grenade/lube/tripwire/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/infra)
CreateDefaultTrigger(/obj/item/assembly/infra)
// Basic explosion grenade
/obj/item/weapon/grenade/chem_grenade/explosion
/obj/item/grenade/chem_grenade/explosion
payload_name = "conventional"
stage = 2
/obj/item/weapon/grenade/chem_grenade/explosion/New()
/obj/item/grenade/chem_grenade/explosion/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("glycerol",30) // todo: someone says NG is overpowered, test.
B1.reagents.add_reagent("sacid",15)
B2.reagents.add_reagent("sacid",15)
@@ -147,92 +147,92 @@
beakers += B2
// Assembly Variants
/obj/item/weapon/grenade/chem_grenade/explosion/remote/New()
/obj/item/grenade/chem_grenade/explosion/remote/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/weapon/grenade/chem_grenade/explosion/prox/New()
/obj/item/grenade/chem_grenade/explosion/prox/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/explosion/mine/New()
/obj/item/grenade/chem_grenade/explosion/mine/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/mousetrap)
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
// Water + Potassium = Boom
/obj/item/weapon/grenade/chem_grenade/waterpotassium
/obj/item/grenade/chem_grenade/waterpotassium
payload_name = "chem explosive"
stage = 2
/obj/item/weapon/grenade/chem_grenade/waterpotassium/New()
/obj/item/grenade/chem_grenade/waterpotassium/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("water",100)
B2.reagents.add_reagent("potassium",100)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/waterpotassium/remote/New()
/obj/item/grenade/chem_grenade/waterpotassium/remote/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/weapon/grenade/chem_grenade/waterpotassium/prox/New()
/obj/item/grenade/chem_grenade/waterpotassium/prox/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire/New()
/obj/item/grenade/chem_grenade/waterpotassium/tripwire/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/infra)
CreateDefaultTrigger(/obj/item/assembly/infra)
/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire_armed/New()
/obj/item/grenade/chem_grenade/waterpotassium/tripwire_armed/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/infra/armed)
CreateDefaultTrigger(/obj/item/assembly/infra/armed)
/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire_armed_stealth/New()
/obj/item/grenade/chem_grenade/waterpotassium/tripwire_armed_stealth/New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/infra/armed/stealth)
CreateDefaultTrigger(/obj/item/assembly/infra/armed/stealth)
// Basic EMP grenade
/obj/item/weapon/grenade/chem_grenade/emp
/obj/item/grenade/chem_grenade/emp
payload_name = "EMP"
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("uranium",50)
B2.reagents.add_reagent("iron",50)
beakers += B1
beakers += B2
// Assembly Variants
/obj/item/weapon/grenade/chem_grenade/emp/remote
/obj/item/grenade/chem_grenade/emp/remote
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/weapon/grenade/chem_grenade/emp/prox
/obj/item/grenade/chem_grenade/emp/prox
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/emp/mine
/obj/item/grenade/chem_grenade/emp/mine
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/mousetrap)
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
// --------------------------------------
// Dangerous slime core grenades
// --------------------------------------
/*
/obj/item/weapon/grenade/chem_grenade/large/bluespace
/obj/item/grenade/chem_grenade/large/bluespace
payload_name = "bluespace slime"
desc = "A standard grenade casing containing weaponized slime extract."
stage = 2
@@ -241,28 +241,28 @@
..()
var/obj/item/slime_extract/bluespace/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/large/bluespace/prox
/obj/item/grenade/chem_grenade/large/bluespace/prox
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/large/bluespace/mine
/obj/item/grenade/chem_grenade/large/bluespace/mine
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/mousetrap)
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/weapon/grenade/chem_grenade/large/bluespace/remote
/obj/item/grenade/chem_grenade/large/bluespace/remote
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
*/
/obj/item/weapon/grenade/chem_grenade/large/monster
/obj/item/grenade/chem_grenade/large/monster
payload_name = "gold slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
@@ -271,27 +271,27 @@
..()
var/obj/item/slime_extract/gold/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/large/monster/prox
/obj/item/grenade/chem_grenade/large/monster/prox
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor)
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/weapon/grenade/chem_grenade/large/monster/mine
/obj/item/grenade/chem_grenade/large/monster/mine
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/mousetrap)
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/weapon/grenade/chem_grenade/large/monster/remote
/obj/item/grenade/chem_grenade/large/monster/remote
New()
..()
CreateDefaultTrigger(/obj/item/device/assembly/signaler)
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/weapon/grenade/chem_grenade/large/feast
/obj/item/grenade/chem_grenade/large/feast
payload_name = "silver slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
@@ -300,7 +300,7 @@
..()
var/obj/item/slime_extract/silver/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
@@ -309,27 +309,27 @@
// Syndie Kits
// --------------------------------------
/obj/item/weapon/storage/box/syndie_kit/remotegrenade
/obj/item/storage/box/syndie_kit/remotegrenade
name = "Remote Grenade Kit"
New()
..()
new /obj/item/weapon/grenade/chem_grenade/explosion/remote(src)
new /obj/item/device/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/device/assembly/signaler(src)
new /obj/item/grenade/chem_grenade/explosion/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/weapon/storage/box/syndie_kit/remoteemp
/obj/item/storage/box/syndie_kit/remoteemp
name = "Remote EMP Kit"
New()
..()
new /obj/item/weapon/grenade/chem_grenade/emp/remote(src)
new /obj/item/device/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/device/assembly/signaler(src)
new /obj/item/grenade/chem_grenade/emp/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/weapon/storage/box/syndie_kit/remotelube
/obj/item/storage/box/syndie_kit/remotelube
name = "Remote Lube Kit"
New()
..()
new /obj/item/weapon/grenade/chem_grenade/lube(src)
new /obj/item/device/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/device/assembly/signaler(src)
new /obj/item/grenade/chem_grenade/lube(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
@@ -1,11 +1,11 @@
/obj/item/weapon/grenade/empgrenade
/obj/item/grenade/empgrenade
name = "classic EMP grenade"
desc = "It is designed to wreak havoc on electronic systems."
icon_state = "emp"
item_state = "emp"
origin_tech = "magnets=3;combat=2"
/obj/item/weapon/grenade/empgrenade/prime()
/obj/item/grenade/empgrenade/prime()
update_mob()
empulse(src, 4, 10)
qdel(src)
empulse(src, 4, 10, 1)
qdel(src)
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/flashbang
/obj/item/grenade/flashbang
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
@@ -7,7 +7,7 @@
light_color = LIGHT_COLOR_WHITE
var/light_time = 2
/obj/item/weapon/grenade/flashbang/prime()
/obj/item/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
@@ -26,7 +26,7 @@
spawn(light_time)
qdel(src)
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/M)
/obj/item/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/M)
M.show_message("<span class='warning'>BANG</span>", 2)
playsound(loc, 'sound/effects/bang.ogg', 25, 1)
@@ -1,6 +1,6 @@
//improvised explosives//
/obj/item/weapon/grenade/iedcasing
/obj/item/grenade/iedcasing
name = "improvised firebomb"
desc = "A weak, improvised incendiary device."
w_class = WEIGHT_CLASS_SMALL
@@ -16,7 +16,7 @@
display_timer = 0
var/list/times
/obj/item/weapon/grenade/iedcasing/New()
/obj/item/grenade/iedcasing/New()
..()
overlays += "improvised_grenade_filled"
overlays += "improvised_grenade_wired"
@@ -25,9 +25,9 @@
if(det_time < 0) //checking for 'duds'
det_time = rand(30,80)
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
/obj/item/grenade/iedcasing/CheckParts(list/parts_list)
..()
var/obj/item/weapon/reagent_containers/food/drinks/cans/can = locate() in contents
var/obj/item/reagent_containers/food/drinks/cans/can = locate() in contents
if(can)
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
can.pixel_y = 0
@@ -37,7 +37,7 @@
underlays += can_underlay
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
/obj/item/grenade/iedcasing/attack_self(mob/user) //
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You light the [name]!</span>")
@@ -49,17 +49,18 @@
var/area/A = get_area(bombturf)
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
log_game("[key_name(user)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
investigate_log("[key_name(user)] has primed a [name] for detonation at [A.name] [COORD(bombturf)])", INVESTIGATE_BOMB)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
addtimer(src, "prime", det_time)
addtimer(CALLBACK(src, .proc/prime), det_time)
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
/obj/item/grenade/iedcasing/prime() //Blowing that can up
update_mob()
explosion(loc, -1, -1, 2, flame_range = 4) // small explosion, plus a very large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
/obj/item/grenade/iedcasing/examine(mob/user)
..()
to_chat(user, "You can't tell when it will explode!")
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade
/obj/item/grenade
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = WEIGHT_CLASS_SMALL
@@ -15,7 +15,7 @@
var/det_time = 50
var/display_timer = 1
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
/obj/item/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
active = 1
@@ -29,9 +29,9 @@
return 1
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
/*/obj/item/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/gun/grenadelauncher)) return ..()
if((user.is_in_active_hand(src)) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
@@ -47,7 +47,7 @@
return*/
/obj/item/weapon/grenade/examine(mob/user)
/obj/item/grenade/examine(mob/user)
..(user)
if(display_timer)
if(det_time > 1)
@@ -55,7 +55,7 @@
else
to_chat(user, "\The [src] is set for instant detonation.")
/obj/item/weapon/grenade/attack_self(mob/user as mob)
/obj/item/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
@@ -66,7 +66,7 @@
var/area/A = get_area(bombturf)
message_admins("[key_name_admin(usr)] has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])")
bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])"
investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])", INVESTIGATE_BOMB)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
@@ -74,16 +74,16 @@
prime()
/obj/item/weapon/grenade/proc/prime()
/obj/item/grenade/proc/prime()
/obj/item/weapon/grenade/proc/update_mob()
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
/obj/item/grenade/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/screwdriver))
switch(det_time)
if("1")
det_time = 10
@@ -100,6 +100,6 @@
add_fingerprint(user)
..()
/obj/item/weapon/grenade/attack_hand()
/obj/item/grenade/attack_hand()
walk(src, null, null)
..()
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/smokebomb
/obj/item/grenade/smokebomb
desc = "It is set to detonate in 2 seconds."
name = "smoke bomb"
icon = 'icons/obj/grenade.dmi'
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/spawnergrenade
/obj/item/grenade/spawnergrenade
desc = "It is set to detonate in 5 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
@@ -31,26 +31,26 @@
qdel(src)
return
/obj/item/weapon/grenade/spawnergrenade/manhacks
/obj/item/grenade/spawnergrenade/manhacks
name = "manhack delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/spesscarp
/obj/item/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/feral_cats
/obj/item/grenade/spawnergrenade/feral_cats
name = "feral cat delivery grenade"
desc = "This grenade contains 8 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight."
spawner_type = /mob/living/simple_animal/hostile/feral_cat
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/feral_cats/prime() //Own proc for this because the regular one would flash people which was dumb.
/obj/item/grenade/spawnergrenade/feral_cats/prime() //Own proc for this because the regular one would flash people which was dumb.
update_mob()
if(spawner_type && deliveryamt)
var/turf/T = get_turf(src)
@@ -1,4 +1,4 @@
/obj/item/weapon/grenade/syndieminibomb
/obj/item/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
@@ -6,7 +6,7 @@
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/syndieminibomb/prime()
/obj/item/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)

Some files were not shown because too many files have changed in this diff Show More