@@ -0,0 +1,842 @@
|
||||
#define GLOW_MODE 3
|
||||
#define LIGHT_MODE 2
|
||||
#define REMOVE_MODE 1
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
RCD
|
||||
ARCD
|
||||
RLD
|
||||
*/
|
||||
|
||||
/obj/item/construction
|
||||
name = "not for ingame use"
|
||||
desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges."
|
||||
opacity = 0
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
force = 0
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=100000)
|
||||
req_access_txt = "11"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/matter = 0
|
||||
var/max_matter = 100
|
||||
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
|
||||
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
|
||||
var/plasmarglassmultiplier = 2 //50% less plasma than in plasteel
|
||||
var/rglassmultiplier = 1.5 //One metal sheet, half a glass sheet
|
||||
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
|
||||
var/has_ammobar = FALSE //controls whether or not does update_icon apply ammo indicator overlays
|
||||
var/ammo_sections = 10 //amount of divisions in the ammo indicator overlay/number of ammo indicator states
|
||||
var/custom_range = 7
|
||||
var/upgrade = FALSE
|
||||
|
||||
/obj/item/construction/Initialize()
|
||||
. = ..()
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/construction/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "\A [src]. It currently holds [matter]/[max_matter] matter-units." )
|
||||
|
||||
/obj/item/construction/Destroy()
|
||||
QDEL_NULL(spark_system)
|
||||
. = ..()
|
||||
|
||||
/obj/item/construction/attackby(obj/item/W, mob/user, params)
|
||||
if(iscyborg(user))
|
||||
return
|
||||
var/loaded = 0
|
||||
if(istype(W, /obj/item/rcd_ammo))
|
||||
var/obj/item/rcd_ammo/R = W
|
||||
var/load = min(R.ammoamt, max_matter - matter)
|
||||
if(load <= 0)
|
||||
to_chat(user, "<span class='warning'>[src] can't hold any more matter-units!</span>")
|
||||
return
|
||||
R.ammoamt -= load
|
||||
if(R.ammoamt <= 0)
|
||||
qdel(R)
|
||||
matter += load
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
loaded = 1
|
||||
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
|
||||
loaded = loadwithsheets(W, sheetmultiplier, user)
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
||||
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //12 matter for 1 plasteel sheet
|
||||
else if(istype(W, /obj/item/stack/sheet/plasmarglass))
|
||||
loaded = loadwithsheets(W, plasmarglassmultiplier*sheetmultiplier, user) //8 matter for one plasma rglass sheet
|
||||
else if(istype(W, /obj/item/stack/sheet/rglass))
|
||||
loaded = loadwithsheets(W, rglassmultiplier*sheetmultiplier, user) //6 matter for one rglass sheet
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
loaded = loadwithsheets(W, sheetmultiplier * 0.5, user) // 2 matter for 1 rod, as 2 rods are produced from 1 metal
|
||||
else if(istype(W, /obj/item/stack/tile/plasteel))
|
||||
loaded = loadwithsheets(W, sheetmultiplier * 0.25, user) // 1 matter for 1 floortile, as 4 tiles are produced from 1 metal
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>[src] now holds [matter]/[max_matter] matter-units.</span>")
|
||||
else if(istype(W, /obj/item/rcd_upgrade))
|
||||
to_chat(user, "<span class='notice'>You upgrade the RCD with the [W]!</span>")
|
||||
upgrade = TRUE
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
qdel(W)
|
||||
else
|
||||
return ..()
|
||||
update_icon() //ensures that ammo counters (if present) get updated
|
||||
|
||||
/obj/item/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||
if(maxsheets > 0)
|
||||
var/amount_to_use = min(S.amount, maxsheets)
|
||||
S.use(amount_to_use)
|
||||
matter += value*amount_to_use
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into [src]. </span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into [src]!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/construction/proc/activate()
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
/obj/item/construction/attack_self(mob/user)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if(prob(20))
|
||||
spark_system.start()
|
||||
|
||||
/obj/item/construction/proc/useResource(amount, mob/user)
|
||||
if(matter < amount)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
matter -= amount
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/construction/proc/checkResource(amount, mob/user)
|
||||
. = matter >= amount
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
if(has_ammobar)
|
||||
flick("[icon_state]_empty", src) //somewhat hacky thing to make RCDs with ammo counters actually have a blinking yellow light
|
||||
return .
|
||||
|
||||
/obj/item/construction/proc/range_check(atom/A, mob/user)
|
||||
if(!(A in range(custom_range, get_turf(user))))
|
||||
to_chat(user, "<span class='warning'>The \'Out of Range\' light on [src] blinks red.</span>")
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/proc/prox_check(proximity)
|
||||
if(proximity)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/construction/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcd"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
max_matter = 160
|
||||
item_flags = NO_MAT_REDEMPTION | NOBLUDGEON
|
||||
has_ammobar = TRUE
|
||||
var/mode = 1
|
||||
var/ranged = FALSE
|
||||
var/computer_dir = 1
|
||||
var/airlock_type = /obj/machinery/door/airlock
|
||||
var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use
|
||||
var/window_type = /obj/structure/window/fulltile
|
||||
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
|
||||
var/list/conf_access = null
|
||||
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
||||
var/delay_mod = 1
|
||||
var/canRturf = FALSE //Variable for R walls to deconstruct them
|
||||
var/adjacency_check = TRUE //Wheter it checks if the tool has to be in our hands or not. Wsed for the aux base construction drone's internal RCD
|
||||
|
||||
|
||||
/obj/item/construction/rcd/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/construction/rcd/verb/toggle_window_type_verb()
|
||||
set name = "RCD : Toggle Window Type"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
|
||||
toggle_window_type(usr)
|
||||
|
||||
/obj/item/construction/rcd/proc/toggle_window_type(mob/user)
|
||||
var/window_type_name
|
||||
if (window_type == /obj/structure/window/fulltile)
|
||||
window_type = /obj/structure/window/reinforced/fulltile
|
||||
window_type_name = "reinforced glass"
|
||||
else
|
||||
window_type = /obj/structure/window/fulltile
|
||||
window_type_name = "glass"
|
||||
|
||||
to_chat(user, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
|
||||
|
||||
/obj/item/construction/rcd/verb/change_airlock_access(mob/user)
|
||||
|
||||
if (!ishuman(user) && !user.has_unlimited_silicon_privilege)
|
||||
return
|
||||
|
||||
var/t1 = ""
|
||||
|
||||
|
||||
if(use_one_access)
|
||||
t1 += "Restriction Type: <a href='?src=[REF(src)];access=one'>At least one access required</a><br>"
|
||||
else
|
||||
t1 += "Restriction Type: <a href='?src=[REF(src)];access=one'>All accesses required</a><br>"
|
||||
|
||||
t1 += "<a href='?src=[REF(src)];access=all'>Remove All</a><br>"
|
||||
|
||||
var/accesses = ""
|
||||
accesses += "<div align='center'><b>Access</b></div>"
|
||||
accesses += "<table style='width:100%'>"
|
||||
accesses += "<tr>"
|
||||
for(var/i = 1; i <= 7; i++)
|
||||
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
|
||||
accesses += "</tr><tr>"
|
||||
for(var/i = 1; i <= 7; i++)
|
||||
accesses += "<td style='width:14%' valign='top'>"
|
||||
for(var/A in get_region_accesses(i))
|
||||
if(A in conf_access)
|
||||
accesses += "<a href='?src=[REF(src)];access=[A]'><font color=\"red\">[replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=[REF(src)];access=[A]'>[replacetext(get_access_desc(A), " ", " ")]</a> "
|
||||
accesses += "<br>"
|
||||
accesses += "</td>"
|
||||
accesses += "</tr></table>"
|
||||
t1 += "<tt>[accesses]</tt>"
|
||||
|
||||
t1 += "<p><a href='?src=[REF(src)];close=1'>Close</a></p>\n"
|
||||
|
||||
var/datum/browser/popup = new(user, "rcd_access", "Access Control", 900, 500)
|
||||
popup.set_content(t1)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
onclose(user, "rcd_access")
|
||||
|
||||
/obj/item/construction/rcd/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if (href_list["close"])
|
||||
usr << browse(null, "window=rcd_access")
|
||||
return
|
||||
|
||||
if (href_list["access"])
|
||||
toggle_access(href_list["access"])
|
||||
change_airlock_access(usr)
|
||||
|
||||
/obj/item/construction/rcd/proc/toggle_access(acc)
|
||||
if (acc == "all")
|
||||
conf_access = null
|
||||
else if(acc == "one")
|
||||
use_one_access = !use_one_access
|
||||
else
|
||||
var/req = text2num(acc)
|
||||
|
||||
if (conf_access == null)
|
||||
conf_access = list()
|
||||
|
||||
if (!(req in conf_access))
|
||||
conf_access += req
|
||||
else
|
||||
conf_access -= req
|
||||
if (!conf_access.len)
|
||||
conf_access = null
|
||||
|
||||
/obj/item/construction/rcd/proc/get_airlock_image(airlock_type)
|
||||
var/obj/machinery/door/airlock/proto = airlock_type
|
||||
var/ic = initial(proto.icon)
|
||||
var/mutable_appearance/MA = mutable_appearance(ic, "closed")
|
||||
if(!initial(proto.glass))
|
||||
MA.overlays += "fill_closed"
|
||||
//Not scaling these down to button size because they look horrible then, instead just bumping up radius.
|
||||
return MA
|
||||
|
||||
/obj/item/construction/rcd/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated() || (adjacency_check && !user.Adjacent(src)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/rcd/proc/change_computer_dir(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
var/list/computer_dirs = list(
|
||||
"NORTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "cnorth"),
|
||||
"EAST" = image(icon = 'icons/mob/radial.dmi', icon_state = "ceast"),
|
||||
"SOUTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "csouth"),
|
||||
"WEST" = image(icon = 'icons/mob/radial.dmi', icon_state = "cwest")
|
||||
)
|
||||
var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check, tooltips = TRUE)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(computerdirs)
|
||||
if("NORTH")
|
||||
computer_dir = 1
|
||||
if("EAST")
|
||||
computer_dir = 4
|
||||
if("SOUTH")
|
||||
computer_dir = 2
|
||||
if("WEST")
|
||||
computer_dir = 8
|
||||
|
||||
/obj/item/construction/rcd/proc/change_airlock_setting(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
var/list/solid_or_glass_choices = list(
|
||||
"Solid" = get_airlock_image(/obj/machinery/door/airlock),
|
||||
"Glass" = get_airlock_image(/obj/machinery/door/airlock/glass)
|
||||
)
|
||||
|
||||
var/list/solid_choices = list(
|
||||
"Standard" = get_airlock_image(/obj/machinery/door/airlock),
|
||||
"Public" = get_airlock_image(/obj/machinery/door/airlock/public),
|
||||
"Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering),
|
||||
"Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos),
|
||||
"Security" = get_airlock_image(/obj/machinery/door/airlock/security),
|
||||
"Command" = get_airlock_image(/obj/machinery/door/airlock/command),
|
||||
"Medical" = get_airlock_image(/obj/machinery/door/airlock/medical),
|
||||
"Research" = get_airlock_image(/obj/machinery/door/airlock/research),
|
||||
"Freezer" = get_airlock_image(/obj/machinery/door/airlock/freezer),
|
||||
"Science" = get_airlock_image(/obj/machinery/door/airlock/science),
|
||||
"Virology" = get_airlock_image(/obj/machinery/door/airlock/virology),
|
||||
"Mining" = get_airlock_image(/obj/machinery/door/airlock/mining),
|
||||
"Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance),
|
||||
"External" = get_airlock_image(/obj/machinery/door/airlock/external),
|
||||
"External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external),
|
||||
"Airtight Hatch" = get_airlock_image(/obj/machinery/door/airlock/hatch),
|
||||
"Maintenance Hatch" = get_airlock_image(/obj/machinery/door/airlock/maintenance_hatch)
|
||||
)
|
||||
|
||||
var/list/glass_choices = list(
|
||||
"Standard" = get_airlock_image(/obj/machinery/door/airlock/glass),
|
||||
"Public" = get_airlock_image(/obj/machinery/door/airlock/public/glass),
|
||||
"Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering/glass),
|
||||
"Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos/glass),
|
||||
"Security" = get_airlock_image(/obj/machinery/door/airlock/security/glass),
|
||||
"Command" = get_airlock_image(/obj/machinery/door/airlock/command/glass),
|
||||
"Medical" = get_airlock_image(/obj/machinery/door/airlock/medical/glass),
|
||||
"Research" = get_airlock_image(/obj/machinery/door/airlock/research/glass),
|
||||
"Science" = get_airlock_image(/obj/machinery/door/airlock/science/glass),
|
||||
"Virology" = get_airlock_image(/obj/machinery/door/airlock/virology/glass),
|
||||
"Mining" = get_airlock_image(/obj/machinery/door/airlock/mining/glass),
|
||||
"Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/glass),
|
||||
"External" = get_airlock_image(/obj/machinery/door/airlock/external/glass),
|
||||
"External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external/glass)
|
||||
)
|
||||
|
||||
var/airlockcat = show_radial_menu(user, src, solid_or_glass_choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockcat)
|
||||
if("Solid")
|
||||
if(advanced_airlock_setting == 1)
|
||||
var/airlockpaint = show_radial_menu(user, src, solid_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockpaint)
|
||||
if("Standard")
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
if("Public")
|
||||
airlock_type = /obj/machinery/door/airlock/public
|
||||
if("Engineering")
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
if("Atmospherics")
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
if("Security")
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
if("Command")
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
if("Medical")
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
if("Research")
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
if("Freezer")
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
if("Science")
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
if("Virology")
|
||||
airlock_type = /obj/machinery/door/airlock/virology
|
||||
if("Mining")
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
if("Maintenance")
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
if("External")
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
if("External Maintenance")
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/external
|
||||
if("Airtight Hatch")
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
if("Maintenance Hatch")
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
airlock_glass = FALSE
|
||||
else
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
airlock_glass = FALSE
|
||||
|
||||
if("Glass")
|
||||
if(advanced_airlock_setting == 1)
|
||||
var/airlockpaint = show_radial_menu(user, src , glass_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockpaint)
|
||||
if("Standard")
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
if("Public")
|
||||
airlock_type = /obj/machinery/door/airlock/public/glass
|
||||
if("Engineering")
|
||||
airlock_type = /obj/machinery/door/airlock/engineering/glass
|
||||
if("Atmospherics")
|
||||
airlock_type = /obj/machinery/door/airlock/atmos/glass
|
||||
if("Security")
|
||||
airlock_type = /obj/machinery/door/airlock/security/glass
|
||||
if("Command")
|
||||
airlock_type = /obj/machinery/door/airlock/command/glass
|
||||
if("Medical")
|
||||
airlock_type = /obj/machinery/door/airlock/medical/glass
|
||||
if("Research")
|
||||
airlock_type = /obj/machinery/door/airlock/research/glass
|
||||
if("Science")
|
||||
airlock_type = /obj/machinery/door/airlock/science/glass
|
||||
if("Virology")
|
||||
airlock_type = /obj/machinery/door/airlock/virology/glass
|
||||
if("Mining")
|
||||
airlock_type = /obj/machinery/door/airlock/mining/glass
|
||||
if("Maintenance")
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/glass
|
||||
if("External")
|
||||
airlock_type = /obj/machinery/door/airlock/external/glass
|
||||
if("External Maintenance")
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/external/glass
|
||||
airlock_glass = TRUE
|
||||
else
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
airlock_glass = TRUE
|
||||
else
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
airlock_glass = FALSE
|
||||
|
||||
|
||||
/obj/item/construction/rcd/proc/rcd_create(atom/A, mob/user)
|
||||
var/list/rcd_results = A.rcd_vals(user, src)
|
||||
if(!rcd_results)
|
||||
return FALSE
|
||||
var/turf/the_turf = get_turf(A)
|
||||
var/turf_coords = "[COORD(the_turf)]"
|
||||
investigate_log("[user] is attempting to use [src] on [A] (loc [turf_coords] at [the_turf]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD)
|
||||
if(do_after(user, rcd_results["delay"] * delay_mod, target = A))
|
||||
if(checkResource(rcd_results["cost"], user))
|
||||
var/atom/cached = A
|
||||
if(A.rcd_act(user, src, rcd_results["mode"]))
|
||||
useResource(rcd_results["cost"], user)
|
||||
activate()
|
||||
investigate_log("[user] used [src] on [cached] (loc [turf_coords] at [the_turf]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/rcd/Initialize()
|
||||
. = ..()
|
||||
GLOB.rcd_list += src
|
||||
|
||||
/obj/item/construction/rcd/Destroy()
|
||||
GLOB.rcd_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/construction/rcd/attack_self(mob/user)
|
||||
..()
|
||||
var/list/choices = list(
|
||||
"Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"),
|
||||
"Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"),
|
||||
"Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor")
|
||||
)
|
||||
if(upgrade)
|
||||
choices += list(
|
||||
"Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"),
|
||||
"Machine Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "machine"),
|
||||
"Computer Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "computer_dir"),
|
||||
)
|
||||
if(mode == RCD_AIRLOCK)
|
||||
choices += list(
|
||||
"Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"),
|
||||
"Change Airlock Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlocktype")
|
||||
)
|
||||
else if(mode == RCD_WINDOWGRILLE)
|
||||
choices += list(
|
||||
"Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype")
|
||||
)
|
||||
var/choice = show_radial_menu(user,src,choices, custom_check = CALLBACK(src,.proc/check_menu,user))
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(choice)
|
||||
if("Floors & Walls")
|
||||
mode = RCD_FLOORWALL
|
||||
if("Airlock")
|
||||
mode = RCD_AIRLOCK
|
||||
if("Deconstruct")
|
||||
mode = RCD_DECONSTRUCT
|
||||
if("Grilles & Windows")
|
||||
mode = RCD_WINDOWGRILLE
|
||||
if("Machine Frames")
|
||||
mode = RCD_MACHINE
|
||||
if("Computer Frames")
|
||||
mode = RCD_COMPUTER
|
||||
change_computer_dir(user)
|
||||
return
|
||||
if("Change Access")
|
||||
change_airlock_access(user)
|
||||
return
|
||||
if("Change Airlock Type")
|
||||
change_airlock_setting(user)
|
||||
return
|
||||
if("Change Window Type")
|
||||
toggle_window_type(user)
|
||||
return
|
||||
else
|
||||
return
|
||||
playsound(src, 'sound/effects/pop.ogg', 50, 0)
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to '[choice]'.</span>")
|
||||
|
||||
/obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
|
||||
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/construction/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!prox_check(proximity))
|
||||
return
|
||||
rcd_create(A, user)
|
||||
|
||||
/obj/item/construction/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(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||
|
||||
/obj/item/construction/rcd/proc/detonate_pulse_explode()
|
||||
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/construction/rcd/update_icon()
|
||||
..()
|
||||
if(has_ammobar)
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
add_overlay("[icon_state]_charge[ratio]")
|
||||
|
||||
/obj/item/construction/rcd/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/construction/rcd/borg
|
||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||
desc = "A device used to rapidly build walls and floors."
|
||||
canRturf = TRUE
|
||||
upgrade = TRUE
|
||||
var/energyfactor = 72
|
||||
|
||||
|
||||
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.use(amount * energyfactor) //borgs get 1.3x the use of their RCDs
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/construction/rcd/borg/checkResource(amount, mob/user)
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.charge >= (amount * energyfactor)
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/construction/rcd/borg/syndicate
|
||||
icon_state = "ircd"
|
||||
item_state = "ircd"
|
||||
energyfactor = 66
|
||||
|
||||
/obj/item/construction/rcd/loaded
|
||||
matter = 160
|
||||
|
||||
/obj/item/construction/rcd/loaded/upgraded
|
||||
upgrade = TRUE
|
||||
|
||||
/obj/item/construction/rcd/combat
|
||||
name = "Combat RCD"
|
||||
desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges. This RCD has been upgraded to be able to remove Rwalls!"
|
||||
icon_state = "ircd"
|
||||
item_state = "ircd"
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
canRturf = TRUE
|
||||
|
||||
/obj/item/construction/rcd/industrial
|
||||
name = "industrial RCD"
|
||||
icon_state = "ircd"
|
||||
item_state = "ircd"
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
delay_mod = 0.6
|
||||
sheetmultiplier = 8
|
||||
|
||||
/obj/item/rcd_ammo
|
||||
name = "compressed matter cartridge"
|
||||
desc = "Highly compressed matter for the RCD."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "rcd"
|
||||
item_state = "rcdammo"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=12000, MAT_GLASS=8000)
|
||||
var/ammoamt = 40
|
||||
|
||||
/obj/item/rcd_ammo/large
|
||||
name = "large compressed matter cartridge"
|
||||
desc = "Highly compressed matter for the RCD. Has four times the matter packed into the same space as a normal cartridge."
|
||||
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
|
||||
ammoamt = 160
|
||||
|
||||
|
||||
/obj/item/construction/rcd/combat/admin
|
||||
name = "admin RCD"
|
||||
max_matter = INFINITY
|
||||
matter = INFINITY
|
||||
upgrade = TRUE
|
||||
|
||||
// Ranged RCD
|
||||
|
||||
|
||||
/obj/item/construction/rcd/arcd
|
||||
name = "advanced rapid-construction-device (ARCD)"
|
||||
desc = "A prototype RCD with ranged capability and extended capacity. Reload with metal, plasteel, glass or compressed matter cartridges."
|
||||
max_matter = 300
|
||||
matter = 300
|
||||
delay_mod = 0.6
|
||||
ranged = TRUE
|
||||
icon_state = "arcd"
|
||||
item_state = "oldrcd"
|
||||
has_ammobar = FALSE
|
||||
|
||||
/obj/item/construction/rcd/arcd/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(!range_check(A,user))
|
||||
return
|
||||
if(target_check(A,user))
|
||||
user.Beam(A,icon_state="rped_upgrade",time=30)
|
||||
rcd_create(A,user)
|
||||
|
||||
|
||||
|
||||
// RAPID LIGHTING DEVICE
|
||||
|
||||
|
||||
|
||||
/obj/item/construction/rld
|
||||
name = "rapid-light-device (RLD)"
|
||||
desc = "A device used to rapidly provide lighting sources to an area. Reload with metal, plasteel, glass or compressed matter cartridges."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rld"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
matter = 500
|
||||
max_matter = 500
|
||||
sheetmultiplier = 16
|
||||
var/mode = LIGHT_MODE
|
||||
actions_types = list(/datum/action/item_action/pick_color)
|
||||
ammo_sections = 5
|
||||
has_ammobar = TRUE
|
||||
|
||||
var/wallcost = 10
|
||||
var/floorcost = 15
|
||||
var/launchcost = 5
|
||||
var/deconcost = 10
|
||||
|
||||
var/walldelay = 10
|
||||
var/floordelay = 10
|
||||
var/decondelay = 10
|
||||
|
||||
var/color_choice = null
|
||||
|
||||
|
||||
/obj/item/construction/rld/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/construction/rld/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
color_choice = input(user,"","Choose Color",color_choice) as color
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/construction/rld/update_icon()
|
||||
..()
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
add_overlay("rld_light[ratio]")
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
switch(mode)
|
||||
if(REMOVE_MODE)
|
||||
mode = LIGHT_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Permanent Light Construction'.</span>")
|
||||
if(LIGHT_MODE)
|
||||
mode = GLOW_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Light Launcher'.</span>")
|
||||
if(GLOW_MODE)
|
||||
mode = REMOVE_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Deconstruct'.</span>")
|
||||
|
||||
|
||||
/obj/item/construction/rld/proc/checkdupes(var/target)
|
||||
. = list()
|
||||
var/turf/checking = get_turf(target)
|
||||
for(var/obj/machinery/light/dupe in checking)
|
||||
if(istype(dupe, /obj/machinery/light))
|
||||
. |= dupe
|
||||
|
||||
|
||||
/obj/item/construction/rld/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(!range_check(A,user))
|
||||
return
|
||||
var/turf/start = get_turf(src)
|
||||
switch(mode)
|
||||
if(REMOVE_MODE)
|
||||
if(istype(A, /obj/machinery/light/))
|
||||
if(checkResource(deconcost, user))
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [A]...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, decondelay, target = A))
|
||||
if(!useResource(deconcost, user))
|
||||
return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(LIGHT_MODE)
|
||||
if(iswallturf(A))
|
||||
var/turf/closed/wall/W = A
|
||||
if(checkResource(floorcost, user))
|
||||
to_chat(user, "<span class='notice'>You start building a wall light...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 0)
|
||||
if(do_after(user, floordelay, target = A))
|
||||
if(!istype(W))
|
||||
return FALSE
|
||||
var/list/candidates = list()
|
||||
var/turf/open/winner = null
|
||||
var/winning_dist = null
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/turf/C = get_step(W, direction)
|
||||
var/list/dupes = checkdupes(C)
|
||||
if(start.CanAtmosPass(C) && !dupes.len)
|
||||
candidates += C
|
||||
if(!candidates.len)
|
||||
to_chat(user, "<span class='warning'>Valid target not found...</span>")
|
||||
playsound(src.loc, 'sound/misc/compiler-failure.ogg', 30, 1)
|
||||
return FALSE
|
||||
for(var/turf/open/O in candidates)
|
||||
if(istype(O))
|
||||
var/x0 = O.x
|
||||
var/y0 = O.y
|
||||
var/contender = cheap_hypotenuse(start.x, start.y, x0, y0)
|
||||
if(!winner)
|
||||
winner = O
|
||||
winning_dist = contender
|
||||
else
|
||||
if(contender < winning_dist) // lower is better
|
||||
winner = O
|
||||
winning_dist = contender
|
||||
activate()
|
||||
if(!useResource(wallcost, user))
|
||||
return FALSE
|
||||
var/light = get_turf(winner)
|
||||
var/align = get_dir(winner, A)
|
||||
var/obj/machinery/light/L = new /obj/machinery/light(light)
|
||||
L.setDir(align)
|
||||
L.color = color_choice
|
||||
L.light_color = L.color
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(checkResource(floorcost, user))
|
||||
to_chat(user, "<span class='notice'>You start building a floor light...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
if(do_after(user, floordelay, target = A))
|
||||
if(!istype(F))
|
||||
return 0
|
||||
if(!useResource(floorcost, user))
|
||||
return 0
|
||||
activate()
|
||||
var/destination = get_turf(A)
|
||||
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
|
||||
FL.color = color_choice
|
||||
FL.light_color = FL.color
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(GLOW_MODE)
|
||||
if(useResource(launchcost, user))
|
||||
activate()
|
||||
to_chat(user, "<span class='notice'>You fire a glowstick!</span>")
|
||||
var/obj/item/flashlight/glowstick/G = new /obj/item/flashlight/glowstick(start)
|
||||
G.color = color_choice
|
||||
G.light_color = G.color
|
||||
G.throw_at(A, 9, 3, user)
|
||||
G.on = TRUE
|
||||
G.update_brightness()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/rcd_upgrade
|
||||
name = "RCD advanced design disk"
|
||||
desc = "It contains the design for machine frames, computer frames, and deconstruction."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "datadisk3"
|
||||
|
||||
#undef GLOW_MODE
|
||||
#undef LIGHT_MODE
|
||||
#undef REMOVE_MODE
|
||||
@@ -0,0 +1,355 @@
|
||||
/obj/item/twohanded/rcl
|
||||
name = "rapid cable layer"
|
||||
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
var/obj/structure/cable/last
|
||||
var/obj/item/stack/cable_coil/loaded
|
||||
opacity = FALSE
|
||||
force = 5 //Plastic is soft
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/max_amount = 90
|
||||
var/active = FALSE
|
||||
actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui)
|
||||
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
|
||||
var/current_color_index = 1
|
||||
var/ghetto = FALSE
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
var/datum/radial_menu/persistent/wiring_gui_menu
|
||||
var/mob/listeningTo
|
||||
|
||||
/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)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
|
||||
return
|
||||
else
|
||||
loaded = W //W.loc is src at this point.
|
||||
loaded.max_amount = max_amount //We store a lot.
|
||||
return
|
||||
|
||||
if(loaded.amount < max_amount)
|
||||
var/transfer_amount = min(max_amount - loaded.amount, C.amount)
|
||||
C.use(transfer_amount)
|
||||
loaded.amount += transfer_amount
|
||||
else
|
||||
return
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(!loaded)
|
||||
return
|
||||
if(ghetto && prob(10)) //Is it a ghetto RCL? If so, give it a 10% chance to fall apart
|
||||
to_chat(user, "<span class='warning'>You attempt to loosen the securing screws on the side, but it falls apart!</span>")
|
||||
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
|
||||
var/diff = loaded.amount % 30
|
||||
if(diff)
|
||||
loaded.use(diff)
|
||||
new /obj/item/stack/cable_coil(get_turf(user), diff)
|
||||
else
|
||||
loaded.use(30)
|
||||
new /obj/item/stack/cable_coil(get_turf(user), 30)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
|
||||
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
|
||||
var/diff = loaded.amount % 30
|
||||
if(diff)
|
||||
loaded.use(diff)
|
||||
new /obj/item/stack/cable_coil(get_turf(user), diff)
|
||||
else
|
||||
loaded.use(30)
|
||||
new /obj/item/stack/cable_coil(get_turf(user), 30)
|
||||
loaded.max_amount = initial(loaded.max_amount)
|
||||
if(!user.put_in_hands(loaded))
|
||||
loaded.forceMove(get_turf(user))
|
||||
|
||||
loaded = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
/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/twohanded/rcl/Destroy()
|
||||
QDEL_NULL(loaded)
|
||||
last = null
|
||||
listeningTo = null
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-empty"
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(61 to INFINITY)
|
||||
cable_amount = 3
|
||||
if(31 to 60)
|
||||
cable_amount = 2
|
||||
if(1 to 30)
|
||||
cable_amount = 1
|
||||
else
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rcl"
|
||||
item_state = "rcl"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
if(!loaded || !loaded.amount)
|
||||
if(loud)
|
||||
to_chat(user, "<span class='notice'>The last of the cables unreel from [src].</span>")
|
||||
if(loaded)
|
||||
QDEL_NULL(loaded)
|
||||
loaded = null
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
unwield(user)
|
||||
active = wielded
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/twohanded/rcl/pickup(mob/user)
|
||||
..()
|
||||
getMobhook(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/dropped(mob/wearer)
|
||||
..()
|
||||
UnregisterSignal(wearer, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
last = null
|
||||
|
||||
/obj/item/twohanded/rcl/attack_self(mob/user)
|
||||
..()
|
||||
active = wielded
|
||||
if(!active)
|
||||
last = null
|
||||
else if(!last)
|
||||
for(var/obj/structure/cable/C in get_turf(user))
|
||||
if(C.d1 == FALSE || C.d2 == FALSE)
|
||||
last = C
|
||||
break
|
||||
|
||||
obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
if(listeningTo == to_hook)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(to_hook, COMSIG_MOVABLE_MOVED, .proc/trigger)
|
||||
listeningTo = to_hook
|
||||
|
||||
/obj/item/twohanded/rcl/proc/trigger(mob/user)
|
||||
if(active)
|
||||
layCable(user)
|
||||
if(wiring_gui_menu) //update the wire options as you move
|
||||
wiringGuiUpdate(user)
|
||||
|
||||
|
||||
//previous contents of trigger(), lays cable each time the player moves
|
||||
/obj/item/twohanded/rcl/proc/layCable(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
if(is_empty(user, 0))
|
||||
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(prob(2) && ghetto) //Give ghetto RCLs a 2% chance to jam, requiring it to be reactviated manually.
|
||||
to_chat(user, "<span class='warning'>[src]'s wires jam!</span>")
|
||||
active = FALSE
|
||||
return
|
||||
else
|
||||
if(last)
|
||||
if(get_dist(last, user) == 1) //hacky, but it works
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.intact || !T.can_have_cabling())
|
||||
last = null
|
||||
return
|
||||
if(get_dir(last, user) == last.d2)
|
||||
//Did we just walk backwards? Well, that's the one direction we CAN'T complete a stub.
|
||||
last = null
|
||||
return
|
||||
loaded.cable_join(last, user, FALSE)
|
||||
if(is_empty(user))
|
||||
return //If we've run out, display message and exit
|
||||
else
|
||||
last = null
|
||||
loaded.item_color = colors[current_color_index]
|
||||
last = loaded.place_turf(get_turf(src), user, turn(user.dir, 180))
|
||||
is_empty(user) //If we've run out, display message
|
||||
update_icon()
|
||||
|
||||
//searches the current tile for a stub cable of the same colour
|
||||
/obj/item/twohanded/rcl/proc/findLinkingCable(mob/user)
|
||||
var/turf/T
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
|
||||
T = get_turf(user)
|
||||
if(T.intact || !T.can_have_cabling())
|
||||
return
|
||||
|
||||
for(var/obj/structure/cable/C in T)
|
||||
if(!C)
|
||||
continue
|
||||
if(C.cable_color != GLOB.cable_colors[colors[current_color_index]])
|
||||
continue
|
||||
if(C.d1 == 0)
|
||||
return C
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiGenerateChoices(mob/user)
|
||||
var/fromdir = 0
|
||||
var/obj/structure/cable/linkingCable = findLinkingCable(user)
|
||||
if(linkingCable)
|
||||
fromdir = linkingCable.d2
|
||||
|
||||
var/list/wiredirs = list("1","5","4","6","2","10","8","9")
|
||||
for(var/icondir in wiredirs)
|
||||
var/dirnum = text2num(icondir)
|
||||
var/cablesuffix = "[min(fromdir,dirnum)]-[max(fromdir,dirnum)]"
|
||||
if(fromdir == dirnum) //cables can't loop back on themselves
|
||||
cablesuffix = "invalid"
|
||||
var/image/img = image(icon = 'icons/mob/radial.dmi', icon_state = "cable_[cablesuffix]")
|
||||
img.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
wiredirs[icondir] = img
|
||||
return wiredirs
|
||||
|
||||
/obj/item/twohanded/rcl/proc/showWiringGui(mob/user)
|
||||
var/list/choices = wiringGuiGenerateChoices(user)
|
||||
|
||||
wiring_gui_menu = show_radial_menu_persistent(user, src , choices, select_proc = CALLBACK(src, .proc/wiringGuiReact, user), radius = 42)
|
||||
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiUpdate(mob/user)
|
||||
if(!wiring_gui_menu)
|
||||
return
|
||||
|
||||
wiring_gui_menu.entry_animation = FALSE //stop the open anim from playing each time we update
|
||||
var/list/choices = wiringGuiGenerateChoices(user)
|
||||
|
||||
wiring_gui_menu.change_choices(choices,FALSE)
|
||||
|
||||
|
||||
//Callback used to respond to interactions with the wiring menu
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiReact(mob/living/user,choice)
|
||||
if(!choice) //close on a null choice (the center button)
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return
|
||||
|
||||
choice = text2num(choice)
|
||||
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
if(is_empty(user, 0))
|
||||
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.intact || !T.can_have_cabling())
|
||||
return
|
||||
|
||||
loaded.item_color = colors[current_color_index]
|
||||
|
||||
var/obj/structure/cable/linkingCable = findLinkingCable(user)
|
||||
if(linkingCable)
|
||||
if(choice != linkingCable.d2)
|
||||
loaded.cable_join(linkingCable, user, FALSE, choice)
|
||||
last = null
|
||||
else
|
||||
last = loaded.place_turf(get_turf(src), user, choice)
|
||||
|
||||
is_empty(user) //If we've run out, display message
|
||||
|
||||
wiringGuiUpdate(user)
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
. = ..()
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/rcl_col))
|
||||
current_color_index++;
|
||||
if (current_color_index > colors.len)
|
||||
current_color_index = 1
|
||||
var/cwname = colors[current_color_index]
|
||||
to_chat(user, "Color changed to [cwname]!")
|
||||
if(loaded)
|
||||
loaded.item_color= colors[current_color_index]
|
||||
update_icon()
|
||||
if(wiring_gui_menu)
|
||||
wiringGuiUpdate(user)
|
||||
else if(istype(action, /datum/action/item_action/rcl_gui))
|
||||
if(wiring_gui_menu) //The menu is already open, close it
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
else //open the menu
|
||||
showWiringGui(user)
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto
|
||||
actions_types = list()
|
||||
max_amount = 30
|
||||
name = "makeshift rapid cable layer"
|
||||
ghetto = TRUE
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(20 to INFINITY)
|
||||
cable_amount = 3
|
||||
if(10 to 19)
|
||||
cable_amount = 2
|
||||
if(1 to 9)
|
||||
cable_amount = 1
|
||||
else
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rclg"
|
||||
item_state = "rclg"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
#define AREA_ERRNONE 0
|
||||
#define AREA_STATION 1
|
||||
#define AREA_SPACE 2
|
||||
#define AREA_SPECIAL 3
|
||||
|
||||
/obj/item/areaeditor
|
||||
name = "area modification item"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "blueprints"
|
||||
attack_verb = list("attacked", "bapped", "hit")
|
||||
var/fluffnotice = "Nobody's gonna read this stuff!"
|
||||
var/in_use = FALSE
|
||||
|
||||
/obj/item/areaeditor/attack_self(mob/user)
|
||||
add_fingerprint(user)
|
||||
. = "<BODY><HTML><head><title>[src]</title></head> \
|
||||
<h2>[station_name()] [src.name]</h2> \
|
||||
<small>[fluffnotice]</small><hr>"
|
||||
switch(get_area_type())
|
||||
if(AREA_SPACE)
|
||||
. += "<p>According to the [src.name], you are now in an unclaimed territory.</p>"
|
||||
if(AREA_SPECIAL)
|
||||
. += "<p>This place is not noted on the [src.name].</p>"
|
||||
. += "<p><a href='?src=[REF(src)];create_area=1'>Create or modify an existing area</a></p>"
|
||||
|
||||
|
||||
/obj/item/areaeditor/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(!usr.canUseTopic(src))
|
||||
usr << browse(null, "window=blueprints")
|
||||
return TRUE
|
||||
if(href_list["create_area"])
|
||||
if(in_use)
|
||||
return
|
||||
in_use = TRUE
|
||||
create_area(usr)
|
||||
in_use = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
//Station blueprints!!!
|
||||
/obj/item/areaeditor/blueprints
|
||||
name = "station blueprints"
|
||||
desc = "Blueprints of the station. There is a \"Classified\" stamp and several coffee stains on it."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "blueprints"
|
||||
fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage."
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/list/image/showing = list()
|
||||
var/client/viewing
|
||||
var/legend = FALSE //Viewing the wire legend
|
||||
|
||||
|
||||
/obj/item/areaeditor/blueprints/Destroy()
|
||||
clear_viewer()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/areaeditor/blueprints/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(!legend)
|
||||
var/area/A = get_area(user)
|
||||
if(get_area_type() == AREA_STATION)
|
||||
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
|
||||
. += "<p><a href='?src=[REF(src)];edit_area=1'>Change area name</a></p>"
|
||||
. += "<p><a href='?src=[REF(src)];view_legend=1'>View wire colour legend</a></p>"
|
||||
if(!viewing)
|
||||
. += "<p><a href='?src=[REF(src)];view_blueprints=1'>View structural data</a></p>"
|
||||
else
|
||||
. += "<p><a href='?src=[REF(src)];refresh=1'>Refresh structural data</a></p>"
|
||||
. += "<p><a href='?src=[REF(src)];hide_blueprints=1'>Hide structural data</a></p>"
|
||||
else
|
||||
if(legend == TRUE)
|
||||
. += "<a href='?src=[REF(src)];exit_legend=1'><< Back</a>"
|
||||
. += view_wire_devices(user);
|
||||
else
|
||||
//legend is a wireset
|
||||
. += "<a href='?src=[REF(src)];view_legend=1'><< Back</a>"
|
||||
. += view_wire_set(user, legend)
|
||||
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
|
||||
popup.set_content(.)
|
||||
popup.open()
|
||||
onclose(user, "blueprints")
|
||||
|
||||
|
||||
/obj/item/areaeditor/blueprints/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["edit_area"])
|
||||
if(get_area_type()!=AREA_STATION)
|
||||
return
|
||||
if(in_use)
|
||||
return
|
||||
in_use = TRUE
|
||||
edit_area()
|
||||
in_use = FALSE
|
||||
if(href_list["exit_legend"])
|
||||
legend = FALSE;
|
||||
if(href_list["view_legend"])
|
||||
legend = TRUE;
|
||||
if(href_list["view_wireset"])
|
||||
legend = href_list["view_wireset"];
|
||||
if(href_list["view_blueprints"])
|
||||
set_viewer(usr, "<span class='notice'>You flip the blueprints over to view the complex information diagram.</span>")
|
||||
if(href_list["hide_blueprints"])
|
||||
clear_viewer(usr,"<span class='notice'>You flip the blueprints over to view the simple information diagram.</span>")
|
||||
if(href_list["refresh"])
|
||||
clear_viewer(usr)
|
||||
set_viewer(usr)
|
||||
|
||||
attack_self(usr) //this is not the proper way, but neither of the old update procs work! it's too ancient and I'm tired shush.
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/get_images(turf/T, viewsize)
|
||||
. = list()
|
||||
for(var/turf/TT in range(viewsize, T))
|
||||
if(TT.blueprint_data)
|
||||
. += TT.blueprint_data
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/set_viewer(mob/user, message = "")
|
||||
if(user && user.client)
|
||||
if(viewing)
|
||||
clear_viewer()
|
||||
viewing = user.client
|
||||
showing = get_images(get_turf(user), viewing.view)
|
||||
viewing.images |= showing
|
||||
if(message)
|
||||
to_chat(user, message)
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/clear_viewer(mob/user, message = "")
|
||||
if(viewing)
|
||||
viewing.images -= showing
|
||||
viewing = null
|
||||
showing.Cut()
|
||||
if(message)
|
||||
to_chat(user, message)
|
||||
|
||||
/obj/item/areaeditor/blueprints/dropped(mob/user)
|
||||
..()
|
||||
clear_viewer()
|
||||
legend = FALSE
|
||||
|
||||
|
||||
|
||||
/obj/item/areaeditor/proc/get_area_type(area/A)
|
||||
if(!A)
|
||||
A = get_area(usr)
|
||||
if(A.outdoors)
|
||||
return AREA_SPACE
|
||||
var/list/SPECIALS = list(
|
||||
/area/shuttle,
|
||||
/area/admin,
|
||||
/area/arrival,
|
||||
/area/centcom,
|
||||
/area/asteroid,
|
||||
/area/tdome,
|
||||
/area/wizard_station,
|
||||
/area/hilbertshotel,
|
||||
/area/hilbertshotelstorage
|
||||
)
|
||||
for (var/type in SPECIALS)
|
||||
if ( istype(A,type) )
|
||||
return AREA_SPECIAL
|
||||
return AREA_STATION
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/view_wire_devices(mob/user)
|
||||
var/message = "<br>You examine the wire legend.<br>"
|
||||
for(var/wireset in GLOB.wire_color_directory)
|
||||
message += "<br><a href='?src=[REF(src)];view_wireset=[wireset]'>[GLOB.wire_name_directory[wireset]]</a>"
|
||||
message += "</p>"
|
||||
return message
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/view_wire_set(mob/user, wireset)
|
||||
//for some reason you can't use wireset directly as a derefencer so this is the next best :/
|
||||
for(var/device in GLOB.wire_color_directory)
|
||||
if("[device]" == wireset) //I know... don't change it...
|
||||
var/message = "<p><b>[GLOB.wire_name_directory[device]]:</b>"
|
||||
for(var/Col in GLOB.wire_color_directory[device])
|
||||
var/wire_name = GLOB.wire_color_directory[device][Col]
|
||||
if(!findtext(wire_name, WIRE_DUD_PREFIX)) //don't show duds
|
||||
message += "<p><span style='color: [Col]'>[Col]</span>: [wire_name]</p>"
|
||||
message += "</p>"
|
||||
return message
|
||||
return ""
|
||||
|
||||
/obj/item/areaeditor/proc/edit_area()
|
||||
var/area/A = get_area(usr)
|
||||
var/prevname = "[A.name]"
|
||||
var/str = stripped_input(usr,"New area name:", "Area Creation", "", MAX_NAME_LEN)
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
to_chat(usr, "<span class='warning'>The given name is too long. The area's name is unchanged.</span>")
|
||||
return
|
||||
set_area_machinery_title(A,str,prevname)
|
||||
A.name = str
|
||||
if(A.firedoors)
|
||||
for(var/D in A.firedoors)
|
||||
var/obj/machinery/door/firedoor/FD = D
|
||||
FD.CalculateAffectingAreas()
|
||||
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
|
||||
log_game("[key_name(usr)] has renamed [prevname] to [str]")
|
||||
A.update_areasize()
|
||||
interact()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/areaeditor/proc/set_area_machinery_title(area/A,title,oldtitle)
|
||||
if(!oldtitle) // or replacetext goes to infinite loop
|
||||
return
|
||||
for(var/obj/machinery/airalarm/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/power/apc/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/door/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
//TODO: much much more. Unnamed airlocks, cameras, etc.
|
||||
|
||||
//Blueprint Subtypes
|
||||
|
||||
/obj/item/areaeditor/blueprints/cyborg
|
||||
name = "station schematics"
|
||||
desc = "A digital copy of the station blueprints stored in your memory."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "blueprints"
|
||||
fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station."
|
||||
@@ -0,0 +1,52 @@
|
||||
/obj/item/organ/body_egg
|
||||
name = "body egg"
|
||||
desc = "All slimy and yuck."
|
||||
icon_state = "innards"
|
||||
zone = BODY_ZONE_CHEST
|
||||
slot = "parasite_egg"
|
||||
|
||||
/obj/item/organ/body_egg/on_find(mob/living/finder)
|
||||
..()
|
||||
to_chat(finder, "<span class='warning'>You found an unknown alien organism in [owner]'s [zone]!</span>")
|
||||
|
||||
/obj/item/organ/body_egg/New(loc)
|
||||
if(iscarbon(loc))
|
||||
src.Insert(loc)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/body_egg/Insert(var/mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
..()
|
||||
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
|
||||
|
||||
/obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0)
|
||||
if(owner)
|
||||
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner)
|
||||
..()
|
||||
|
||||
/obj/item/organ/body_egg/on_death()
|
||||
. = ..()
|
||||
if(!owner)
|
||||
return
|
||||
egg_process()
|
||||
|
||||
/obj/item/organ/body_egg/on_life()
|
||||
. = ..()
|
||||
egg_process()
|
||||
|
||||
|
||||
/obj/item/organ/body_egg/proc/egg_process()
|
||||
return
|
||||
|
||||
/obj/item/organ/body_egg/proc/RefreshInfectionImage()
|
||||
RemoveInfectionImages()
|
||||
AddInfectionImages()
|
||||
|
||||
/obj/item/organ/body_egg/proc/AddInfectionImages(mob/living/carbon/C)
|
||||
return
|
||||
|
||||
/obj/item/organ/body_egg/proc/RemoveInfectionImages(mob/living/carbon/C)
|
||||
return
|
||||
@@ -0,0 +1,204 @@
|
||||
//Cardboard cutouts! They're man-shaped and can be colored with a crayon to look like a human in a certain outfit, although it's limited, discolored, and obvious to more than a cursory glance.
|
||||
/obj/item/cardboard_cutout
|
||||
name = "cardboard cutout"
|
||||
desc = "A vaguely humanoid cardboard cutout. It's completely blank."
|
||||
icon = 'icons/obj/cardboard_cutout.dmi'
|
||||
icon_state = "cutout_basic"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
resistance_flags = FLAMMABLE
|
||||
// Possible restyles for the cutout;
|
||||
// add an entry in change_appearance() if you add to here
|
||||
var/list/possible_appearances = list("Assistant", "Clown", "Mime",
|
||||
"Traitor", "Nuke Op", "Cultist", "Brass Cultist", "Clockwork Cultist",
|
||||
"Revolutionary", "Wizard", "Shadowling", "Xenomorph", "Xenomorph Maid", "Swarmer",
|
||||
"Ash Walker", "Deathsquad Officer", "Ian", "Slaughter Demon",
|
||||
"Laughter Demon", "Private Security Officer", "Securitron", "Gondola", "Monkey")
|
||||
var/pushed_over = FALSE //If the cutout is pushed over and has to be righted
|
||||
var/deceptive = FALSE //If the cutout actually appears as what it portray and not a discolored version
|
||||
|
||||
var/lastattacker = null
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
|
||||
if(user.a_intent == INTENT_HELP || pushed_over)
|
||||
return ..()
|
||||
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
push_over()
|
||||
|
||||
/obj/item/cardboard_cutout/proc/push_over()
|
||||
name = initial(name)
|
||||
desc = "[initial(desc)] It's been pushed over."
|
||||
icon = initial(icon)
|
||||
icon_state = "cutout_pushed_over"
|
||||
remove_atom_colour(FIXED_COLOUR_PRIORITY)
|
||||
alpha = initial(alpha)
|
||||
pushed_over = TRUE
|
||||
|
||||
/obj/item/cardboard_cutout/attack_self(mob/living/user)
|
||||
if(!pushed_over)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You right [src].</span>")
|
||||
desc = initial(desc)
|
||||
icon = initial(icon)
|
||||
icon_state = initial(icon_state) //This resets a cutout to its blank state - this is intentional to allow for resetting
|
||||
pushed_over = FALSE
|
||||
|
||||
/obj/item/cardboard_cutout/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
change_appearance(I, user)
|
||||
return
|
||||
// Why yes, this does closely resemble mob and object attack code.
|
||||
if(I.item_flags & NOBLUDGEON)
|
||||
return
|
||||
if(!I.force)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)
|
||||
else if(I.hitsound)
|
||||
playsound(loc, I.hitsound, get_clamped_volume(), 1, -1)
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
|
||||
if(I.force)
|
||||
user.visible_message("<span class='danger'>[user] has hit \
|
||||
[src] with [I]!</span>", "<span class='danger'>You hit [src] \
|
||||
with [I]!</span>")
|
||||
|
||||
if(prob(I.force))
|
||||
push_over()
|
||||
|
||||
/obj/item/cardboard_cutout/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/bullet/reusable))
|
||||
P.on_hit(src, 0)
|
||||
visible_message("<span class='danger'>[src] has been hit by [P]!</span>")
|
||||
playsound(src, 'sound/weapons/slice.ogg', 50, 1)
|
||||
if(prob(P.damage))
|
||||
push_over()
|
||||
|
||||
/obj/item/cardboard_cutout/proc/change_appearance(obj/item/toy/crayon/crayon, mob/living/user)
|
||||
if(!crayon || !user)
|
||||
return
|
||||
if(pushed_over)
|
||||
to_chat(user, "<span class='warning'>Right [src] first!</span>")
|
||||
return
|
||||
if(crayon.check_empty(user))
|
||||
return
|
||||
if(crayon.is_capped)
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return
|
||||
var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
|
||||
if(!new_appearance || !crayon || !user.canUseTopic(src))
|
||||
return
|
||||
if(!do_after(user, 10, FALSE, src, TRUE))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] gives [src] a new look.</span>", "<span class='notice'>Voila! You give [src] a new look.</span>")
|
||||
crayon.use_charges(1)
|
||||
crayon.check_empty(user)
|
||||
alpha = 255
|
||||
icon = initial(icon)
|
||||
if(!deceptive)
|
||||
add_atom_colour("#FFD7A7", FIXED_COLOUR_PRIORITY)
|
||||
switch(new_appearance)
|
||||
if("Assistant")
|
||||
name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
|
||||
desc = "A cardboat cutout of an assistant."
|
||||
icon_state = "cutout_greytide"
|
||||
if("Clown")
|
||||
name = pick(GLOB.clown_names)
|
||||
desc = "A cardboard cutout of a clown. You get the feeling that it should be in a corner."
|
||||
icon_state = "cutout_clown"
|
||||
if("Mime")
|
||||
name = pick(GLOB.mime_names)
|
||||
desc = "...(A cardboard cutout of a mime.)"
|
||||
icon_state = "cutout_mime"
|
||||
if("Traitor")
|
||||
name = "[pick("Unknown", "Captain")]"
|
||||
desc = "A cardboard cutout of a traitor."
|
||||
icon_state = "cutout_traitor"
|
||||
if("Nuke Op")
|
||||
name = "[pick("Unknown", "COMMS", "Telecomms", "AI", "stealthy op", "STEALTH", "sneakybeaky", "MEDIC", "Medic")]"
|
||||
desc = "A cardboard cutout of a nuclear operative."
|
||||
icon_state = "cutout_fluke"
|
||||
if("Cultist")
|
||||
name = "Unknown"
|
||||
desc = "A cardboard cutout of a cultist."
|
||||
icon_state = "cutout_cultist"
|
||||
if("Brass Cultist")
|
||||
name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
|
||||
desc = "A cardboard cutout of a \"servant\" of Ratvar."
|
||||
icon_state = "cutout_servant"
|
||||
if("Clockwork Cultist")
|
||||
name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
|
||||
desc = "A cardboard cutout of a servant of Ratvar."
|
||||
icon_state = "cutout_new_servant"
|
||||
if("Revolutionary")
|
||||
name = "Unknown"
|
||||
desc = "A cardboard cutout of a revolutionary."
|
||||
icon_state = "cutout_viva"
|
||||
if("Wizard")
|
||||
name = "[pick(GLOB.wizard_first)], [pick(GLOB.wizard_second)]"
|
||||
desc = "A cardboard cutout of a wizard."
|
||||
icon_state = "cutout_wizard"
|
||||
if("Shadowling")
|
||||
name = "Unknown"
|
||||
desc = "A cardboard cutout of a shadowling."
|
||||
icon_state = "cutout_shadowling"
|
||||
if("Xenomorph")
|
||||
name = "alien hunter ([rand(1, 999)])"
|
||||
desc = "A cardboard cutout of a xenomorph."
|
||||
icon_state = "cutout_fukken_xeno"
|
||||
if(prob(25))
|
||||
alpha = 75 //Spooky sneaking!
|
||||
if("Xenomorph Maid")
|
||||
name = "lusty xenomorph maid ([rand(1, 999)])"
|
||||
desc = "A cardboard cutout of a xenomorph maid."
|
||||
icon_state = "cutout_lusty"
|
||||
if("Swarmer")
|
||||
name = "Swarmer ([rand(1, 999)])"
|
||||
desc = "A cardboard cutout of a swarmer."
|
||||
icon_state = "cutout_swarmer"
|
||||
if("Ash Walker")
|
||||
name = lizard_name(pick(MALE, FEMALE))
|
||||
desc = "A cardboard cutout of an ash walker."
|
||||
icon_state = "cutout_free_antag"
|
||||
if("Deathsquad Officer")
|
||||
name = pick(GLOB.commando_names)
|
||||
desc = "A cardboard cutout of a death commando."
|
||||
icon_state = "cutout_deathsquad"
|
||||
if("Ian")
|
||||
name = "Ian"
|
||||
desc = "A cardboard cutout of the HoP's beloved corgi."
|
||||
icon_state = "cutout_ian"
|
||||
if("Slaughter Demon")
|
||||
name = "slaughter demon"
|
||||
desc = "A cardboard cutout of a slaughter demon."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "daemon"
|
||||
if("Laughter Demon")
|
||||
name = "laughter demon"
|
||||
desc = "A cardboard cutout of a laughter demon."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "bowmon"
|
||||
if("Private Security Officer")
|
||||
name = "Private Security Officer"
|
||||
desc = "A cardboard cutout of a private security officer."
|
||||
icon_state = "cutout_ntsec"
|
||||
if("Securitron")
|
||||
name = "[pick("Officer", "Oftiser", "Sergeant", "General")][pick(" Genesky", " Pingsky", " Beepsky", " Pipsqueak", "-at-Armsky")]"
|
||||
desc = "A cardboard cutout of a securitron."
|
||||
icon_state = "cutout_law"
|
||||
if("Gondola")
|
||||
name = "gondola"
|
||||
desc = "A cardboard cutout of a gondola."
|
||||
icon_state = "cutout_gondola"
|
||||
if("Monkey")
|
||||
name = "monkey ([rand(1, 999)])"
|
||||
desc = "A cardboard cutout of a monkey."
|
||||
icon_state = "cutout_monky"
|
||||
return 1
|
||||
|
||||
/obj/item/cardboard_cutout/setDir(newdir)
|
||||
dir = SOUTH
|
||||
|
||||
/obj/item/cardboard_cutout/adaptive //Purchased by Syndicate agents, these cutouts are indistinguishable from normal cutouts but aren't discolored when their appearance is changed
|
||||
deceptive = TRUE
|
||||
@@ -0,0 +1,274 @@
|
||||
#define CHRONO_BEAM_RANGE 3
|
||||
#define CHRONO_FRAME_COUNT 22
|
||||
/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'
|
||||
icon_state = "chronobackpack"
|
||||
item_state = "backpack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
slowdown = 1
|
||||
actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun)
|
||||
var/obj/item/gun/energy/chrono_gun/PA = null
|
||||
var/list/erased_minds = list() //a collection of minds from the dead
|
||||
|
||||
/obj/item/chrono_eraser/proc/pass_mind(datum/mind/M)
|
||||
erased_minds += M
|
||||
|
||||
/obj/item/chrono_eraser/dropped()
|
||||
..()
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
|
||||
/obj/item/chrono_eraser/Destroy()
|
||||
dropped()
|
||||
return ..()
|
||||
|
||||
/obj/item/chrono_eraser/ui_action_click(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.back == src)
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
else
|
||||
PA = new(src)
|
||||
user.put_in_hands(PA)
|
||||
|
||||
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BACK)
|
||||
return 1
|
||||
|
||||
/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'
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
item_flags = DROPDEL
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam)
|
||||
can_charge = 0
|
||||
fire_delay = 50
|
||||
var/obj/item/chrono_eraser/TED = null
|
||||
var/obj/effect/chrono_field/field = null
|
||||
var/turf/startpos = null
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, CHRONO_GUN_TRAIT)
|
||||
if(istype(loc, /obj/item/chrono_eraser))
|
||||
TED = loc
|
||||
else //admin must have spawned it
|
||||
TED = new(src.loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(field)
|
||||
field_disconnect(field)
|
||||
..()
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/Destroy()
|
||||
if(TED)
|
||||
TED.PA = null
|
||||
TED = null
|
||||
if(field)
|
||||
field_disconnect(field)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/proc/field_connect(obj/effect/chrono_field/F)
|
||||
var/mob/living/user = src.loc
|
||||
if(F.gun)
|
||||
if(isliving(user) && F.captured)
|
||||
to_chat(user, "<span class='alert'><b>FAIL: <i>[F.captured]</i> already has an existing connection.</b></span>")
|
||||
src.field_disconnect(F)
|
||||
else
|
||||
startpos = get_turf(src)
|
||||
field = F
|
||||
F.gun = src
|
||||
if(isliving(user) && F.captured)
|
||||
to_chat(user, "<span class='notice'>Connection established with target: <b>[F.captured]</b></span>")
|
||||
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/proc/field_disconnect(obj/effect/chrono_field/F)
|
||||
if(F && field == F)
|
||||
var/mob/living/user = src.loc
|
||||
if(F.gun == src)
|
||||
F.gun = null
|
||||
if(isliving(user) && F.captured)
|
||||
to_chat(user, "<span class='alert'>Disconnected from target: <b>[F.captured]</b></span>")
|
||||
field = null
|
||||
startpos = null
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/proc/field_check(obj/effect/chrono_field/F)
|
||||
if(F)
|
||||
if(field == F)
|
||||
var/turf/currentpos = get_turf(src)
|
||||
var/mob/living/user = src.loc
|
||||
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
|
||||
return 1
|
||||
field_disconnect(F)
|
||||
return 0
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/proc/pass_mind(datum/mind/M)
|
||||
if(TED)
|
||||
TED.pass_mind(M)
|
||||
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam
|
||||
name = "eradication beam"
|
||||
icon_state = "chronobolt"
|
||||
range = CHRONO_BEAM_RANGE
|
||||
nodamage = 1
|
||||
var/obj/item/gun/energy/chrono_gun/gun = null
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/ammo_casing/energy/chrono_beam/C = loc
|
||||
if(istype(C))
|
||||
gun = C.gun
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/on_hit(atom/target)
|
||||
if(target && gun && isliving(target))
|
||||
var/obj/effect/chrono_field/F = new(target.loc, target, gun)
|
||||
gun.field_connect(F)
|
||||
|
||||
|
||||
/obj/item/ammo_casing/energy/chrono_beam
|
||||
name = "eradication beam"
|
||||
projectile_type = /obj/item/projectile/energy/chrono_beam
|
||||
icon_state = "chronobolt"
|
||||
e_cost = 0
|
||||
var/obj/item/gun/energy/chrono_gun/gun
|
||||
|
||||
/obj/item/ammo_casing/energy/chrono_beam/Initialize()
|
||||
if(istype(loc))
|
||||
gun = loc
|
||||
. = ..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/effect/chrono_field
|
||||
name = "eradication field"
|
||||
desc = "An aura of time-bluespace energy."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "chronofield"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
var/mob/living/captured = null
|
||||
var/obj/item/gun/energy/chrono_gun/gun = null
|
||||
var/tickstokill = 15
|
||||
var/mutable_appearance/mob_underlay
|
||||
var/preloaded = 0
|
||||
var/RPpos = null
|
||||
|
||||
/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/gun/energy/chrono_gun/G)
|
||||
if(target && isliving(target) && G)
|
||||
target.forceMove(src)
|
||||
src.captured = target
|
||||
var/icon/mob_snapshot = getFlatIcon(target)
|
||||
var/icon/cached_icon = new()
|
||||
|
||||
for(var/i=1, i<=CHRONO_FRAME_COUNT, i++)
|
||||
var/icon/removing_frame = icon('icons/obj/chronos.dmi', "erasing", SOUTH, i)
|
||||
var/icon/mob_icon = icon(mob_snapshot)
|
||||
mob_icon.Blend(removing_frame, ICON_MULTIPLY)
|
||||
cached_icon.Insert(mob_icon, "frame[i]")
|
||||
|
||||
mob_underlay = mutable_appearance(cached_icon, "frame1")
|
||||
update_icon()
|
||||
|
||||
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/chrono_field/Destroy()
|
||||
if(gun && gun.field_check(src))
|
||||
gun.field_disconnect(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/chrono_field/update_icon()
|
||||
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
|
||||
ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
RPpos = ttk_frame
|
||||
mob_underlay.icon_state = "frame[RPpos]"
|
||||
underlays = list() //hack: BYOND refuses to update the underlay to match the icon_state otherwise
|
||||
underlays += mob_underlay
|
||||
|
||||
/obj/effect/chrono_field/process()
|
||||
if(captured)
|
||||
if(tickstokill > initial(tickstokill))
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(drop_location())
|
||||
qdel(src)
|
||||
else if(tickstokill <= 0)
|
||||
to_chat(captured, "<span class='boldnotice'>As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...</span>")
|
||||
var/mob/dead/observer/ghost = captured.ghostize(1)
|
||||
if(captured.mind)
|
||||
if(ghost)
|
||||
ghost.mind = null
|
||||
if(gun)
|
||||
gun.pass_mind(captured.mind)
|
||||
qdel(captured)
|
||||
qdel(src)
|
||||
else
|
||||
captured.Unconscious(80)
|
||||
if(captured.loc != src)
|
||||
captured.forceMove(src)
|
||||
update_icon()
|
||||
if(gun)
|
||||
if(gun.field_check(src))
|
||||
tickstokill--
|
||||
else
|
||||
gun = null
|
||||
return .()
|
||||
else
|
||||
tickstokill++
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/chrono_field/bullet_act(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/gun/energy/chrono_gun/Pgun = beam.gun
|
||||
if(Pgun && istype(Pgun))
|
||||
Pgun.field_connect(src)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/effect/chrono_field/assume_air()
|
||||
return 0
|
||||
|
||||
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
|
||||
var/datum/gas_mixture/GM = new
|
||||
GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
|
||||
GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
|
||||
GM.temperature = T20C
|
||||
return GM
|
||||
|
||||
/obj/effect/chrono_field/Move()
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
|
||||
#undef CHRONO_BEAM_RANGE
|
||||
#undef CHRONO_FRAME_COUNT
|
||||
@@ -0,0 +1,994 @@
|
||||
/obj/item/circuitboard/machine/sleeper
|
||||
name = "Sleeper (Machine Board)"
|
||||
build_path = /obj/machinery/sleeper
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/vr_sleeper
|
||||
name = "VR Sleeper (Machine Board)"
|
||||
build_path = /obj/machinery/vr_sleeper
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stack/sheet/glass = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/announcement_system
|
||||
name = "Announcement System (Machine Board)"
|
||||
build_path = /obj/machinery/announcement_system
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/autolathe
|
||||
name = "Autolathe (Machine Board)"
|
||||
build_path = /obj/machinery/autolathe
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 3,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/bloodbankgen
|
||||
name = "Blood Bank Generator (Machine Board)"
|
||||
build_path = /obj/machinery/bloodbankgen
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/clonepod
|
||||
name = "Clone Pod (Machine Board)"
|
||||
build_path = /obj/machinery/clonepod
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/clonepod/experimental
|
||||
name = "Experimental Clone Pod (Machine Board)"
|
||||
build_path = /obj/machinery/clonepod/experimental
|
||||
|
||||
/obj/item/circuitboard/machine/abductor
|
||||
name = "alien board (Report This)"
|
||||
icon_state = "abductor_mod"
|
||||
|
||||
/obj/item/circuitboard/machine/clockwork
|
||||
name = "clockwork board (Report This)"
|
||||
icon_state = "clock_mod"
|
||||
|
||||
/obj/item/circuitboard/machine/clonescanner
|
||||
name = "Cloning Scanner (Machine Board)"
|
||||
build_path = /obj/machinery/dna_scannernew
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/holopad
|
||||
name = "AI Holopad (Machine Board)"
|
||||
build_path = /obj/machinery/holopad
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE //wew lad
|
||||
|
||||
/obj/item/circuitboard/machine/launchpad
|
||||
name = "Bluespace Launchpad (Machine Board)"
|
||||
build_path = /obj/machinery/launchpad
|
||||
req_components = list(
|
||||
/obj/item/stack/ore/bluespace_crystal = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
|
||||
|
||||
/obj/item/circuitboard/machine/limbgrower
|
||||
name = "Limb Grower (Machine Board)"
|
||||
build_path = /obj/machinery/limbgrower
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 2,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/quantumpad
|
||||
name = "Quantum Pad (Machine Board)"
|
||||
build_path = /obj/machinery/quantumpad
|
||||
req_components = list(
|
||||
/obj/item/stack/ore/bluespace_crystal = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1)
|
||||
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
|
||||
|
||||
/obj/item/circuitboard/machine/recharger
|
||||
name = "Weapon Recharger (Machine Board)"
|
||||
build_path = /obj/machinery/recharger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/cell_charger
|
||||
name = "Cell Charger (Machine Board)"
|
||||
build_path = /obj/machinery/cell_charger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/cyborgrecharger
|
||||
name = "Cyborg Recharger (Machine Board)"
|
||||
build_path = /obj/machinery/recharge_station
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/cell = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high)
|
||||
|
||||
/obj/item/circuitboard/machine/recycler
|
||||
name = "Recycler (Machine Board)"
|
||||
build_path = /obj/machinery/recycler
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/space_heater
|
||||
name = "Space Heater (Machine Board)"
|
||||
build_path = /obj/machinery/space_heater
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 3)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/broadcaster
|
||||
name = "Subspace Broadcaster (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/broadcaster
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/micro_laser = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/bus
|
||||
name = "Bus Mainframe (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/bus
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/hub
|
||||
name = "Hub Mainframe (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/hub
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/processor
|
||||
name = "Processor Unit (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/processor
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 3,
|
||||
/obj/item/stock_parts/subspace/filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/receiver
|
||||
name = "Subspace Receiver (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/receiver
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/relay
|
||||
name = "Relay Mainframe (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/relay
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/telecomms/server
|
||||
name = "Telecommunication Server (Machine Board)"
|
||||
build_path = /obj/machinery/telecomms/server
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/teleporter_hub
|
||||
name = "Teleporter Hub (Machine Board)"
|
||||
build_path = /obj/machinery/teleport/hub
|
||||
req_components = list(
|
||||
/obj/item/stack/ore/bluespace_crystal = 3,
|
||||
/obj/item/stock_parts/matter_bin = 1)
|
||||
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
|
||||
|
||||
/obj/item/circuitboard/machine/teleporter_station
|
||||
name = "Teleporter Station (Machine Board)"
|
||||
build_path = /obj/machinery/teleport/station
|
||||
req_components = list(
|
||||
/obj/item/stack/ore/bluespace_crystal = 2,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
|
||||
|
||||
/obj/item/circuitboard/machine/vendor
|
||||
name = "Booze-O-Mat Vendor (Machine Board)"
|
||||
desc = "You can turn the \"brand selection\" dial using a screwdriver."
|
||||
build_path = /obj/machinery/vending/boozeomat
|
||||
req_components = list(/obj/item/vending_refill/boozeomat = 1)
|
||||
|
||||
var/static/list/vending_names_paths = list(
|
||||
/obj/machinery/vending/boozeomat = "Booze-O-Mat",
|
||||
/obj/machinery/vending/coffee = "Solar's Best Hot Drinks",
|
||||
/obj/machinery/vending/snack = "Getmore Chocolate Corp",
|
||||
/obj/machinery/vending/cola = "Robust Softdrinks",
|
||||
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
|
||||
/obj/machinery/vending/games = "\improper Good Clean Fun",
|
||||
/obj/machinery/vending/autodrobe = "AutoDrobe",
|
||||
/obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe",
|
||||
/obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe",
|
||||
/obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe",
|
||||
/obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe",
|
||||
/obj/machinery/vending/wardrobe/cargo_wardrobe = "CargoDrobe",
|
||||
/obj/machinery/vending/wardrobe/robo_wardrobe = "RoboDrobe",
|
||||
/obj/machinery/vending/wardrobe/science_wardrobe = "SciDrobe",
|
||||
/obj/machinery/vending/wardrobe/hydro_wardrobe = "HyDrobe",
|
||||
/obj/machinery/vending/wardrobe/curator_wardrobe = "CuraDrobe",
|
||||
/obj/machinery/vending/wardrobe/bar_wardrobe = "BarDrobe",
|
||||
/obj/machinery/vending/wardrobe/chef_wardrobe = "ChefDrobe",
|
||||
/obj/machinery/vending/wardrobe/jani_wardrobe = "JaniDrobe",
|
||||
/obj/machinery/vending/wardrobe/law_wardrobe = "LawDrobe",
|
||||
/obj/machinery/vending/wardrobe/chap_wardrobe = "ChapDrobe",
|
||||
/obj/machinery/vending/wardrobe/chem_wardrobe = "ChemDrobe",
|
||||
/obj/machinery/vending/wardrobe/gene_wardrobe = "GeneDrobe",
|
||||
/obj/machinery/vending/wardrobe/viro_wardrobe = "ViroDrobe",
|
||||
/obj/machinery/vending/clothing = "ClothesMate",
|
||||
/obj/machinery/vending/medical = "NanoMed Plus",
|
||||
/obj/machinery/vending/wallmed = "NanoMed")
|
||||
|
||||
/obj/item/circuitboard/machine/vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/position = vending_names_paths.Find(build_path)
|
||||
position = (position == vending_names_paths.len) ? 1 : (position + 1)
|
||||
var/typepath = vending_names_paths[position]
|
||||
|
||||
to_chat(user, "<span class='notice'>You set the board to \"[vending_names_paths[typepath]]\".</span>")
|
||||
set_type(typepath)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/vendor/proc/set_type(obj/machinery/vending/typepath)
|
||||
build_path = typepath
|
||||
name = "[vending_names_paths[build_path]] Vendor (Machine Board)"
|
||||
req_components = list(initial(typepath.refill_canister) = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/vendor/apply_default_parts(obj/machinery/M)
|
||||
for(var/typepath in vending_names_paths)
|
||||
if(istype(M, typepath))
|
||||
set_type(typepath)
|
||||
break
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/mech_recharger
|
||||
name = "Mechbay Recharger (Machine Board)"
|
||||
build_path = /obj/machinery/mech_bay_recharge_port
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/capacitor = 5)
|
||||
|
||||
/obj/item/circuitboard/machine/mechfab
|
||||
name = "Exosuit Fabricator (Machine Board)"
|
||||
build_path = /obj/machinery/mecha_part_fabricator
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cryo_tube
|
||||
name = "Cryotube (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/unary/cryo_cell
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 4)
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine
|
||||
name = "Thermomachine (Machine Board)"
|
||||
desc = "You can use a screwdriver to switch between heater and freezer."
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
#define PATH_FREEZER /obj/machinery/atmospherics/components/unary/thermomachine/freezer
|
||||
#define PATH_HEATER /obj/machinery/atmospherics/components/unary/thermomachine/heater
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/Initialize()
|
||||
. = ..()
|
||||
if(!build_path)
|
||||
if(prob(50))
|
||||
name = "Freezer (Machine Board)"
|
||||
build_path = PATH_FREEZER
|
||||
else
|
||||
name = "Heater (Machine Board)"
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
if(PATH_FREEZER)
|
||||
new_type = /obj/item/circuitboard/machine/thermomachine/heater
|
||||
new_setting = "Heater"
|
||||
if(PATH_HEATER)
|
||||
new_type = /obj/item/circuitboard/machine/thermomachine/freezer
|
||||
new_setting = "Freezer"
|
||||
name = initial(new_type.name)
|
||||
build_path = initial(new_type.build_path)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/heater
|
||||
name = "Heater (Machine Board)"
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/freezer
|
||||
name = "Freezer (Machine Board)"
|
||||
build_path = PATH_FREEZER
|
||||
|
||||
#undef PATH_FREEZER
|
||||
#undef PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/deep_fryer
|
||||
name = "circuit board (Deep Fryer)"
|
||||
build_path = /obj/machinery/deepfryer
|
||||
req_components = list(/obj/item/stock_parts/micro_laser = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/gibber
|
||||
name = "Gibber (Machine Board)"
|
||||
build_path = /obj/machinery/gibber
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/monkey_recycler
|
||||
name = "Monkey Recycler (Machine Board)"
|
||||
build_path = /obj/machinery/monkey_recycler
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/processor
|
||||
name = "Food Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/processor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(build_path == /obj/machinery/processor)
|
||||
name = "Slime Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor/slime
|
||||
to_chat(user, "<span class='notice'>Name protocols successfully updated.</span>")
|
||||
else
|
||||
name = "Food Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor
|
||||
to_chat(user, "<span class='notice'>Defaulting name protocols.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/processor/slime
|
||||
name = "Slime Processor (Machine Board)"
|
||||
build_path = /obj/machinery/processor/slime
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge
|
||||
name = "Smartfridge (Machine Board)"
|
||||
build_path = /obj/machinery/smartfridge
|
||||
req_components = list(/obj/item/stock_parts/matter_bin = 1)
|
||||
var/static/list/fridges_name_paths = list(/obj/machinery/smartfridge = "plant produce",
|
||||
/obj/machinery/smartfridge/food = "food",
|
||||
/obj/machinery/smartfridge/drinks = "drinks",
|
||||
/obj/machinery/smartfridge/extract = "slimes",
|
||||
/obj/machinery/smartfridge/organ = "organs",
|
||||
/obj/machinery/smartfridge/chemistry = "chems",
|
||||
/obj/machinery/smartfridge/chemistry/virology = "viruses",
|
||||
/obj/machinery/smartfridge/disks = "disks")
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge/Initialize(mapload, new_type)
|
||||
if(new_type)
|
||||
build_path = new_type
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/position = fridges_name_paths.Find(build_path, fridges_name_paths)
|
||||
position = (position == fridges_name_paths.len) ? 1 : (position + 1)
|
||||
build_path = fridges_name_paths[position]
|
||||
to_chat(user, "<span class='notice'>You set the board to [fridges_name_paths[build_path]].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/smartfridge/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='info'>[src] is set to [fridges_name_paths[build_path]]. You can use a screwdriver to reconfigure it.</span>")
|
||||
|
||||
/obj/item/circuitboard/machine/biogenerator
|
||||
name = "Biogenerator (Machine Board)"
|
||||
build_path = /obj/machinery/biogenerator
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/plantgenes
|
||||
name = "Plant DNA Manipulator (Machine Board)"
|
||||
build_path = /obj/machinery/plantgenes
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/plantgenes/vault
|
||||
name = "alien board (Plant DNA Manipulator)"
|
||||
icon_state = "abductor_mod"
|
||||
// It wasn't made by actual abductors race, so no abductor tech here.
|
||||
def_components = list(
|
||||
/obj/item/stock_parts/manipulator = /obj/item/stock_parts/manipulator/femto,
|
||||
/obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra,
|
||||
/obj/item/stock_parts/scanning_module = /obj/item/stock_parts/scanning_module/triphasic)
|
||||
|
||||
|
||||
/obj/item/circuitboard/machine/hydroponics
|
||||
name = "Hydroponics Tray (Machine Board)"
|
||||
build_path = /obj/machinery/hydroponics/constructable
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/seed_extractor
|
||||
name = "Seed Extractor (Machine Board)"
|
||||
build_path = /obj/machinery/seed_extractor
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/ore_redemption
|
||||
name = "Ore Redemption (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/ore_redemption
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/assembly/igniter = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/mining_equipment_vendor
|
||||
name = "Mining Equipment Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/equipment_vendor
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/matter_bin = 3)
|
||||
|
||||
/obj/item/circuitboard/machine/mining_equipment_vendor/golem
|
||||
name = "Golem Ship Equipment Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/equipment_vendor/golem
|
||||
|
||||
/obj/item/circuitboard/machine/ntnet_relay
|
||||
name = "NTNet Relay (Machine Board)"
|
||||
build_path = /obj/machinery/ntnet_relay
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/pacman
|
||||
name = "PACMAN-type Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/port_gen/pacman
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/pacman/super
|
||||
name = "SUPERPACMAN-type Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/port_gen/pacman/super
|
||||
|
||||
/obj/item/circuitboard/machine/pacman/mrs
|
||||
name = "MRSPACMAN-type Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/port_gen/pacman/mrs
|
||||
|
||||
/obj/item/circuitboard/machine/rtg
|
||||
name = "RTG (Machine Board)"
|
||||
build_path = /obj/machinery/power/rtg
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/sheet/mineral/uranium = 10) // We have no Pu-238, and this is the closest thing to it.
|
||||
|
||||
/obj/item/circuitboard/machine/rtg/advanced
|
||||
name = "Advanced RTG (Machine Board)"
|
||||
build_path = /obj/machinery/power/rtg/advanced
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/mineral/uranium = 10,
|
||||
/obj/item/stack/sheet/mineral/plasma = 5)
|
||||
|
||||
/obj/item/circuitboard/machine/abductor/core
|
||||
name = "alien board (Void Core)"
|
||||
build_path = /obj/machinery/power/rtg/abductor
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/cell/infinite/abductor = 1)
|
||||
def_components = list(
|
||||
/obj/item/stock_parts/capacitor = /obj/item/stock_parts/capacitor/quadratic,
|
||||
/obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra)
|
||||
|
||||
/obj/item/circuitboard/machine/emitter
|
||||
name = "Emitter (Machine Board)"
|
||||
build_path = /obj/machinery/power/emitter
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/smes
|
||||
name = "SMES (Machine Board)"
|
||||
build_path = /obj/machinery/power/smes
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/cell = 5,
|
||||
/obj/item/stock_parts/capacitor = 1)
|
||||
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high/empty)
|
||||
|
||||
/obj/item/circuitboard/machine/rad_collector
|
||||
name = "Radiation Collector (Machine Board)"
|
||||
build_path = /obj/machinery/power/rad_collector
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/sheet/plasmarglass = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil
|
||||
name = "Tesla Controller (Machine Board)"
|
||||
desc = "You can use a screwdriver to switch between Research and Power Generation."
|
||||
build_path = /obj/machinery/power/tesla_coil
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
#define PATH_POWERCOIL /obj/machinery/power/tesla_coil/power
|
||||
#define PATH_RPCOIL /obj/machinery/power/tesla_coil/research
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/Initialize()
|
||||
. = ..()
|
||||
if(build_path)
|
||||
build_path = PATH_POWERCOIL
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
if(PATH_POWERCOIL)
|
||||
new_type = /obj/item/circuitboard/machine/tesla_coil/research
|
||||
new_setting = "Research"
|
||||
if(PATH_RPCOIL)
|
||||
new_type = /obj/item/circuitboard/machine/tesla_coil/power
|
||||
new_setting = "Power"
|
||||
name = initial(new_type.name)
|
||||
build_path = initial(new_type.build_path)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/power
|
||||
name = "Tesla Coil (Machine Board)"
|
||||
build_path = PATH_POWERCOIL
|
||||
|
||||
/obj/item/circuitboard/machine/tesla_coil/research
|
||||
name = "Tesla Corona Researcher (Machine Board)"
|
||||
build_path = PATH_RPCOIL
|
||||
|
||||
#undef PATH_POWERCOIL
|
||||
#undef PATH_RPCOIL
|
||||
|
||||
/obj/item/circuitboard/machine/grounding_rod
|
||||
name = "Grounding Rod (Machine Board)"
|
||||
build_path = /obj/machinery/power/grounding_rod
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/power_compressor
|
||||
name = "Power Compressor (Machine Board)"
|
||||
build_path = /obj/machinery/power/compressor
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/manipulator = 6)
|
||||
|
||||
/obj/item/circuitboard/machine/power_turbine
|
||||
name = "Power Turbine (Machine Board)"
|
||||
build_path = /obj/machinery/power/turbine
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 6)
|
||||
|
||||
/obj/item/circuitboard/machine/chem_dispenser
|
||||
name = "Chem Dispenser (Machine Board)"
|
||||
build_path = /obj/machinery/chem_dispenser
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/cell = 1)
|
||||
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks
|
||||
name = "Soda Dispenser (Machine Board)"
|
||||
build_path = /obj/machinery/chem_dispenser/drinks
|
||||
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks/beer
|
||||
name = "Booze Dispenser (Machine Board)"
|
||||
build_path = /obj/machinery/chem_dispenser/drinks/beer
|
||||
|
||||
/obj/item/circuitboard/machine/smoke_machine
|
||||
name = "Smoke Machine (Machine Board)"
|
||||
build_path = /obj/machinery/smoke_machine
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/cell = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_heater
|
||||
name = "Chemical Heater (Machine Board)"
|
||||
build_path = /obj/machinery/chem_heater
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master
|
||||
name = "ChemMaster 3000 (Machine Board)"
|
||||
build_path = /obj/machinery/chem_master
|
||||
desc = "You can turn the \"mode selection\" dial using a screwdriver."
|
||||
req_components = list(
|
||||
/obj/item/reagent_containers/glass/beaker = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/new_name = "ChemMaster"
|
||||
var/new_path = /obj/machinery/chem_master
|
||||
|
||||
if(build_path == /obj/machinery/chem_master)
|
||||
new_name = "CondiMaster"
|
||||
new_path = /obj/machinery/chem_master/condimaster
|
||||
|
||||
build_path = new_path
|
||||
name = "[new_name] 3000 (Machine Board)"
|
||||
to_chat(user, "<span class='notice'>You change the circuit board setting to \"[new_name]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/reagentgrinder
|
||||
name = "Machine Design (All-In-One Grinder)"
|
||||
build_path = /obj/machinery/reagentgrinder/constructed
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/condi
|
||||
name = "CondiMaster 3000 (Machine Board)"
|
||||
build_path = /obj/machinery/chem_master/condimaster
|
||||
|
||||
/obj/item/circuitboard/machine/circuit_imprinter
|
||||
name = "Circuit Imprinter (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/circuit_imprinter
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/department
|
||||
name = "Departmental Circuit Imprinter (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/circuit_imprinter/department
|
||||
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/department/science
|
||||
name = "Departmental Circuit Imprinter - Science (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/circuit_imprinter/department/science
|
||||
|
||||
/obj/item/circuitboard/machine/destructive_analyzer
|
||||
name = "Destructive Analyzer (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/destructive_analyzer
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/experimentor
|
||||
name = "E.X.P.E.R.I-MENTOR (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/experimentor
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/nanite_chamber
|
||||
name = "Nanite Chamber (Machine Board)"
|
||||
build_path = /obj/machinery/nanite_chamber
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/public_nanite_chamber
|
||||
name = "Public Nanite Chamber (Machine Board)"
|
||||
build_path = /obj/machinery/public_nanite_chamber
|
||||
var/cloud_id = 1
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user)
|
||||
var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
|
||||
if(new_cloud == null)
|
||||
return
|
||||
cloud_id = CLAMP(round(new_cloud, 1), 1, 100)
|
||||
|
||||
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "Cloud ID is currently set to [cloud_id].")
|
||||
|
||||
/obj/item/circuitboard/machine/nanite_program_hub
|
||||
name = "Nanite Program Hub (Machine Board)"
|
||||
build_path = /obj/machinery/nanite_program_hub
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/nanite_programmer
|
||||
name = "Nanite Programmer (Machine Board)"
|
||||
build_path = /obj/machinery/nanite_programmer
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe
|
||||
name = "Protolathe (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/protolathe
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department
|
||||
name = "Departmental Protolathe (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/cargo
|
||||
name = "Departmental Protolathe (Machine Board) - Cargo"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/cargo
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/engineering
|
||||
name = "Departmental Protolathe (Machine Board) - Engineering"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/engineering
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/medical
|
||||
name = "Departmental Protolathe (Machine Board) - Medical"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/medical
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/science
|
||||
name = "Departmental Protolathe (Machine Board) - Science"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/science
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/security
|
||||
name = "Departmental Protolathe (Machine Board) - Security"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/security
|
||||
|
||||
/obj/item/circuitboard/machine/protolathe/department/service
|
||||
name = "Departmental Protolathe - Service (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/service
|
||||
|
||||
/obj/item/circuitboard/machine/techfab
|
||||
name = "\improper Techfab (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/techfab
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department
|
||||
name = "\improper Departmental Techfab (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/cargo
|
||||
name = "\improper Departmental Techfab (Machine Board) - Cargo"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/cargo
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/engineering
|
||||
name = "\improper Departmental Techfab (Machine Board) - Engineering"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/engineering
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/medical
|
||||
name = "\improper Departmental Techfab (Machine Board) - Medical"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/medical
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/science
|
||||
name = "\improper Departmental Techfab (Machine Board) - Science"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/science
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/security
|
||||
name = "\improper Departmental Techfab (Machine Board) - Security"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/security
|
||||
|
||||
/obj/item/circuitboard/machine/techfab/department/service
|
||||
name = "\improper Departmental Techfab - Service (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/techfab/department/service
|
||||
|
||||
/obj/item/circuitboard/machine/rdserver
|
||||
name = "R&D Server (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/server
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/bsa/back
|
||||
name = "Bluespace Artillery Generator (Machine Board)"
|
||||
build_path = /obj/machinery/bsa/back //No freebies!
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor/quadratic = 5,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/bsa/middle
|
||||
name = "Bluespace Artillery Fusor (Machine Board)"
|
||||
build_path = /obj/machinery/bsa/middle
|
||||
req_components = list(
|
||||
/obj/item/stack/ore/bluespace_crystal = 20,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/bsa/front
|
||||
name = "Bluespace Artillery Bore (Machine Board)"
|
||||
build_path = /obj/machinery/bsa/front
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator/femto = 5,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/dna_vault
|
||||
name = "DNA Vault (Machine Board)"
|
||||
build_path = /obj/machinery/dna_vault //No freebies!
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor/super = 5,
|
||||
/obj/item/stock_parts/manipulator/pico = 5,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/microwave
|
||||
name = "Microwave (Machine Board)"
|
||||
build_path = /obj/machinery/microwave
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stack/sheet/glass = 2)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/vending/donksofttoyvendor
|
||||
name = "Donksoft Toy Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/vending/donksofttoyvendor
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/vending_refill/donksoft = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/vending/syndicatedonksofttoyvendor
|
||||
name = "Syndicate Donksoft Toy Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/vending/toyliberationstation
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/vending_refill/donksoft = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/dish_drive
|
||||
name = "Dish Drive (Machine Board)"
|
||||
build_path = /obj/machinery/dish_drive
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 2)
|
||||
var/suction = TRUE
|
||||
var/transmit = TRUE
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/dish_drive/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch.</span>")
|
||||
to_chat(user, "<span class='notice'>Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch.</span>")
|
||||
|
||||
/obj/item/circuitboard/machine/dish_drive/attack_self(mob/living/user)
|
||||
suction = !suction
|
||||
to_chat(user, "<span class='notice'>You [suction ? "enable" : "disable"] the board's suction function.</span>")
|
||||
|
||||
/obj/item/circuitboard/machine/dish_drive/AltClick(mob/living/user)
|
||||
if(!user.Adjacent(src))
|
||||
return
|
||||
transmit = !transmit
|
||||
to_chat(user, "<span class='notice'>You [transmit ? "enable" : "disable"] the board's automatic disposal transmission.</span>")
|
||||
|
||||
/obj/item/circuitboard/machine/stacking_unit_console
|
||||
name = "Stacking Machine Console (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/stacking_unit_console
|
||||
req_components = list(
|
||||
/obj/item/stack/sheet/glass = 2,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
|
||||
/obj/item/circuitboard/machine/stacking_machine
|
||||
name = "Stacking Machine (Machine Board)"
|
||||
build_path = /obj/machinery/mineral/stacking_machine
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/matter_bin = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/generator
|
||||
name = "Thermo-Electric Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/generator
|
||||
req_components = list()
|
||||
|
||||
/obj/item/circuitboard/machine/circulator
|
||||
name = "Circulator/Heat Exchanger (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/binary/circulator
|
||||
req_components = list()
|
||||
|
||||
/obj/item/circuitboard/machine/harvester
|
||||
name = "Harvester (Machine Board)"
|
||||
build_path = /obj/machinery/harvester
|
||||
req_components = list(/obj/item/stock_parts/micro_laser = 4)
|
||||
|
||||
/obj/item/circuitboard/machine/ore_silo
|
||||
name = "Ore Silo (Machine Board)"
|
||||
build_path = /obj/machinery/ore_silo
|
||||
req_components = list()
|
||||
|
||||
/obj/item/circuitboard/machine/autobottler
|
||||
name = "Auto-Bottler (Machine Board)"
|
||||
build_path = /obj/machinery/rnd/production/protolathe/department/autobottler //Manips make you print things cheaper, even chems
|
||||
req_components = list(/obj/item/stock_parts/matter_bin = 5,
|
||||
/obj/item/stack/sheet/glass = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/reagent_containers/glass/beaker = 6) //So it can hold lots of chems
|
||||
@@ -112,11 +112,11 @@
|
||||
throw_range = 7
|
||||
attack_verb = list("HONKED")
|
||||
var/moodlet = "honk" //used to define which kind of moodlet is added to the honked target
|
||||
var/list/honksounds = list('sound/items/bikehorn.ogg' = 1)
|
||||
var/honksound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/item/bikehorn/ComponentInitialize()
|
||||
/obj/item/bikehorn/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, honksounds, 50)
|
||||
AddComponent(/datum/component/squeak, list(honksound=1), 50)
|
||||
|
||||
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, moodlet, /datum/mood_event/honk)
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
/obj/item/bikehorn/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, pickweight(honksounds), 50, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
//air horn
|
||||
@@ -132,7 +132,7 @@
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honksounds = list('sound/items/airhorn2.ogg' = 1)
|
||||
honksound = 'sound/items/airhorn2.ogg'
|
||||
|
||||
//golden bikehorn
|
||||
/obj/item/bikehorn/golden
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
#define WAND_OPEN "Open Door"
|
||||
#define WAND_BOLT "Toggle Bolts"
|
||||
#define WAND_EMERGENCY "Toggle Emergency Access"
|
||||
|
||||
/obj/item/door_remote
|
||||
icon_state = "gangtool-white"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
icon = 'icons/obj/device.dmi'
|
||||
name = "control wand"
|
||||
desc = "Remotely controls airlocks."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/mode = WAND_OPEN
|
||||
var/region_access = 1 //See access.dm
|
||||
var/list/access_list
|
||||
|
||||
/obj/item/door_remote/Initialize()
|
||||
. = ..()
|
||||
access_list = get_region_accesses(region_access)
|
||||
AddComponent(/datum/component/ntnet_interface)
|
||||
|
||||
/obj/item/door_remote/attack_self(mob/user)
|
||||
switch(mode)
|
||||
if(WAND_OPEN)
|
||||
mode = WAND_BOLT
|
||||
if(WAND_BOLT)
|
||||
mode = WAND_EMERGENCY
|
||||
if(WAND_EMERGENCY)
|
||||
mode = WAND_OPEN
|
||||
to_chat(user, "Now in mode: [mode].")
|
||||
|
||||
// Airlock remote works by sending NTNet packets to whatever it's pointed at.
|
||||
/obj/item/door_remote/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
var/datum/component/ntnet_interface/target_interface = A.GetComponent(/datum/component/ntnet_interface)
|
||||
|
||||
if(!target_interface)
|
||||
return
|
||||
|
||||
// Generate a control packet.
|
||||
var/datum/netdata/data = new
|
||||
data.recipient_ids = list(target_interface.hardware_id)
|
||||
|
||||
switch(mode)
|
||||
if(WAND_OPEN)
|
||||
data.data["data"] = "open"
|
||||
if(WAND_BOLT)
|
||||
data.data["data"] = "bolt"
|
||||
if(WAND_EMERGENCY)
|
||||
data.data["data"] = "emergency"
|
||||
|
||||
data.data["data_secondary"] = "toggle"
|
||||
data.passkey = access_list
|
||||
|
||||
ntnet_send(data)
|
||||
|
||||
|
||||
/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 = 0
|
||||
|
||||
/obj/item/door_remote/captain
|
||||
name = "command door remote"
|
||||
icon_state = "gangtool-yellow"
|
||||
region_access = 7
|
||||
|
||||
/obj/item/door_remote/chief_engineer
|
||||
name = "engineering door remote"
|
||||
icon_state = "gangtool-orange"
|
||||
region_access = 5
|
||||
|
||||
/obj/item/door_remote/research_director
|
||||
name = "research door remote"
|
||||
icon_state = "gangtool-purple"
|
||||
region_access = 4
|
||||
|
||||
/obj/item/door_remote/head_of_security
|
||||
name = "security door remote"
|
||||
icon_state = "gangtool-red"
|
||||
region_access = 2
|
||||
|
||||
/obj/item/door_remote/quartermaster
|
||||
name = "supply door remote"
|
||||
desc = "Remotely controls airlocks. This remote has additional Vault access."
|
||||
icon_state = "gangtool-green"
|
||||
region_access = 6
|
||||
|
||||
/obj/item/door_remote/chief_medical_officer
|
||||
name = "medical door remote"
|
||||
icon_state = "gangtool-blue"
|
||||
region_access = 3
|
||||
|
||||
/obj/item/door_remote/civillian
|
||||
name = "civilian door remote"
|
||||
icon_state = "gangtool-white"
|
||||
region_access = 1
|
||||
|
||||
#undef WAND_OPEN
|
||||
#undef WAND_BOLT
|
||||
#undef WAND_EMERGENCY
|
||||
@@ -0,0 +1,847 @@
|
||||
#define RANDOM_GRAFFITI "Random Graffiti"
|
||||
#define RANDOM_LETTER "Random Letter"
|
||||
#define RANDOM_PUNCTUATION "Random Punctuation"
|
||||
#define RANDOM_NUMBER "Random Number"
|
||||
#define RANDOM_SYMBOL "Random Symbol"
|
||||
#define RANDOM_DRAWING "Random Drawing"
|
||||
#define RANDOM_ORIENTED "Random Oriented"
|
||||
#define RANDOM_RUNE "Random Rune"
|
||||
#define RANDOM_ANY "Random Anything"
|
||||
|
||||
#define PAINT_NORMAL 1
|
||||
#define PAINT_LARGE_HORIZONTAL 2
|
||||
#define PAINT_LARGE_HORIZONTAL_ICON 'icons/effects/96x32.dmi'
|
||||
|
||||
/*
|
||||
* Crayons
|
||||
*/
|
||||
|
||||
/obj/item/toy/crayon
|
||||
name = "crayon"
|
||||
desc = "A colourful crayon. Looks tasty. Mmmm..."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonred"
|
||||
|
||||
var/icon_capped
|
||||
var/icon_uncapped
|
||||
var/use_overlays = FALSE
|
||||
|
||||
item_color = "red"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("attacked", "coloured")
|
||||
grind_results = list()
|
||||
var/paint_color = "#FF0000" //RGB
|
||||
|
||||
var/drawtype
|
||||
var/text_buffer = ""
|
||||
|
||||
var/static/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body","cyka","star","poseur tag","prolizard","antilizard", "tile")
|
||||
var/static/list/symbols = list("danger","firedanger","electricdanger","biohazard","radiation","safe","evac","space","med","trade","shop","food","peace","like","skull","nay","heart","credit")
|
||||
var/static/list/drawings = list("smallbrush","brush","largebrush","splatter","snake","stickman","carp","ghost","clown","taser","disk","fireaxe","toolbox","corgi","cat","toilet","blueprint","beepsky","scroll","bottle","shotgun")
|
||||
var/static/list/oriented = list("arrow","line","thinline","shortline","body","chevron","footprint","clawprint","pawprint") // These turn to face the same way as the drawer
|
||||
var/static/list/runes = list("rune1","rune2","rune3","rune4","rune5","rune6")
|
||||
var/static/list/randoms = list(RANDOM_ANY, RANDOM_RUNE, RANDOM_ORIENTED,
|
||||
RANDOM_NUMBER, RANDOM_GRAFFITI, RANDOM_LETTER, RANDOM_SYMBOL, RANDOM_PUNCTUATION, RANDOM_DRAWING)
|
||||
var/static/list/graffiti_large_h = list("yiffhell", "secborg", "paint")
|
||||
|
||||
var/static/list/all_drawables = graffiti + symbols + drawings + oriented + runes + graffiti_large_h
|
||||
|
||||
var/paint_mode = PAINT_NORMAL
|
||||
|
||||
var/charges = 30 //-1 or less for unlimited uses
|
||||
var/charges_left
|
||||
var/volume_multiplier = 1 // Increases reagent effect
|
||||
|
||||
var/actually_paints = TRUE
|
||||
|
||||
var/instant = FALSE
|
||||
var/self_contained = TRUE // If it deletes itself when it is empty
|
||||
|
||||
var/edible = TRUE // That doesn't mean eating it is a good idea
|
||||
|
||||
var/list/reagent_contents = list("nutriment" = 1)
|
||||
// If the user can toggle the colour, a la vanilla spraycan
|
||||
var/can_change_colour = FALSE
|
||||
|
||||
var/has_cap = FALSE
|
||||
var/is_capped = FALSE
|
||||
|
||||
var/pre_noise = FALSE
|
||||
var/post_noise = FALSE
|
||||
|
||||
var/datum/team/gang/gang //For marking territory.
|
||||
var/gang_tag_delay = 30 //this is the delay for gang mode tag applications on anything that gang = true on.
|
||||
|
||||
/obj/item/toy/crayon/proc/isValidSurface(surface)
|
||||
return istype(surface, /turf/open/floor)
|
||||
|
||||
/obj/item/toy/crayon/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is jamming [src] 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/Initialize()
|
||||
. = ..()
|
||||
// Makes crayons identifiable in things like grinders
|
||||
if(name == "crayon")
|
||||
name = "[item_color] crayon"
|
||||
|
||||
drawtype = pick(all_drawables)
|
||||
|
||||
refill()
|
||||
|
||||
/obj/item/toy/crayon/proc/refill()
|
||||
if(charges == -1)
|
||||
charges_left = 100
|
||||
else
|
||||
charges_left = charges
|
||||
|
||||
if(!reagents)
|
||||
create_reagents(charges_left * volume_multiplier)
|
||||
reagents.clear_reagents()
|
||||
|
||||
var/total_weight = 0
|
||||
for(var/key in reagent_contents)
|
||||
total_weight += reagent_contents[key]
|
||||
|
||||
var/units_per_weight = reagents.maximum_volume / total_weight
|
||||
for(var/reagent in reagent_contents)
|
||||
var/weight = reagent_contents[reagent]
|
||||
var/amount = weight * units_per_weight
|
||||
reagents.add_reagent(reagent, amount)
|
||||
|
||||
/obj/item/toy/crayon/proc/use_charges(mob/user, amount = 1, requires_full = TRUE)
|
||||
// Returns number of charges actually used
|
||||
if(charges == -1)
|
||||
. = amount
|
||||
refill()
|
||||
else
|
||||
if(check_empty(user, amount, requires_full))
|
||||
return 0
|
||||
else
|
||||
. = min(charges_left, amount)
|
||||
charges_left -= .
|
||||
|
||||
/obj/item/toy/crayon/proc/check_empty(mob/user, amount = 1, requires_full = TRUE)
|
||||
// When eating a crayon, check_empty() can be called twice producing
|
||||
// two messages unless we check for being deleted first
|
||||
if(QDELETED(src))
|
||||
return TRUE
|
||||
|
||||
. = FALSE
|
||||
// -1 is unlimited charges
|
||||
if(charges == -1)
|
||||
. = FALSE
|
||||
else if(!charges_left)
|
||||
to_chat(user, "<span class='warning'>There is no more of [src] left!</span>")
|
||||
if(self_contained)
|
||||
qdel(src)
|
||||
. = TRUE
|
||||
else if(charges_left < amount && requires_full)
|
||||
to_chat(user, "<span class='warning'>There is not enough of [src] left!</span>")
|
||||
. = TRUE
|
||||
|
||||
/obj/item/toy/crayon/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
// tgui is a plague upon this codebase
|
||||
|
||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crayon", name, 600, 600,
|
||||
master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/proc/staticDrawables()
|
||||
|
||||
. = list()
|
||||
|
||||
var/list/g_items = list()
|
||||
. += list(list("name" = "Graffiti", "items" = g_items))
|
||||
for(var/g in graffiti)
|
||||
g_items += list(list("item" = g))
|
||||
|
||||
var/list/glh_items = list()
|
||||
. += list(list("name" = "Graffiti Large Horizontal", "items" = glh_items))
|
||||
for(var/glh in graffiti_large_h)
|
||||
glh_items += list(list("item" = glh))
|
||||
|
||||
var/list/S_items = list()
|
||||
. += list(list("name" = "Symbols", "items" = S_items))
|
||||
for(var/S in symbols)
|
||||
S_items += list(list("item" = S))
|
||||
|
||||
var/list/D_items = list()
|
||||
. += list(list("name" = "Drawings", "items" = D_items))
|
||||
for(var/D in drawings)
|
||||
D_items += list(list("item" = D))
|
||||
|
||||
var/list/O_items = list()
|
||||
. += list(list(name = "Oriented", "items" = O_items))
|
||||
for(var/O in oriented)
|
||||
O_items += list(list("item" = O))
|
||||
|
||||
var/list/R_items = list()
|
||||
. += list(list(name = "Runes", "items" = R_items))
|
||||
for(var/R in runes)
|
||||
R_items += list(list("item" = R))
|
||||
|
||||
var/list/rand_items = list()
|
||||
. += list(list(name = "Random", "items" = rand_items))
|
||||
for(var/i in randoms)
|
||||
rand_items += list(list("item" = i))
|
||||
|
||||
|
||||
/obj/item/toy/crayon/ui_data()
|
||||
|
||||
var/static/list/crayon_drawables
|
||||
|
||||
if (!crayon_drawables)
|
||||
crayon_drawables = staticDrawables()
|
||||
|
||||
. = list()
|
||||
.["drawables"] = crayon_drawables
|
||||
.["selected_stencil"] = drawtype
|
||||
.["text_buffer"] = text_buffer
|
||||
|
||||
.["has_cap"] = has_cap
|
||||
.["is_capped"] = is_capped
|
||||
.["can_change_colour"] = can_change_colour
|
||||
.["current_colour"] = paint_color
|
||||
|
||||
/obj/item/toy/crayon/ui_act(action, list/params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("toggle_cap")
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
. = TRUE
|
||||
if("select_stencil")
|
||||
var/stencil = params["item"]
|
||||
if(stencil in all_drawables + randoms)
|
||||
drawtype = stencil
|
||||
. = TRUE
|
||||
text_buffer = ""
|
||||
if(stencil in graffiti_large_h)
|
||||
paint_mode = PAINT_LARGE_HORIZONTAL
|
||||
text_buffer = ""
|
||||
else
|
||||
paint_mode = PAINT_NORMAL
|
||||
if("select_colour")
|
||||
if(can_change_colour)
|
||||
var/chosen_colour = input(usr,"","Choose Color",paint_color) as color|null
|
||||
|
||||
if (!isnull(chosen_colour))
|
||||
paint_color = chosen_colour
|
||||
. = TRUE
|
||||
else
|
||||
. = FALSE
|
||||
if("enter_text")
|
||||
var/txt = stripped_input(usr,"Choose what to write.",
|
||||
"Scribbles",default = text_buffer)
|
||||
text_buffer = crayon_text_strip(txt)
|
||||
. = TRUE
|
||||
paint_mode = PAINT_NORMAL
|
||||
drawtype = "a"
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/proc/crayon_text_strip(text)
|
||||
var/static/regex/crayon_r = new /regex(@"[^\w!?,.=%#&+\/\-]")
|
||||
return replacetext(lowertext(text), crayon_r, "")
|
||||
|
||||
/obj/item/toy/crayon/afterattack(atom/target, mob/user, proximity, params)
|
||||
. = ..()
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
|
||||
var/static/list/punctuation = list("!","?",".",",","/","+","-","=","%","#","&")
|
||||
|
||||
var/cost = 1
|
||||
if(paint_mode == PAINT_LARGE_HORIZONTAL)
|
||||
cost = 5
|
||||
if(istype(target, /obj/item/canvas))
|
||||
cost = 0
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if (HAS_TRAIT(H, TRAIT_TAGGER))
|
||||
cost *= 0.5
|
||||
var/charges_used = use_charges(user, cost)
|
||||
if(!charges_used)
|
||||
return
|
||||
. = charges_used
|
||||
|
||||
if(istype(target, /obj/effect/decal/cleanable))
|
||||
target = target.loc
|
||||
|
||||
if(!isValidSurface(target))
|
||||
return
|
||||
|
||||
var/drawing = drawtype
|
||||
switch(drawtype)
|
||||
if(RANDOM_LETTER)
|
||||
drawing = ascii2text(rand(97, 122)) // a-z
|
||||
if(RANDOM_PUNCTUATION)
|
||||
drawing = pick(punctuation)
|
||||
if(RANDOM_SYMBOL)
|
||||
drawing = pick(symbols)
|
||||
if(RANDOM_DRAWING)
|
||||
drawing = pick(drawings)
|
||||
if(RANDOM_GRAFFITI)
|
||||
drawing = pick(graffiti)
|
||||
if(RANDOM_RUNE)
|
||||
drawing = pick(runes)
|
||||
if(RANDOM_ORIENTED)
|
||||
drawing = pick(oriented)
|
||||
if(RANDOM_NUMBER)
|
||||
drawing = ascii2text(rand(48, 57)) // 0-9
|
||||
if(RANDOM_ANY)
|
||||
drawing = pick(all_drawables)
|
||||
|
||||
var/temp = "rune"
|
||||
var/ascii = (length(drawing) == 1) ? TRUE : FALSE
|
||||
if(ascii && is_alpha(drawing))
|
||||
temp = "letter"
|
||||
else if(ascii && is_digit(drawing))
|
||||
temp = "number"
|
||||
else if(drawing in punctuation)
|
||||
temp = "punctuation mark"
|
||||
else if(drawing in symbols)
|
||||
temp = "symbol"
|
||||
else if(drawing in drawings)
|
||||
temp = "drawing"
|
||||
else if(drawing in graffiti|oriented)
|
||||
temp = "graffiti"
|
||||
|
||||
// If a gang member is using a gang spraycan, it'll behave differently
|
||||
var/gang_mode = FALSE
|
||||
if(gang && user.mind && user.mind.has_antag_datum(/datum/antagonist/gang)) //Heres a check.
|
||||
gang_mode = TRUE // No more runtimes if a non-gang member sprays a gang can, it just works like normal cans.
|
||||
// discontinue if the area isn't valid for tagging because gang "honour"
|
||||
if(gang_mode && (!can_claim_for_gang(user, target)))
|
||||
return
|
||||
|
||||
var/graf_rot
|
||||
if(drawing in oriented)
|
||||
switch(user.dir)
|
||||
if(EAST)
|
||||
graf_rot = 90
|
||||
if(SOUTH)
|
||||
graf_rot = 180
|
||||
if(WEST)
|
||||
graf_rot = 270
|
||||
else
|
||||
graf_rot = 0
|
||||
|
||||
var/list/click_params = params2list(params)
|
||||
var/clickx
|
||||
var/clicky
|
||||
|
||||
if(click_params && click_params["icon-x"] && click_params["icon-y"])
|
||||
clickx = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
if(!instant)
|
||||
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
|
||||
|
||||
if(pre_noise)
|
||||
audible_message("<span class='notice'>You hear spraying.</span>")
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
|
||||
var/takes_time = !instant //For order purposes, since I'm maximum bad.
|
||||
if(gang_mode)
|
||||
takes_time = TRUE
|
||||
|
||||
var/wait_time = 50
|
||||
if(paint_mode == PAINT_LARGE_HORIZONTAL)
|
||||
wait_time *= 3
|
||||
|
||||
if(takes_time) //This is what deteremines the time it takes to spray a tag in gang mode. 50 is Default.
|
||||
if(!do_after(user, gang_tag_delay, target = target)) //25 is a good number, but we have gang_tag_delay var now.
|
||||
return
|
||||
|
||||
if(length(text_buffer))
|
||||
drawing = text_buffer[1]
|
||||
|
||||
|
||||
var/list/turf/affected_turfs = list()
|
||||
|
||||
|
||||
if(actually_paints)
|
||||
if(gang_mode)
|
||||
// Double check it wasn't tagged in the meanwhile.
|
||||
if(!can_claim_for_gang(user, target))
|
||||
return
|
||||
tag_for_gang(user, target)
|
||||
affected_turfs += target
|
||||
else
|
||||
switch(paint_mode)
|
||||
if(PAINT_NORMAL)
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(target, paint_color, drawing, temp, graf_rot)
|
||||
C.add_hiddenprint(user)
|
||||
C.pixel_x = clickx
|
||||
C.pixel_y = clicky
|
||||
affected_turfs += target
|
||||
if(PAINT_LARGE_HORIZONTAL)
|
||||
var/turf/left = locate(target.x-1,target.y,target.z)
|
||||
var/turf/right = locate(target.x+1,target.y,target.z)
|
||||
if(isValidSurface(left) && isValidSurface(right))
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
|
||||
C.add_hiddenprint(user)
|
||||
affected_turfs += left
|
||||
affected_turfs += right
|
||||
affected_turfs += target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
|
||||
return
|
||||
|
||||
if(!instant)
|
||||
to_chat(user, "<span class='notice'>You finish drawing \the [temp].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You spray a [temp] on \the [target.name]</span>")
|
||||
|
||||
if(length(text_buffer) > 1)
|
||||
text_buffer = copytext(text_buffer,2)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
if(post_noise)
|
||||
audible_message("<span class='notice'>You hear spraying.</span>")
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
|
||||
var/fraction = min(1, . / reagents.maximum_volume)
|
||||
if(affected_turfs.len)
|
||||
fraction /= affected_turfs.len
|
||||
for(var/t in affected_turfs)
|
||||
reagents.reaction(t, TOUCH, fraction * volume_multiplier)
|
||||
reagents.trans_to(t, ., volume_multiplier)
|
||||
check_empty(user)
|
||||
|
||||
|
||||
//////////////Gang mode stuff/////////////////
|
||||
/obj/item/toy/crayon/proc/can_claim_for_gang(mob/user, atom/target)
|
||||
// Check area validity.
|
||||
// Reject space, player-created areas, and non-station z-levels.
|
||||
var/area/A = get_area(target)
|
||||
if(!A || (!is_station_level(A.z)) || !A.valid_territory)
|
||||
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
|
||||
return FALSE
|
||||
|
||||
var/spraying_over = FALSE
|
||||
for(var/G in target)
|
||||
var/obj/effect/decal/cleanable/crayon/gang/gangtag = G
|
||||
if(istype(gangtag))
|
||||
var/datum/antagonist/gang/GA = user.mind.has_antag_datum(/datum/antagonist/gang)
|
||||
if(gangtag.gang != GA.gang)
|
||||
spraying_over = TRUE
|
||||
break
|
||||
|
||||
var/occupying_gang = territory_claimed(A, user)
|
||||
if(occupying_gang && !spraying_over)
|
||||
to_chat(user, "<span class='danger'>[A] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!</span>")
|
||||
return FALSE
|
||||
|
||||
// If you pass the gauntlet of checks, you're good to proceed
|
||||
return TRUE
|
||||
|
||||
/obj/item/toy/crayon/proc/territory_claimed(area/territory, mob/user)
|
||||
for(var/datum/team/gang/G in GLOB.gangs)
|
||||
if(territory.type in (G.territories|G.new_territories))
|
||||
. = G.name
|
||||
break
|
||||
|
||||
/obj/item/toy/crayon/proc/tag_for_gang(mob/user, atom/target)
|
||||
//Delete any old markings on this tile, including other gang tags
|
||||
for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
|
||||
qdel(old_marking)
|
||||
|
||||
var/datum/antagonist/gang/G = user.mind.has_antag_datum(/datum/antagonist/gang)
|
||||
var/area/territory = get_area(target)
|
||||
|
||||
new /obj/effect/decal/cleanable/crayon/gang(target,G.gang,"graffiti",0,user) // Heres the gang tag.
|
||||
to_chat(user, "<span class='notice'>You tagged [territory] for your gang!</span>")
|
||||
/////////////////Gang end////////////////////
|
||||
|
||||
|
||||
/obj/item/toy/crayon/attack(mob/M, mob/user)
|
||||
if(edible && (M == user))
|
||||
to_chat(user, "You take a bite of the [src.name]. Delicious!")
|
||||
var/eaten = use_charges(user, 5, FALSE)
|
||||
if(check_empty(user)) //Prevents divsion by zero
|
||||
return
|
||||
var/fraction = min(eaten / reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction * volume_multiplier)
|
||||
reagents.trans_to(M, eaten, volume_multiplier)
|
||||
// check_empty() is called during afterattack
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/toy/crayon/red
|
||||
icon_state = "crayonred"
|
||||
paint_color = "#DA0000"
|
||||
item_color = "red"
|
||||
reagent_contents = list("nutriment" = 1, "redcrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/orange
|
||||
icon_state = "crayonorange"
|
||||
paint_color = "#FF9300"
|
||||
item_color = "orange"
|
||||
reagent_contents = list("nutriment" = 1, "orangecrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/yellow
|
||||
icon_state = "crayonyellow"
|
||||
paint_color = "#FFF200"
|
||||
item_color = "yellow"
|
||||
reagent_contents = list("nutriment" = 1, "yellowcrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/green
|
||||
icon_state = "crayongreen"
|
||||
paint_color = "#A8E61D"
|
||||
item_color = "green"
|
||||
reagent_contents = list("nutriment" = 1, "greencrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/blue
|
||||
icon_state = "crayonblue"
|
||||
paint_color = "#00B7EF"
|
||||
item_color = "blue"
|
||||
reagent_contents = list("nutriment" = 1, "bluecrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/purple
|
||||
icon_state = "crayonpurple"
|
||||
paint_color = "#DA00FF"
|
||||
item_color = "purple"
|
||||
reagent_contents = list("nutriment" = 1, "purplecrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/black
|
||||
icon_state = "crayonblack"
|
||||
paint_color = "#1C1C1C" //Not completely black because total black looks bad. So Mostly Black.
|
||||
item_color = "black"
|
||||
reagent_contents = list("nutriment" = 1, "blackcrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/white
|
||||
icon_state = "crayonwhite"
|
||||
paint_color = "#FFFFFF"
|
||||
item_color = "white"
|
||||
reagent_contents = list("nutriment" = 1, "whitecrayonpowder" = 1)
|
||||
|
||||
/obj/item/toy/crayon/mime
|
||||
icon_state = "crayonmime"
|
||||
desc = "A very sad-looking crayon."
|
||||
paint_color = "#FFFFFF"
|
||||
item_color = "mime"
|
||||
reagent_contents = list("nutriment" = 1, "invisiblecrayonpowder" = 1)
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/rainbow
|
||||
icon_state = "crayonrainbow"
|
||||
paint_color = "#FFF000"
|
||||
item_color = "rainbow"
|
||||
reagent_contents = list("nutriment" = 1, "colorful_reagent" = 1)
|
||||
drawtype = RANDOM_ANY // just the default starter.
|
||||
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/rainbow/afterattack(atom/target, mob/user, proximity, params)
|
||||
paint_color = rgb(rand(0,255), rand(0,255), rand(0,255))
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Crayon Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/crayons
|
||||
name = "box of crayons"
|
||||
desc = "A box of crayons for all your rune drawing needs."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonbox"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/storage/crayons/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 7
|
||||
STR.can_hold = typecacheof(list(/obj/item/toy/crayon))
|
||||
|
||||
/obj/item/storage/crayons/PopulateContents()
|
||||
new /obj/item/toy/crayon/red(src)
|
||||
new /obj/item/toy/crayon/orange(src)
|
||||
new /obj/item/toy/crayon/yellow(src)
|
||||
new /obj/item/toy/crayon/green(src)
|
||||
new /obj/item/toy/crayon/blue(src)
|
||||
new /obj/item/toy/crayon/purple(src)
|
||||
new /obj/item/toy/crayon/black(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/crayons/update_icon()
|
||||
cut_overlays()
|
||||
for(var/obj/item/toy/crayon/crayon in contents)
|
||||
add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.item_color))
|
||||
|
||||
/obj/item/storage/crayons/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = W
|
||||
switch(C.item_color)
|
||||
if("mime")
|
||||
to_chat(usr, "This crayon is too sad to be contained in this box.")
|
||||
return
|
||||
if("rainbow")
|
||||
to_chat(usr, "This crayon is too powerful to be contained in this box.")
|
||||
return
|
||||
if(istype(W, /obj/item/toy/crayon/spraycan))
|
||||
to_chat(user, "Spraycans are not crayons.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
//Spraycan stuff
|
||||
|
||||
/obj/item/toy/crayon/spraycan
|
||||
name = "spray can"
|
||||
icon_state = "spraycan"
|
||||
|
||||
icon_capped = "spraycan_cap"
|
||||
icon_uncapped = "spraycan"
|
||||
use_overlays = TRUE
|
||||
paint_color = null
|
||||
|
||||
item_state = "spraycan"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
desc = "A metallic container containing tasty paint."
|
||||
|
||||
instant = TRUE
|
||||
edible = FALSE
|
||||
has_cap = TRUE
|
||||
is_capped = TRUE
|
||||
self_contained = FALSE // Don't disappear when they're empty
|
||||
can_change_colour = TRUE
|
||||
gang = TRUE //Gang check is true for all things upon the honored hierarchy of spraycans, except those that are FALSE.
|
||||
|
||||
reagent_contents = list("welding_fuel" = 1, "ethanol" = 1)
|
||||
|
||||
pre_noise = TRUE
|
||||
post_noise = FALSE
|
||||
|
||||
/obj/item/toy/crayon/spraycan/isValidSurface(surface)
|
||||
return (istype(surface, /turf/open/floor) || istype(surface, /turf/closed/wall))
|
||||
|
||||
/obj/item/toy/crayon/spraycan/suicide_act(mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(is_capped || !actually_paints)
|
||||
user.visible_message("<span class='suicide'>[user] shakes up [src] with a rattle and lifts it to [user.p_their()] mouth, but nothing happens!</span>")
|
||||
user.say("MEDIOCRE!!", forced="spraycan suicide")
|
||||
return SHAME
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] shakes up [src] with a rattle and lifts it to [user.p_their()] mouth, spraying paint across [user.p_their()] teeth!</span>")
|
||||
user.say("WITNESS ME!!", forced="spraycan suicide")
|
||||
if(pre_noise || post_noise)
|
||||
playsound(loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
if(can_change_colour)
|
||||
paint_color = "#C0C0C0"
|
||||
update_icon()
|
||||
if(actually_paints)
|
||||
H.lip_style = "spray_face"
|
||||
H.lip_color = paint_color
|
||||
H.update_body()
|
||||
var/used = use_charges(user, 10, FALSE)
|
||||
var/fraction = min(1, used / reagents.maximum_volume)
|
||||
reagents.reaction(user, VAPOR, fraction * volume_multiplier)
|
||||
reagents.trans_to(user, used, volume_multiplier)
|
||||
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/Initialize()
|
||||
. = ..()
|
||||
// If default crayon red colour, pick a more fun spraycan colour
|
||||
if(!paint_color)
|
||||
paint_color = pick("#DA0000","#FF9300","#FFF200","#A8E61D","#00B7EF",
|
||||
"#DA00FF")
|
||||
refill()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/toy/crayon/spraycan/examine(mob/user)
|
||||
. = ..()
|
||||
if(charges_left)
|
||||
to_chat(user, "It has [charges_left] use\s left.")
|
||||
else
|
||||
to_chat(user, "It is empty.")
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to [ is_capped ? "take the cap off" : "put the cap on"].</span>")
|
||||
|
||||
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(is_capped)
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return
|
||||
|
||||
if(check_empty(user))
|
||||
return
|
||||
|
||||
if(iscarbon(target))
|
||||
if(pre_noise || post_noise)
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 25, 1, 5)
|
||||
|
||||
var/mob/living/carbon/C = target
|
||||
C.visible_message("<span class='danger'>[user] sprays [src] into the face of [C]!</span>", "<span class='userdanger'>[user] sprays [src] into your face!</span>")
|
||||
|
||||
if(C.client)
|
||||
C.blur_eyes(3)
|
||||
C.blind_eyes(1)
|
||||
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
|
||||
C.confused = max(C.confused, 3)
|
||||
C.Knockdown(60)
|
||||
if(ishuman(C) && actually_paints)
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.lip_style = "spray_face"
|
||||
H.lip_color = paint_color
|
||||
H.update_body()
|
||||
|
||||
// Caution, spray cans contain inflammable substances
|
||||
. = use_charges(user, 10, FALSE)
|
||||
var/fraction = min(1, . / reagents.maximum_volume)
|
||||
reagents.reaction(C, VAPOR, fraction * volume_multiplier)
|
||||
|
||||
return
|
||||
|
||||
if(isobj(target))
|
||||
if(actually_paints)
|
||||
if(color_hex2num(paint_color) < 350 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected
|
||||
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
|
||||
return FALSE
|
||||
|
||||
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
|
||||
if(istype(target, /obj/structure/window))
|
||||
if(color_hex2num(paint_color) < 255)
|
||||
target.set_opacity(255)
|
||||
else
|
||||
target.set_opacity(initial(target.opacity))
|
||||
|
||||
. = use_charges(user, 2)
|
||||
var/fraction = min(1, . / reagents.maximum_volume)
|
||||
reagents.reaction(target, TOUCH, fraction * volume_multiplier)
|
||||
reagents.trans_to(target, ., volume_multiplier)
|
||||
|
||||
if(pre_noise || post_noise)
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
user.visible_message("[user] coats [target] with spray paint!", "<span class='notice'>You coat [target] with spray paint.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_icon()
|
||||
icon_state = is_capped ? icon_capped : icon_uncapped
|
||||
if(use_overlays)
|
||||
cut_overlays()
|
||||
var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]")
|
||||
spray_overlay.color = paint_color
|
||||
add_overlay(spray_overlay)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg
|
||||
name = "cyborg spraycan"
|
||||
desc = "A metallic container containing shiny synthesised paint."
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity, params)
|
||||
var/diff = ..()
|
||||
if(!iscyborg(user))
|
||||
to_chat(user, "<span class='notice'>How did you get this?</span>")
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
|
||||
if(!diff)
|
||||
return
|
||||
// 25 is our cost per unit of paint, making it cost 25 energy per
|
||||
// normal tag, 50 per window, and 250 per attack
|
||||
var/cost = diff * 25
|
||||
// Cyborgs shouldn't be able to use modules without a cell. But if they do
|
||||
// it's free.
|
||||
if(borgy.cell)
|
||||
borgy.cell.use(cost)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/hellcan
|
||||
name = "hellcan"
|
||||
desc = "This spraycan doesn't seem to be filled with paint..."
|
||||
icon_state = "deathcan2_cap"
|
||||
icon_capped = "deathcan2_cap"
|
||||
icon_uncapped = "deathcan2"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
volume_multiplier = 25
|
||||
charges = 100
|
||||
reagent_contents = list("clf3" = 1)
|
||||
actually_paints = FALSE
|
||||
paint_color = "#000000"
|
||||
|
||||
/obj/item/toy/crayon/spraycan/lubecan
|
||||
name = "slippery spraycan"
|
||||
desc = "You can barely keep hold of this thing."
|
||||
icon_state = "clowncan2_cap"
|
||||
icon_capped = "clowncan2_cap"
|
||||
icon_uncapped = "clowncan2"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
reagent_contents = list("lube" = 1, "banana" = 1)
|
||||
volume_multiplier = 5
|
||||
|
||||
/obj/item/toy/crayon/spraycan/lubecan/isValidSurface(surface)
|
||||
return istype(surface, /turf/open/floor)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/mimecan
|
||||
name = "silent spraycan"
|
||||
desc = "Art is best seen, not heard."
|
||||
icon_state = "mimecan_cap"
|
||||
icon_capped = "mimecan_cap"
|
||||
icon_uncapped = "mimecan"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
can_change_colour = FALSE
|
||||
paint_color = "#FFFFFF" //RGB
|
||||
|
||||
pre_noise = FALSE
|
||||
post_noise = FALSE
|
||||
reagent_contents = list("nothing" = 1, "mutetoxin" = 1)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang
|
||||
charges = 20 // Charges back to 20, which is the default value for them.
|
||||
gang = TRUE
|
||||
gang_tag_delay = 15 //Its 50% faster than a regular spraycan, for tagging. After-all they did spend points/meet the boss.
|
||||
|
||||
pre_noise = FALSE
|
||||
post_noise = TRUE // Its even more stealthy just a tad.
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang/Initialize(loc, datum/team/gang/G)
|
||||
..()
|
||||
if(G)
|
||||
gang = G
|
||||
paint_color = G.color
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang/examine(mob/user)
|
||||
. = ..()
|
||||
if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user))
|
||||
to_chat(user, "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster.")
|
||||
|
||||
/obj/item/toy/crayon/spraycan/infinite
|
||||
name = "infinite spraycan"
|
||||
charges = -1
|
||||
desc = "Now with 30% more bluespace technology."
|
||||
|
||||
#undef RANDOM_GRAFFITI
|
||||
#undef RANDOM_LETTER
|
||||
#undef RANDOM_PUNCTUATION
|
||||
#undef RANDOM_SYMBOL
|
||||
#undef RANDOM_DRAWING
|
||||
#undef RANDOM_NUMBER
|
||||
#undef RANDOM_ORIENTED
|
||||
#undef RANDOM_RUNE
|
||||
#undef RANDOM_ANY
|
||||
@@ -0,0 +1,766 @@
|
||||
//backpack item
|
||||
#define HALFWAYCRITDEATH ((HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) * 0.5)
|
||||
|
||||
/obj/item/defibrillator
|
||||
name = "defibrillator"
|
||||
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "defibunit"
|
||||
item_state = "defibunit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
actions_types = list(/datum/action/item_action/toggle_paddles)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
|
||||
var/on = FALSE //if the paddles are equipped (1) or on the defib (0)
|
||||
var/safety = TRUE //if you can zap people with the defibs on harm mode
|
||||
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
|
||||
var/obj/item/twohanded/shockpaddles/paddles
|
||||
var/obj/item/stock_parts/cell/high/cell
|
||||
var/combat = FALSE //can we revive through space suits?
|
||||
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
|
||||
var/healdisk = FALSE // Will we shock people dragging the body?
|
||||
var/pullshocksafely = FALSE //Dose the unit have the healdisk upgrade?
|
||||
var/primetime = 0 // is the defib faster
|
||||
var/timedeath = 10
|
||||
|
||||
/obj/item/defibrillator/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/defibrillator/Initialize() //starts without a cell for rnd
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/update_icon()
|
||||
update_power()
|
||||
update_overlays()
|
||||
update_charge()
|
||||
|
||||
/obj/item/defibrillator/proc/update_power()
|
||||
if(!QDELETED(cell))
|
||||
if(QDELETED(paddles) || cell.charge < paddles.revivecost)
|
||||
powered = FALSE
|
||||
else
|
||||
powered = TRUE
|
||||
else
|
||||
powered = FALSE
|
||||
|
||||
/obj/item/defibrillator/proc/update_overlays()
|
||||
cut_overlays()
|
||||
if(!on)
|
||||
add_overlay("[initial(icon_state)]-paddles")
|
||||
if(powered)
|
||||
add_overlay("[initial(icon_state)]-powered")
|
||||
if(!cell)
|
||||
add_overlay("[initial(icon_state)]-nocell")
|
||||
if(!safety)
|
||||
add_overlay("[initial(icon_state)]-emagged")
|
||||
|
||||
/obj/item/defibrillator/proc/update_charge()
|
||||
if(powered) //so it doesn't show charge if it's unpowered
|
||||
if(!QDELETED(cell))
|
||||
var/ratio = cell.charge / cell.maxcharge
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
add_overlay("[initial(icon_state)]-charge[ratio]")
|
||||
|
||||
/obj/item/defibrillator/CheckParts(list/parts_list)
|
||||
..()
|
||||
cell = locate(/obj/item/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/ui_action_click()
|
||||
toggle_paddles()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/defibrillator/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(slot_flags == ITEM_SLOT_BACK)
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Put the defibrillator on your back first!</span>")
|
||||
|
||||
else if(slot_flags == ITEM_SLOT_BELT)
|
||||
if(user.get_item_by_slot(SLOT_BELT) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Strap the defibrillator's belt on first!</span>")
|
||||
return
|
||||
else if(istype(loc, /obj/machinery/defibrillator_mount))
|
||||
ui_action_click() //checks for this are handled in defibrillator.mount.dm
|
||||
return ..()
|
||||
|
||||
/obj/item/defibrillator/MouseDrop(obj/over_object)
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
else if(istype(W, /obj/item/stock_parts/cell))
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else
|
||||
if(C.maxcharge < paddles.revivecost)
|
||||
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/defibrillator/emag_act(mob/user)
|
||||
. = ..()
|
||||
safety = !safety
|
||||
to_chat(user, "<span class='warning'>You silently [safety ? "enable" : "disable"] [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/defibrillator/emp_act(severity)
|
||||
. = ..()
|
||||
if(cell && !(. & EMP_PROTECT_CONTENTS))
|
||||
deductcharge(1000 / severity)
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(safety)
|
||||
safety = FALSE
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
|
||||
playsound(src, 'sound/machines/defib_saftyOff.ogg', 50, 0)
|
||||
else
|
||||
safety = TRUE
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
|
||||
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/proc/toggle_paddles()
|
||||
set name = "Toggle Paddles"
|
||||
set category = "Object"
|
||||
on = !on
|
||||
|
||||
var/mob/living/carbon/user = usr
|
||||
if(on)
|
||||
//Detach the paddles into the user's hands
|
||||
if(!usr.put_in_hands(paddles))
|
||||
on = FALSE
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
//Remove from their hands and back onto the defib unit
|
||||
paddles.unwield()
|
||||
remove_paddles(user)
|
||||
|
||||
update_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/defibrillator/proc/make_paddles()
|
||||
return new /obj/item/twohanded/shockpaddles(src)
|
||||
|
||||
/obj/item/defibrillator/equipped(mob/user, slot)
|
||||
..()
|
||||
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBackSlot())
|
||||
return 1
|
||||
|
||||
/obj/item/defibrillator/proc/remove_paddles(mob/user) //this fox the bug with the paddles when other player stole you the defib when you have the paddles equiped
|
||||
if(ismob(paddles.loc))
|
||||
var/mob/M = paddles.loc
|
||||
M.dropItemToGround(paddles, TRUE)
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/Destroy()
|
||||
if(on)
|
||||
var/M = get(paddles, /mob)
|
||||
remove_paddles(M)
|
||||
QDEL_NULL(paddles)
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/defibrillator/proc/deductcharge(chrgdeductamt)
|
||||
if(cell)
|
||||
if(cell.charge < (paddles.revivecost+chrgdeductamt))
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
if(cell.use(chrgdeductamt))
|
||||
update_icon()
|
||||
return TRUE
|
||||
else
|
||||
update_icon()
|
||||
return FALSE
|
||||
|
||||
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
|
||||
spawn(50)
|
||||
if(cell)
|
||||
if(cell.charge >= paddles.revivecost)
|
||||
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
|
||||
playsound(src, 'sound/machines/defib_ready.ogg', 50, 0)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
paddles.cooldown = FALSE
|
||||
paddles.update_icon()
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/compact
|
||||
name = "compact defibrillator"
|
||||
desc = "A belt-equipped defibrillator that can be rapidly deployed."
|
||||
icon_state = "defibcompact"
|
||||
item_state = "defibcompact"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBeltSlot())
|
||||
return TRUE
|
||||
|
||||
/obj/item/defibrillator/compact/loaded/Initialize()
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
|
||||
/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 = TRUE
|
||||
safety = FALSE
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/Initialize()
|
||||
. = ..()
|
||||
cell = new /obj/item/stock_parts/cell/infinite(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//paddles
|
||||
|
||||
/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/items_and_weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
|
||||
force = 0
|
||||
throwforce = 6
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
var/revivecost = 1000
|
||||
var/cooldown = FALSE
|
||||
var/busy = FALSE
|
||||
var/obj/item/defibrillator/defib
|
||||
var/req_defib = TRUE
|
||||
var/combat = FALSE //If it penetrates armor and gives additional functionality
|
||||
var/grab_ghost = FALSE
|
||||
var/tlimit = DEFIB_TIME_LIMIT * 10
|
||||
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!req_defib)
|
||||
return
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/Moved()
|
||||
. = ..()
|
||||
check_range()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_range()
|
||||
if(!req_defib || !defib)
|
||||
return
|
||||
if(!in_range(src,defib))
|
||||
var/mob/living/L = loc
|
||||
if(istype(L))
|
||||
to_chat(L, "<span class='warning'>[defib]'s paddles overextend and come out of your hands!</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
|
||||
snap_back()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
|
||||
if(req_defib || !time)
|
||||
return
|
||||
cooldown = TRUE
|
||||
update_icon()
|
||||
sleep(time)
|
||||
var/turf/T = get_turf(src)
|
||||
T.audible_message("<span class='notice'>[src] beeps: Unit is recharged.</span>")
|
||||
playsound(src, 'sound/machines/defib_ready.ogg', 50, 0)
|
||||
cooldown = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/New(mainunit)
|
||||
..()
|
||||
if(check_defib_exists(mainunit, src) && req_defib)
|
||||
defib = mainunit
|
||||
forceMove(defib)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/update_icon()
|
||||
icon_state = "defibpaddles[wielded]"
|
||||
item_state = "defibpaddles[wielded]"
|
||||
if(cooldown)
|
||||
icon_state = "defibpaddles[wielded]_cooldown"
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/C = loc
|
||||
C.update_inv_hands()
|
||||
|
||||
/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>")
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/dropped(mob/user)
|
||||
if(!req_defib)
|
||||
return ..()
|
||||
if(user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
if(user != loc)
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
snap_back()
|
||||
return unwield(user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/snap_back()
|
||||
if(!defib)
|
||||
return
|
||||
defib.on = FALSE
|
||||
forceMove(defib)
|
||||
defib.update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
|
||||
if(!req_defib)
|
||||
return TRUE //If it doesn't need a defib, just say it exists
|
||||
if (!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
|
||||
qdel(O)
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
|
||||
|
||||
if(busy)
|
||||
return
|
||||
if(req_defib && !defib.powered)
|
||||
user.visible_message("<span class='notice'>[defib] beeps: Unit is unpowered.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
if(!wielded)
|
||||
if(iscyborg(user))
|
||||
to_chat(user, "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>")
|
||||
return
|
||||
if(cooldown)
|
||||
if(req_defib)
|
||||
to_chat(user, "<span class='warning'>[defib] is recharging!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] are recharging!</span>")
|
||||
return
|
||||
|
||||
user.stop_pulling() //User has hands full, and we don't care about anyone else pulling on it, their problem. CLEAR!!
|
||||
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
do_disarm(M, user)
|
||||
return
|
||||
|
||||
if(!iscarbon(M))
|
||||
if(req_defib)
|
||||
to_chat(user, "<span class='warning'>The instructions on [defib] don't mention how to revive that...</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You aren't sure how to revive that...</span>")
|
||||
return
|
||||
var/mob/living/carbon/H = M
|
||||
|
||||
|
||||
if(user.zone_selected != BODY_ZONE_CHEST)
|
||||
to_chat(user, "<span class='warning'>You need to target your patient's chest with [src]!</span>")
|
||||
return
|
||||
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
do_harm(H, user)
|
||||
return
|
||||
|
||||
if((!req_defib && grab_ghost) || (req_defib && defib.grab_ghost))
|
||||
H.notify_ghost_cloning("Your heart is being defibrillated!")
|
||||
H.grab_ghost() // Shove them back in their body.
|
||||
else if(can_defib(H))
|
||||
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)
|
||||
|
||||
do_help(H, user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H) //Our code here is different than tg, if it breaks in testing; BUG_PROBABLE_CAUSE
|
||||
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
|
||||
if(H.suiciding || H.hellbound || HAS_TRAIT(H, TRAIT_HUSK))
|
||||
return
|
||||
if((world.time - H.timeofdeath) > tlimit)
|
||||
return
|
||||
if((H.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (H.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
|
||||
return
|
||||
if(!heart || (heart.organ_flags & ORGAN_FAILING))
|
||||
return
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || H.suiciding)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
|
||||
if(req_defib)
|
||||
if(defib.pullshocksafely && isliving(H.pulledby))
|
||||
H.visible_message("<span class='danger'>The defibrillator safely discharges the excessive charge into the floor!</span>")
|
||||
else
|
||||
var/mob/living/M = H.pulledby
|
||||
if(M.electrocute_act(30, src))
|
||||
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
|
||||
M.emote("scream")
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
return
|
||||
M.visible_message("<span class='danger'>[user] hastily places [src] on [M]'s chest!</span>", \
|
||||
"<span class='userdanger'>[user] hastily places [src] on [M]'s chest!</span>")
|
||||
busy = TRUE
|
||||
if(do_after(user, 10, target = M))
|
||||
M.visible_message("<span class='danger'>[user] zaps [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] zaps [M] with [src]!</span>")
|
||||
M.adjustStaminaLoss(50)
|
||||
M.Knockdown(100)
|
||||
M.updatehealth() //forces health update before next life tick
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
M.emote("gasp")
|
||||
log_combat(user, M, "stunned", src)
|
||||
busy = FALSE
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
if(req_defib)
|
||||
defib.cooldowncheck(user)
|
||||
else
|
||||
recharge(60)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_harm(mob/living/carbon/H, mob/living/user)
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>",
|
||||
"<span class='warning'>You overcharge the paddles and begin to place them onto [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
if(do_after(user, 30, target = H))
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>",
|
||||
"<span class='warning'>You place [src] on [H]'s chest and begin to charge them.</span>")
|
||||
var/turf/T = get_turf(defib)
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
|
||||
if(req_defib)
|
||||
T.audible_message("<span class='warning'>\The [defib] lets out an urgent beep and lets out a steadily rising hum...</span>")
|
||||
else
|
||||
user.audible_message("<span class='warning'>[src] let out an urgent beep.</span>")
|
||||
if(do_after(user, 30, target = H)) //Takes longer due to overcharging
|
||||
if(!H)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
return
|
||||
if(H && H.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>[H] is dead.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
return
|
||||
user.visible_message("<span class='boldannounce'><i>[user] shocks [H] with \the [src]!</span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 100, 1, -1)
|
||||
playsound(src, 'sound/weapons/egloves.ogg', 100, 1, -1)
|
||||
H.emote("scream")
|
||||
shock_touching(45, H)
|
||||
if(H.can_heartattack() && !H.undergoing_cardiac_arrest())
|
||||
if(!H.stat)
|
||||
H.visible_message("<span class='warning'>[H] thrashes wildly, clutching at [H.p_their()] chest!</span>",
|
||||
"<span class='userdanger'>You feel a horrible agony in your chest!</span>")
|
||||
H.set_heartattack(TRUE)
|
||||
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
||||
log_combat(user, H, "overloaded the heart of", defib)
|
||||
H.Knockdown(100)
|
||||
H.Jitter(100)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
if(!req_defib)
|
||||
recharge(60)
|
||||
if(req_defib && (defib.cooldowncheck(user)))
|
||||
return
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
|
||||
var/primetimer
|
||||
var/primetimer2
|
||||
var/deathtimer
|
||||
if(req_defib)
|
||||
primetimer = 30 - defib.primetime //I swear to god if I find shit like this elsewhere
|
||||
primetimer2 = 20 - defib.primetime
|
||||
deathtimer = DEFIB_TIME_LOSS * defib.timedeath
|
||||
else
|
||||
primetimer = 30
|
||||
primetimer2 = 20
|
||||
deathtimer = DEFIB_TIME_LOSS * 10
|
||||
|
||||
if(do_after(user, primetimer, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, 0)
|
||||
// patients rot when they are killed, and die when they are dead
|
||||
var/tplus = world.time - H.timeofdeath //length of time spent dead
|
||||
var/tloss = deathtimer
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
|
||||
if(do_after(user, primetimer2, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
|
||||
for(var/obj/item/carried_item in H.contents)
|
||||
if(istype(carried_item, /obj/item/clothing/suit/space))
|
||||
if((!combat && !req_defib) || (req_defib && !defib.combat))
|
||||
user.audible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
playsound(src, "bodyfall", 50, 1)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1)
|
||||
total_brute = H.getBruteLoss()
|
||||
total_burn = H.getFireLoss()
|
||||
shock_touching(30, H)
|
||||
var/failed
|
||||
|
||||
if (H.suiciding || (HAS_TRAIT(H, TRAIT_NOCLONE)))
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
|
||||
else if (H.hellbound)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile.</span>"
|
||||
else if (tplus > tlimit)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Body has decayed for too long. Further attempts futile.</span>"
|
||||
else if (!heart)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart is missing.</span>"
|
||||
else if (heart.organ_flags & ORGAN_FAILING)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart too damaged.</span>"
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.</span>"
|
||||
else if(H.get_ghost())
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
|
||||
else
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(BR) //BUG_PROBABLE_CAUSE - slight difference between us and tg
|
||||
if(BR.organ_flags & ORGAN_FAILING)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain tissue is damaged making recovery of patient impossible via defibrillator. Further attempts futile.</span>"
|
||||
if(BR.brain_death)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain damaged beyond point of no return. Further attempts futile.</span>"
|
||||
if(H.suiciding || BR.brainmob?.suiciding)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No intelligence pattern can be detected in patient's brain. Further attempts futile.</span>"
|
||||
else
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing. Further attempts futile.</span>"
|
||||
|
||||
|
||||
if(failed)
|
||||
user.visible_message(failed)
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
else
|
||||
//If the body has been fixed so that they would not be in crit when defibbed, give them oxyloss to put them back into crit
|
||||
if (H.health > HALFWAYCRITDEATH)
|
||||
H.adjustOxyLoss(H.health - HALFWAYCRITDEATH, 0)
|
||||
else
|
||||
var/overall_damage = total_brute + total_burn + H.getToxLoss() + H.getOxyLoss()
|
||||
var/mobhealth = H.health
|
||||
H.adjustOxyLoss((mobhealth - HALFWAYCRITDEATH) * (H.getOxyLoss() / overall_damage), 0)
|
||||
H.adjustToxLoss((mobhealth - HALFWAYCRITDEATH) * (H.getToxLoss() / overall_damage), 0)
|
||||
H.adjustFireLoss((mobhealth - HALFWAYCRITDEATH) * (total_burn / overall_damage), 0)
|
||||
H.adjustBruteLoss((mobhealth - HALFWAYCRITDEATH) * (total_brute / overall_damage), 0)
|
||||
H.updatehealth() // Previous "adjust" procs don't update health, so we do it manually.
|
||||
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.</span>")
|
||||
playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
|
||||
H.set_heartattack(FALSE)
|
||||
H.revive()
|
||||
H.emote("gasp")
|
||||
H.Jitter(100)
|
||||
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(tplus > tloss)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, max(0, min(99, ((tlimit - tplus) / tlimit * 100))), 150)
|
||||
log_combat(user, H, "revived", defib)
|
||||
if(req_defib)
|
||||
if(defib.healdisk)
|
||||
H.heal_overall_damage(25, 25)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = 1
|
||||
update_icon()
|
||||
if(req_defib)
|
||||
defib.cooldowncheck(user)
|
||||
else
|
||||
recharge(60)
|
||||
else if (!H.getorgan(/obj/item/organ/heart))
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's heart is missing. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
else if(H.undergoing_cardiac_arrest())
|
||||
H.set_heartattack(FALSE)
|
||||
if(!(heart.organ_flags & ORGAN_FAILING))
|
||||
H.set_heartattack(FALSE)
|
||||
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed, heart damage detected.</span>")
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/disk/medical/defib_heal))
|
||||
if(healdisk)
|
||||
to_chat(user, "<span class='notice'>This unit is already upgraded with this disk!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You upgrade the unit with Heal upgrade disk!</span>")
|
||||
healdisk = TRUE
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/disk/medical/defib_shock))
|
||||
if(pullshocksafely)
|
||||
to_chat(user, "<span class='notice'>This unit is already upgraded with this disk!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You upgrade the unit with Shock Safety upgrade disk!</span>")
|
||||
pullshocksafely = TRUE
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/disk/medical/defib_speed))
|
||||
if(!primetime == initial(primetime))
|
||||
to_chat(user, "<span class='notice'>This unit is already upgraded with this disk!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You upgrade the unit with Speed upgrade disk!</span>")
|
||||
primetime = 10
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/disk/medical/defib_decay))
|
||||
if(!timedeath == initial(timedeath))
|
||||
to_chat(user, "<span class='notice'>This unit is already upgraded with this disk!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You upgrade the unit with Longer Decay upgrade disk!</span>")
|
||||
timedeath = 20
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg
|
||||
name = "cyborg defibrillator paddles"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.emagged)
|
||||
combat = TRUE
|
||||
else
|
||||
combat = FALSE
|
||||
else
|
||||
combat = FALSE
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/syndicate
|
||||
name = "syndicate defibrillator paddles"
|
||||
desc = "A pair of paddles used to revive deceased operatives. It possesses both the ability to penetrate armor and to deliver powerful shocks offensively."
|
||||
combat = TRUE
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
///////////////////////////////////////////
|
||||
/////////Defibrillator Disks//////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
/obj/item/disk/medical
|
||||
name = "Defibrillator Upgrade Disk"
|
||||
desc = "A blank upgrade disk, made for a defibrillator"
|
||||
icon = 'modular_citadel/icons/obj/defib_disks.dmi'
|
||||
icon_state = "upgrade_disk"
|
||||
item_state = "heal_disk"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/disk/medical/defib_heal
|
||||
name = "Defibrillator Healing Disk"
|
||||
desc = "An upgrade which increases the healing power of the defibrillator"
|
||||
icon_state = "heal_disk"
|
||||
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
|
||||
|
||||
/obj/item/disk/medical/defib_shock
|
||||
name = "Defibrillator Anti-Shock Disk"
|
||||
desc = "A safety upgrade that guarantees only the patient will get shocked"
|
||||
icon_state = "zap_disk"
|
||||
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
|
||||
|
||||
/obj/item/disk/medical/defib_decay
|
||||
name = "Defibrillator Body-Decay Extender Disk"
|
||||
desc = "An upgrade allowing the defibrillator to work on more decayed bodies"
|
||||
icon_state = "body_disk"
|
||||
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 16000, MAT_SILVER = 6000, MAT_TITANIUM = 2000)
|
||||
|
||||
/obj/item/disk/medical/defib_speed
|
||||
name = "Defibrillator Fast Charge Disk"
|
||||
desc = "An upgrade to the defibrillator capacitors, which let it charge faster"
|
||||
icon_state = "fast_disk"
|
||||
materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_GOLD = 26000, MAT_SILVER = 26000)
|
||||
|
||||
#undef HALFWAYCRITDEATH
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,230 @@
|
||||
//Clown PDA is slippery.
|
||||
/obj/item/pda/clown
|
||||
name = "clown PDA"
|
||||
default_cartridge = /obj/item/cartridge/virus/clown
|
||||
inserted_item = /obj/item/toy/crayon/rainbow
|
||||
icon_state = "pda-clown"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
var/slipvictims = list() //CIT CHANGE - makes clown PDAs track unique people slipped
|
||||
|
||||
/obj/item/pda/clown/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 120, NO_SLIP_WHEN_WALKING|SLIP_WHEN_JOGGING, CALLBACK(src, .proc/AfterSlip))
|
||||
|
||||
/obj/item/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
|
||||
if (istype(M) && (M.real_name != owner))
|
||||
slipvictims |= M //CIT CHANGE - makes clown PDAs track unique people slipped
|
||||
var/obj/item/cartridge/virus/clown/cart = cartridge
|
||||
if(istype(cart) && cart.charges < 5)
|
||||
cart.charges++
|
||||
|
||||
// Special AI/pAI PDAs that cannot explode.
|
||||
/obj/item/pda/ai
|
||||
icon = null
|
||||
ttone = "data"
|
||||
fon = FALSE
|
||||
detonatable = FALSE
|
||||
|
||||
/obj/item/pda/ai/attack_self(mob/user)
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
return
|
||||
|
||||
/obj/item/pda/ai/pai
|
||||
ttone = "assist"
|
||||
|
||||
|
||||
|
||||
/obj/item/pda/medical
|
||||
name = "medical PDA"
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-medical"
|
||||
|
||||
/obj/item/pda/viro
|
||||
name = "virology PDA"
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-virology"
|
||||
|
||||
/obj/item/pda/engineering
|
||||
name = "engineering PDA"
|
||||
default_cartridge = /obj/item/cartridge/engineering
|
||||
icon_state = "pda-engineer"
|
||||
|
||||
/obj/item/pda/security
|
||||
name = "security PDA"
|
||||
default_cartridge = /obj/item/cartridge/security
|
||||
icon_state = "pda-security"
|
||||
|
||||
/obj/item/pda/detective
|
||||
name = "detective PDA"
|
||||
default_cartridge = /obj/item/cartridge/detective
|
||||
icon_state = "pda-detective"
|
||||
|
||||
/obj/item/pda/warden
|
||||
name = "warden PDA"
|
||||
default_cartridge = /obj/item/cartridge/security
|
||||
icon_state = "pda-warden"
|
||||
|
||||
/obj/item/pda/janitor
|
||||
name = "janitor PDA"
|
||||
default_cartridge = /obj/item/cartridge/janitor
|
||||
icon_state = "pda-janitor"
|
||||
ttone = "slip"
|
||||
|
||||
/obj/item/pda/toxins
|
||||
name = "scientist PDA"
|
||||
default_cartridge = /obj/item/cartridge/signal/toxins
|
||||
icon_state = "pda-science"
|
||||
ttone = "boom"
|
||||
|
||||
/obj/item/pda/mime
|
||||
name = "mime PDA"
|
||||
default_cartridge = /obj/item/cartridge/virus/mime
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
icon_state = "pda-mime"
|
||||
silent = TRUE
|
||||
ttone = "silence"
|
||||
|
||||
/obj/item/pda/heads
|
||||
default_cartridge = /obj/item/cartridge/head
|
||||
icon_state = "pda-hop"
|
||||
|
||||
/obj/item/pda/heads/hop
|
||||
name = "head of personnel PDA"
|
||||
default_cartridge = /obj/item/cartridge/hop
|
||||
icon_state = "pda-hop"
|
||||
|
||||
/obj/item/pda/heads/hos
|
||||
name = "head of security PDA"
|
||||
default_cartridge = /obj/item/cartridge/hos
|
||||
icon_state = "pda-hos"
|
||||
|
||||
/obj/item/pda/heads/ce
|
||||
name = "chief engineer PDA"
|
||||
default_cartridge = /obj/item/cartridge/ce
|
||||
icon_state = "pda-ce"
|
||||
|
||||
/obj/item/pda/heads/cmo
|
||||
name = "chief medical officer PDA"
|
||||
default_cartridge = /obj/item/cartridge/cmo
|
||||
icon_state = "pda-cmo"
|
||||
|
||||
/obj/item/pda/heads/rd
|
||||
name = "research director PDA"
|
||||
default_cartridge = /obj/item/cartridge/rd
|
||||
inserted_item = /obj/item/pen/fourcolor
|
||||
icon_state = "pda-rd"
|
||||
|
||||
/obj/item/pda/captain
|
||||
name = "captain PDA"
|
||||
default_cartridge = /obj/item/cartridge/captain
|
||||
inserted_item = /obj/item/pen/fountain/captain
|
||||
icon_state = "pda-captain"
|
||||
detonatable = FALSE
|
||||
|
||||
/obj/item/pda/lieutenant
|
||||
name = "lieutenant PDA"
|
||||
default_cartridge = /obj/item/cartridge/captain
|
||||
inserted_item = /obj/item/pen/fountain/captain
|
||||
icon_state = "pda-lieutenant"
|
||||
ttone = "bwoink"
|
||||
detonatable = FALSE
|
||||
hidden = TRUE
|
||||
note = "Congratulations, you have chosen the Thinktronic 5230-2 Personal Data Assistant Prestige Edition! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
|
||||
|
||||
/obj/item/pda/cargo
|
||||
name = "cargo technician PDA"
|
||||
default_cartridge = /obj/item/cartridge/quartermaster
|
||||
icon_state = "pda-cargo"
|
||||
|
||||
/obj/item/pda/quartermaster
|
||||
name = "quartermaster PDA"
|
||||
default_cartridge = /obj/item/cartridge/quartermaster
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
icon_state = "pda-qm"
|
||||
|
||||
/obj/item/pda/shaftminer
|
||||
name = "shaft miner PDA"
|
||||
icon_state = "pda-miner"
|
||||
|
||||
/obj/item/pda/syndicate
|
||||
default_cartridge = /obj/item/cartridge/virus/syndicate
|
||||
icon_state = "pda-syndi"
|
||||
name = "military PDA"
|
||||
owner = "John Doe"
|
||||
hidden = 1
|
||||
|
||||
/obj/item/pda/chaplain
|
||||
name = "chaplain PDA"
|
||||
icon_state = "pda-chaplain"
|
||||
ttone = "holy"
|
||||
|
||||
/obj/item/pda/lawyer
|
||||
name = "lawyer PDA"
|
||||
default_cartridge = /obj/item/cartridge/lawyer
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
icon_state = "pda-lawyer"
|
||||
ttone = "objection"
|
||||
|
||||
/obj/item/pda/botanist
|
||||
name = "botanist PDA"
|
||||
//default_cartridge = /obj/item/cartridge/botanist
|
||||
icon_state = "pda-hydro"
|
||||
|
||||
/obj/item/pda/roboticist
|
||||
name = "roboticist PDA"
|
||||
icon_state = "pda-roboticist"
|
||||
default_cartridge = /obj/item/cartridge/roboticist
|
||||
|
||||
/obj/item/pda/curator
|
||||
name = "curator PDA"
|
||||
icon_state = "pda-library"
|
||||
overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"),
|
||||
'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay"))
|
||||
current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay")
|
||||
default_cartridge = /obj/item/cartridge/curator
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
|
||||
silent = TRUE //Quiet in the library!
|
||||
overlays_offsets = list('icons/obj/pda.dmi' = list(-3,0))
|
||||
overlays_x_offset = -3
|
||||
|
||||
/obj/item/pda/clear
|
||||
name = "clear PDA"
|
||||
icon_state = "pda-clear"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special edition with a transparent case."
|
||||
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
|
||||
|
||||
/obj/item/pda/neko
|
||||
name = "neko PDA"
|
||||
icon_state = "pda-neko"
|
||||
overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_neko", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special feline edition."
|
||||
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Mew Turbo Limited Edition NYA~! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
|
||||
|
||||
/obj/item/pda/cook
|
||||
name = "cook PDA"
|
||||
icon_state = "pda-cook"
|
||||
|
||||
/obj/item/pda/bar
|
||||
name = "bartender PDA"
|
||||
icon_state = "pda-bartender"
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
|
||||
/obj/item/pda/atmos
|
||||
name = "atmospherics PDA"
|
||||
default_cartridge = /obj/item/cartridge/atmos
|
||||
icon_state = "pda-atmos"
|
||||
|
||||
/obj/item/pda/chemist
|
||||
name = "chemist PDA"
|
||||
default_cartridge = /obj/item/cartridge/chemistry
|
||||
icon_state = "pda-chemistry"
|
||||
|
||||
/obj/item/pda/geneticist
|
||||
name = "geneticist PDA"
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-genetics"
|
||||
@@ -0,0 +1,775 @@
|
||||
#define CART_SECURITY (1<<0)
|
||||
#define CART_ENGINE (1<<1)
|
||||
#define CART_ATMOS (1<<2)
|
||||
#define CART_MEDICAL (1<<3)
|
||||
#define CART_MANIFEST (1<<4)
|
||||
#define CART_CLOWN (1<<5)
|
||||
#define CART_MIME (1<<6)
|
||||
#define CART_JANITOR (1<<7)
|
||||
#define CART_REAGENT_SCANNER (1<<8)
|
||||
#define CART_NEWSCASTER (1<<9)
|
||||
#define CART_REMOTE_DOOR (1<<10)
|
||||
#define CART_STATUS_DISPLAY (1<<11)
|
||||
#define CART_QUARTERMASTER (1<<12)
|
||||
#define CART_HYDROPONICS (1<<13)
|
||||
#define CART_DRONEPHONE (1<<14)
|
||||
|
||||
|
||||
/obj/item/cartridge
|
||||
name = "generic cartridge"
|
||||
desc = "A data cartridge for portable microcomputers."
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "cart"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/obj/item/integrated_signaler/radio = null
|
||||
|
||||
var/access = 0 //Bit flags for cartridge access
|
||||
|
||||
var/remote_door_id = ""
|
||||
|
||||
var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
|
||||
var/spam_enabled = 0 //Enables "Send to All" Option
|
||||
|
||||
var/obj/item/pda/host_pda = null
|
||||
var/menu
|
||||
var/datum/data/record/active1 = null //General
|
||||
var/datum/data/record/active2 = null //Medical
|
||||
var/datum/data/record/active3 = null //Security
|
||||
var/obj/machinery/computer/monitor/powmonitor = null // Power Monitor
|
||||
var/list/powermonitors = list()
|
||||
var/message1 // used for status_displays
|
||||
var/message2
|
||||
var/list/stored_data = list()
|
||||
var/current_channel
|
||||
|
||||
var/mob/living/simple_animal/bot/active_bot
|
||||
var/list/botlist = list()
|
||||
|
||||
/obj/item/cartridge/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/pda/pda = loc
|
||||
if(istype(pda))
|
||||
host_pda = pda
|
||||
|
||||
/obj/item/cartridge/engineering
|
||||
name = "\improper Power-ON cartridge"
|
||||
icon_state = "cart-e"
|
||||
access = CART_ENGINE | CART_DRONEPHONE
|
||||
bot_access_flags = FLOOR_BOT
|
||||
|
||||
/obj/item/cartridge/atmos
|
||||
name = "\improper BreatheDeep cartridge"
|
||||
icon_state = "cart-a"
|
||||
access = CART_ATMOS | CART_DRONEPHONE
|
||||
bot_access_flags = FLOOR_BOT | FIRE_BOT
|
||||
|
||||
/obj/item/cartridge/medical
|
||||
name = "\improper Med-U cartridge"
|
||||
icon_state = "cart-m"
|
||||
access = CART_MEDICAL
|
||||
bot_access_flags = MED_BOT
|
||||
|
||||
/obj/item/cartridge/chemistry
|
||||
name = "\improper ChemWhiz cartridge"
|
||||
icon_state = "cart-chem"
|
||||
access = CART_REAGENT_SCANNER
|
||||
bot_access_flags = MED_BOT
|
||||
|
||||
/obj/item/cartridge/security
|
||||
name = "\improper R.O.B.U.S.T. cartridge"
|
||||
icon_state = "cart-s"
|
||||
access = CART_SECURITY
|
||||
bot_access_flags = SEC_BOT
|
||||
|
||||
/obj/item/cartridge/detective
|
||||
name = "\improper D.E.T.E.C.T. cartridge"
|
||||
icon_state = "cart-eye"
|
||||
access = CART_SECURITY | CART_MEDICAL | CART_MANIFEST
|
||||
bot_access_flags = SEC_BOT
|
||||
|
||||
/obj/item/cartridge/janitor
|
||||
name = "\improper CustodiPRO cartridge"
|
||||
desc = "The ultimate in clean-room design."
|
||||
icon_state = "cart-j"
|
||||
access = CART_JANITOR | CART_DRONEPHONE
|
||||
bot_access_flags = CLEAN_BOT
|
||||
|
||||
/obj/item/cartridge/lawyer
|
||||
name = "\improper P.R.O.V.E. cartridge"
|
||||
icon_state = "cart-law"
|
||||
access = CART_SECURITY
|
||||
spam_enabled = 1
|
||||
|
||||
/obj/item/cartridge/curator
|
||||
name = "\improper Lib-Tweet cartridge"
|
||||
icon_state = "cart-lib"
|
||||
access = CART_NEWSCASTER
|
||||
|
||||
/obj/item/cartridge/roboticist
|
||||
name = "\improper B.O.O.P. Remote Control cartridge"
|
||||
desc = "Packed with heavy duty triple-bot interlink!"
|
||||
icon_state = "cart-robo"
|
||||
bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
|
||||
access = CART_DRONEPHONE
|
||||
|
||||
/obj/item/cartridge/signal
|
||||
name = "generic signaler cartridge"
|
||||
icon_state = "cart-sig"
|
||||
desc = "A data cartridge with an integrated radio signaler module."
|
||||
|
||||
/obj/item/cartridge/signal/toxins
|
||||
name = "\improper Signal Ace 2 cartridge"
|
||||
desc = "Complete with integrated radio signaler!"
|
||||
icon_state = "cart-tox"
|
||||
access = CART_REAGENT_SCANNER | CART_ATMOS
|
||||
|
||||
/obj/item/cartridge/signal/Initialize()
|
||||
. = ..()
|
||||
radio = new(src)
|
||||
|
||||
|
||||
|
||||
/obj/item/cartridge/quartermaster
|
||||
name = "space parts & space vendors cartridge"
|
||||
desc = "Perfect for the Quartermaster on the go!"
|
||||
icon_state = "cart-q"
|
||||
access = CART_QUARTERMASTER
|
||||
bot_access_flags = MULE_BOT
|
||||
|
||||
/obj/item/cartridge/head
|
||||
name = "\improper Easy-Record DELUXE cartridge"
|
||||
icon_state = "cart-h"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY
|
||||
|
||||
/obj/item/cartridge/hop
|
||||
name = "\improper HumanResources9001 cartridge"
|
||||
icon_state = "cart-h"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_JANITOR | CART_SECURITY | CART_NEWSCASTER | CART_QUARTERMASTER | CART_DRONEPHONE
|
||||
bot_access_flags = MULE_BOT | CLEAN_BOT
|
||||
|
||||
/obj/item/cartridge/hos
|
||||
name = "\improper R.O.B.U.S.T. DELUXE cartridge"
|
||||
icon_state = "cart-hos"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_SECURITY
|
||||
bot_access_flags = SEC_BOT
|
||||
|
||||
|
||||
/obj/item/cartridge/ce
|
||||
name = "\improper Power-On DELUXE cartridge"
|
||||
icon_state = "cart-ce"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_ENGINE | CART_ATMOS | CART_DRONEPHONE
|
||||
bot_access_flags = FLOOR_BOT | FIRE_BOT
|
||||
|
||||
/obj/item/cartridge/cmo
|
||||
name = "\improper Med-U DELUXE cartridge"
|
||||
icon_state = "cart-cmo"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_REAGENT_SCANNER | CART_MEDICAL
|
||||
bot_access_flags = MED_BOT
|
||||
|
||||
/obj/item/cartridge/rd
|
||||
name = "\improper Signal Ace DELUXE cartridge"
|
||||
icon_state = "cart-rd"
|
||||
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_REAGENT_SCANNER | CART_ATMOS | CART_DRONEPHONE
|
||||
bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
|
||||
|
||||
/obj/item/cartridge/rd/Initialize()
|
||||
. = ..()
|
||||
radio = new(src)
|
||||
|
||||
/obj/item/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
desc = "Now with 350% more value!" //Give the Captain...EVERYTHING! (Except Mime, Clown, and Syndie)
|
||||
icon_state = "cart-c"
|
||||
access = ~(CART_CLOWN | CART_MIME | CART_REMOTE_DOOR)
|
||||
bot_access_flags = SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
|
||||
spam_enabled = 1
|
||||
|
||||
/obj/item/cartridge/captain/New()
|
||||
..()
|
||||
radio = new(src)
|
||||
|
||||
/obj/item/cartridge/proc/post_status(command, data1, data2)
|
||||
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS)
|
||||
|
||||
if(!frequency)
|
||||
return
|
||||
|
||||
var/datum/signal/status_signal = new(list("command" = command))
|
||||
switch(command)
|
||||
if("message")
|
||||
status_signal.data["msg1"] = data1
|
||||
status_signal.data["msg2"] = data2
|
||||
if("alert")
|
||||
status_signal.data["picture_state"] = data1
|
||||
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
/obj/item/cartridge/proc/generate_menu(mob/user)
|
||||
if(!host_pda)
|
||||
return
|
||||
switch(host_pda.mode)
|
||||
if(40) //signaller
|
||||
menu = "<h4>[PDAIMG(signaler)] Remote Signaling System</h4>"
|
||||
|
||||
menu += {"
|
||||
<a href='byond://?src=[REF(src)];choice=Send Signal'>Send Signal</A><BR>
|
||||
Frequency:
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=-10'>-</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=-2'>-</a>
|
||||
[format_frequency(radio.frequency)]
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=2'>+</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=10'>+</a><br>
|
||||
<br>
|
||||
Code:
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=-5'>-</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=-1'>-</a>
|
||||
[radio.code]
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=1'>+</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=5'>+</a><br>"}
|
||||
if (41) //crew manifest
|
||||
|
||||
menu = "<h4>[PDAIMG(notes)] Crew Manifest</h4>"
|
||||
menu += "Entries cannot be modified from this terminal.<br><br>"
|
||||
if(GLOB.data_core.general)
|
||||
for (var/datum/data/record/t in sortRecord(GLOB.data_core.general))
|
||||
menu += "[t.fields["name"]] - [t.fields["rank"]]<br>"
|
||||
menu += "<br>"
|
||||
|
||||
|
||||
if (42) //status displays
|
||||
menu = "<h4>[PDAIMG(status)] Station Status Display Interlink</h4>"
|
||||
|
||||
menu += "\[ <A HREF='?src=[REF(src)];choice=Status;statdisp=blank'>Clear</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=[REF(src)];choice=Status;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
menu += "\[ <A HREF='?src=[REF(src)];choice=Status;statdisp=message'>Message</A> \]"
|
||||
menu += "<ul><li> Line 1: <A HREF='?src=[REF(src)];choice=Status;statdisp=setmsg1'>[ message1 ? message1 : "(none)"]</A>"
|
||||
menu += "<li> Line 2: <A HREF='?src=[REF(src)];choice=Status;statdisp=setmsg2'>[ message2 ? message2 : "(none)"]</A></ul><br>"
|
||||
menu += "\[ Alert: <A HREF='?src=[REF(src)];choice=Status;statdisp=alert;alert=default'>None</A> |"
|
||||
menu += " <A HREF='?src=[REF(src)];choice=Status;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
menu += " <A HREF='?src=[REF(src)];choice=Status;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
menu += " <A HREF='?src=[REF(src)];choice=Status;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR>"
|
||||
|
||||
if (43)
|
||||
menu = "<h4>[PDAIMG(power)] Power Monitors - Please select one</h4><BR>"
|
||||
powmonitor = null
|
||||
powermonitors = list()
|
||||
var/powercount = 0
|
||||
|
||||
|
||||
|
||||
var/turf/pda_turf = get_turf(src)
|
||||
for(var/obj/machinery/computer/monitor/pMon in GLOB.machines)
|
||||
if(pMon.stat & (NOPOWER | BROKEN)) //check to make sure the computer is functional
|
||||
continue
|
||||
if(pda_turf.z != pMon.z) //and that we're on the same zlevel as the computer (lore: limited signal strength)
|
||||
continue
|
||||
if(pMon.is_secret_monitor) //make sure it isn't a secret one (ie located on a ruin), allowing people to metagame that the location exists
|
||||
continue
|
||||
powercount++
|
||||
powermonitors += pMon
|
||||
|
||||
|
||||
if(!powercount)
|
||||
menu += "<span class='danger'>No connection<BR></span>"
|
||||
else
|
||||
|
||||
menu += "<FONT SIZE=-1>"
|
||||
var/count = 0
|
||||
for(var/obj/machinery/computer/monitor/pMon in powermonitors)
|
||||
count++
|
||||
menu += "<a href='byond://?src=[REF(src)];choice=Power Select;target=[count]'>[pMon] - [get_area_name(pMon, TRUE)] </a><BR>"
|
||||
|
||||
menu += "</FONT>"
|
||||
|
||||
if (433)
|
||||
menu = "<h4>[PDAIMG(power)] Power Monitor </h4><BR>"
|
||||
if(!powmonitor || !powmonitor.get_powernet())
|
||||
menu += "<span class='danger'>No connection<BR></span>"
|
||||
else
|
||||
var/list/L = list()
|
||||
var/datum/powernet/connected_powernet = powmonitor.get_powernet()
|
||||
for(var/obj/machinery/power/terminal/term in connected_powernet.nodes)
|
||||
if(istype(term.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = term.master
|
||||
L += A
|
||||
|
||||
menu += "<PRE>Location: [get_area_name(powmonitor, TRUE)]<BR>Total power: [DisplayPower(connected_powernet.viewavail)]<BR>Total load: [DisplayPower(connected_powernet.viewload)]<BR>"
|
||||
|
||||
menu += "<FONT SIZE=-1>"
|
||||
|
||||
if(L.len > 0)
|
||||
menu += "Area Eqp./Lgt./Env. Load Cell<HR>"
|
||||
|
||||
var/list/S = list(" Off","AOff"," On", " AOn")
|
||||
var/list/chg = list("N","C","F")
|
||||
|
||||
for(var/obj/machinery/power/apc/A in L)
|
||||
menu += copytext(add_tspace(A.area.name, 30), 1, 30)
|
||||
menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(DisplayPower(A.lastused_total), 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]<BR>"
|
||||
|
||||
menu += "</FONT></PRE>"
|
||||
|
||||
if (44) //medical records //This thing only displays a single screen so it's hard to really get the sub-menu stuff working.
|
||||
menu = "<h4>[PDAIMG(medical)] Medical Record List</h4>"
|
||||
if(GLOB.data_core.general)
|
||||
for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
|
||||
menu += "<a href='byond://?src=[REF(src)];choice=Medical Records;target=[R.fields["id"]]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
menu += "<br>"
|
||||
if(441)
|
||||
menu = "<h4>[PDAIMG(medical)] Medical Record</h4>"
|
||||
|
||||
if(active1 in GLOB.data_core.general)
|
||||
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
|
||||
menu += "Sex: [active1.fields["sex"]]<br>"
|
||||
menu += "Age: [active1.fields["age"]]<br>"
|
||||
menu += "Rank: [active1.fields["rank"]]<br>"
|
||||
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
|
||||
menu += "Physical Status: [active1.fields["p_stat"]]<br>"
|
||||
menu += "Mental Status: [active1.fields["m_stat"]]<br>"
|
||||
else
|
||||
menu += "<b>Record Lost!</b><br>"
|
||||
|
||||
menu += "<br>"
|
||||
|
||||
menu += "<h4>[PDAIMG(medical)] Medical Data</h4>"
|
||||
if(active2 in GLOB.data_core.medical)
|
||||
menu += "Blood Type: [active2.fields["blood_type"]]<br><br>"
|
||||
|
||||
menu += "Minor Disabilities: [active2.fields["mi_dis"]]<br>"
|
||||
menu += "Details: [active2.fields["mi_dis_d"]]<br><br>"
|
||||
|
||||
menu += "Major Disabilities: [active2.fields["ma_dis"]]<br>"
|
||||
menu += "Details: [active2.fields["ma_dis_d"]]<br><br>"
|
||||
|
||||
menu += "Allergies: [active2.fields["alg"]]<br>"
|
||||
menu += "Details: [active2.fields["alg_d"]]<br><br>"
|
||||
|
||||
menu += "Current Diseases: [active2.fields["cdi"]]<br>"
|
||||
menu += "Details: [active2.fields["cdi_d"]]<br><br>"
|
||||
|
||||
menu += "Important Notes: [active2.fields["notes"]]<br>"
|
||||
else
|
||||
menu += "<b>Record Lost!</b><br>"
|
||||
|
||||
menu += "<br>"
|
||||
if (45) //security records
|
||||
menu = "<h4>[PDAIMG(cuffs)] Security Record List</h4>"
|
||||
if(GLOB.data_core.general)
|
||||
for (var/datum/data/record/R in sortRecord(GLOB.data_core.general))
|
||||
menu += "<a href='byond://?src=[REF(src)];choice=Security Records;target=[R.fields["id"]]'>[R.fields["id"]]: [R.fields["name"]]<br>"
|
||||
|
||||
menu += "<br>"
|
||||
if(451)
|
||||
menu = "<h4>[PDAIMG(cuffs)] Security Record</h4>"
|
||||
|
||||
if(active1 in GLOB.data_core.general)
|
||||
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
|
||||
menu += "Sex: [active1.fields["sex"]]<br>"
|
||||
menu += "Age: [active1.fields["age"]]<br>"
|
||||
menu += "Rank: [active1.fields["rank"]]<br>"
|
||||
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
|
||||
menu += "Physical Status: [active1.fields["p_stat"]]<br>"
|
||||
menu += "Mental Status: [active1.fields["m_stat"]]<br>"
|
||||
else
|
||||
menu += "<b>Record Lost!</b><br>"
|
||||
|
||||
menu += "<br>"
|
||||
|
||||
menu += "<h4>[PDAIMG(cuffs)] Security Data</h4>"
|
||||
if(active3 in GLOB.data_core.security)
|
||||
menu += "Criminal Status: [active3.fields["criminal"]]<br>"
|
||||
|
||||
menu += text("<BR>\nMinor Crimes:")
|
||||
|
||||
menu +={"<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Crime</th>
|
||||
<th>Details</th>
|
||||
<th>Author</th>
|
||||
<th>Time Added</th>
|
||||
</tr>"}
|
||||
for(var/datum/data/crime/c in active3.fields["mi_crim"])
|
||||
menu += "<tr><td>[c.crimeName]</td>"
|
||||
menu += "<td>[c.crimeDetails]</td>"
|
||||
menu += "<td>[c.author]</td>"
|
||||
menu += "<td>[c.time]</td>"
|
||||
menu += "</tr>"
|
||||
menu += "</table>"
|
||||
|
||||
menu += text("<BR>\nMajor Crimes:")
|
||||
|
||||
menu +={"<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Crime</th>
|
||||
<th>Details</th>
|
||||
<th>Author</th>
|
||||
<th>Time Added</th>
|
||||
</tr>"}
|
||||
for(var/datum/data/crime/c in active3.fields["ma_crim"])
|
||||
menu += "<tr><td>[c.crimeName]</td>"
|
||||
menu += "<td>[c.crimeDetails]</td>"
|
||||
menu += "<td>[c.author]</td>"
|
||||
menu += "<td>[c.time]</td>"
|
||||
menu += "</tr>"
|
||||
menu += "</table>"
|
||||
|
||||
menu += "<BR>\nImportant Notes:<br>"
|
||||
menu += "[active3.fields["notes"]]"
|
||||
else
|
||||
menu += "<b>Record Lost!</b><br>"
|
||||
|
||||
menu += "<br>"
|
||||
|
||||
if (47) //quartermaster order records
|
||||
menu = "<h4>[PDAIMG(crate)] Supply Record Interlink</h4>"
|
||||
|
||||
menu += "<BR><B>Supply shuttle</B><BR>"
|
||||
menu += "Location: "
|
||||
switch(SSshuttle.supply.mode)
|
||||
if(SHUTTLE_CALL)
|
||||
menu += "Moving to "
|
||||
if(!is_station_level(SSshuttle.supply.z))
|
||||
menu += "station"
|
||||
else
|
||||
menu += "CentCom"
|
||||
menu += " ([SSshuttle.supply.timeLeft(600)] Mins)"
|
||||
else
|
||||
menu += "At "
|
||||
if(!is_station_level(SSshuttle.supply.z))
|
||||
menu += "CentCom"
|
||||
else
|
||||
menu += "station"
|
||||
menu += "<BR>Current approved orders: <BR><ol>"
|
||||
for(var/S in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = S
|
||||
menu += "<li>#[SO.id] - [SO.pack.name] approved by [SO.orderer] [SO.reason ? "([SO.reason])":""]</li>"
|
||||
menu += "</ol>"
|
||||
|
||||
menu += "Current requests: <BR><ol>"
|
||||
for(var/S in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = S
|
||||
menu += "<li>#[SO.id] - [SO.pack.name] requested by [SO.orderer]</li>"
|
||||
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management."
|
||||
|
||||
if (48) // quartermaster ore logs
|
||||
menu = list("<h4>[PDAIMG(crate)] Ore Silo Logs</h4>")
|
||||
if (GLOB.ore_silo_default)
|
||||
var/list/logs = GLOB.silo_access_logs[REF(GLOB.ore_silo_default)]
|
||||
var/len = LAZYLEN(logs)
|
||||
var/i = 0
|
||||
for(var/M in logs)
|
||||
if (++i > 30)
|
||||
menu += "(... older logs not shown ...)"
|
||||
break
|
||||
var/datum/ore_silo_log/entry = M
|
||||
menu += "[len - i]. [entry.formatted]<br><br>"
|
||||
if(i == 0)
|
||||
menu += "Nothing!"
|
||||
else
|
||||
menu += "<b>No ore silo detected!</b>"
|
||||
menu = jointext(menu, "")
|
||||
|
||||
if (49) //janitorial locator
|
||||
menu = "<h4>[PDAIMG(bucket)] Persistent Custodial Object Locator</h4>"
|
||||
|
||||
var/turf/cl = get_turf(src)
|
||||
if (cl)
|
||||
menu += "Current Orbital Location: <b>\[[cl.x],[cl.y]\]</b>"
|
||||
|
||||
menu += "<h4>Located Mops:</h4>"
|
||||
|
||||
var/ldat
|
||||
for (var/obj/item/mop/M in world)
|
||||
var/turf/ml = get_turf(M)
|
||||
|
||||
if(ml)
|
||||
if (ml.z != cl.z)
|
||||
continue
|
||||
var/direction = get_dir(src, M)
|
||||
ldat += "Mop - <b>\[[ml.x],[ml.y] ([uppertext(dir2text(direction))])\]</b> - [M.reagents.total_volume ? "Wet" : "Dry"]<br>"
|
||||
|
||||
if (!ldat)
|
||||
menu += "None"
|
||||
else
|
||||
menu += "[ldat]"
|
||||
|
||||
menu += "<h4>Pimpin' Ride:</h4>"
|
||||
|
||||
ldat = null
|
||||
for (var/obj/vehicle/ridden/janicart/M in world)
|
||||
var/turf/ml = get_turf(M)
|
||||
|
||||
if(ml)
|
||||
if (ml.z != cl.z)
|
||||
continue
|
||||
var/direction = get_dir(src, M)
|
||||
ldat += "Ride - <b>\[[ml.x],[ml.y] ([uppertext(dir2text(direction))])\]</b><br>"
|
||||
|
||||
if (!ldat)
|
||||
menu += "None"
|
||||
else
|
||||
menu += "[ldat]"
|
||||
|
||||
menu += "<h4>Located Janitorial Cart:</h4>"
|
||||
|
||||
ldat = null
|
||||
for (var/obj/structure/janitorialcart/B in world)
|
||||
var/turf/bl = get_turf(B)
|
||||
|
||||
if(bl)
|
||||
if (bl.z != cl.z)
|
||||
continue
|
||||
var/direction = get_dir(src, B)
|
||||
ldat += "Cart - <b>\[[bl.x],[bl.y] ([uppertext(dir2text(direction))])\]</b> - Water level: [B.reagents.total_volume]/100<br>"
|
||||
|
||||
if (!ldat)
|
||||
menu += "None"
|
||||
else
|
||||
menu += "[ldat]"
|
||||
|
||||
menu += "<h4>Located Cleanbots:</h4>"
|
||||
|
||||
ldat = null
|
||||
for (var/mob/living/simple_animal/bot/cleanbot/B in GLOB.alive_mob_list)
|
||||
var/turf/bl = get_turf(B)
|
||||
|
||||
if(bl)
|
||||
if (bl.z != cl.z)
|
||||
continue
|
||||
var/direction = get_dir(src, B)
|
||||
ldat += "Cleanbot - <b>\[[bl.x],[bl.y] ([uppertext(dir2text(direction))])\]</b> - [B.on ? "Online" : "Offline"]<br>"
|
||||
|
||||
if (!ldat)
|
||||
menu += "None"
|
||||
else
|
||||
menu += "[ldat]"
|
||||
|
||||
else
|
||||
menu += "ERROR: Unable to determine current location."
|
||||
menu += "<br><br><A href='byond://?src=[REF(src)];choice=49'>Refresh GPS Locator</a>"
|
||||
|
||||
if (53) // Newscaster
|
||||
menu = "<h4>[PDAIMG(notes)] Newscaster Access</h4>"
|
||||
menu += "<br> Current Newsfeed: <A href='byond://?src=[REF(src)];choice=Newscaster Switch Channel'>[current_channel ? current_channel : "None"]</a> <br>"
|
||||
var/datum/newscaster/feed_channel/current
|
||||
for(var/datum/newscaster/feed_channel/chan in GLOB.news_network.network_channels)
|
||||
if (chan.channel_name == current_channel)
|
||||
current = chan
|
||||
if(!current)
|
||||
menu += "<h5> ERROR : NO CHANNEL FOUND </h5>"
|
||||
return
|
||||
var/i = 1
|
||||
for(var/datum/newscaster/feed_message/msg in current.messages)
|
||||
menu +="-[msg.returnBody(-1)] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[msg.returnAuthor(-1)]</FONT>\]</FONT><BR>"
|
||||
menu +="<b><font size=1>[msg.comments.len] comment[msg.comments.len > 1 ? "s" : ""]</font></b><br>"
|
||||
if(msg.img)
|
||||
user << browse_rsc(msg.img, "tmp_photo[i].png")
|
||||
menu +="<img src='tmp_photo[i].png' width = '180'><BR>"
|
||||
i++
|
||||
for(var/datum/newscaster/feed_comment/comment in msg.comments)
|
||||
menu +="<font size=1><small>[comment.body]</font><br><font size=1><small><small><small>[comment.author] [comment.time_stamp]</small></small></small></small></font><br>"
|
||||
menu += "<br> <A href='byond://?src=[REF(src)];choice=Newscaster Message'>Post Message</a>"
|
||||
|
||||
if (54) // Beepsky, Medibot, Floorbot, and Cleanbot access
|
||||
menu = "<h4>[PDAIMG(medbot)] Bots Interlink</h4>"
|
||||
bot_control()
|
||||
if (99) //Newscaster message permission error
|
||||
menu = "<h5> ERROR : NOT AUTHORIZED [host_pda.id ? "" : "- ID SLOT EMPTY"] </h5>"
|
||||
|
||||
return menu
|
||||
|
||||
/obj/item/cartridge/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
switch(href_list["choice"])
|
||||
if("Medical Records")
|
||||
active1 = find_record("id", href_list["target"], GLOB.data_core.general)
|
||||
if(active1)
|
||||
active2 = find_record("id", href_list["target"], GLOB.data_core.medical)
|
||||
host_pda.mode = 441
|
||||
if(!active2)
|
||||
active1 = null
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Security Records")
|
||||
active1 = find_record("id", href_list["target"], GLOB.data_core.general)
|
||||
if(active1)
|
||||
active3 = find_record("id", href_list["target"], GLOB.data_core.security)
|
||||
host_pda.mode = 451
|
||||
if(!active3)
|
||||
active1 = null
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Send Signal")
|
||||
INVOKE_ASYNC(radio, /obj/item/integrated_signaler.proc/send_activation)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Signal Frequency")
|
||||
var/new_frequency = sanitize_frequency(radio.frequency + text2num(href_list["sfreq"]))
|
||||
radio.set_frequency(new_frequency)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Signal Code")
|
||||
radio.code += text2num(href_list["scode"])
|
||||
radio.code = round(radio.code)
|
||||
radio.code = min(100, radio.code)
|
||||
radio.code = max(1, radio.code)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Status")
|
||||
switch(href_list["statdisp"])
|
||||
if("message")
|
||||
post_status("message", message1, message2)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
if("setmsg1")
|
||||
message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40)
|
||||
updateSelfDialog()
|
||||
if("setmsg2")
|
||||
message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40)
|
||||
updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Power Select")
|
||||
var/pnum = text2num(href_list["target"])
|
||||
powmonitor = powermonitors[pnum]
|
||||
host_pda.mode = 433
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Supply Orders")
|
||||
host_pda.mode =47
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Newscaster Access")
|
||||
host_pda.mode = 53
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Newscaster Message")
|
||||
var/host_pda_owner_name = host_pda.id ? "[host_pda.id.registered_name] ([host_pda.id.assignment])" : "Unknown"
|
||||
var/message = host_pda.msg_input()
|
||||
var/datum/newscaster/feed_channel/current
|
||||
for(var/datum/newscaster/feed_channel/chan in GLOB.news_network.network_channels)
|
||||
if (chan.channel_name == current_channel)
|
||||
current = chan
|
||||
if(current.locked && current.author != host_pda_owner_name)
|
||||
host_pda.mode = 99
|
||||
host_pda.Topic(null,list("choice"="Refresh"))
|
||||
return
|
||||
GLOB.news_network.SubmitArticle(message,host_pda.owner,current_channel)
|
||||
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if("Newscaster Switch Channel")
|
||||
current_channel = host_pda.msg_input()
|
||||
host_pda.Topic(null,list("choice"=num2text(host_pda.mode)))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
//Bot control section! Viciously ripped from radios for being laggy and terrible.
|
||||
if(href_list["op"])
|
||||
switch(href_list["op"])
|
||||
|
||||
if("control")
|
||||
active_bot = locate(href_list["bot"])
|
||||
|
||||
if("botlist")
|
||||
active_bot = null
|
||||
|
||||
if("summon") //Args are in the correct order, they are stated here just as an easy reminder.
|
||||
active_bot.bot_control(command= "summon", user_turf= get_turf(usr), user_access= host_pda.GetAccess())
|
||||
|
||||
else //Forward all other bot commands to the bot itself!
|
||||
active_bot.bot_control(command= href_list["op"], user= usr)
|
||||
playsound(src, 'sound/machines/terminal_select.ogg', 50, 1)
|
||||
|
||||
if(href_list["mule"]) //MULEbots are special snowflakes, and need different args due to how they work.
|
||||
|
||||
active_bot.bot_control(href_list["mule"], usr, TRUE)
|
||||
|
||||
if(!host_pda)
|
||||
return
|
||||
host_pda.attack_self(usr)
|
||||
|
||||
|
||||
/obj/item/cartridge/proc/bot_control()
|
||||
|
||||
|
||||
var/mob/living/simple_animal/bot/Bot
|
||||
|
||||
if(active_bot)
|
||||
menu += "<B>[active_bot]</B><BR> Status: (<A href='byond://?src=[REF(src)];op=control;bot=[REF(active_bot)]'>[PDAIMG(refresh)]<i>refresh</i></A>)<BR>"
|
||||
menu += "Model: [active_bot.model]<BR>"
|
||||
menu += "Location: [get_area(active_bot)]<BR>"
|
||||
menu += "Mode: [active_bot.get_mode()]"
|
||||
if(active_bot.allow_pai)
|
||||
menu += "<BR>pAI: "
|
||||
if(active_bot.paicard && active_bot.paicard.pai)
|
||||
menu += "[active_bot.paicard.pai.name]"
|
||||
if(active_bot.bot_core.allowed(usr))
|
||||
menu += " (<A href='byond://?src=[REF(src)];op=ejectpai'><i>eject</i></A>)"
|
||||
else
|
||||
menu += "<i>none</i>"
|
||||
|
||||
//MULEs!
|
||||
if(active_bot.bot_type == MULE_BOT)
|
||||
var/mob/living/simple_animal/bot/mulebot/MULE = active_bot
|
||||
var/atom/Load = MULE.load
|
||||
menu += "<BR>Current Load: [ !Load ? "<i>none</i>" : "[Load.name] (<A href='byond://?src=[REF(src)];mule=unload'><i>unload</i></A>)" ]<BR>"
|
||||
menu += "Destination: [MULE.destination ? MULE.destination : "<i>None</i>"] (<A href='byond://?src=[REF(src)];mule=destination'><i>set</i></A>)<BR>"
|
||||
menu += "Set ID: [MULE.suffix] <A href='byond://?src=[REF(src)];mule=setid'><i> Modify</i></A><BR>"
|
||||
menu += "Power: [MULE.cell ? MULE.cell.percent() : 0]%<BR>"
|
||||
menu += "Home: [!MULE.home_destination ? "<i>none</i>" : MULE.home_destination ]<BR>"
|
||||
menu += "Delivery Reporting: <A href='byond://?src=[REF(src)];mule=report'>[MULE.report_delivery ? "(<B>On</B>)": "(<B>Off</B>)"]</A><BR>"
|
||||
menu += "Auto Return Home: <A href='byond://?src=[REF(src)];mule=autoret'>[MULE.auto_return ? "(<B>On</B>)": "(<B>Off</B>)"]</A><BR>"
|
||||
menu += "Auto Pickup Crate: <A href='byond://?src=[REF(src)];mule=autopick'>[MULE.auto_pickup ? "(<B>On</B>)": "(<B>Off</B>)"]</A><BR><BR>" //Hue.
|
||||
|
||||
menu += "\[<A href='byond://?src=[REF(src)];mule=stop'>Stop</A>\] "
|
||||
menu += "\[<A href='byond://?src=[REF(src)];mule=go'>Proceed</A>\] "
|
||||
menu += "\[<A href='byond://?src=[REF(src)];mule=home'>Return Home</A>\]<BR>"
|
||||
|
||||
else
|
||||
menu += "<BR>\[<A href='byond://?src=[REF(src)];op=patroloff'>Stop Patrol</A>\] " //patrolon
|
||||
menu += "\[<A href='byond://?src=[REF(src)];op=patrolon'>Start Patrol</A>\] " //patroloff
|
||||
menu += "\[<A href='byond://?src=[REF(src)];op=summon'>Summon Bot</A>\]<BR>" //summon
|
||||
menu += "Keep an ID inserted to upload access codes upon summoning."
|
||||
|
||||
menu += "<HR><A href='byond://?src=[REF(src)];op=botlist'>[PDAIMG(back)]Return to bot list</A>"
|
||||
else
|
||||
menu += "<BR><A href='byond://?src=[REF(src)];op=botlist'>[PDAIMG(refresh)]Scan for active bots</A><BR><BR>"
|
||||
var/turf/current_turf = get_turf(src)
|
||||
var/zlevel = current_turf.z
|
||||
var/botcount = 0
|
||||
for(Bot in GLOB.alive_mob_list) //Git da botz
|
||||
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots on the same Z-level are detected!
|
||||
continue //Also, the PDA must have access to the bot type.
|
||||
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
|
||||
botcount++
|
||||
if(!botcount) //No bots at all? Lame.
|
||||
menu += "No bots found.<BR>"
|
||||
return
|
||||
|
||||
return menu
|
||||
|
||||
//If the cartridge adds a special line to the top of the messaging app
|
||||
/obj/item/cartridge/proc/message_header()
|
||||
return ""
|
||||
|
||||
//If the cartridge adds something to each potetial messaging target
|
||||
/obj/item/cartridge/proc/message_special(obj/item/pda/target)
|
||||
return ""
|
||||
|
||||
//This is called for special abilities of cartridges
|
||||
/obj/item/cartridge/proc/special(mob/living/user, list/params)
|
||||
@@ -0,0 +1,108 @@
|
||||
/obj/item/cartridge/virus
|
||||
name = "Generic Virus PDA cart"
|
||||
var/charges = 5
|
||||
|
||||
/obj/item/cartridge/virus/proc/send_virus(obj/item/pda/target, mob/living/U)
|
||||
return
|
||||
|
||||
/obj/item/cartridge/virus/message_header()
|
||||
return "<b>[charges] viral files left.</b><HR>"
|
||||
|
||||
/obj/item/cartridge/virus/message_special(obj/item/pda/target)
|
||||
if (!istype(loc, /obj/item/pda))
|
||||
return "" //Sanity check, this shouldn't be possible.
|
||||
return " (<a href='byond://?src=[REF(loc)];choice=cart;special=virus;target=[REF(target)]'>*Send Virus*</a>)"
|
||||
|
||||
/obj/item/cartridge/virus/special(mob/living/user, list/params)
|
||||
var/obj/item/pda/P = locate(params["target"])//Leaving it alone in case it may do something useful, I guess.
|
||||
send_virus(P,user)
|
||||
|
||||
/obj/item/cartridge/virus/clown
|
||||
name = "\improper Honkworks 5.0 cartridge"
|
||||
icon_state = "cart-clown"
|
||||
desc = "A data cartridge for portable microcomputers. It smells vaguely of bananas."
|
||||
access = CART_CLOWN
|
||||
|
||||
/obj/item/cartridge/virus/clown/send_virus(obj/item/pda/target, mob/living/U)
|
||||
if(charges <= 0)
|
||||
to_chat(U, "<span class='notice'>Out of charges.</span>")
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
to_chat(U, "<span class='notice'>Virus Sent!</span>")
|
||||
target.honkamt = (rand(15,20))
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
|
||||
/obj/item/cartridge/virus/mime
|
||||
name = "\improper Gestur-O 1000 cartridge"
|
||||
icon_state = "cart-mi"
|
||||
access = CART_MIME
|
||||
|
||||
/obj/item/cartridge/virus/mime/send_virus(obj/item/pda/target, mob/living/U)
|
||||
if(charges <= 0)
|
||||
to_chat(U, "<span class='notice'>Out of charges.</span>")
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
to_chat(U, "<span class='notice'>Virus Sent!</span>")
|
||||
target.silent = TRUE
|
||||
target.ttone = "silence"
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
|
||||
/obj/item/cartridge/virus/syndicate
|
||||
name = "\improper Detomatix cartridge"
|
||||
access = CART_REMOTE_DOOR
|
||||
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
|
||||
charges = 4
|
||||
|
||||
/obj/item/cartridge/virus/syndicate/send_virus(obj/item/pda/target, mob/living/U)
|
||||
if(charges <= 0)
|
||||
to_chat(U, "<span class='notice'>Out of charges.</span>")
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
var/difficulty = 0
|
||||
if(target.cartridge)
|
||||
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink)
|
||||
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
|
||||
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
|
||||
else
|
||||
message_admins("[!is_special_character(U) ? "Non-antag " : ""][ADMIN_LOOKUPFLW(U)] triggered a PDA explosion on [target.name] at [ADMIN_VERBOSEJMP(target)].")
|
||||
var/message_log = "triggered a PDA explosion on [target.name] at [AREACOORD(target)]."
|
||||
U.log_message(message_log, LOG_ATTACK)
|
||||
U.show_message("<span class='notice'>Success!</span>", 1)
|
||||
target.explode()
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
|
||||
/obj/item/cartridge/virus/frame
|
||||
name = "\improper F.R.A.M.E. cartridge"
|
||||
icon_state = "cart-f"
|
||||
var/telecrystals = 0
|
||||
|
||||
/obj/item/cartridge/virus/frame/send_virus(obj/item/pda/target, mob/living/U)
|
||||
if(charges <= 0)
|
||||
to_chat(U, "<span class='notice'>Out of charges.</span>")
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink)
|
||||
if(!hidden_uplink)
|
||||
hidden_uplink = target.AddComponent(/datum/component/uplink)
|
||||
hidden_uplink.unlock_code = lock_code
|
||||
else
|
||||
hidden_uplink.hidden_crystals += hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
|
||||
hidden_uplink.telecrystals = telecrystals
|
||||
telecrystals = 0
|
||||
hidden_uplink.active = TRUE
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
@@ -0,0 +1,176 @@
|
||||
/obj/item/chameleon
|
||||
name = "chameleon-projector"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "shield0"
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/can_use = 1
|
||||
var/obj/effect/dummy/chameleon/active_dummy = null
|
||||
var/saved_appearance = null
|
||||
|
||||
/obj/item/chameleon/New()
|
||||
..()
|
||||
var/obj/item/cigbutt/butt = /obj/item/cigbutt
|
||||
saved_appearance = initial(butt.appearance)
|
||||
|
||||
/obj/item/chameleon/dropped()
|
||||
..()
|
||||
disrupt()
|
||||
|
||||
/obj/item/chameleon/equipped()
|
||||
..()
|
||||
disrupt()
|
||||
|
||||
/obj/item/chameleon/attack_self(mob/user)
|
||||
if (isturf(user.loc) || istype(user.loc, /obj/structure) || active_dummy)
|
||||
toggle(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't use [src] while inside something!</span>")
|
||||
|
||||
/obj/item/chameleon/afterattack(atom/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!check_sprite(target))
|
||||
return
|
||||
if(active_dummy)//I now present you the blackli(f)st
|
||||
return
|
||||
if(isturf(target))
|
||||
return
|
||||
if(ismob(target))
|
||||
return
|
||||
if(istype(target, /obj/structure/falsewall))
|
||||
return
|
||||
if(iseffect(target))
|
||||
if(!(istype(target, /obj/effect/decal))) //be a footprint
|
||||
return
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||
var/obj/temp = new/obj()
|
||||
temp.appearance = target.appearance
|
||||
temp.layer = initial(target.layer) // scanning things in your inventory
|
||||
temp.plane = initial(target.plane)
|
||||
saved_appearance = temp.appearance
|
||||
|
||||
/obj/item/chameleon/proc/check_sprite(atom/target)
|
||||
if(target.icon_state in icon_states(target.icon))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/chameleon/proc/toggle(mob/user)
|
||||
if(!can_use || !saved_appearance)
|
||||
return
|
||||
if(active_dummy)
|
||||
eject_all()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
to_chat(user, "<span class='notice'>You deactivate \the [src].</span>")
|
||||
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(user.drop_location())
|
||||
C.activate(user, saved_appearance, src)
|
||||
to_chat(user, "<span class='notice'>You activate \the [src].</span>")
|
||||
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
|
||||
user.cancel_camera()
|
||||
|
||||
/obj/item/chameleon/proc/disrupt(delete_dummy = 1)
|
||||
if(active_dummy)
|
||||
for(var/mob/M in active_dummy)
|
||||
to_chat(M, "<span class='danger'>Your chameleon-projector deactivates.</span>")
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
eject_all()
|
||||
if(delete_dummy)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
can_use = 0
|
||||
spawn(50) can_use = 1
|
||||
|
||||
/obj/item/chameleon/proc/eject_all()
|
||||
for(var/atom/movable/A in active_dummy)
|
||||
A.forceMove(active_dummy.loc)
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
M.reset_perspective(null)
|
||||
|
||||
/obj/effect/dummy/chameleon
|
||||
name = ""
|
||||
desc = ""
|
||||
density = FALSE
|
||||
var/can_move = 0
|
||||
var/obj/item/chameleon/master = null
|
||||
|
||||
/obj/effect/dummy/chameleon/proc/activate(mob/M, saved_appearance, obj/item/chameleon/C)
|
||||
appearance = saved_appearance
|
||||
if(istype(M.buckled, /obj/vehicle))
|
||||
var/obj/vehicle/V = M.buckled
|
||||
var/datum/component/riding/VRD = V.GetComponent(/datum/component/riding)
|
||||
if(VRD)
|
||||
VRD.force_dismount(M)
|
||||
else
|
||||
V.unbuckle_mob(M, force = TRUE)
|
||||
M.forceMove(src)
|
||||
master = C
|
||||
master.active_dummy = src
|
||||
|
||||
/obj/effect/dummy/chameleon/attackby()
|
||||
master.disrupt()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/effect/dummy/chameleon/attack_hand()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_animal()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_slime()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_alien()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/ex_act(S, T)
|
||||
contents_explosion(S, T)
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/bullet_act()
|
||||
..()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/relaymove(mob/user, direction)
|
||||
if(isspaceturf(loc) || !direction)
|
||||
return //No magical space movement!
|
||||
|
||||
if(can_move < world.time)
|
||||
var/amount
|
||||
switch(user.bodytemperature)
|
||||
if(300 to INFINITY)
|
||||
amount = 10
|
||||
if(295 to 300)
|
||||
amount = 13
|
||||
if(280 to 295)
|
||||
amount = 16
|
||||
if(260 to 280)
|
||||
amount = 20
|
||||
else
|
||||
amount = 25
|
||||
|
||||
can_move = world.time + amount
|
||||
step(src, direction)
|
||||
return
|
||||
|
||||
/obj/effect/dummy/chameleon/Destroy()
|
||||
master.disrupt(0)
|
||||
return ..()
|
||||
@@ -0,0 +1,120 @@
|
||||
/obj/item/compressionkit
|
||||
name = "bluespace compression kit"
|
||||
desc = "An illegally modified BSRPED, capable of reducing the size of most items."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "compression_c"
|
||||
item_state = "RPED"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/charges = 5
|
||||
// var/damage_multiplier = 0.2 Not in use yet.
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/compressionkit/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It has [charges] charges left. Recharge with bluespace crystals.</span>")
|
||||
to_chat(user, "<span class='notice'>Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).</span>")
|
||||
|
||||
/obj/item/compressionkit/attack_self(mob/user)
|
||||
if(mode == 0)
|
||||
mode = 1
|
||||
icon_state = "compression_e"
|
||||
to_chat(user, "<span class='notice'>You switch the compressor to expand mode. This isn't implemented yet, so right now it wont do anything different!</span>")
|
||||
return
|
||||
if(mode == 1)
|
||||
mode = 0
|
||||
icon_state = "compression_c"
|
||||
to_chat(user, "<span class='notice'>You switch the compressor to compress mode. Usage will now reduce the size of objects.</span>")
|
||||
return
|
||||
else
|
||||
mode = 0
|
||||
icon_state = "compression_c"
|
||||
to_chat(user, "<span class='notice'>Some coder cocked up or an admin broke your compressor. It's been set back to compress mode..</span>")
|
||||
|
||||
/obj/item/compressionkit/proc/sparks()
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, get_turf(src))
|
||||
s.start()
|
||||
|
||||
/obj/item/compressionkit/suicide_act(mob/living/carbon/M)
|
||||
M.visible_message("<span class='suicide'>[M] is sticking their head in [src] and turning it on! [M.p_theyre(TRUE)] going to compress their own skull!</span>")
|
||||
var/obj/item/bodypart/head = M.get_bodypart("head")
|
||||
if(!head)
|
||||
return
|
||||
var/turf/T = get_turf(M)
|
||||
var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth")
|
||||
for(var/internal_organ in organs)
|
||||
var/obj/item/organ/I = internal_organ
|
||||
I.Remove(M)
|
||||
I.forceMove(T)
|
||||
head.drop_limb()
|
||||
qdel(head)
|
||||
new M.gib_type(T,1,M.get_static_viruses())
|
||||
M.add_splatter_floor(T)
|
||||
playsound(M, 'sound/weapons/flash.ogg', 50, 1)
|
||||
playsound(M, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/compressionkit/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity || !target)
|
||||
return
|
||||
else
|
||||
if(charges == 0)
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>The bluespace compression kit is out of charges! Recharge it with bluespace crystals.</span>")
|
||||
return
|
||||
if(istype(target, /obj/item))
|
||||
var/obj/item/O = target
|
||||
if(O.w_class == 1)
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>[target] cannot be compressed smaller!.</span>")
|
||||
return
|
||||
if(O.GetComponent(/datum/component/storage))
|
||||
to_chat(user, "<span class='notice'>You feel like compressing an item that stores other items would be counterproductive.</span>")
|
||||
return
|
||||
if(O.w_class > 1)
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] is compressing [O] with their bluespace compression kit!</span>")
|
||||
if(do_mob(user, O, 40) && charges > 0 && O.w_class > 1)
|
||||
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1)
|
||||
sparks()
|
||||
flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN)
|
||||
O.w_class -= 1
|
||||
// O.force_mult -= damage_multiplier
|
||||
charges -= 1
|
||||
to_chat(user, "<span class='notice'>You successfully compress [target]! The compressor now has [charges] charges.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Anomalous error. Summon a coder.</span>")
|
||||
|
||||
else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_GROIN)
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/genital/penis/P = H.getorganslot(ORGAN_SLOT_PENIS)
|
||||
if(!P)
|
||||
return
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1)
|
||||
H.visible_message("<span class='warning'>[user] is preparing to shrink [H]\'s [P.name] with their bluespace compression kit!</span>")
|
||||
if(do_mob(user, H, 40) && charges > 0 && P.length > 0)
|
||||
H.visible_message("<span class='warning'>[user] has shrunk [H]\'s [P.name]!</span>")
|
||||
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1)
|
||||
sparks()
|
||||
flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN)
|
||||
charges -= 1
|
||||
var/p_name = P.name
|
||||
P.modify_size(-5)
|
||||
if(QDELETED(P))
|
||||
H.visible_message("<span class='warning'>[H]\'s [p_name] vanishes!</span>")
|
||||
|
||||
|
||||
/obj/item/compressionkit/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/ore/bluespace_crystal))
|
||||
var/obj/item/stack/ore/bluespace_crystal/B = I
|
||||
charges += 2
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src]. It now has [charges] charges.</span>")
|
||||
if(B.amount > 1)
|
||||
B.amount -= 1
|
||||
else
|
||||
qdel(I)
|
||||
@@ -0,0 +1,529 @@
|
||||
// Dogborg Sleeper units
|
||||
|
||||
/obj/item/dogborg/sleeper
|
||||
name = "hound sleeper"
|
||||
desc = "nothing should see this."
|
||||
icon = 'icons/mob/dogborg.dmi'
|
||||
icon_state = "sleeper"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/mob/living/carbon/patient
|
||||
var/inject_amount = 10
|
||||
var/min_health = -100
|
||||
var/cleaning = FALSE
|
||||
var/cleaning_cycles = 10
|
||||
var/patient_laststat = null
|
||||
var/list/injection_chems = list("antitoxin", "epinephrine", "salbutamol", "bicaridine", "kelotane")
|
||||
var/eject_port = "ingestion"
|
||||
var/escape_in_progress = FALSE
|
||||
var/message_cooldown
|
||||
var/breakout_time = 150
|
||||
var/tmp/last_hearcheck = 0
|
||||
var/tmp/list/hearing_mobs
|
||||
var/list/items_preserved = list()
|
||||
var/static/list/important_items = typecacheof(list(
|
||||
/obj/item/hand_tele,
|
||||
/obj/item/card/id,
|
||||
/obj/item/aicard,
|
||||
/obj/item/gun,
|
||||
/obj/item/pinpointer,
|
||||
/obj/item/clothing/shoes/magboots,
|
||||
/obj/item/clothing/head/helmet/space,
|
||||
/obj/item/clothing/suit/space,
|
||||
/obj/item/reagent_containers/hypospray/CMO,
|
||||
/obj/item/tank/jetpack/oxygen/captain,
|
||||
/obj/item/clothing/accessory/medal/gold/captain,
|
||||
/obj/item/clothing/suit/armor,
|
||||
/obj/item/documents,
|
||||
/obj/item/nuke_core,
|
||||
/obj/item/nuke_core_container,
|
||||
/obj/item/areaeditor/blueprints,
|
||||
/obj/item/documents/syndicate,
|
||||
/obj/item/disk/nuclear,
|
||||
/obj/item/bombcore,
|
||||
/obj/item/grenade,
|
||||
/obj/item/storage
|
||||
))
|
||||
|
||||
// Bags are prohibited from this due to the potential explotation of objects, same with brought
|
||||
|
||||
/obj/item/dogborg/sleeper/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
item_flags |= NOBLUDGEON //No more attack messages
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/dogborg/sleeper/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
go_out() //just... sanity I guess, edge case shit
|
||||
return ..()
|
||||
|
||||
/obj/item/dogborg/sleeper/Exit(atom/movable/O)
|
||||
return 0
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/get_host()
|
||||
if(!loc)
|
||||
return
|
||||
if(iscyborg(loc))
|
||||
return loc
|
||||
else if(iscyborg(loc.loc))
|
||||
return loc.loc //cursed cyborg code
|
||||
|
||||
/obj/item/dogborg/sleeper/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
|
||||
var/mob/living/silicon/robot/hound = get_host()
|
||||
if(!hound)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!iscarbon(target))
|
||||
return
|
||||
var/voracious = TRUE
|
||||
if(!target.client || !(target.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
voracious = FALSE
|
||||
if(target.buckled)
|
||||
to_chat(user, "<span class='warning'>The user is buckled and can not be put into your [src].</span>")
|
||||
return
|
||||
if(patient)
|
||||
to_chat(user, "<span class='warning'>Your [src] is already occupied.</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[hound.name] is carefully inserting [target.name] into their [src].</span>", "<span class='notice'>You start placing [target] into your [src]...</span>")
|
||||
if(!patient && iscarbon(target) && !target.buckled && do_after (user, 100, target = target))
|
||||
|
||||
if(!in_range(src, target)) //Proximity is probably old news by now, do a new check.
|
||||
return //If they moved away, you can't eat them.
|
||||
|
||||
if(patient)
|
||||
return //If you try to eat two people at once, you can only eat one.
|
||||
|
||||
else //If you don't have someone in you, proceed.
|
||||
if(!isjellyperson(target) && ("toxin" in injection_chems))
|
||||
injection_chems -= "toxin"
|
||||
injection_chems += "antitoxin"
|
||||
if(isjellyperson(target) && !("toxin" in injection_chems))
|
||||
injection_chems -= "antitoxin"
|
||||
injection_chems += "toxin"
|
||||
target.forceMove(src)
|
||||
target.reset_perspective(src)
|
||||
target.ExtinguishMob() //The tongue already puts out fire stacks but being put into the sleeper shouldn't allow you to keep burning.
|
||||
update_gut(hound)
|
||||
user.visible_message("<span class='warning'>[voracious ? "[hound]'s [src.name] lights up and expands as [target] slips inside into their [src.name]." : "[hound]'s sleeper indicator lights up as [target] is scooped up into [hound.p_their()] [src]."]</span>", \
|
||||
"<span class='notice'>Your [voracious ? "[src.name] lights up as [target] slips into" : "sleeper indicator light shines brightly as [target] is scooped inside"] your [src]. Life support functions engaged.</span>")
|
||||
message_admins("[key_name(hound)] has sleeper'd [key_name(patient)] as a dogborg. [ADMIN_JMP(src)]")
|
||||
playsound(hound, 'sound/effects/bin_close.ogg', 100, 1)
|
||||
|
||||
/obj/item/dogborg/sleeper/container_resist(mob/living/user)
|
||||
var/mob/living/silicon/robot/hound = get_host()
|
||||
if(!hound)
|
||||
go_out(user)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
return
|
||||
var/voracious = TRUE
|
||||
if(!user.client || !(user.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
voracious = FALSE
|
||||
user.visible_message("<span class='notice'>You see [voracious ? "[user] struggling against the expanded material of [hound]'s gut!" : "and hear [user] pounding against something inside of [hound]'s [src.name]!"]</span>", \
|
||||
"<span class='notice'>[voracious ? "You start struggling inside of [src]'s tight, flexible confines," : "You start pounding against the metallic walls of [src],"] trying to trigger the release... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
|
||||
"<span class='italics'>You hear a [voracious ? "couple of thumps" : "loud banging noise"] coming from within [hound].</span>")
|
||||
if(do_after(user, breakout_time, target = src))
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [hound.name]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [hound.name]!</span>")
|
||||
go_out(user, hound)
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/go_out(atom/movable/target, mob/living/silicon/robot/hound)
|
||||
var/voracious = hound ? TRUE : FALSE
|
||||
var/list/targets = target && hound ? list(target) : contents
|
||||
if(hound)
|
||||
if(!hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
voracious = FALSE
|
||||
else
|
||||
for(var/mob/M in targets)
|
||||
if(!M.client || !(M.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
voracious = FALSE
|
||||
if(length(targets))
|
||||
if(hound)
|
||||
hound.visible_message("<span class='warning'>[voracious ? "[hound] empties out [hound.p_their()] contents via [hound.p_their()] release port." : "[hound]'s underside slides open with an audible clunk before [hound.p_their()] [src] flips over, carelessly dumping its contents onto the ground below [hound.p_them()] before closing right back up again."]</span>", \
|
||||
"<span class='notice'>[voracious ? "You empty your contents via your release port." : "You open your sleeper hatch, quickly releasing all of the contents within before closing it again."]</span>")
|
||||
for(var/a in contents)
|
||||
var/atom/movable/AM = a
|
||||
AM.forceMove(get_turf(src))
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.reset_perspective()
|
||||
playsound(loc, voracious ? 'sound/effects/splat.ogg' : 'sound/effects/bin_close.ogg', 50, 1)
|
||||
items_preserved.Cut()
|
||||
cleaning = FALSE
|
||||
if(hound)
|
||||
update_gut(hound)
|
||||
|
||||
|
||||
/obj/item/dogborg/sleeper/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(. || !iscyborg(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/dogborg/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "dogborg_sleeper", name, 375, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/dogborg/sleeper/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = patient ? 1 : 0
|
||||
|
||||
if(cleaning && length(contents - items_preserved))
|
||||
data["items"] = "Self-cleaning mode active: [length(contents - items_preserved)] object(s) remaining."
|
||||
data["cleaning"] = cleaning
|
||||
if(injection_chems != null)
|
||||
data["chem"] = list()
|
||||
for(var/chem in injection_chems)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[chem]
|
||||
data["chem"] += list(list("name" = R.name, "id" = R.id))
|
||||
|
||||
data["occupant"] = list()
|
||||
var/mob/living/mob_occupant = patient
|
||||
if(mob_occupant)
|
||||
data["occupant"]["name"] = mob_occupant.name
|
||||
switch(mob_occupant.stat)
|
||||
if(CONSCIOUS)
|
||||
data["occupant"]["stat"] = "Conscious"
|
||||
data["occupant"]["statstate"] = "good"
|
||||
if(SOFT_CRIT)
|
||||
data["occupant"]["stat"] = "Conscious"
|
||||
data["occupant"]["statstate"] = "average"
|
||||
if(UNCONSCIOUS)
|
||||
data["occupant"]["stat"] = "Unconscious"
|
||||
data["occupant"]["statstate"] = "average"
|
||||
if(DEAD)
|
||||
data["occupant"]["stat"] = "Dead"
|
||||
data["occupant"]["statstate"] = "bad"
|
||||
data["occupant"]["health"] = mob_occupant.health
|
||||
data["occupant"]["maxHealth"] = mob_occupant.maxHealth
|
||||
data["occupant"]["minHealth"] = HEALTH_THRESHOLD_DEAD
|
||||
data["occupant"]["bruteLoss"] = mob_occupant.getBruteLoss()
|
||||
data["occupant"]["oxyLoss"] = mob_occupant.getOxyLoss()
|
||||
data["occupant"]["toxLoss"] = mob_occupant.getToxLoss()
|
||||
data["occupant"]["fireLoss"] = mob_occupant.getFireLoss()
|
||||
data["occupant"]["cloneLoss"] = mob_occupant.getCloneLoss()
|
||||
data["occupant"]["brainLoss"] = mob_occupant.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
data["occupant"]["reagents"] = list()
|
||||
if(mob_occupant.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in mob_occupant.reagents.reagent_list)
|
||||
data["occupant"]["reagents"] += list(list("name" = R.name, "volume" = R.volume))
|
||||
return data
|
||||
|
||||
/obj/item/dogborg/sleeper/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || !iscyborg(usr))
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("eject")
|
||||
go_out(null, usr)
|
||||
. = TRUE
|
||||
if("inject")
|
||||
var/chem = params["chem"]
|
||||
if(!patient)
|
||||
return
|
||||
inject_chem(chem, usr)
|
||||
. = TRUE
|
||||
if("cleaning")
|
||||
if(!contents)
|
||||
to_chat(src, "Your [src] is already cleaned.")
|
||||
return
|
||||
if(patient)
|
||||
to_chat(patient, "<span class='danger'>[usr.name]'s [src] fills with caustic enzymes around you!</span>")
|
||||
to_chat(src, "<span class='danger'>Cleaning process enabled.</span>")
|
||||
clean_cycle(usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/update_gut(mob/living/silicon/robot/hound)
|
||||
//Well, we HAD one, what happened to them?
|
||||
var/prociconupdate = FALSE
|
||||
var/currentenvy = hound.sleeper_nv
|
||||
hound.sleeper_nv = FALSE
|
||||
if(patient in contents)
|
||||
if(patient_laststat != patient.stat)
|
||||
if(patient.stat & DEAD)
|
||||
hound.sleeper_r = 1
|
||||
hound.sleeper_g = 0
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = 0
|
||||
hound.sleeper_g = 1
|
||||
patient_laststat = patient.stat
|
||||
prociconupdate = TRUE
|
||||
|
||||
if(!patient.client || !(patient.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
hound.sleeper_nv = TRUE
|
||||
else
|
||||
hound.sleeper_nv = FALSE
|
||||
if(hound.sleeper_nv != currentenvy)
|
||||
prociconupdate = TRUE
|
||||
|
||||
//Update icon
|
||||
if(prociconupdate)
|
||||
hound.update_icons()
|
||||
//Return original patient
|
||||
return(patient)
|
||||
//Check for a new patient
|
||||
else
|
||||
for(var/mob/living/carbon/human/C in contents)
|
||||
patient = C
|
||||
if(patient.stat & DEAD)
|
||||
hound.sleeper_r = 1
|
||||
hound.sleeper_g = 0
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = 0
|
||||
hound.sleeper_g = 1
|
||||
patient_laststat = patient.stat
|
||||
|
||||
if(!patient.client || !(patient.client.prefs.cit_toggles & MEDIHOUND_SLEEPER) || !hound.client || !(hound.client.prefs.cit_toggles & MEDIHOUND_SLEEPER))
|
||||
hound.sleeper_nv = TRUE
|
||||
else
|
||||
hound.sleeper_nv = FALSE
|
||||
|
||||
//Update icon and return new patient
|
||||
hound.update_icons()
|
||||
return
|
||||
|
||||
//Cleaning looks better with red on, even with nobody in it
|
||||
if(cleaning && !patient)
|
||||
hound.sleeper_r = 1
|
||||
hound.sleeper_g = 0
|
||||
//Couldn't find anyone, and not cleaning
|
||||
else if(!cleaning && !patient)
|
||||
hound.sleeper_r = 0
|
||||
hound.sleeper_g = 0
|
||||
|
||||
patient_laststat = null
|
||||
patient = null
|
||||
hound.update_icons()
|
||||
|
||||
//Gurgleborg process
|
||||
/obj/item/dogborg/sleeper/proc/clean_cycle(mob/living/silicon/robot/hound)
|
||||
//Sanity
|
||||
if(!hound)
|
||||
return
|
||||
for(var/I in items_preserved)
|
||||
if(!(I in contents))
|
||||
items_preserved -= I
|
||||
var/list/touchable_items = contents - items_preserved
|
||||
var/sound/prey_digest = sound(get_sfx("digest_prey"))
|
||||
var/sound/prey_death = sound(get_sfx("death_prey"))
|
||||
var/sound/pred_digest = sound(get_sfx("digest_pred"))
|
||||
var/sound/pred_death = sound(get_sfx("death_pred"))
|
||||
if(cleaning_cycles)
|
||||
cleaning_cycles--
|
||||
cleaning = TRUE
|
||||
for(var/mob/living/carbon/C in (touchable_items))
|
||||
if((C.status_flags & GODMODE) || !C.digestable)
|
||||
items_preserved += C
|
||||
else
|
||||
C.adjustBruteLoss(2)
|
||||
C.adjustFireLoss(3)
|
||||
if(contents)
|
||||
var/atom/target = pick(touchable_items)
|
||||
if(iscarbon(target)) //Handle the target being a mob
|
||||
var/mob/living/carbon/T = target
|
||||
if(T.stat == DEAD && T.digestable) //Mob is now dead
|
||||
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
|
||||
to_chat(hound,"<span class='notice'>You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.</span>")
|
||||
to_chat(T,"<span class='notice'>You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.</span>")
|
||||
hound.cell.give(30000) //Fueeeeellll
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
var/turf/source = get_turf(hound)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!istype(H.loc, /obj/item/dogborg/sleeper))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_death)
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_death)
|
||||
for(var/belly in T.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
for(var/atom/movable/thing in B)
|
||||
thing.forceMove(src)
|
||||
if(ismob(thing))
|
||||
to_chat(thing, "As [T] melts away around you, you find yourself in [hound]'s [name]")
|
||||
for(var/obj/item/W in T)
|
||||
if(!T.dropItemToGround(W))
|
||||
qdel(W)
|
||||
qdel(T)
|
||||
//Handle the target being anything but a mob
|
||||
else if(isobj(target))
|
||||
var/obj/T = target
|
||||
if(T.type in important_items) //If the object is in the items_preserved global list
|
||||
items_preserved += T
|
||||
//If the object is not one to preserve
|
||||
else
|
||||
qdel(T)
|
||||
update_gut()
|
||||
hound.cell.give(10)
|
||||
else
|
||||
cleaning_cycles = initial(cleaning_cycles)
|
||||
cleaning = FALSE
|
||||
to_chat(hound, "<span class='notice'>Your [src] chimes it ends its self-cleaning cycle.</span>")//Belly is entirely empty
|
||||
|
||||
if(!length(contents))
|
||||
to_chat(hound, "<span class='notice'>Your [src] is now clean. Ending self-cleaning cycle.</span>")
|
||||
cleaning = FALSE
|
||||
|
||||
//sound effects
|
||||
if(prob(50))
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
var/turf/source = get_turf(hound)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!istype(H.loc, /obj/item/dogborg/sleeper))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
update_gut(hound)
|
||||
|
||||
if(cleaning)
|
||||
addtimer(CALLBACK(src, .proc/clean_cycle, hound), 50)
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/CheckAccepted(obj/item/I)
|
||||
return is_type_in_typecache(I, important_items)
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/inject_chem(chem, mob/living/silicon/robot/hound)
|
||||
if(!hound)
|
||||
return
|
||||
if(hound.cell.charge <= 800) //This is so borgs don't kill themselves with it. Remember, 750 charge used every injection.
|
||||
to_chat(hound, "<span class='notice'>You don't have enough power to synthesize fluids.</span>")
|
||||
return
|
||||
if(patient.reagents.get_reagent_amount(chem) + 10 >= 20) //Preventing people from accidentally killing themselves by trying to inject too many chemicals!
|
||||
to_chat(hound, "<span class='notice'>Your stomach is currently too full of fluids to secrete more fluids of this kind.</span>")
|
||||
return
|
||||
patient.reagents.add_reagent(chem, 10)
|
||||
hound.cell.use(750) //-750 charge per injection
|
||||
var/units = round(patient.reagents.get_reagent_amount(chem))
|
||||
to_chat(hound, "<span class='notice'>Injecting [units] unit\s of [chem] into occupant.</span>") //If they were immersed, the reagents wouldn't leave with them.
|
||||
|
||||
/obj/item/dogborg/sleeper/medihound //Medihound sleeper
|
||||
name = "Mobile Sleeper"
|
||||
desc = "Equipment for medical hound. A mounted sleeper that stabilizes patients and can inject reagents in the borg's reserves."
|
||||
icon = 'icons/mob/dogborg.dmi'
|
||||
icon_state = "sleeper"
|
||||
breakout_time = 30 //Medical sleepers should be designed to be as easy as possible to get out of.
|
||||
|
||||
/obj/item/dogborg/sleeper/K9 //The K9 portabrig
|
||||
name = "Mobile Brig"
|
||||
desc = "Equipment for a K9 unit. A mounted portable-brig that holds criminals."
|
||||
icon = 'icons/mob/dogborg.dmi'
|
||||
icon_state = "sleeperb"
|
||||
inject_amount = 0
|
||||
min_health = -100
|
||||
injection_chems = null //So they don't have all the same chems as the medihound!
|
||||
breakout_time = 300
|
||||
|
||||
/obj/item/storage/attackby(obj/item/dogborg/sleeper/K9, mob/user, proximity)
|
||||
if(istype(K9))
|
||||
K9.afterattack(src, user ,1)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/dogborg/sleeper/K9/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
|
||||
var/mob/living/silicon/robot/hound = get_host()
|
||||
if(!hound || !istype(target) || !proximity || target.anchored)
|
||||
return
|
||||
if (!target.devourable)
|
||||
to_chat(user, "The target registers an error code. Unable to insert into [src].")
|
||||
return
|
||||
if(patient)
|
||||
to_chat(user,"<span class='warning'>Your [src] is already occupied.</span>")
|
||||
return
|
||||
if(target.buckled)
|
||||
to_chat(user,"<span class='warning'>[target] is buckled and can not be put into your [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[hound.name] is ingesting [target] into their [src].</span>", "<span class='notice'>You start ingesting [target] into your [src.name]...</span>")
|
||||
if(do_after(user, 30, target = target) && !patient && !target.buckled)
|
||||
target.forceMove(src)
|
||||
target.reset_perspective(src)
|
||||
update_gut(hound)
|
||||
user.visible_message("<span class='warning'>[hound.name]'s mobile brig clunks in series as [target] slips inside.</span>", "<span class='notice'>Your mobile brig groans lightly as [target] slips inside.</span>")
|
||||
playsound(hound, 'sound/effects/bin_close.ogg', 80, 1) // Really don't need ERP sound effects for robots
|
||||
|
||||
|
||||
/obj/item/dogborg/sleeper/compactor //Janihound gut.
|
||||
name = "garbage processor"
|
||||
desc = "A mounted garbage compactor unit with fuel processor."
|
||||
icon = 'icons/mob/dogborg.dmi'
|
||||
icon_state = "compactor"
|
||||
inject_amount = 0
|
||||
min_health = -100
|
||||
injection_chems = null //So they don't have all the same chems as the medihound!
|
||||
var/max_item_count = 30
|
||||
|
||||
/obj/item/storage/attackby(obj/item/dogborg/sleeper/compactor, mob/user, proximity) //GIT CIRCUMVENTED YO!
|
||||
if(istype(compactor))
|
||||
compactor.afterattack(src, user ,1)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/dogborg/sleeper/compactor/afterattack(atom/movable/target, mob/living/silicon/user, proximity)//GARBO NOMS
|
||||
var/mob/living/silicon/robot/hound = get_host()
|
||||
if(!hound || !istype(target) || !proximity || target.anchored)
|
||||
return
|
||||
if(length(contents) > (max_item_count - 1))
|
||||
to_chat(user,"<span class='warning'>Your [src] is full. Eject or process contents to continue.</span>")
|
||||
return
|
||||
if(isitem(target))
|
||||
var/obj/item/I = target
|
||||
if(CheckAccepted(I))
|
||||
to_chat(user,"<span class='warning'>[I] registers an error code to your [src]</span>")
|
||||
return
|
||||
if(I.w_class > WEIGHT_CLASS_NORMAL)
|
||||
to_chat(user,"<span class='warning'>[I] is too large to fit into your [src]</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[hound.name] is ingesting [I] into their [src.name].</span>", "<span class='notice'>You start ingesting [target] into your [src.name]...</span>")
|
||||
if(do_after(user, 15, target = target) && length(contents) < max_item_count)
|
||||
I.forceMove(src)
|
||||
I.visible_message("<span class='warning'>[hound.name]'s garbage processor groans lightly as [I] slips inside.</span>", "<span class='notice'>Your garbage compactor groans lightly as [I] slips inside.</span>")
|
||||
playsound(hound, 'sound/machines/disposalflush.ogg', 50, 1)
|
||||
if(length(contents) > 11) //grow that tum after a certain junk amount
|
||||
hound.sleeper_r = 1
|
||||
hound.update_icons()
|
||||
else
|
||||
hound.sleeper_r = 0
|
||||
hound.update_icons()
|
||||
return
|
||||
|
||||
if(iscarbon(target) || issilicon(target))
|
||||
var/mob/living/trashman = target
|
||||
if(!trashman.devourable)
|
||||
to_chat(user, "<span class='warning'>[target] registers an error code to your [src]</span>")
|
||||
return
|
||||
if(patient)
|
||||
to_chat(user,"<span class='warning'>Your [src] is already occupied.</span>")
|
||||
return
|
||||
if(trashman.buckled)
|
||||
to_chat(user,"<span class='warning'>[trashman] is buckled and can not be put into your [src].</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[hound.name] is ingesting [trashman] into their [src].</span>", "<span class='notice'>You start ingesting [trashman] into your [src.name]...</span>")
|
||||
if(do_after(user, 30, target = trashman) && !patient && !trashman.buckled && length(contents) < max_item_count)
|
||||
trashman.forceMove(src)
|
||||
trashman.reset_perspective(src)
|
||||
update_gut()
|
||||
user.visible_message("<span class='warning'>[hound.name]'s garbage processor groans lightly as [trashman] slips inside.</span>", "<span class='notice'>Your garbage compactor groans lightly as [trashman] slips inside.</span>")
|
||||
playsound(hound, 'sound/effects/bin_close.ogg', 80, 1)
|
||||
|
||||
/obj/item/dogborg/sleeper/K9/flavour
|
||||
name = "Mobile Sleeper"
|
||||
desc = "A mounted, underslung sleeper, intended for holding willing occupants for leisurely purposes."
|
||||
@@ -0,0 +1,545 @@
|
||||
/obj/item/flashlight
|
||||
name = "flashlight"
|
||||
desc = "A hand-held emergency light."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight"
|
||||
item_state = "flashlight"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
var/on = FALSE
|
||||
var/brightness_on = 4 //range of light when on
|
||||
var/flashlight_power = 0.8 //strength of the light when on
|
||||
light_color = "#FFCC66"
|
||||
|
||||
/obj/item/flashlight/Initialize()
|
||||
. = ..()
|
||||
if(icon_state == "[initial(icon_state)]-on")
|
||||
on = TRUE
|
||||
update_brightness()
|
||||
|
||||
/obj/item/flashlight/proc/update_brightness(mob/user = null)
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(flashlight_power)
|
||||
set_light(l_range = brightness_on, l_power = flashlight_power)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
playsound(user, on ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, 1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
|
||||
/obj/item/flashlight/suicide_act(mob/living/carbon/human/user)
|
||||
if (user.eye_blind)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] close to [user.p_their()] eyes and turning it on ... but [user.p_theyre()] blind!</span>")
|
||||
return SHAME
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] close to [user.p_their()] eyes and turning it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))
|
||||
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if(!M.get_bodypart(BODY_ZONE_HEAD))
|
||||
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
|
||||
return
|
||||
|
||||
if(flashlight_power < 0.3)
|
||||
to_chat(user, "<span class='warning'>\The [src] isn't bright enough to see anything!</span> ")
|
||||
return
|
||||
|
||||
switch(user.zone_selected)
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
if((M.head && M.head.flags_cover & HEADCOVERSEYES) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) || (M.glasses && M.glasses.flags_cover & GLASSESCOVERSEYES))
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/organ/eyes/E = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
to_chat(user, "<span class='danger'>[M] doesn't have any eyes!</span>")
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
if(M.flash_act(visual = 1))
|
||||
M.visible_message("[M] directs [src] to [M.p_their()] eyes.", "<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
|
||||
else
|
||||
M.visible_message("[M] directs [src] to [M.p_their()] eyes.", "<span class='notice'>You wave the light in front of your eyes.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
|
||||
if(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='warning'>[M]'s pupils don't react to the light!</span>")
|
||||
else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-ray vision
|
||||
to_chat(user, "<span class='danger'>[M]'s pupils give an eerie glow!</span>")
|
||||
else //they're okay!
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils narrow.</span>")
|
||||
|
||||
if(BODY_ZONE_PRECISE_MOUTH)
|
||||
|
||||
if(M.is_mouth_covered())
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSMOUTH) ? "helmet" : "mask"] first.</span>")
|
||||
return
|
||||
|
||||
var/their = M.p_their()
|
||||
|
||||
var/list/mouth_organs = new
|
||||
for(var/obj/item/organ/O in M.internal_organs)
|
||||
if(O.zone == BODY_ZONE_PRECISE_MOUTH)
|
||||
mouth_organs.Add(O)
|
||||
var/organ_list = ""
|
||||
var/organ_count = LAZYLEN(mouth_organs)
|
||||
if(organ_count)
|
||||
for(var/I in 1 to organ_count)
|
||||
if(I > 1)
|
||||
if(I == mouth_organs.len)
|
||||
organ_list += ", and "
|
||||
else
|
||||
organ_list += ", "
|
||||
var/obj/item/organ/O = mouth_organs[I]
|
||||
organ_list += (O.gender == "plural" ? O.name : "\an [O.name]")
|
||||
|
||||
var/pill_count = 0
|
||||
for(var/datum/action/item_action/hands_free/activate_pill/AP in M.actions)
|
||||
pill_count++
|
||||
|
||||
if(M == user)
|
||||
var/can_use_mirror = FALSE
|
||||
if(isturf(user.loc))
|
||||
var/obj/structure/mirror/mirror = locate(/obj/structure/mirror, user.loc)
|
||||
if(mirror)
|
||||
switch(user.dir)
|
||||
if(NORTH)
|
||||
can_use_mirror = mirror.pixel_y > 0
|
||||
if(SOUTH)
|
||||
can_use_mirror = mirror.pixel_y < 0
|
||||
if(EAST)
|
||||
can_use_mirror = mirror.pixel_x > 0
|
||||
if(WEST)
|
||||
can_use_mirror = mirror.pixel_x < 0
|
||||
|
||||
M.visible_message("[M] directs [src] to [their] mouth.", \
|
||||
"<span class='notice'>You point [src] into your mouth.</span>")
|
||||
if(!can_use_mirror)
|
||||
to_chat(user, "<span class='notice'>You can't see anything without a mirror.</span>")
|
||||
return
|
||||
if(organ_count)
|
||||
to_chat(user, "<span class='notice'>Inside your mouth [organ_count > 1 ? "are" : "is"] [organ_list].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's nothing inside your mouth.</span>")
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>You have [pill_count] implanted pill[pill_count > 1 ? "s" : ""].</span>")
|
||||
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s mouth.</span>",\
|
||||
"<span class='notice'>You direct [src] to [M]'s mouth.</span>")
|
||||
if(organ_count)
|
||||
to_chat(user, "<span class='notice'>Inside [their] mouth [organ_count > 1 ? "are" : "is"] [organ_list].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[M] doesn't have any organs in [their] mouth.</span>")
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.</span>")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
flags_1 = CONDUCT_1
|
||||
brightness_on = 2
|
||||
light_color = "#FFDDCC"
|
||||
flashlight_power = 0.3
|
||||
var/holo_cooldown = 0
|
||||
|
||||
/obj/item/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(!proximity_flag)
|
||||
if(holo_cooldown > world.time)
|
||||
to_chat(user, "<span class='warning'>[src] is not ready yet!</span>")
|
||||
return
|
||||
var/T = get_turf(target)
|
||||
if(locate(/mob/living) in T)
|
||||
new /obj/effect/temp_visual/medical_holosign(T,user) //produce a holographic glow
|
||||
holo_cooldown = world.time + 100
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/medical_holosign
|
||||
name = "medical holosign"
|
||||
desc = "A small holographic glow that indicates a medic is coming to treat a patient."
|
||||
icon_state = "medi_holo"
|
||||
duration = 30
|
||||
|
||||
/obj/effect/temp_visual/medical_holosign/Initialize(mapload, creator)
|
||||
. = ..()
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0) //make some noise!
|
||||
if(creator)
|
||||
visible_message("<span class='danger'>[creator] created a medical hologram!</span>")
|
||||
|
||||
|
||||
/obj/item/flashlight/seclite
|
||||
name = "seclite"
|
||||
desc = "A robust flashlight used by security."
|
||||
icon_state = "seclite"
|
||||
item_state = "seclite"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
force = 9 // Not as good as a stun baton.
|
||||
brightness_on = 5 // A little better than the standard flashlight.
|
||||
light_color = "#CDDDFF"
|
||||
flashlight_power = 0.9
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/flashlight/lamp
|
||||
name = "desk lamp"
|
||||
desc = "A desk lamp with an adjustable mount."
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
force = 10
|
||||
brightness_on = 5
|
||||
light_color = "#FFDDBB"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
materials = list()
|
||||
on = TRUE
|
||||
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/item/flashlight/lamp/green
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen"
|
||||
item_state = "lampgreen"
|
||||
|
||||
|
||||
|
||||
/obj/item/flashlight/lamp/verb/toggle_light()
|
||||
set name = "Toggle light"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!usr.stat)
|
||||
attack_self(usr)
|
||||
|
||||
//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"
|
||||
item_state = "bananalamp"
|
||||
|
||||
// FLARES
|
||||
|
||||
/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
|
||||
brightness_on = 7 // Pretty bright.
|
||||
light_color = "#FA421A"
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
actions_types = list()
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
heat = 1000
|
||||
light_color = LIGHT_COLOR_FLARE
|
||||
grind_results = list("sulfur" = 15)
|
||||
|
||||
/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/flashlight/flare/process()
|
||||
open_flame(heat)
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel || !on)
|
||||
turn_off()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/flare/ignition_effect(atom/A, mob/user)
|
||||
if(fuel && on)
|
||||
. = "<span class='notice'>[user] lights [A] with [src] like a real \
|
||||
badass.</span>"
|
||||
else
|
||||
. = ""
|
||||
|
||||
/obj/item/flashlight/flare/proc/turn_off()
|
||||
on = FALSE
|
||||
force = initial(src.force)
|
||||
damtype = initial(src.damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
|
||||
/obj/item/flashlight/flare/update_brightness(mob/user = null)
|
||||
..()
|
||||
if(on)
|
||||
item_state = "[initial(item_state)]-on"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already on.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] lights \the [src].</span>", "<span class='notice'>You light \the [src]!</span>")
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/flare/get_temperature()
|
||||
return on * heat
|
||||
|
||||
/obj/item/flashlight/flare/torch
|
||||
name = "torch"
|
||||
desc = "A torch fashioned from some leaves and a log."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
brightness_on = 4
|
||||
light_color = "#FAA44B"
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
on_damage = 10
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/flashlight/lantern
|
||||
name = "lantern"
|
||||
icon_state = "lantern"
|
||||
item_state = "lantern"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi'
|
||||
desc = "A mining lantern."
|
||||
brightness_on = 6 // luminosity when on
|
||||
light_color = "#FFAA44"
|
||||
flashlight_power = 0.75
|
||||
|
||||
|
||||
/obj/item/flashlight/slime
|
||||
gender = PLURAL
|
||||
name = "glowing slime extract"
|
||||
desc = "Extract from a yellow slime. It emits a strong light when squeezed."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "slime"
|
||||
item_state = "slime"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list()
|
||||
brightness_on = 6 //luminosity when on
|
||||
light_color = "#FFEEAA"
|
||||
flashlight_power = 0.6
|
||||
|
||||
/obj/item/flashlight/emp
|
||||
var/emp_max_charges = 4
|
||||
var/emp_cur_charges = 4
|
||||
var/charge_tick = 0
|
||||
|
||||
|
||||
/obj/item/flashlight/emp/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/emp/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/flashlight/emp/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/flashlight/emp/attack(mob/living/M, mob/living/user)
|
||||
if(on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) // call original attack when examining organs
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/flashlight/emp/afterattack(atom/movable/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(emp_cur_charges > 0)
|
||||
emp_cur_charges -= 1
|
||||
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
log_combat(user, M, "attacked", "EMP-light")
|
||||
M.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].", \
|
||||
"<span class='userdanger'>[user] blinks \the [src] at you.")
|
||||
else
|
||||
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].")
|
||||
to_chat(user, "\The [src] now has [emp_cur_charges] charge\s.")
|
||||
A.emp_act(EMP_HEAVY)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
/obj/item/flashlight/emp/debug //for testing emp_act()
|
||||
name = "debug EMP flashlight"
|
||||
emp_max_charges = 100
|
||||
emp_cur_charges = 100
|
||||
|
||||
// Glowsticks, in the uncomfortable range of similar to flares,
|
||||
// but not similar enough to make it worth a refactor
|
||||
/obj/item/flashlight/glowstick
|
||||
name = "glowstick"
|
||||
desc = "A military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 4
|
||||
color = LIGHT_COLOR_GREEN
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
grind_results = list("phenol" = 15, "hydrogen" = 10, "oxygen" = 5) //Meth-in-a-stick
|
||||
var/fuel = 0
|
||||
|
||||
/obj/item/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
. = ..()
|
||||
|
||||
/obj/item/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/flashlight/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/glowstick/proc/turn_off()
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light(0)
|
||||
else if(on)
|
||||
var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow")
|
||||
glowstick_overlay.color = color
|
||||
add_overlay(glowstick_overlay)
|
||||
item_state = "glowstick-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is spent.</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already lit.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
|
||||
activate()
|
||||
|
||||
/obj/item/flashlight/glowstick/proc/activate()
|
||||
if(!on)
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/glowstick/red
|
||||
name = "red glowstick"
|
||||
color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/flashlight/glowstick/blue
|
||||
name = "blue glowstick"
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/flashlight/glowstick/cyan
|
||||
name = "cyan glowstick"
|
||||
color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/flashlight/glowstick/orange
|
||||
name = "orange glowstick"
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
|
||||
/obj/item/flashlight/glowstick/yellow
|
||||
name = "yellow glowstick"
|
||||
color = LIGHT_COLOR_YELLOW
|
||||
|
||||
/obj/item/flashlight/glowstick/pink
|
||||
name = "pink glowstick"
|
||||
color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/item/flashlight/spotlight //invisible lighting source
|
||||
name = "disco light"
|
||||
desc = "Groovy..."
|
||||
icon_state = null
|
||||
light_color = null
|
||||
brightness_on = 0
|
||||
flashlight_power = 1
|
||||
light_range = 0
|
||||
light_power = 10
|
||||
alpha = 0
|
||||
layer = 0
|
||||
on = TRUE
|
||||
anchored = TRUE
|
||||
var/range = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/item/flashlight/flashdark
|
||||
name = "flashdark"
|
||||
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
|
||||
icon_state = "flashdark"
|
||||
item_state = "flashdark"
|
||||
brightness_on = 2.5
|
||||
flashlight_power = -3
|
||||
|
||||
/obj/item/flashlight/eyelight
|
||||
name = "eyelight"
|
||||
desc = "This shouldn't exist outside of someone's head, how are you seeing this?"
|
||||
brightness_on = 15
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = DROPDEL
|
||||
actions_types = list()
|
||||
@@ -0,0 +1,230 @@
|
||||
#define RAD_LEVEL_NORMAL 9
|
||||
#define RAD_LEVEL_MODERATE 100
|
||||
#define RAD_LEVEL_HIGH 400
|
||||
#define RAD_LEVEL_VERY_HIGH 800
|
||||
#define RAD_LEVEL_CRITICAL 1500
|
||||
|
||||
#define RAD_MEASURE_SMOOTHING 5
|
||||
|
||||
#define RAD_GRACE_PERIOD 2
|
||||
|
||||
/obj/item/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis
|
||||
name = "\improper Geiger counter"
|
||||
desc = "A handheld device used for detecting and measuring radiation pulses."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "geiger_off"
|
||||
item_state = "multitool"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
||||
|
||||
var/grace = RAD_GRACE_PERIOD
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
|
||||
var/scanning = FALSE
|
||||
var/radiation_count = 0
|
||||
var/current_tick_amount = 0
|
||||
var/last_tick_amount = 0
|
||||
var/fail_to_receive = 0
|
||||
var/current_warning = 1
|
||||
|
||||
/obj/item/geiger_counter/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
soundloop = new(list(src), FALSE)
|
||||
|
||||
/obj/item/geiger_counter/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/process()
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
if(!scanning)
|
||||
current_tick_amount = 0
|
||||
return
|
||||
|
||||
radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING
|
||||
radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING
|
||||
|
||||
if(current_tick_amount)
|
||||
grace = RAD_GRACE_PERIOD
|
||||
last_tick_amount = current_tick_amount
|
||||
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
grace--
|
||||
if(grace <= 0)
|
||||
radiation_count = 0
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
..()
|
||||
if(!scanning)
|
||||
return 1
|
||||
to_chat(user, "<span class='info'>Alt-click it to clear stored radiation levels.</span>")
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>The display seems to be incomprehensible.</span>")
|
||||
return 1
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
to_chat(user, "<span class='notice'>Ambient radiation level count reports that all is well.</span>")
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
to_chat(user, "<span class='disarm'>Ambient radiation levels slightly above average.</span>")
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
to_chat(user, "<span class='warning'>Ambient radiation levels above average.</span>")
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
to_chat(user, "<span class='danger'>Ambient radiation levels highly above average.</span>")
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
to_chat(user, "<span class='suicide'>Ambient radiation levels nearing critical level.</span>")
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>")
|
||||
|
||||
/obj/item/geiger_counter/update_icon()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
return 1
|
||||
if(obj_flags & EMAGGED)
|
||||
icon_state = "geiger_on_emag"
|
||||
return 1
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
..()
|
||||
|
||||
/obj/item/geiger_counter/proc/update_sound()
|
||||
var/datum/looping_sound/geiger/loop = soundloop
|
||||
if(!scanning)
|
||||
loop.stop()
|
||||
return
|
||||
if(!radiation_count)
|
||||
loop.stop()
|
||||
return
|
||||
loop.last_radiation = radiation_count
|
||||
loop.start()
|
||||
|
||||
/obj/item/geiger_counter/rad_act(amount)
|
||||
. = ..()
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/user)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='notice'>You scan [target]'s radiation levels with [src]...</span>")
|
||||
addtimer(CALLBACK(src, .proc/scan, target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [target]!</span>")
|
||||
target.rad_act(radiation_count)
|
||||
radiation_count = 0
|
||||
return TRUE
|
||||
|
||||
/obj/item/geiger_counter/proc/scan(atom/A, mob/user)
|
||||
var/rad_strength = 0
|
||||
for(var/i in get_rad_contents(A)) // Yes it's intentional that you can't detect radioactive things under rad protection. Gives traitors a way to hide their glowing green rocks.
|
||||
var/atom/thing = i
|
||||
if(!thing)
|
||||
continue
|
||||
var/datum/component/radioactive/radiation = thing.GetComponent(/datum/component/radioactive)
|
||||
if(radiation)
|
||||
rad_strength += radiation.strength
|
||||
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(!M.radiation)
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation] rad.</span>")
|
||||
|
||||
if(rad_strength)
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume=50))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
return 0
|
||||
radiation_count = 0
|
||||
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/geiger_counter/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
obj_flags |= EMAGGED
|
||||
return TRUE
|
||||
|
||||
/obj/item/geiger_counter/cyborg
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo == user)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
RegisterSignal(user, COMSIG_ATOM_RAD_ACT, .proc/redirect_rad_act)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
rad_act(amount)
|
||||
|
||||
/obj/item/geiger_counter/cyborg/dropped()
|
||||
. = ..()
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
listeningTo = null
|
||||
|
||||
#undef RAD_LEVEL_NORMAL
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
#undef RAD_LEVEL_HIGH
|
||||
#undef RAD_LEVEL_VERY_HIGH
|
||||
#undef RAD_LEVEL_CRITICAL
|
||||
@@ -0,0 +1,226 @@
|
||||
GLOBAL_LIST_EMPTY(GPS_list)
|
||||
/obj/item/gps
|
||||
name = "global positioning system"
|
||||
desc = "Helping lost spacemen find their way through the planets since 2016."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "gps-c"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/gpstag = "COM0"
|
||||
var/emped = FALSE
|
||||
var/tracking = TRUE
|
||||
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
|
||||
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
|
||||
|
||||
/obj/item/gps/examine(mob/user)
|
||||
..()
|
||||
var/turf/curr = get_turf(src)
|
||||
to_chat(user, "The screen says: [get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])")
|
||||
to_chat(user, "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>")
|
||||
|
||||
/obj/item/gps/Initialize()
|
||||
. = ..()
|
||||
GLOB.GPS_list += src
|
||||
name = "global positioning system ([gpstag])"
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/gps/Destroy()
|
||||
GLOB.GPS_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/gps/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
emped = TRUE
|
||||
cut_overlay("working")
|
||||
add_overlay("emp")
|
||||
addtimer(CALLBACK(src, .proc/reboot), 300, TIMER_UNIQUE|TIMER_OVERRIDE) //if a new EMP happens, remove the old timer so it doesn't reactivate early
|
||||
SStgui.close_uis(src) //Close the UI control if it is open.
|
||||
|
||||
/obj/item/gps/proc/reboot()
|
||||
emped = FALSE
|
||||
cut_overlay("emp")
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/gps/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
toggletracking(user)
|
||||
|
||||
/obj/item/gps/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, "It's busted!")
|
||||
return
|
||||
if(tracking)
|
||||
cut_overlay("working")
|
||||
to_chat(user, "[src] is no longer tracking, or visible to other GPS devices.")
|
||||
tracking = FALSE
|
||||
else
|
||||
add_overlay("working")
|
||||
to_chat(user, "[src] is now tracking, and visible to other GPS devices.")
|
||||
tracking = TRUE
|
||||
|
||||
|
||||
/obj/item/gps/ui_interact(mob/user, ui_key = "gps", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
|
||||
if(emped)
|
||||
to_chat(user, "[src] fizzles weakly.")
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
var/gps_window_height = 300 + GLOB.GPS_list.len * 20 // Variable window height, depending on how many GPS units there are to show
|
||||
ui = new(user, src, ui_key, "gps", "Global Positioning System", 600, gps_window_height, master_ui, state) //width, height
|
||||
ui.open()
|
||||
|
||||
ui.set_autoupdate(state = updating)
|
||||
|
||||
|
||||
/obj/item/gps/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["power"] = tracking
|
||||
data["tag"] = gpstag
|
||||
data["updating"] = updating
|
||||
data["globalmode"] = global_mode
|
||||
if(!tracking || emped) //Do not bother scanning if the GPS is off or EMPed
|
||||
return data
|
||||
|
||||
var/turf/curr = get_turf(src)
|
||||
data["current"] = "[get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])"
|
||||
|
||||
var/list/signals = list()
|
||||
data["signals"] = list()
|
||||
|
||||
for(var/gps in GLOB.GPS_list)
|
||||
var/obj/item/gps/G = gps
|
||||
if(G.emped || !G.tracking || G == src)
|
||||
continue
|
||||
var/turf/pos = get_turf(G)
|
||||
if(!global_mode && pos.z != curr.z)
|
||||
continue
|
||||
var/list/signal = list()
|
||||
signal["entrytag"] = G.gpstag //Name or 'tag' of the GPS
|
||||
signal["area"] = get_area_name(G, TRUE)
|
||||
signal["coord"] = "[pos.x], [pos.y], [pos.z]"
|
||||
if(pos.z == curr.z) //Distance/Direction calculations for same z-level only
|
||||
signal["dist"] = max(get_dist(curr, pos), 0) //Distance between the src and remote GPS turfs
|
||||
signal["degrees"] = round(Get_Angle(curr, pos)) //0-360 degree directional bearing, for more precision.
|
||||
var/direction = uppertext(dir2text(get_dir(curr, pos))) //Direction text (East, etc). Not as precise, but still helpful.
|
||||
if(!direction)
|
||||
direction = "CENTER"
|
||||
signal["degrees"] = "N/A"
|
||||
signal["direction"] = direction
|
||||
|
||||
signals += list(signal) //Add this signal to the list of signals
|
||||
data["signals"] = signals
|
||||
return data
|
||||
|
||||
|
||||
|
||||
/obj/item/gps/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/a = input("Please enter desired tag.", name, gpstag) as text
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
gpstag = a
|
||||
. = TRUE
|
||||
name = "global positioning system ([gpstag])"
|
||||
|
||||
if("power")
|
||||
toggletracking(usr)
|
||||
. = TRUE
|
||||
if("updating")
|
||||
updating = !updating
|
||||
. = TRUE
|
||||
if("globalmode")
|
||||
global_mode = !global_mode
|
||||
. = TRUE
|
||||
|
||||
|
||||
/obj/item/gps/science
|
||||
icon_state = "gps-s"
|
||||
gpstag = "SCI0"
|
||||
|
||||
/obj/item/gps/engineering
|
||||
icon_state = "gps-e"
|
||||
gpstag = "ENG0"
|
||||
|
||||
/obj/item/gps/mining
|
||||
icon_state = "gps-m"
|
||||
gpstag = "MINE0"
|
||||
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
|
||||
|
||||
/obj/item/gps/cyborg
|
||||
icon_state = "gps-b"
|
||||
gpstag = "BORG0"
|
||||
desc = "A mining cyborg internal positioning system. Used as a recovery beacon for damaged cyborg assets, or a collaboration tool for mining teams."
|
||||
|
||||
/obj/item/gps/cyborg/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, CYBORG_ITEM_TRAIT)
|
||||
|
||||
/obj/item/gps/internal
|
||||
icon_state = null
|
||||
item_flags = ABSTRACT
|
||||
gpstag = "Eerie Signal"
|
||||
desc = "Report to a coder immediately."
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
var/obj/item/implant/gps/implant
|
||||
|
||||
/obj/item/gps/internal/Initialize(mapload, obj/item/implant/gps/_implant)
|
||||
. = ..()
|
||||
implant = _implant
|
||||
|
||||
/obj/item/gps/internal/Destroy()
|
||||
if(implant?.imp_in)
|
||||
qdel(implant)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gps/internal/mining
|
||||
icon_state = "gps-m"
|
||||
gpstag = "MINER"
|
||||
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
|
||||
|
||||
/obj/item/gps/internal/base
|
||||
gpstag = "NT_AUX"
|
||||
desc = "A homing signal from Nanotrasen's mining base."
|
||||
|
||||
/obj/item/gps/visible_debug
|
||||
name = "visible GPS"
|
||||
gpstag = "ADMIN"
|
||||
desc = "This admin-spawn GPS unit leaves the coordinates visible \
|
||||
on any turf that it passes over, for debugging. Especially useful \
|
||||
for marking the area around the transition edges."
|
||||
var/list/turf/tagged
|
||||
|
||||
/obj/item/gps/visible_debug/Initialize()
|
||||
. = ..()
|
||||
tagged = list()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/gps/visible_debug/process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
// I assume it's faster to color,tag and OR the turf in, rather
|
||||
// then checking if its there
|
||||
T.color = RANDOM_COLOUR
|
||||
T.maptext = "[T.x],[T.y],[T.z]"
|
||||
tagged |= T
|
||||
|
||||
/obj/item/gps/visible_debug/proc/clear()
|
||||
while(tagged.len)
|
||||
var/turf/T = pop(tagged)
|
||||
T.color = initial(T.color)
|
||||
T.maptext = initial(T.maptext)
|
||||
|
||||
/obj/item/gps/visible_debug/Destroy()
|
||||
if(tagged)
|
||||
clear()
|
||||
tagged = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
. = ..()
|
||||
@@ -0,0 +1,266 @@
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
item_state = "multitool"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/multitool/chaplain
|
||||
name = "\improper hypertool"
|
||||
desc = "Used for pulsing wires to test which to cut. Also emits microwaves to fry some brains!"
|
||||
damtype = BRAIN
|
||||
force = 18
|
||||
armour_penetration = 35
|
||||
hitsound = 'sound/effects/sparks4.ogg'
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/obj/item/multitool/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/multitool/examine(mob/user)
|
||||
..()
|
||||
if(selected_io)
|
||||
to_chat(user, "<span class='notice'>Activate [src] to detach the data wire.</span>")
|
||||
if(buffer)
|
||||
to_chat(user, "<span class='notice'>Its buffer contains [buffer].</span>")
|
||||
|
||||
/obj/item/multitool/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!</span>")
|
||||
return OXYLOSS//theres a reason it wasnt recommended by doctors
|
||||
|
||||
/obj/item/multitool/attack_self(mob/user)
|
||||
if(selected_io)
|
||||
selected_io = null
|
||||
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/multitool/update_icon()
|
||||
if(selected_io)
|
||||
icon_state = "multitool_red"
|
||||
else
|
||||
icon_state = "multitool"
|
||||
|
||||
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
if(!io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
|
||||
return
|
||||
|
||||
if(selected_io)
|
||||
if(io == selected_io)
|
||||
to_chat(user, "<span class='warning'>Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.</span>")
|
||||
return
|
||||
if(io.io_type != selected_io.io_type)
|
||||
to_chat(user, "<span class='warning'>Those two types of channels are incompatible. The first is a [selected_io.io_type], \
|
||||
while the second is a [io.io_type].</span>")
|
||||
return
|
||||
if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly.</span>")
|
||||
return
|
||||
io.connect_pin(selected_io)
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].</span>")
|
||||
selected_io.holder.interact(user) // This is to update the UI.
|
||||
selected_io = null
|
||||
|
||||
else
|
||||
selected_io = io
|
||||
to_chat(user, "<span class='notice'>You link \the multitool to \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
if(!io1.linked.len || !io2.linked.len)
|
||||
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
|
||||
return
|
||||
|
||||
if(!(io1 in io2.linked) || !(io2 in io1.linked) )
|
||||
to_chat(user, "<span class='warning'>These data pins aren't connected!</span>")
|
||||
return
|
||||
else
|
||||
io1.disconnect_pin(io2)
|
||||
to_chat(user, "<span class='notice'>You clip the data connection between the [io1.holder.displayed_name]'s \
|
||||
[io1.name] and the [io2.holder.displayed_name]'s [io2.name].</span>")
|
||||
io1.holder.interact(user) // This is to update the UI.
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
/obj/item/multitool/ai_detect
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
var/hud_type = DATA_HUD_AI_DETECT
|
||||
var/hud_on = FALSE
|
||||
var/mob/camera/aiEye/remote/ai_detector/eye
|
||||
var/datum/action/item_action/toggle_multitool/toggle_action
|
||||
|
||||
/obj/item/multitool/ai_detect/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
eye = new /mob/camera/aiEye/remote/ai_detector()
|
||||
toggle_action = new /datum/action/item_action/toggle_multitool(src)
|
||||
|
||||
/obj/item/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(hud_on && ismob(loc))
|
||||
remove_hud(loc)
|
||||
QDEL_NULL(toggle_action)
|
||||
QDEL_NULL(eye)
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/ai_detect/ui_action_click()
|
||||
return
|
||||
|
||||
/obj/item/multitool/ai_detect/update_icon()
|
||||
if(selected_io)
|
||||
icon_state = "multitool_red"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
|
||||
/obj/item/multitool/ai_detect/equipped(mob/living/carbon/human/user, slot)
|
||||
..()
|
||||
if(hud_on)
|
||||
show_hud(user)
|
||||
|
||||
/obj/item/multitool/ai_detect/dropped(mob/living/carbon/human/user)
|
||||
..()
|
||||
if(hud_on)
|
||||
remove_hud(user)
|
||||
|
||||
/obj/item/multitool/ai_detect/process()
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
if(eye.eye_user)
|
||||
eye.setLoc(get_turf(src))
|
||||
multitool_detect()
|
||||
update_icon()
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/toggle_hud(mob/user)
|
||||
hud_on = !hud_on
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You toggle the ai detection HUD on [src] [hud_on ? "on" : "off"].</span>")
|
||||
if(hud_on)
|
||||
show_hud(user)
|
||||
else
|
||||
remove_hud(user)
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/show_hud(mob/user)
|
||||
if(user && hud_type)
|
||||
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
|
||||
PM.alpha = 150
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
if(!H.hudusers[user])
|
||||
H.add_hud_to(user)
|
||||
eye.eye_user = user
|
||||
eye.setLoc(get_turf(src))
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/remove_hud(mob/user)
|
||||
if(user && hud_type)
|
||||
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
|
||||
PM.alpha = 255
|
||||
var/datum/atom_hud/H = GLOB.huds[hud_type]
|
||||
H.remove_hud_from(user)
|
||||
if(eye)
|
||||
eye.setLoc(null)
|
||||
eye.eye_user = null
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(detect_state)
|
||||
return
|
||||
var/datum/camerachunk/chunk = GLOB.cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk && chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
if(!A.ai_detector_visible)
|
||||
continue
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
/mob/camera/aiEye/remote/ai_detector
|
||||
name = "AI detector eye"
|
||||
ai_detector_visible = FALSE
|
||||
use_static = USE_STATIC_TRANSPARENT
|
||||
visible_icon = FALSE
|
||||
|
||||
/datum/action/item_action/toggle_multitool
|
||||
name = "Toggle AI detector HUD"
|
||||
check_flags = NONE
|
||||
|
||||
/datum/action/item_action/toggle_multitool/Trigger()
|
||||
if(!..())
|
||||
return 0
|
||||
if(target)
|
||||
var/obj/item/multitool/ai_detect/M = target
|
||||
M.toggle_hud(owner)
|
||||
return 1
|
||||
|
||||
/obj/item/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "multitool_cyborg"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
|
||||
/obj/item/multitool/advanced
|
||||
name = "advanced multitool"
|
||||
desc = "The reproduction of an abductor's multitool, this multitool is a classy silver."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.2
|
||||
@@ -0,0 +1,165 @@
|
||||
/obj/item/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
var/mob/living/silicon/pai/pai
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
|
||||
/obj/item/paicard/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is staring sadly at [src]! [user.p_they()] can't keep living without real human intimacy!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/paicard/Initialize()
|
||||
SSpai.pai_card_list += src
|
||||
add_overlay("pai-off")
|
||||
return ..()
|
||||
|
||||
/obj/item/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
SSpai.pai_card_list -= src
|
||||
if (!QDELETED(pai))
|
||||
QDEL_NULL(pai)
|
||||
return ..()
|
||||
|
||||
/obj/item/paicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Personal AI Device</B><BR>"
|
||||
if(pai)
|
||||
if(!pai.master_dna || !pai.master)
|
||||
dat += "<a href='byond://?src=[REF(src)];setdna=1'>Imprint Master DNA</a><br>"
|
||||
dat += "Installed Personality: [pai.name]<br>"
|
||||
dat += "Prime directive: <br>[pai.laws.zeroth]<br>"
|
||||
for(var/slaws in pai.laws.supplied)
|
||||
dat += "Additional directives: <br>[slaws]<br>"
|
||||
dat += "<a href='byond://?src=[REF(src)];setlaws=1'>Configure Directives</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<h3>Device Settings</h3><br>"
|
||||
if(pai.radio)
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "Transmit: <A href='byond://?src=[REF(src)];wires=[WIRE_TX]'>[(pai.radio.wires.is_cut(WIRE_TX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
dat += "Receive: <A href='byond://?src=[REF(src)];wires=[WIRE_RX]'>[(pai.radio.wires.is_cut(WIRE_RX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
else
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.real_name == pai.master || H.dna.unique_enzymes == pai.master_dna)
|
||||
dat += "<A href='byond://?src=[REF(src)];toggle_holo=1'>\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]</a><br>"
|
||||
dat += "<A href='byond://?src=[REF(src)];wipe=1'>\[Wipe current pAI personality\]</a><br>"
|
||||
else
|
||||
dat += "No personality installed.<br>"
|
||||
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
|
||||
dat += "<A href='byond://?src=[REF(src)];request=1'>\[View available personalities\]</a><br>"
|
||||
user << browse(dat, "window=paicard")
|
||||
onclose(user, "paicard")
|
||||
return
|
||||
|
||||
/obj/item/paicard/Topic(href, href_list)
|
||||
|
||||
if(!usr || usr.stat)
|
||||
return
|
||||
|
||||
if(href_list["request"])
|
||||
SSpai.findPAI(src, usr)
|
||||
|
||||
if(pai)
|
||||
if(!(loc == usr))
|
||||
return
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
if(!iscarbon(usr))
|
||||
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
|
||||
else
|
||||
var/mob/living/carbon/M = usr
|
||||
pai.master = M.real_name
|
||||
pai.master_dna = M.dna.unique_enzymes
|
||||
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
|
||||
pai.emittersemicd = FALSE
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(pai)
|
||||
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
|
||||
to_chat(pai, "<span class='danger'>Byte by byte you lose your sense of self.</span>")
|
||||
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
|
||||
to_chat(pai, "<span class='rose'>oblivion... </span>")
|
||||
qdel(pai)
|
||||
if(href_list["wires"])
|
||||
var/wire = text2num(href_list["wires"])
|
||||
if(pai.radio)
|
||||
pai.radio.wires.cut(wire)
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1]) as message),1,MAX_MESSAGE_LEN)
|
||||
if(newlaws && pai)
|
||||
pai.add_supplied_law(0,newlaws)
|
||||
if(href_list["toggle_holo"])
|
||||
if(pai.canholo)
|
||||
to_chat(pai, "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>")
|
||||
pai.canholo = FALSE
|
||||
to_chat(usr, "<span class='warning'>You disable your pAI's holomatrix!</span>")
|
||||
else
|
||||
to_chat(pai, "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>")
|
||||
pai.canholo = TRUE
|
||||
to_chat(usr, "<span class='notice'>You enable your pAI's holomatrix!</span>")
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
// WIRE_SIGNAL = 1
|
||||
// WIRE_RECEIVE = 2
|
||||
// WIRE_TRANSMIT = 4
|
||||
|
||||
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
src.pai = personality
|
||||
src.add_overlay("pai-null")
|
||||
|
||||
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
|
||||
audible_message("\The [src] plays a cheerful startup noise!")
|
||||
|
||||
/obj/item/paicard/proc/setEmotion(emotion)
|
||||
if(pai)
|
||||
src.cut_overlays()
|
||||
switch(emotion)
|
||||
if(1)
|
||||
src.add_overlay("pai-happy")
|
||||
if(2)
|
||||
src.add_overlay("pai-cat")
|
||||
if(3)
|
||||
src.add_overlay("pai-extremely-happy")
|
||||
if(4)
|
||||
src.add_overlay("pai-face")
|
||||
if(5)
|
||||
src.add_overlay("pai-laugh")
|
||||
if(6)
|
||||
src.add_overlay("pai-off")
|
||||
if(7)
|
||||
src.add_overlay("pai-sad")
|
||||
if(8)
|
||||
src.add_overlay("pai-angry")
|
||||
if(9)
|
||||
src.add_overlay("pai-what")
|
||||
if(10)
|
||||
src.add_overlay("pai-null")
|
||||
if(11)
|
||||
src.add_overlay("pai-exclamation")
|
||||
if(12)
|
||||
src.add_overlay("pai-question")
|
||||
if(13)
|
||||
src.add_overlay("pai-sunglasses")
|
||||
|
||||
/obj/item/paicard/proc/alertUpdate()
|
||||
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
|
||||
/obj/item/paicard/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(pai && !pai.holoform)
|
||||
pai.emp_act(severity)
|
||||
@@ -0,0 +1,776 @@
|
||||
|
||||
/*
|
||||
|
||||
CONTAINS:
|
||||
T-RAY
|
||||
HEALTH ANALYZER
|
||||
GAS ANALYZER
|
||||
SLIME SCANNER
|
||||
|
||||
*/
|
||||
/obj/item/t_scanner
|
||||
name = "\improper 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 = FALSE
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
materials = list(MAT_METAL=150)
|
||||
|
||||
/obj/item/t_scanner/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to emit terahertz-rays into [user.p_their()] brain with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/t_scanner/attack_self(mob/user)
|
||||
|
||||
on = !on
|
||||
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
|
||||
|
||||
if(on)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/t_scanner/process()
|
||||
if(!on)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return null
|
||||
scan()
|
||||
|
||||
/obj/item/t_scanner/proc/scan()
|
||||
t_ray_scan(loc)
|
||||
|
||||
/proc/t_ray_scan(mob/viewer, flick_time = 8, distance = 3)
|
||||
if(!ismob(viewer) || !viewer.client)
|
||||
return
|
||||
var/list/t_ray_images = list()
|
||||
for(var/obj/O in orange(distance, viewer) )
|
||||
if(O.level != 1)
|
||||
continue
|
||||
|
||||
if(O.invisibility == INVISIBILITY_MAXIMUM)
|
||||
var/image/I = new(loc = get_turf(O))
|
||||
var/mutable_appearance/MA = new(O)
|
||||
MA.alpha = 128
|
||||
MA.dir = O.dir
|
||||
I.appearance = MA
|
||||
t_ray_images += I
|
||||
if(t_ray_images.len)
|
||||
flick_overlay(t_ray_images, list(viewer.client), flick_time)
|
||||
|
||||
/obj/item/healthanalyzer
|
||||
name = "health analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "health"
|
||||
item_state = "healthanalyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=200)
|
||||
var/mode = 1
|
||||
var/scanmode = 0
|
||||
var/advanced = FALSE
|
||||
|
||||
/obj/item/healthanalyzer/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanmode)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
scanmode = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
scanmode = 0
|
||||
|
||||
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
var/msg = "<span class='info'>*---------*\nAnalyzing results for The floor:\n\tOverall status: <b>Healthy</b>\n"
|
||||
msg += "Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font>\n"
|
||||
msg += "\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font>\n"
|
||||
msg += "Body temperature: ???\n"
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
|
||||
if(scanmode == 0)
|
||||
healthscan(user, M, mode, advanced)
|
||||
else if(scanmode == 1)
|
||||
chemscan(user, M)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
|
||||
if(isliving(user) && (user.incapacitated() || user.eye_blind))
|
||||
return
|
||||
//Damage specifics
|
||||
var/oxy_loss = M.getOxyLoss()
|
||||
var/tox_loss = M.getToxLoss()
|
||||
var/fire_loss = M.getFireLoss()
|
||||
var/brute_loss = M.getBruteLoss()
|
||||
var/mob_status = (M.stat == DEAD ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
||||
|
||||
if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced)
|
||||
mob_status = "<span class='alert'><b>Deceased</b></span>"
|
||||
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!</span>")
|
||||
if(H.undergoing_liver_failure() && H.stat != DEAD) //might be depreciated BUG_PROBABLE_CAUSE
|
||||
to_chat(user, "<span class='danger'>Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!</span>")
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n"
|
||||
|
||||
// Damage descriptions
|
||||
if(brute_loss > 10)
|
||||
msg += "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>\n"
|
||||
if(fire_loss > 10)
|
||||
msg += "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>\n"
|
||||
if(oxy_loss > 10)
|
||||
msg += "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>\n"
|
||||
if(tox_loss > 10)
|
||||
msg += "\t<span class='alert'>[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected.</span>\n"
|
||||
if(M.getStaminaLoss())
|
||||
msg += "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>\n"
|
||||
if(advanced)
|
||||
msg += "\t<span class='info'>Fatigue Level: [M.getStaminaLoss()]%.</span>\n"
|
||||
if (M.getCloneLoss())
|
||||
msg += "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage.</span>\n"
|
||||
if(advanced)
|
||||
msg += "\t<span class='info'>Cellular Damage Level: [M.getCloneLoss()].</span>\n"
|
||||
if (!M.getorgan(/obj/item/organ/brain))
|
||||
to_chat(user, "\t<span class='alert'>Subject lacks a brain.</span>") //Unsure how this won't proc for 50% of the cit playerbase (This is a joke everyone on cit a cute.)
|
||||
if(ishuman(M) && advanced) // Should I make this not advanced?
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/liver/L = H.getorganslot("liver")
|
||||
if(L)
|
||||
if(L.swelling > 20)
|
||||
msg += "\t<span class='danger'>Subject is suffering from an enlarged liver.</span>\n" //i.e. shrink their liver or give them a transplant.
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's liver is missing.</span>\n"
|
||||
var/obj/item/organ/tongue/T = H.getorganslot("tongue")
|
||||
if(T)
|
||||
if(T.damage > 40)
|
||||
msg += "\t<span class='danger'>Subject is suffering from severe burn tissue on their tongue.</span>\n" //i.e. their tongue is shot
|
||||
if(T.name == "fluffy tongue")
|
||||
msg += "\t<span class='danger'>Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's tongue is missing.</span>\n"
|
||||
var/obj/item/organ/lungs/Lung = H.getorganslot("lungs")
|
||||
if(Lung)
|
||||
if(Lung.damage > 150)
|
||||
msg += "\t<span class='danger'>Subject is suffering from acute emphysema leading to trouble breathing.</span>\n" //i.e. Their lungs are shot
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's lungs have collapsed from trauma!</span>\n"
|
||||
var/obj/item/organ/genital/penis/P = H.getorganslot("penis")
|
||||
if(P)
|
||||
if(P.length>20)
|
||||
msg += "\t<span class='info'>Subject has a sizeable gentleman's organ at [P.length] inches.</span>\n"
|
||||
var/obj/item/organ/genital/breasts/Br = H.getorganslot("breasts")
|
||||
if(Br)
|
||||
if(Br.cached_size>5)
|
||||
msg += "\t<span class='info'>Subject has a sizeable bosom with a [Br.size] cup.</span>\n"
|
||||
|
||||
if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200 || !M.getorgan(/obj/item/organ/brain))
|
||||
msg += "\t<span class='alert'>Subject's brain function is non-existent.</span>\n"
|
||||
else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120)
|
||||
msg += "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental traumas.</span>\n"
|
||||
else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45)
|
||||
msg += "\t<span class='alert'>Brain damage detected.</span>\n"
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(LAZYLEN(C.get_traumas()))
|
||||
var/list/trauma_text = list()
|
||||
for(var/datum/brain_trauma/B in C.get_traumas())
|
||||
var/trauma_desc = ""
|
||||
switch(B.resilience)
|
||||
if(TRAUMA_RESILIENCE_SURGERY)
|
||||
trauma_desc += "severe "
|
||||
if(TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
trauma_desc += "deep-rooted "
|
||||
if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
trauma_desc += "permanent "
|
||||
trauma_desc += B.scan_desc
|
||||
trauma_text += trauma_desc
|
||||
msg += "\t<span class='alert'>Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].</span>\n"
|
||||
if(C.roundstart_quirks.len)
|
||||
msg += "\t<span class='info'>Subject has the following physiological traits: [C.get_trait_string()].</span>\n"
|
||||
if(advanced)
|
||||
msg += "\t<span class='info'>Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.</span>\n"
|
||||
if(M.radiation)
|
||||
msg += "\t<span class='alert'>Subject is irradiated.</span>\n"
|
||||
msg += "\t<span class='info'>Radiation Level: [M.radiation] rad</span>\n"
|
||||
|
||||
if(advanced && M.hallucinating())
|
||||
msg += "\t<span class='info'>Subject is hallucinating.</span>\n"
|
||||
|
||||
//MKUltra
|
||||
if(advanced && M.has_status_effect(/datum/status_effect/chem/enthrall))
|
||||
msg += "\t<span class='info'>Subject has abnormal brain fuctions.</span>\n"
|
||||
|
||||
//Astrogen shenanigans
|
||||
if(advanced && M.reagents.has_reagent("astral"))
|
||||
if(M.mind)
|
||||
msg += "\t<span class='danger'>Warning: subject may be possesed.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='notice'>Subject appears to be astrally projecting.</span>\n"
|
||||
|
||||
//Eyes and ears
|
||||
if(advanced)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
|
||||
msg += "\t<span class='info'><b>==EAR STATUS==</b></span>\n"
|
||||
if(istype(ears))
|
||||
var/healthy = TRUE
|
||||
if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION))
|
||||
healthy = FALSE
|
||||
msg += "\t<span class='alert'>Subject is genetically deaf.</span>\n"
|
||||
else if(HAS_TRAIT(C, TRAIT_DEAF))
|
||||
healthy = FALSE
|
||||
msg += "\t<span class='alert'>Subject is deaf.</span>\n"
|
||||
else
|
||||
if(ears.damage)
|
||||
to_chat(user, "\t<span class='alert'>Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.</span>")
|
||||
healthy = FALSE
|
||||
if(ears.deaf)
|
||||
to_chat(user, "\t<span class='alert'>Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.</span>")
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
msg += "\t<span class='info'>Healthy.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='alert'>Subject does not have ears.</span>\n"
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
|
||||
msg += "\t<span class='info'><b>==EYE STATUS==</b></span>\n"
|
||||
if(istype(eyes))
|
||||
var/healthy = TRUE
|
||||
if(HAS_TRAIT(C, TRAIT_BLIND))
|
||||
msg += "\t<span class='alert'>Subject is blind.</span>\n"
|
||||
healthy = FALSE
|
||||
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
|
||||
msg += "\t<span class='alert'>Subject is nearsighted.</span>\n"
|
||||
healthy = FALSE
|
||||
if(eyes.damage > 30)
|
||||
msg += "\t<span class='alert'>Subject has severe eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.damage > 20)
|
||||
msg += "\t<span class='alert'>Subject has significant eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.damage)
|
||||
msg += "\t<span class='alert'>Subject has minor eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
msg += "\t<span class='info'>Healthy.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='alert'>Subject does not have eyes.</span>\n"
|
||||
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/ldamage = H.return_liver_damage()
|
||||
if(ldamage > 10)
|
||||
msg += "\t<span class='alert'>[ldamage > 45 ? "Severe" : "Minor"] liver damage detected.</span>\n"
|
||||
|
||||
// Body part damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
var/mob/living/carbon/C = M
|
||||
var/list/damaged = C.get_damaged_bodyparts(1,1)
|
||||
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
|
||||
msg += "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>\n"
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
msg += "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]\n"
|
||||
|
||||
//Organ damages report
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/minor_damage
|
||||
var/major_damage
|
||||
var/max_damage
|
||||
var/report_organs = FALSE
|
||||
|
||||
//Piece together the lists to be reported
|
||||
for(var/O in H.internal_organs)
|
||||
var/obj/item/organ/organ = O
|
||||
if(organ.organ_flags & ORGAN_FAILING)
|
||||
report_organs = TRUE //if we report one organ, we report all organs, even if the lists are empty, just for consistency
|
||||
if(max_damage)
|
||||
max_damage += ", " //prelude the organ if we've already reported an organ
|
||||
max_damage += organ.name //this just slaps the organ name into the string of text
|
||||
else
|
||||
max_damage = "\t<span class='alert'>Non-Functional Organs: " //our initial statement
|
||||
max_damage += organ.name
|
||||
else if(organ.damage > organ.high_threshold)
|
||||
report_organs = TRUE
|
||||
if(major_damage)
|
||||
major_damage += ", "
|
||||
major_damage += organ.name
|
||||
else
|
||||
major_damage = "\t<span class='info'>Severely Damaged Organs: "
|
||||
major_damage += organ.name
|
||||
else if(organ.damage > organ.low_threshold)
|
||||
report_organs = TRUE
|
||||
if(minor_damage)
|
||||
minor_damage += ", "
|
||||
minor_damage += organ.name
|
||||
else
|
||||
minor_damage = "\t<span class='info'>Mildly Damaged Organs: "
|
||||
minor_damage += organ.name
|
||||
|
||||
if(report_organs) //we either finish the list, or set it to be empty if no organs were reported in that category
|
||||
if(!max_damage)
|
||||
max_damage = "\t<span class='alert'>Non-Functional Organs: </span>\n"
|
||||
else
|
||||
max_damage += "</span>\n"
|
||||
if(!major_damage)
|
||||
major_damage = "\t<span class='info'>Severely Damaged Organs: </span>\n"
|
||||
else
|
||||
major_damage += "</span>\n"
|
||||
if(!minor_damage)
|
||||
minor_damage = "\t<span class='info'>Mildly Damaged Organs: </span>\n"
|
||||
else
|
||||
minor_damage += "</span>\n"
|
||||
msg += "[minor_damage]"
|
||||
msg += "[major_damage]"
|
||||
msg += "[max_damage]"
|
||||
|
||||
|
||||
// Species and body temperature
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/species/S = H.dna.species
|
||||
var/mutant = FALSE
|
||||
if (H.dna.check_mutation(HULK))
|
||||
mutant = TRUE
|
||||
else if (S.mutantlungs != initial(S.mutantlungs))
|
||||
mutant = TRUE
|
||||
else if (S.mutant_brain != initial(S.mutant_brain))
|
||||
mutant = TRUE
|
||||
else if (S.mutant_heart != initial(S.mutant_heart))
|
||||
mutant = TRUE
|
||||
else if (S.mutanteyes != initial(S.mutanteyes))
|
||||
mutant = TRUE
|
||||
else if (S.mutantears != initial(S.mutantears))
|
||||
mutant = TRUE
|
||||
else if (S.mutanthands != initial(S.mutanthands))
|
||||
mutant = TRUE
|
||||
else if (S.mutanttongue != initial(S.mutanttongue))
|
||||
mutant = TRUE
|
||||
else if (S.mutanttail != initial(S.mutanttail))
|
||||
mutant = TRUE
|
||||
else if (S.mutantliver != initial(S.mutantliver))
|
||||
mutant = TRUE
|
||||
else if (S.mutantstomach != initial(S.mutantstomach))
|
||||
mutant = TRUE
|
||||
|
||||
msg += "\t<span class='info'>Reported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]</span>\n"
|
||||
msg += "\t<span class='info'>Base Species: [S.name]</span>\n"
|
||||
if(mutant)
|
||||
msg += "\t<span class='info'>Subject has mutations present.</span>\n"
|
||||
msg += "\t<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>\n"
|
||||
|
||||
// Time of death
|
||||
if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced)))
|
||||
msg += "<span class='info'>Time of Death:</span> [M.tod]\n"
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
msg += "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>\n"
|
||||
|
||||
for(var/thing in M.diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
msg += "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>\n"
|
||||
|
||||
// Blood Level
|
||||
if(M.has_dna())
|
||||
var/mob/living/carbon/C = M
|
||||
var/blood_id = C.get_blood_id()
|
||||
if(blood_id)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.bleed_rate)
|
||||
msg += "<span class='danger'>Subject is bleeding!</span>\n"
|
||||
var/blood_percent = round((C.blood_volume / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100)
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != ("blood" || "jellyblood"))//special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
else
|
||||
blood_type = blood_id
|
||||
if(C.blood_volume <= (BLOOD_VOLUME_SAFE*C.blood_ratio) && C.blood_volume > (BLOOD_VOLUME_OKAY*C.blood_ratio))
|
||||
msg += "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else if(C.blood_volume <= (BLOOD_VOLUME_OKAY*C.blood_ratio))
|
||||
msg += "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else
|
||||
msg += "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>\n"
|
||||
|
||||
var/cyberimp_detect
|
||||
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
|
||||
if(CI.status == ORGAN_ROBOTIC && !CI.syndicate_implant)
|
||||
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
|
||||
if(cyberimp_detect)
|
||||
msg += "<span class='notice'>Detected cybernetic modifications:</span>\n"
|
||||
msg += "<span class='notice'>[cyberimp_detect]</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE)
|
||||
|
||||
/proc/chemscan(mob/living/user, mob/living/M)
|
||||
if(istype(M))
|
||||
if(M.reagents)
|
||||
var/msg = "<span class='info'>*---------*\n"
|
||||
if(M.reagents.reagent_list.len)
|
||||
var/list/datum/reagent/reagents = list()
|
||||
for(var/datum/reagent/R in M.reagents.reagent_list)
|
||||
if(R.chemical_flags & REAGENT_INVISIBLE)
|
||||
continue
|
||||
reagents += R
|
||||
|
||||
if(length(reagents))
|
||||
msg += "<span class='notice'>Subject contains the following reagents:</span>\n"
|
||||
for(var/datum/reagent/R in reagents)
|
||||
msg += "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]\n"
|
||||
else
|
||||
msg += "<span class='notice'>Subject contains no reagents.</span>\n"
|
||||
|
||||
else
|
||||
msg += "<span class='notice'>Subject contains no reagents.</span>\n"
|
||||
if(M.reagents.addiction_list.len)
|
||||
msg += "<span class='boldannounce'>Subject is addicted to the following reagents:</span>\n"
|
||||
for(var/datum/reagent/R in M.reagents.addiction_list)
|
||||
msg += "<span class='danger'>[R.name]</span>\n"
|
||||
else
|
||||
msg += "<span class='notice'>Subject is not addicted to any reagents.</span>\n"
|
||||
|
||||
if(M.reagents.has_reagent("fermiTox"))
|
||||
var/datum/reagent/fermiTox = M.reagents.has_reagent("fermiTox")
|
||||
switch(fermiTox.volume)
|
||||
if(5 to 10)
|
||||
msg += "<span class='notice'>Subject contains a low amount of toxic isomers.</span>\n"
|
||||
if(10 to 25)
|
||||
msg += "<span class='danger'>Subject contains toxic isomers.</span>\n"
|
||||
if(25 to 50)
|
||||
msg += "<span class='danger'>Subject contains a substantial amount of toxic isomers.</span>\n"
|
||||
if(50 to 95)
|
||||
msg += "<span class='danger'>Subject contains a high amount of toxic isomers.</span>\n"
|
||||
if(95 to INFINITY)
|
||||
msg += "<span class='danger'>Subject contains a extremely dangerous amount of toxic isomers.</span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
|
||||
/obj/item/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
to_chat(usr, "The scanner now shows specific limb damage.")
|
||||
if(0)
|
||||
to_chat(usr, "The scanner no longer shows limb damage.")
|
||||
|
||||
/obj/item/healthanalyzer/advanced
|
||||
name = "advanced health analyzer"
|
||||
icon_state = "health_adv"
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy."
|
||||
advanced = TRUE
|
||||
|
||||
/obj/item/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels. Alt-Click to use the built in barometer function."
|
||||
name = "analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "analyzer"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
tool_behaviour = TOOL_ANALYZER
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
grind_results = list("mercury" = 5, "iron" = 5, "silicon" = 5)
|
||||
var/cooldown = FALSE
|
||||
var/cooldown_time = 250
|
||||
var/accuracy // 0 is the best accuracy.
|
||||
|
||||
/obj/item/analyzer/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to activate the barometer function.</span>")
|
||||
|
||||
/obj/item/analyzer/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/analyzer/attack_self(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
if(total_moles)
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
|
||||
var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
|
||||
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
|
||||
var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
||||
|
||||
GAS_GARBAGE_COLLECT(environment.gases)
|
||||
|
||||
for(var/id in env_gases)
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = env_gases[id]/total_moles
|
||||
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)</span>")
|
||||
|
||||
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
||||
..()
|
||||
|
||||
if(user.canUseTopic(src))
|
||||
|
||||
if(cooldown)
|
||||
to_chat(user, "<span class='warning'>[src]'s barometer function is preparing 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))
|
||||
|
||||
/proc/atmosanalyzer_scan(mixture, mob/living/user, atom/target = src)
|
||||
var/icon = target
|
||||
user.visible_message("[user] has used the analyzer on [icon2html(icon, viewers(user))] [target].", "<span class='notice'>You use the analyzer on [icon2html(icon, user)] [target].</span>")
|
||||
to_chat(user, "<span class='boldnotice'>Results of analysis of [icon2html(icon, user)] [target].</span>")
|
||||
|
||||
var/list/airs = islist(mixture) ? mixture : list(mixture)
|
||||
for(var/g in airs)
|
||||
if(airs.len > 1) //not a unary gas mixture
|
||||
to_chat(user, "<span class='boldnotice'>Node [airs.Find(g)]</span>")
|
||||
var/datum/gas_mixture/air_contents = g
|
||||
|
||||
var/total_moles = air_contents.total_moles()
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess?
|
||||
var/temperature = air_contents.temperature
|
||||
var/cached_scan_results = air_contents.analyzer_results
|
||||
|
||||
if(total_moles > 0)
|
||||
to_chat(user, "<span class='notice'>Moles: [round(total_moles, 0.01)] mol</span>")
|
||||
to_chat(user, "<span class='notice'>Volume: [volume] L</span>")
|
||||
to_chat(user, "<span class='notice'>Pressure: [round(pressure,0.01)] kPa</span>")
|
||||
|
||||
var/list/cached_gases = air_contents.gases
|
||||
for(var/id in cached_gases)
|
||||
var/gas_concentration = cached_gases[id]/total_moles
|
||||
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)</span>")
|
||||
|
||||
else
|
||||
if(airs.len > 1)
|
||||
to_chat(user, "<span class='notice'>This node is empty!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[target] is empty!</span>")
|
||||
|
||||
if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected
|
||||
var/fusion_power = round(cached_scan_results["fusion"], 0.01)
|
||||
var/tier = fusionpower2text(fusion_power)
|
||||
to_chat(user, "<span class='boldnotice'>Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.</span>")
|
||||
to_chat(user, "<span class='notice'>Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.</span>")
|
||||
return
|
||||
|
||||
//slime scanner
|
||||
|
||||
/obj/item/slime_scanner
|
||||
name = "slime scanner"
|
||||
desc = "A device that analyzes a slime's internal composition and measures its stats."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "adv_spectrometer"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = CONDUCT_1
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
|
||||
/obj/item/slime_scanner/attack(mob/living/M, mob/living/user)
|
||||
if(user.stat || user.eye_blind)
|
||||
return
|
||||
if (!isslime(M))
|
||||
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
|
||||
return
|
||||
var/mob/living/simple_animal/slime/T = M
|
||||
slime_scan(T, user)
|
||||
|
||||
/proc/slime_scan(mob/living/simple_animal/slime/T, mob/living/user)
|
||||
to_chat(user, "========================")
|
||||
to_chat(user, "<b>Slime scan results:</b>")
|
||||
to_chat(user, "<span class='notice'>[T.colour] [T.is_adult ? "adult" : "baby"] slime</span>")
|
||||
to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is starving!</span>")
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is hungry</span>")
|
||||
to_chat(user, "Electric change strength: [T.powerlevel]")
|
||||
to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]%")
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
to_chat(user, "This slime does not evolve any further.")
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
to_chat(user, "Possible mutation: [T.slime_mutation[3]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
if (T.cores > 1)
|
||||
to_chat(user, "Multiple cores detected")
|
||||
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
|
||||
if(T.effectmod)
|
||||
to_chat(user, "<span class='notice'>Core mutation in progress: [T.effectmod]</span>")
|
||||
to_chat(user, "<span class = 'notice'>Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]</span>")
|
||||
to_chat(user, "========================")
|
||||
|
||||
|
||||
/obj/item/nanite_scanner
|
||||
name = "nanite scanner"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "nanite_scanner"
|
||||
item_state = "nanite_remote"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
desc = "A hand-held body scanner able to detect nanites and their programming."
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=200)
|
||||
|
||||
/obj/item/nanite_scanner/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s nanites.</span>")
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE)
|
||||
if(!response)
|
||||
to_chat(user, "<span class='info'>No nanites detected in the subject.</span>")
|
||||
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
|
||||
Miscellaneous traitor devices
|
||||
|
||||
BATTERER
|
||||
|
||||
RADIOACTIVE MICROLASER
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
The Batterer, like a flashbang but 50% chance to knock people over. Can be either very
|
||||
effective or pretty fucking useless.
|
||||
|
||||
*/
|
||||
|
||||
/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
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
var/times_used = 0 //Number of times it's been used.
|
||||
var/max_uses = 2
|
||||
|
||||
|
||||
/obj/item/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!user) return
|
||||
if(times_used >= max_uses)
|
||||
to_chat(user, "<span class='danger'>The mind batterer has been burnt out!</span>")
|
||||
return
|
||||
|
||||
log_combat(user, null, "knocked down people in the area", src)
|
||||
|
||||
for(var/mob/living/carbon/human/M in urange(10, user, 1))
|
||||
if(prob(50))
|
||||
|
||||
M.Knockdown(rand(200,400))
|
||||
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||
|
||||
else
|
||||
to_chat(M, "<span class='userdanger'>You feel a sudden, electric jolt travel through your head.</span>")
|
||||
|
||||
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You trigger [src].</span>")
|
||||
times_used += 1
|
||||
if(times_used >= max_uses)
|
||||
icon_state = "battererburnt"
|
||||
|
||||
/*
|
||||
The radioactive microlaser, a device disguised as a health analyzer used to irradiate people.
|
||||
|
||||
The strength of the radiation is determined by the 'intensity' setting, while the delay between
|
||||
the scan and the irradiation kicking in is determined by the wavelength.
|
||||
|
||||
Each scan will cause the microlaser to have a brief cooldown period. Higher intensity will increase
|
||||
the cooldown, while higher wavelength will decrease it.
|
||||
|
||||
Wavelength is also slightly increased by the intensity as well.
|
||||
*/
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser
|
||||
materials = list(MAT_METAL=400)
|
||||
var/irradiate = 1
|
||||
var/intensity = 10 // how much damage the radiation does
|
||||
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
|
||||
var/used = 0 // is it cooling down?
|
||||
var/stealth = FALSE
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
if(!irradiate)
|
||||
return
|
||||
if(!used)
|
||||
log_combat(user, M, "irradiated", src)
|
||||
var/cooldown = GetCooldown()
|
||||
used = 1
|
||||
icon_state = "health1"
|
||||
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
spawn((wavelength+(intensity*4))*5)
|
||||
if(M)
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
|
||||
M.rad_act(intensity*10)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/handle_cooldown(cooldown)
|
||||
spawn(cooldown)
|
||||
used = 0
|
||||
icon_state = "health"
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/GetCooldown()
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user)
|
||||
. = ..()
|
||||
|
||||
var/dat = "Irradiation: <A href='?src=[REF(src)];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=[REF(src)];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
dat += "Scan Mode: <a href='?src=[REF(src)];mode=1'>"
|
||||
if(!scanmode)
|
||||
dat += "Scan Health"
|
||||
else if(scanmode == 1)
|
||||
dat += "Scan Reagents"
|
||||
else
|
||||
dat += "Disabled"
|
||||
dat += "</a><br><br>"
|
||||
|
||||
dat += {"
|
||||
Radiation Intensity:
|
||||
<A href='?src=[REF(src)];radint=-5'>-</A><A href='?src=[REF(src)];radint=-1'>-</A>
|
||||
[intensity]
|
||||
<A href='?src=[REF(src)];radint=1'>+</A><A href='?src=[REF(src)];radint=5'>+</A><BR>
|
||||
|
||||
Radiation Wavelength:
|
||||
<A href='?src=[REF(src)];radwav=-5'>-</A><A href='?src=[REF(src)];radwav=-1'>-</A>
|
||||
[(wavelength+(intensity*4))]
|
||||
<A href='?src=[REF(src)];radwav=1'>+</A><A href='?src=[REF(src)];radwav=5'>+</A><BR>
|
||||
Laser Cooldown: [DisplayTimeText(GetCooldown())]<BR>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
else if(href_list["mode"])
|
||||
scanmode += 1
|
||||
if(scanmode > 2)
|
||||
scanmode = 0
|
||||
|
||||
else if(href_list["radint"])
|
||||
var/amount = text2num(href_list["radint"])
|
||||
amount += intensity
|
||||
intensity = max(1,(min(20,amount)))
|
||||
|
||||
else if(href_list["radwav"])
|
||||
var/amount = text2num(href_list["radwav"])
|
||||
amount += wavelength
|
||||
wavelength = max(0,(min(120,amount)))
|
||||
|
||||
attack_self(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/shadowcloak
|
||||
name = "cloaker belt"
|
||||
desc = "Makes you invisible for short periods of time. Recharges in darkness."
|
||||
icon = 'icons/obj/clothing/belts.dmi'
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
|
||||
var/mob/living/carbon/human/user = null
|
||||
var/charge = 300
|
||||
var/max_charge = 300
|
||||
var/on = FALSE
|
||||
var/old_alpha = 0
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
|
||||
/obj/item/shadowcloak/ui_action_click(mob/user)
|
||||
if(user.get_item_by_slot(SLOT_BELT) == src)
|
||||
if(!on)
|
||||
Activate(usr)
|
||||
else
|
||||
Deactivate()
|
||||
return
|
||||
|
||||
/obj/item/shadowcloak/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BELT)
|
||||
return 1
|
||||
|
||||
/obj/item/shadowcloak/proc/Activate(mob/living/carbon/human/user)
|
||||
if(!user)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You activate [src].</span>")
|
||||
src.user = user
|
||||
START_PROCESSING(SSobj, src)
|
||||
old_alpha = user.alpha
|
||||
on = TRUE
|
||||
|
||||
/obj/item/shadowcloak/proc/Deactivate()
|
||||
to_chat(user, "<span class='notice'>You deactivate [src].</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(user)
|
||||
user.alpha = old_alpha
|
||||
on = FALSE
|
||||
user = null
|
||||
|
||||
/obj/item/shadowcloak/dropped(mob/user)
|
||||
..()
|
||||
if(user && user.get_item_by_slot(SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
|
||||
/obj/item/shadowcloak/process()
|
||||
if(user.get_item_by_slot(SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(on)
|
||||
var/lumcount = T.get_lumcount()
|
||||
if(lumcount > 0.3)
|
||||
charge = max(0,charge - 25)//Quick decrease in light
|
||||
else
|
||||
charge = min(max_charge,charge + 50) //Charge in the dark
|
||||
animate(user,alpha = CLAMP(255 - charge,0,255),time = 10)
|
||||
|
||||
|
||||
/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/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
@@ -0,0 +1,213 @@
|
||||
/obj/item/toy/eightball
|
||||
name = "magic eightball"
|
||||
desc = "A black ball with a stenciled number eight in white on the side. It seems full of dark liquid.\nThe instructions state that you should ask your question aloud, and then shake."
|
||||
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "eightball"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
verb_say = "rattles"
|
||||
|
||||
var/shaking = FALSE
|
||||
var/on_cooldown = FALSE
|
||||
|
||||
var/shake_time = 50
|
||||
var/cooldown_time = 100
|
||||
|
||||
var/static/list/possible_answers = list(
|
||||
"It is certain",
|
||||
"It is decidedly so",
|
||||
"Without a doubt",
|
||||
"Yes definitely",
|
||||
"You may rely on it",
|
||||
"As I see it, yes",
|
||||
"Most likely",
|
||||
"Outlook good",
|
||||
"Yes",
|
||||
"Signs point to yes",
|
||||
"Reply hazy try again",
|
||||
"Ask again later",
|
||||
"Better not tell you now",
|
||||
"Cannot predict now",
|
||||
"Concentrate and ask again",
|
||||
"Don't count on it",
|
||||
"My reply is no",
|
||||
"My sources say no",
|
||||
"Outlook not so good",
|
||||
"Very doubtful")
|
||||
|
||||
/obj/item/toy/eightball/Initialize(mapload)
|
||||
. = ..()
|
||||
if(MakeHaunted())
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/toy/eightball/proc/MakeHaunted()
|
||||
. = prob(1)
|
||||
if(.)
|
||||
new /obj/item/toy/eightball/haunted(loc)
|
||||
|
||||
/obj/item/toy/eightball/attack_self(mob/user)
|
||||
if(shaking)
|
||||
return
|
||||
|
||||
if(on_cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] was shaken recently, it needs time to settle.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] starts shaking [src].</span>", "<span class='notice'>You start shaking [src].</span>", "<span class='italics'>You hear shaking and sloshing.</span>")
|
||||
|
||||
shaking = TRUE
|
||||
|
||||
start_shaking(user)
|
||||
if(do_after(user, shake_time, needhand=TRUE, target=user, progress=TRUE))
|
||||
var/answer = get_answer()
|
||||
say(answer)
|
||||
|
||||
on_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, .proc/clear_cooldown), cooldown_time)
|
||||
|
||||
shaking = FALSE
|
||||
|
||||
/obj/item/toy/eightball/proc/start_shaking(user)
|
||||
return
|
||||
|
||||
/obj/item/toy/eightball/proc/get_answer()
|
||||
return pick(possible_answers)
|
||||
|
||||
/obj/item/toy/eightball/proc/clear_cooldown()
|
||||
on_cooldown = FALSE
|
||||
|
||||
// A broken magic eightball, it only says "YOU SUCK" over and over again.
|
||||
|
||||
/obj/item/toy/eightball/broken
|
||||
name = "broken magic eightball"
|
||||
desc = "A black ball with a stenciled number eight in white on the side. It is cracked and seems empty."
|
||||
var/fixed_answer
|
||||
|
||||
/obj/item/toy/eightball/broken/Initialize(mapload)
|
||||
. = ..()
|
||||
fixed_answer = pick(possible_answers)
|
||||
|
||||
/obj/item/toy/eightball/broken/get_answer()
|
||||
return fixed_answer
|
||||
|
||||
// Haunted eightball is identical in description and function to toy,
|
||||
// except it actually ASKS THE DEAD (wooooo)
|
||||
|
||||
/obj/item/toy/eightball/haunted
|
||||
shake_time = 150
|
||||
cooldown_time = 1800
|
||||
flags_1 = HEAR_1
|
||||
var/last_message
|
||||
var/selected_message
|
||||
var/list/votes
|
||||
|
||||
/obj/item/toy/eightball/haunted/Initialize(mapload)
|
||||
. = ..()
|
||||
votes = list()
|
||||
GLOB.poi_list |= src
|
||||
|
||||
/obj/item/toy/eightball/haunted/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/eightball/haunted/MakeHaunted()
|
||||
return FALSE
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/item/toy/eightball/haunted/attack_ghost(mob/user)
|
||||
if(!shaking)
|
||||
to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>")
|
||||
return
|
||||
interact(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/eightball/haunted/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
. = ..()
|
||||
last_message = raw_message
|
||||
|
||||
/obj/item/toy/eightball/haunted/start_shaking(mob/user)
|
||||
// notify ghosts that someone's shaking a haunted eightball
|
||||
// and inform them of the message, (hopefully a yes/no question)
|
||||
selected_message = last_message
|
||||
notify_ghosts("[user] is shaking [src], hoping to get an answer to \"[selected_message]\"", source=src, enter_link="<a href=?src=[REF(src)];interact=1>(Click to help)</a>", action=NOTIFY_ATTACK)
|
||||
|
||||
/obj/item/toy/eightball/haunted/Topic(href, href_list)
|
||||
if(href_list["interact"])
|
||||
if(isobserver(usr))
|
||||
interact(usr)
|
||||
|
||||
/obj/item/toy/eightball/haunted/proc/get_vote_tallies()
|
||||
var/list/answers = list()
|
||||
for(var/ckey in votes)
|
||||
var/selected = votes[ckey]
|
||||
if(selected in answers)
|
||||
answers[selected]++
|
||||
else
|
||||
answers[selected] = 1
|
||||
|
||||
return answers
|
||||
|
||||
|
||||
/obj/item/toy/eightball/haunted/get_answer()
|
||||
if(!votes.len)
|
||||
return pick(possible_answers)
|
||||
|
||||
var/list/tallied_votes = get_vote_tallies()
|
||||
|
||||
// I miss python sorting, then I wouldn't have to muck about with
|
||||
// all this
|
||||
var/most_popular_answer
|
||||
var/most_amount = 0
|
||||
// yes, if there is a tie, there is an arbitary decision
|
||||
// but we never said the spirit world was fair
|
||||
for(var/A in tallied_votes)
|
||||
var/amount = tallied_votes[A]
|
||||
if(amount > most_amount)
|
||||
most_popular_answer = A
|
||||
|
||||
return most_popular_answer
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_interact(mob/user, ui_key="main", datum/tgui/ui=null, force_open=0, datum/tgui/master_ui=null, datum/ui_state/state = GLOB.observer_state)
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "eightball", name, 400, 600, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["shaking"] = shaking
|
||||
data["question"] = selected_message
|
||||
var/list/tallied_votes = get_vote_tallies()
|
||||
|
||||
data["answers"] = list()
|
||||
|
||||
for(var/pa in possible_answers)
|
||||
var/list/L = list()
|
||||
L["answer"] = pa
|
||||
var/amount = 0
|
||||
if(pa in tallied_votes)
|
||||
amount = tallied_votes[pa]
|
||||
L["amount"] = amount
|
||||
var/selected = FALSE
|
||||
if(votes[user.ckey] == pa)
|
||||
selected = TRUE
|
||||
L["selected"] = selected
|
||||
|
||||
data["answers"] += list(L)
|
||||
return data
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/mob/user = usr
|
||||
|
||||
switch(action)
|
||||
if("vote")
|
||||
var/selected_answer = params["answer"]
|
||||
if(!(selected_answer in possible_answers))
|
||||
return
|
||||
else
|
||||
votes[user.ckey] = selected_answer
|
||||
. = TRUE
|
||||
@@ -0,0 +1,467 @@
|
||||
///books that teach things (intrinsic actions like bar flinging, spells like fireball or smoke, or martial arts)///
|
||||
|
||||
/obj/item/book/granter
|
||||
due_date = 0 // Game time in deciseconds
|
||||
unique = 1 // 0 Normal book, 1 Should not be treated as normal book, unable to be copied, unable to be modified
|
||||
var/list/remarks = list() //things to read about while learning.
|
||||
var/pages_to_mastery = 3 //Essentially controls how long a mob must keep the book in his hand to actually successfully learn
|
||||
var/reading = FALSE //sanity
|
||||
var/oneuse = TRUE //default this is true, but admins can var this to 0 if we wanna all have a pass around of the rod form book
|
||||
var/used = FALSE //only really matters if oneuse but it might be nice to know if someone's used it for admin investigations perhaps
|
||||
|
||||
/obj/item/book/granter/proc/turn_page(mob/user)
|
||||
playsound(user, pick('sound/effects/pageturn1.ogg','sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg'), 30, 1)
|
||||
if(do_after(user,50, user))
|
||||
if(remarks.len)
|
||||
to_chat(user, "<span class='notice'>[pick(remarks)]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You keep reading...</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/proc/recoil(mob/user) //nothing so some books can just return
|
||||
|
||||
/obj/item/book/granter/proc/already_known(mob/user)
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/proc/on_reading_start(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start reading [name]...</span>")
|
||||
|
||||
/obj/item/book/granter/proc/on_reading_stopped(mob/user)
|
||||
to_chat(user, "<span class='notice'>You stop reading...</span>")
|
||||
|
||||
/obj/item/book/granter/proc/on_reading_finished(mob/user)
|
||||
to_chat(user, "<span class='notice'>You finish reading [name]!</span>")
|
||||
|
||||
/obj/item/book/granter/proc/onlearned(mob/user)
|
||||
used = TRUE
|
||||
|
||||
|
||||
/obj/item/book/granter/attack_self(mob/user)
|
||||
if(reading)
|
||||
to_chat(user, "<span class='warning'>You're already reading this!</span>")
|
||||
return FALSE
|
||||
if(already_known(user))
|
||||
return FALSE
|
||||
if(used && oneuse)
|
||||
recoil(user)
|
||||
else
|
||||
on_reading_start(user)
|
||||
reading = TRUE
|
||||
for(var/i=1, i<=pages_to_mastery, i++)
|
||||
if(!turn_page(user))
|
||||
on_reading_stopped()
|
||||
reading = FALSE
|
||||
return
|
||||
if(do_after(user,50, user))
|
||||
on_reading_finished(user)
|
||||
reading = FALSE
|
||||
return TRUE
|
||||
|
||||
///ACTION BUTTONS///
|
||||
|
||||
/obj/item/book/granter/action
|
||||
var/granted_action
|
||||
var/actionname = "catching bugs" //might not seem needed but this makes it so you can safely name action buttons toggle this or that without it fucking up the granter, also caps
|
||||
|
||||
/obj/item/book/granter/action/already_known(mob/user)
|
||||
if(!granted_action)
|
||||
return TRUE
|
||||
for(var/datum/action/A in user.actions)
|
||||
if(A.type == granted_action)
|
||||
to_chat(user, "<span class='notice'>You already know all about [actionname].</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/action/on_reading_start(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start reading about [actionname]...</span>")
|
||||
|
||||
/obj/item/book/granter/action/on_reading_finished(mob/user)
|
||||
to_chat(user, "<span class='notice'>You feel like you've got a good handle on [actionname]!</span>")
|
||||
var/datum/action/G = new granted_action
|
||||
G.Grant(user)
|
||||
onlearned(user)
|
||||
|
||||
/obj/item/book/granter/action/drink_fling
|
||||
granted_action = /datum/action/innate/drink_fling
|
||||
name = "Tapper: This One's For You"
|
||||
desc = "A seminal work on the dying art of booze sliding."
|
||||
icon_state = "barbook"
|
||||
actionname = "drink flinging"
|
||||
oneuse = FALSE
|
||||
remarks = list("The trick is keeping a low center of gravity it seems...", "The viscosity of the liquid is important...", "Accounting for crosswinds... really?", "Drag coefficients of various popular drinking glasses...", "What the heck is laminar flow and why does it matter here?", "Greasing the bar seems like it'd be cheating...", "I don't think I'll be working with superfluids...")
|
||||
|
||||
/datum/action/innate/drink_fling
|
||||
name = "Drink Flinging"
|
||||
desc = "Toggles your ability to satisfyingly throw glasses without spilling them."
|
||||
button_icon_state = "drinkfling_off"
|
||||
check_flags = 0
|
||||
|
||||
/datum/action/innate/drink_fling/Activate()
|
||||
button_icon_state = "drinkfling_on"
|
||||
active = TRUE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/drink_fling/Deactivate()
|
||||
button_icon_state = "drinkfling_off"
|
||||
active = FALSE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/obj/item/book/granter/action/origami
|
||||
granted_action = /datum/action/innate/origami
|
||||
name = "The Art of Origami"
|
||||
desc = "A meticulously in-depth manual explaining the art of paper folding."
|
||||
icon_state = "origamibook"
|
||||
actionname = "origami"
|
||||
oneuse = TRUE
|
||||
remarks = list("Dead-stick stability...", "Symmetry seems to play a rather large factor...", "Accounting for crosswinds... really?", "Drag coefficients of various paper types...", "Thrust to weight ratios?", "Positive dihedral angle?", "Center of gravity forward of the center of lift...")
|
||||
|
||||
/datum/action/innate/origami
|
||||
name = "Origami Folding"
|
||||
desc = "Toggles your ability to fold and catch robust paper airplanes."
|
||||
button_icon_state = "origami_off"
|
||||
check_flags = NONE
|
||||
|
||||
/datum/action/innate/origami/Activate()
|
||||
to_chat(owner, "<span class='notice'>You will now fold origami planes.</span>")
|
||||
button_icon_state = "origami_on"
|
||||
active = TRUE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/origami/Deactivate()
|
||||
to_chat(owner, "<span class='notice'>You will no longer fold origami planes.</span>")
|
||||
button_icon_state = "origami_off"
|
||||
active = FALSE
|
||||
UpdateButtonIcon()
|
||||
|
||||
///SPELLS///
|
||||
|
||||
/obj/item/book/granter/spell
|
||||
var/spell
|
||||
var/spellname = "conjure bugs"
|
||||
|
||||
/obj/item/book/granter/spell/already_known(mob/user)
|
||||
if(!spell)
|
||||
return TRUE
|
||||
for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list)
|
||||
if(knownspell.type == spell)
|
||||
if(user.mind)
|
||||
if(iswizard(user))
|
||||
to_chat(user,"<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>")
|
||||
else
|
||||
to_chat(user,"<span class='notice'>You've already read this one.</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/spell/on_reading_start(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start reading about casting [spellname]...</span>")
|
||||
|
||||
/obj/item/book/granter/spell/on_reading_finished(mob/user)
|
||||
to_chat(user, "<span class='notice'>You feel like you've experienced enough to cast [spellname]!</span>")
|
||||
var/obj/effect/proc_holder/spell/S = new spell
|
||||
user.mind.AddSpell(S)
|
||||
user.log_message("learned the spell [spellname] ([S])", LOG_ATTACK, color="orange")
|
||||
onlearned(user)
|
||||
|
||||
/obj/item/book/granter/spell/recoil(mob/user)
|
||||
user.visible_message("<span class='warning'>[src] glows in a black light!</span>")
|
||||
|
||||
/obj/item/book/granter/spell/onlearned(mob/user)
|
||||
..()
|
||||
if(oneuse)
|
||||
user.visible_message("<span class='caution'>[src] glows dark for a second!</span>")
|
||||
|
||||
/obj/item/book/granter/spell/fireball
|
||||
spell = /obj/effect/proc_holder/spell/aimed/fireball
|
||||
spellname = "fireball"
|
||||
icon_state ="bookfireball"
|
||||
desc = "This book feels warm to the touch."
|
||||
remarks = list("Aim...AIM, FOOL!", "Just catching them on fire won't do...", "Accounting for crosswinds... really?", "I think I just burned my hand...", "Why the dumb stance? It's just a flick of the hand...", "OMEE... ONI... Ugh...", "What's the difference between a fireball and a pyroblast...")
|
||||
|
||||
/obj/item/book/granter/spell/fireball/recoil(mob/user)
|
||||
..()
|
||||
explosion(user.loc, 1, 0, 2, 3, FALSE, FALSE, 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/book/granter/spell/sacredflame
|
||||
spell = /obj/effect/proc_holder/spell/targeted/sacred_flame
|
||||
spellname = "sacred flame"
|
||||
icon_state ="booksacredflame"
|
||||
desc = "Become one with the flames that burn within... and invite others to do so as well."
|
||||
remarks = list("Well, it's one way to stop an attacker...", "I'm gonna need some good gear to stop myself from burning to death...", "Keep a fire extinguisher handy, got it...", "I think I just burned my hand...", "Apply flame directly to chest for proper ignition...", "No pain, no gain...", "One with the flame...")
|
||||
|
||||
/obj/item/book/granter/spell/smoke
|
||||
spell = /obj/effect/proc_holder/spell/targeted/smoke
|
||||
spellname = "smoke"
|
||||
icon_state ="booksmoke"
|
||||
desc = "This book is overflowing with the dank arts."
|
||||
remarks = list("Smoke Bomb! Heh...", "Smoke bomb would do just fine too...", "Wait, there's a machine that does the same thing in chemistry?", "This book smells awful...", "Why all these weed jokes? Just tell me how to cast it...", "Wind will ruin the whole spell, good thing we're in space... Right?", "So this is how the spider clan does it...")
|
||||
|
||||
/obj/item/book/granter/spell/smoke/lesser //Chaplain smoke book
|
||||
spell = /obj/effect/proc_holder/spell/targeted/smoke/lesser
|
||||
|
||||
/obj/item/book/granter/spell/smoke/recoil(mob/user)
|
||||
..()
|
||||
to_chat(user,"<span class='caution'>Your stomach rumbles...</span>")
|
||||
if(user.nutrition)
|
||||
user.nutrition = 200
|
||||
if(user.nutrition <= 0)
|
||||
user.nutrition = 0
|
||||
|
||||
/obj/item/book/granter/spell/blind
|
||||
spell = /obj/effect/proc_holder/spell/targeted/trigger/blind
|
||||
spellname = "blind"
|
||||
icon_state ="bookblind"
|
||||
desc = "This book looks blurry, no matter how you look at it."
|
||||
remarks = list("Well I can't learn anything if I can't read the damn thing!", "Why would you use a dark font on a dark background...", "Ah, I can't see an Oh, I'm fine...", "I can't see my hand...!", "I'm manually blinking, damn you book...", "I can't read this page, but somehow I feel like I learned something from it...", "Hey, who turned off the lights?")
|
||||
|
||||
/obj/item/book/granter/spell/blind/recoil(mob/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>You go blind!</span>")
|
||||
user.blind_eyes(10)
|
||||
|
||||
/obj/item/book/granter/spell/mindswap
|
||||
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
spellname = "mindswap"
|
||||
icon_state ="bookmindswap"
|
||||
desc = "This book's cover is pristine, though its pages look ragged and torn."
|
||||
var/mob/stored_swap //Used in used book recoils to store an identity for mindswaps
|
||||
remarks = list("If you mindswap from a mouse, they will be helpless when you recover...", "Wait, where am I...?", "This book is giving me a horrible headache...", "This page is blank, but I feel words popping into my head...", "GYNU... GYRO... Ugh...", "The voices in my head need to stop, I'm trying to read here...", "I don't think anyone will be happy when I cast this spell...")
|
||||
|
||||
/obj/item/book/granter/spell/mindswap/onlearned()
|
||||
spellname = pick("fireball","smoke","blind","forcewall","knock","barnyard","charge")
|
||||
icon_state = "book[spellname]"
|
||||
name = "spellbook of [spellname]" //Note, desc doesn't change by design
|
||||
..()
|
||||
|
||||
/obj/item/book/granter/spell/mindswap/recoil(mob/user)
|
||||
..()
|
||||
if(stored_swap in GLOB.dead_mob_list)
|
||||
stored_swap = null
|
||||
if(!stored_swap)
|
||||
stored_swap = user
|
||||
to_chat(user,"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>")
|
||||
return
|
||||
if(stored_swap == user)
|
||||
to_chat(user,"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
|
||||
return
|
||||
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new
|
||||
if(swapper.cast(list(stored_swap), user, TRUE, TRUE))
|
||||
to_chat(user,"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
|
||||
to_chat(stored_swap,"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[src] fizzles slightly as it stops glowing!</span>") //if the mind_transfer failed to transfer mobs, likely due to the target being catatonic.
|
||||
|
||||
stored_swap = null
|
||||
|
||||
/obj/item/book/granter/spell/forcewall
|
||||
spell = /obj/effect/proc_holder/spell/targeted/forcewall
|
||||
spellname = "forcewall"
|
||||
icon_state ="bookforcewall"
|
||||
desc = "This book has a dedication to mimes everywhere inside the front cover."
|
||||
remarks = list("I can go through the wall! Neat.", "Why are there so many mime references...?", "This would cause much grief in a hallway...", "This is some surprisingly strong magic to create a wall nobody can pass through...", "Why the dumb stance? It's just a flick of the hand...", "Why are the pages so hard to turn, is this even paper?", "I can't mo Oh, i'm fine...")
|
||||
|
||||
/obj/item/book/granter/spell/forcewall/recoil(mob/living/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>You suddenly feel very solid!</span>")
|
||||
user.Stun(40, ignore_canstun = TRUE)
|
||||
user.petrify(30)
|
||||
|
||||
/obj/item/book/granter/spell/knock
|
||||
spell = /obj/effect/proc_holder/spell/aoe_turf/knock
|
||||
spellname = "knock"
|
||||
icon_state ="bookknock"
|
||||
desc = "This book is hard to hold closed properly."
|
||||
remarks = list("Open Sesame!", "So THAT'S the magic password!", "Slow down, book. I still haven't finished this page...", "The book won't stop moving!", "I think this is hurting the spine of the book...", "I can't get to the next page, it's stuck t- I'm good, it just turned to the next page on it's own.", "Yeah, staff of doors does the same thing. Go figure...")
|
||||
|
||||
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>You're knocked down!</span>")
|
||||
user.Knockdown(40)
|
||||
|
||||
/obj/item/book/granter/spell/barnyard
|
||||
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
|
||||
spellname = "barnyard"
|
||||
icon_state ="bookhorses"
|
||||
desc = "This book is more horse than your mind has room for."
|
||||
remarks = list("Moooooooo!","Moo!","Moooo!", "NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!", "Oink!", "Squeeeeeeee!", "Oink Oink!", "Ree!!", "Reee!!", "REEE!!", "REEEEE!!")
|
||||
|
||||
/obj/item/book/granter/spell/barnyard/recoil(mob/living/carbon/user)
|
||||
if(ishuman(user))
|
||||
to_chat(user,"<font size='15' color='red'><b>HORSIE HAS RISEN</b></font>")
|
||||
var/obj/item/clothing/magichead = new /obj/item/clothing/mask/horsehead/cursed(user.drop_location())
|
||||
if(!user.dropItemToGround(user.wear_mask))
|
||||
qdel(user.wear_mask)
|
||||
user.equip_to_slot_if_possible(magichead, SLOT_WEAR_MASK, TRUE, TRUE)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>I say thee neigh</span>") //It still lives here
|
||||
|
||||
/obj/item/book/granter/spell/charge
|
||||
spell = /obj/effect/proc_holder/spell/targeted/charge
|
||||
spellname = "charge"
|
||||
icon_state ="bookcharge"
|
||||
desc = "This book is made of 100% postconsumer wizard."
|
||||
remarks = list("I feel ALIVE!", "I CAN TASTE THE MANA!", "What a RUSH!", "I'm FLYING through these pages!", "THIS GENIUS IS MAKING IT!", "This book is ACTION PAcKED!", "HE'S DONE IT", "LETS GOOOOOOOOOOOO", "Just wait faster is all...")
|
||||
|
||||
/obj/item/book/granter/spell/charge/recoil(mob/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>[src] suddenly feels very warm!</span>")
|
||||
empulse(src, 1, 1)
|
||||
|
||||
/obj/item/book/granter/spell/summonitem
|
||||
spell = /obj/effect/proc_holder/spell/targeted/summonitem
|
||||
spellname = "instant summons"
|
||||
icon_state ="booksummons"
|
||||
desc = "This book is bright and garish, very hard to miss."
|
||||
remarks = list("I can't look away from the book!", "The words seem to pop around the page...", "I just need to focus on one item...", "Make sure to have a good grip on it when casting...", "Slow down, book. I still haven't finished this page...", "Sounds pretty great with some other magical artifacts...", "Magicians must love this one.")
|
||||
|
||||
/obj/item/book/granter/spell/summonitem/recoil(mob/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>[src] suddenly vanishes!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/book/granter/spell/random
|
||||
icon_state = "random_book"
|
||||
|
||||
/obj/item/book/granter/spell/random/Initialize()
|
||||
. = ..()
|
||||
var/static/banned_spells = list(/obj/item/book/granter/spell/mimery_blockade, /obj/item/book/granter/spell/mimery_guns)
|
||||
var/real_type = pick(subtypesof(/obj/item/book/granter/spell) - banned_spells)
|
||||
new real_type(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
///MARTIAL ARTS///
|
||||
|
||||
/obj/item/book/granter/martial
|
||||
var/martial
|
||||
var/martialname = "bug jitsu"
|
||||
var/greet = "You feel like you have mastered the art in breaking code. Nice work, jackass."
|
||||
|
||||
/obj/item/book/granter/martial/already_known(mob/user)
|
||||
if(!martial)
|
||||
return TRUE
|
||||
var/datum/martial_art/MA = martial
|
||||
if(user.mind.has_martialart(initial(MA.id)))
|
||||
to_chat(user,"<span class='warning'>You already know [martialname]!</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/book/granter/martial/on_reading_start(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start reading about [martialname]...</span>")
|
||||
|
||||
/obj/item/book/granter/martial/on_reading_finished(mob/user)
|
||||
to_chat(user, "[greet]")
|
||||
var/datum/martial_art/MA = new martial
|
||||
MA.teach(user)
|
||||
user.log_message("learned the martial art [martialname] ([MA])", LOG_ATTACK, color="orange")
|
||||
onlearned(user)
|
||||
|
||||
/obj/item/book/granter/martial/cqc
|
||||
martial = /datum/martial_art/cqc
|
||||
name = "old manual"
|
||||
martialname = "close quarters combat"
|
||||
desc = "A small, black manual. There are drawn instructions of tactical hand-to-hand combat."
|
||||
greet = "<span class='boldannounce'>You've mastered the basics of CQC.</span>"
|
||||
icon_state = "cqcmanual"
|
||||
remarks = list("Kick... Slam...", "Lock... Kick...", "Strike their abdomen, neck and back for critical damage...", "Slam... Lock...", "I could probably combine this with some other martial arts!", "Words that kill...", "The last and final moment is yours...")
|
||||
|
||||
/obj/item/book/granter/martial/cqc/onlearned(mob/living/carbon/user)
|
||||
..()
|
||||
if(oneuse == TRUE)
|
||||
to_chat(user, "<span class='warning'>[src] beeps ominously...</span>")
|
||||
|
||||
/obj/item/book/granter/martial/cqc/recoil(mob/living/carbon/user)
|
||||
to_chat(user, "<span class='warning'>[src] explodes!</span>")
|
||||
playsound(src,'sound/effects/explosion1.ogg',40,1)
|
||||
user.flash_act(1, 1)
|
||||
user.adjustBruteLoss(6)
|
||||
user.adjustFireLoss(6)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/book/granter/martial/carp
|
||||
martial = /datum/martial_art/the_sleeping_carp
|
||||
name = "mysterious scroll"
|
||||
martialname = "sleeping carp"
|
||||
desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art."
|
||||
greet = "<span class='sciradio'>You have learned the ancient martial art of the Sleeping Carp! Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles \
|
||||
directed toward you. However, you are also unable to use any ranged weaponry. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.</span>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
remarks = list("I must prove myself worthy to the masters of the sleeping carp...", "Stance means everything...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Grab them first so they don't retaliate...", "I must prove myself worthy of this power...")
|
||||
|
||||
/obj/item/book/granter/martial/carp/onlearned(mob/living/carbon/user)
|
||||
..()
|
||||
if(oneuse == TRUE)
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
/obj/item/book/granter/martial/plasma_fist
|
||||
martial = /datum/martial_art/plasma_fist
|
||||
name = "frayed scroll"
|
||||
martialname = "plasma fist"
|
||||
desc = "An aged and frayed scrap of paper written in shifting runes. There are hand-drawn illustrations of pugilism."
|
||||
greet = "<span class='boldannounce'>You have learned the ancient martial art of Plasma Fist. Your combos are extremely hard to pull off, but include some of the most deadly moves ever seen including \
|
||||
the plasma fist, which when pulled off will make someone violently explode.</span>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
remarks = list("Balance...", "Power...", "Control...", "Mastery...", "Vigilance...", "Skill...")
|
||||
|
||||
/obj/item/book/granter/martial/plasma_fist/onlearned(mob/living/carbon/user)
|
||||
..()
|
||||
if(oneuse == TRUE)
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
// I did not include mushpunch's grant, it is not a book and the item does it just fine.
|
||||
|
||||
|
||||
//Crafting Recipe books
|
||||
|
||||
/obj/item/book/granter/crafting_recipe
|
||||
var/list/crafting_recipe_types = list() //Use full /datum/crafting_recipe/what_you_craft
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/on_reading_finished(mob/user)
|
||||
. = ..()
|
||||
if(!user.mind)
|
||||
return
|
||||
for(var/crafting_recipe_type in crafting_recipe_types)
|
||||
var/datum/crafting_recipe/R = crafting_recipe_type
|
||||
user.mind.teach_crafting_recipe(crafting_recipe_type)
|
||||
to_chat(user,"<span class='notice'>You learned how to make [initial(R.name)].</span>")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/threads //Durathread crafting book
|
||||
name = "Credible Threads"
|
||||
desc = "A simple book about sewing and usefull clothing crafting with cloth and durathreads."
|
||||
crafting_recipe_types = list(/datum/crafting_recipe/durathread_duffelbag, /datum/crafting_recipe/durathread_toolbelt, /datum/crafting_recipe/durathread_bandolier, /datum/crafting_recipe/durathread_helmet, /datum/crafting_recipe/durathread_vest)
|
||||
icon_state = "tailers_art1"
|
||||
oneuse = FALSE
|
||||
remarks = list("Durathread is cloth thats also fire-resistant?", "Strong threads that can be used with leather for some light weight storage!", "The cloth can withstand a beating it said but not that much...")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/cooking_sweets_101 //We start at 101 for 103 and 105
|
||||
name = "Cooking Desserts 101"
|
||||
desc = "A cook book that teaches you some more of the newest desserts. AI approved, and a best seller on Honkplanet."
|
||||
crafting_recipe_types = list(/datum/crafting_recipe/food/mimetart, /datum/crafting_recipe/food/berrytart, /datum/crafting_recipe/food/cocolavatart, /datum/crafting_recipe/food/clowncake, /datum/crafting_recipe/food/vanillacake)
|
||||
icon_state = "cooking_learing_sweets"
|
||||
oneuse = FALSE
|
||||
remarks = list("So that is how icing is made!", "Placing fruit on top? How simple...", "Huh layering cake seems harder then this...", "This book smells like candy", "A clown must have made this page, or they forgot to spell check it before printing...", "Wait, a way to cook slime to be safe?")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/coldcooking //IceCream
|
||||
name = "Cooking with Ice"
|
||||
desc = "A cook book that teaches you many old icecream treats."
|
||||
crafting_recipe_types = list(/datum/crafting_recipe/food/banana_split, /datum/crafting_recipe/food/root_float, /datum/crafting_recipe/food/bluecharrie_float, /datum/crafting_recipe/food/charrie_float)
|
||||
icon_state = "cooking_learing_ice"
|
||||
oneuse = FALSE
|
||||
remarks = list("Looks like these would sell much better in a plasma fire...", "Using glass bowls rather then cones?", "Mixing soda and ice-cream?", "Tall glasses with of liquids and solids...", "Just add a bit of icecream and cherry on top?")
|
||||
|
||||
//Later content when I have free time - Trilby Date:24-Aug-2019
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/under_the_oven //Illegal cook book
|
||||
name = "Under The Oven"
|
||||
desc = "A cook book that teaches you many illegal and fun candys. MALF AI approved, and a best seller on the blackmarket."
|
||||
crafting_recipe_types = list()
|
||||
icon_state = "cooking_learing_illegal"
|
||||
oneuse = FALSE
|
||||
remarks = list()
|
||||
@@ -0,0 +1,238 @@
|
||||
/obj/item/grenade/plastic
|
||||
name = "plastic explosive"
|
||||
desc = "Used to put holes in specific areas without too much extra hole."
|
||||
icon_state = "plastic-explosive0"
|
||||
item_state = "plastic-explosive"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
|
||||
item_flags = NOBLUDGEON
|
||||
flags_1 = NONE
|
||||
det_time = 10
|
||||
display_timer = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/atom/target = null
|
||||
var/mutable_appearance/plastic_overlay
|
||||
var/obj/item/assembly_holder/nadeassembly = null
|
||||
var/assemblyattacher
|
||||
var/directional = FALSE
|
||||
var/aim_dir = NORTH
|
||||
var/boom_sizes = list(0, 0, 3)
|
||||
var/can_attach_mob = FALSE
|
||||
var/full_damage_on_mobs = FALSE
|
||||
|
||||
/obj/item/grenade/plastic/Initialize()
|
||||
. = ..()
|
||||
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
|
||||
|
||||
/obj/item/grenade/plastic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/item/grenade/plastic/Destroy()
|
||||
qdel(nadeassembly)
|
||||
nadeassembly = null
|
||||
target = null
|
||||
..()
|
||||
|
||||
/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.transferItemToLoc(I, src))
|
||||
return ..()
|
||||
nadeassembly = A
|
||||
A.master = src
|
||||
assemblyattacher = user.ckey
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [name].</span>")
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
I.play_tool_sound(src, 20)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/grenade/plastic/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(plastic_overlay, TRUE)
|
||||
if(!ismob(target) || full_damage_on_mobs)
|
||||
target.ex_act(2, target)
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
if(directional && target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
explosion(get_step(T, aim_dir), boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
else
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
//assembly stuff
|
||||
/obj/item/grenade/plastic/receive_signal()
|
||||
prime()
|
||||
|
||||
/obj/item/grenade/plastic/Crossed(atom/movable/AM)
|
||||
if(nadeassembly)
|
||||
nadeassembly.Crossed(AM)
|
||||
|
||||
/obj/item/grenade/plastic/on_found(mob/finder)
|
||||
if(nadeassembly)
|
||||
nadeassembly.on_found(finder)
|
||||
|
||||
/obj/item/grenade/plastic/attack_self(mob/user)
|
||||
if(nadeassembly)
|
||||
nadeassembly.attack_self(user)
|
||||
return
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
||||
if(user.get_active_held_item() == src)
|
||||
newtime = CLAMP(newtime, 10, 60000)
|
||||
det_time = newtime
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
|
||||
. = ..()
|
||||
aim_dir = get_dir(user,AM)
|
||||
if(!flag)
|
||||
return
|
||||
if(ismob(AM) && !can_attach_mob)
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start planting [src]. The timer is set to [det_time]...</span>")
|
||||
|
||||
if(do_after(user, 30, target = AM))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
target = AM
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_VERBOSEJMP(target)] with [det_time] second fuse")
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [AREACOORD(user)] with [det_time] second fuse")
|
||||
|
||||
moveToNullspace() //Yep
|
||||
|
||||
if(istype(AM, /obj/item)) //your crappy throwing star can't fly so good with a giant brick of c4 on it.
|
||||
var/obj/item/I = AM
|
||||
I.throw_speed = max(1, (I.throw_speed - 3))
|
||||
I.throw_range = max(1, (I.throw_range - 3))
|
||||
I.embedding = I.embedding.setRating(embed_chance = 0)
|
||||
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
else
|
||||
qdel(src) //How?
|
||||
|
||||
/obj/item/grenade/plastic/proc/shout_syndicate_crap(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
var/message_say = "FOR NO RAISIN!"
|
||||
if(M.mind)
|
||||
var/datum/mind/UM = M
|
||||
if(UM.has_antag_datum(/datum/antagonist/nukeop) || UM.has_antag_datum(/datum/antagonist/traitor))
|
||||
message_say = "FOR THE SYNDICATE!"
|
||||
else if(UM.has_antag_datum(/datum/antagonist/changeling))
|
||||
message_say = "FOR THE HIVE!"
|
||||
else if(UM.has_antag_datum(/datum/antagonist/cult))
|
||||
message_say = "FOR NAR'SIE!"
|
||||
else if(UM.has_antag_datum(/datum/antagonist/clockcult))
|
||||
message_say = "FOR RATVAR!"
|
||||
else if(UM.has_antag_datum(/datum/antagonist/rev))
|
||||
message_say = "VIVA LA REVOLUTION!"
|
||||
M.say(message_say, forced="C4 suicide")
|
||||
|
||||
/obj/item/grenade/plastic/suicide_act(mob/user)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [src] at [ADMIN_VERBOSEJMP(user)]")
|
||||
log_game("[key_name(user)] suicided with [src] at [AREACOORD(user)]")
|
||||
user.visible_message("<span class='suicide'>[user] activates [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
|
||||
shout_syndicate_crap(user)
|
||||
explosion(user,0,2,0) //Cheap explosion imitation because putting prime() here causes runtimes
|
||||
user.gib(1, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/plastic/update_icon()
|
||||
if(nadeassembly)
|
||||
icon_state = "[item_state]1"
|
||||
else
|
||||
icon_state = "[item_state]0"
|
||||
|
||||
//////////////////////////
|
||||
///// The Explosives /////
|
||||
//////////////////////////
|
||||
|
||||
/obj/item/grenade/plastic/c4
|
||||
name = "C4"
|
||||
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
|
||||
gender = PLURAL
|
||||
var/open_panel = 0
|
||||
can_attach_mob = TRUE
|
||||
full_damage_on_mobs = TRUE
|
||||
|
||||
/obj/item/grenade/plastic/c4/New()
|
||||
wires = new /datum/wires/explosive/c4(src)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/plastic/c4/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/plastic/c4/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
|
||||
shout_syndicate_crap(user)
|
||||
target = user
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_VERBOSEJMP(src)]")
|
||||
log_game("[key_name(user)] suicided with [name] at [AREACOORD(user)]")
|
||||
sleep(10)
|
||||
prime()
|
||||
user.gib(1, 1)
|
||||
|
||||
/obj/item/grenade/plastic/c4/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
open_panel = !open_panel
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(is_wire_tool(I))
|
||||
wires.interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/plastic/c4/prime()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(plastic_overlay, TRUE)
|
||||
if(!ismob(target) || full_damage_on_mobs)
|
||||
target.ex_act(2, target)
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
explosion(location,0,0,3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/plastic/c4/attack(mob/M, mob/user, def_zone)
|
||||
return
|
||||
|
||||
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
|
||||
// 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/grenade/plastic/x4
|
||||
name = "X4"
|
||||
desc = "A shaped high-explosive breaching charge. Designed to ensure user safety and wall nonsafety."
|
||||
icon_state = "plasticx40"
|
||||
item_state = "plasticx4"
|
||||
gender = PLURAL
|
||||
directional = TRUE
|
||||
boom_sizes = list(0, 2, 5)
|
||||
@@ -0,0 +1,255 @@
|
||||
//His Grace is a very special weapon granted only to traitor chaplains.
|
||||
//When awakened, He thirsts for blood and begins ticking a "bloodthirst" counter.
|
||||
//The wielder of His Grace is immune to stuns and gradually heals.
|
||||
//If the wielder fails to feed His Grace in time, He will devour them and become incredibly aggressive.
|
||||
//Leaving His Grace alone for some time will reset His thirst and put Him to sleep.
|
||||
//Using His Grace effectively requires extreme speed and care.
|
||||
/obj/item/his_grace
|
||||
name = "artistic toolbox"
|
||||
desc = "A toolbox painted bright green. Looking at it makes you feel uneasy."
|
||||
icon_state = "his_grace"
|
||||
item_state = "toolbox_green"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 12
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM // average toolbox
|
||||
attack_verb = list("robusted")
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
var/awakened = FALSE
|
||||
var/bloodthirst = HIS_GRACE_SATIATED
|
||||
var/prev_bloodthirst = HIS_GRACE_SATIATED
|
||||
var/force_bonus = 0
|
||||
var/ascended = FALSE
|
||||
var/victims_needed = 10 //Citadel change from 25 to 10
|
||||
var/ascend_bonus = 15
|
||||
|
||||
/obj/item/his_grace/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
GLOB.poi_list += src
|
||||
RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, .proc/move_gracefully)
|
||||
|
||||
/obj/item/his_grace/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
GLOB.poi_list -= src
|
||||
for(var/mob/living/L in src)
|
||||
L.forceMove(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/item/his_grace/attack_self(mob/living/user)
|
||||
if(!awakened)
|
||||
INVOKE_ASYNC(src, .proc/awaken, user)
|
||||
|
||||
/obj/item/his_grace/attack(mob/living/M, mob/user)
|
||||
if(awakened && M.stat)
|
||||
consume(M)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/his_grace/CtrlClick(mob/user) //you can't pull his grace
|
||||
return
|
||||
|
||||
/obj/item/his_grace/examine(mob/user)
|
||||
..()
|
||||
if(awakened)
|
||||
switch(bloodthirst)
|
||||
if(HIS_GRACE_SATIATED to HIS_GRACE_PECKISH)
|
||||
to_chat(user, "<span class='his_grace'>[src] isn't very hungry. Not yet.</span>")
|
||||
if(HIS_GRACE_PECKISH to HIS_GRACE_HUNGRY)
|
||||
to_chat(user, "<span class='his_grace'>[src] would like a snack.</span>")
|
||||
if(HIS_GRACE_HUNGRY to HIS_GRACE_FAMISHED)
|
||||
to_chat(user, "<span class='his_grace'>[src] is quite hungry now.</span>")
|
||||
if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING)
|
||||
to_chat(user, "<span class='his_grace'>[src] is openly salivating at the sight of you. Be careful.</span>")
|
||||
if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER)
|
||||
to_chat(user, "<span class='his_grace bold'>You walk a fine line. [src] is very close to devouring you.</span>")
|
||||
if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP)
|
||||
to_chat(user, "<span class='his_grace bold'>[src] is shaking violently and staring directly at you.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='his_grace'>[src] is latched closed.</span>")
|
||||
|
||||
/obj/item/his_grace/relaymove(mob/living/user) //Allows changelings, etc. to climb out of Him after they revive, provided He isn't active
|
||||
if(!awakened)
|
||||
user.forceMove(get_turf(src))
|
||||
user.visible_message("<span class='warning'>[user] scrambles out of [src]!</span>", "<span class='notice'>You climb out of [src]!</span>")
|
||||
|
||||
/obj/item/his_grace/process()
|
||||
if(!bloodthirst)
|
||||
drowse()
|
||||
return
|
||||
if(bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
|
||||
adjust_bloodthirst(1 + FLOOR(LAZYLEN(contents) * 0.5, 1)) //Maybe adjust this?
|
||||
else
|
||||
adjust_bloodthirst(1) //don't cool off rapidly once we're at the point where His Grace consumes all.
|
||||
var/mob/living/master = get_atom_on_turf(src, /mob/living)
|
||||
if(istype(master) && (src in master.held_items))
|
||||
switch(bloodthirst)
|
||||
if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP)
|
||||
master.visible_message("<span class='boldwarning'>[src] turns on [master]!</span>", "<span class='his_grace big bold'>[src] turns on you!</span>")
|
||||
do_attack_animation(master, null, src)
|
||||
master.emote("scream")
|
||||
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||
master.Knockdown(60)
|
||||
master.adjustBruteLoss(master.maxHealth)
|
||||
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
||||
else
|
||||
master.apply_status_effect(STATUS_EFFECT_HISGRACE)
|
||||
return
|
||||
forceMove(get_turf(src)) //no you can't put His Grace in a locker you just have to deal with Him
|
||||
if(bloodthirst < HIS_GRACE_CONSUME_OWNER)
|
||||
return
|
||||
if(bloodthirst >= HIS_GRACE_FALL_ASLEEP)
|
||||
drowse()
|
||||
return
|
||||
var/list/targets = list()
|
||||
for(var/mob/living/L in oview(2, src))
|
||||
targets += L
|
||||
if(!LAZYLEN(targets))
|
||||
return
|
||||
var/mob/living/L = pick(targets)
|
||||
step_to(src, L)
|
||||
if(Adjacent(L))
|
||||
if(!L.stat)
|
||||
L.visible_message("<span class='warning'>[src] lunges at [L]!</span>", "<span class='his_grace big bold'>[src] lunges at you!</span>")
|
||||
do_attack_animation(L, null, src)
|
||||
playsound(L, 'sound/weapons/smash.ogg', 50, 1)
|
||||
playsound(L, 'sound/misc/desceration-01.ogg', 50, 1)
|
||||
L.adjustBruteLoss(force)
|
||||
adjust_bloodthirst(-5) //Don't stop attacking they're right there!
|
||||
else
|
||||
consume(L)
|
||||
|
||||
/obj/item/his_grace/proc/awaken(mob/user) //Good morning, Mr. Grace.
|
||||
if(awakened)
|
||||
return
|
||||
awakened = TRUE
|
||||
user.visible_message("<span class='boldwarning'>[src] begins to rattle. He thirsts.</span>", "<span class='his_grace'>You flick [src]'s latch up. You hope this is a good idea.</span>")
|
||||
name = "His Grace"
|
||||
desc = "A bloodthirsty artifact created by a profane rite."
|
||||
gender = MALE
|
||||
adjust_bloodthirst(1)
|
||||
force_bonus = HIS_GRACE_FORCE_BONUS * LAZYLEN(contents)
|
||||
playsound(user, 'sound/effects/pope_entry.ogg', 100)
|
||||
icon_state = "his_grace_awakened"
|
||||
move_gracefully()
|
||||
|
||||
/obj/item/his_grace/proc/move_gracefully()
|
||||
if(!awakened)
|
||||
return
|
||||
var/static/list/transforms
|
||||
if(!transforms)
|
||||
var/matrix/M1 = matrix()
|
||||
var/matrix/M2 = matrix()
|
||||
var/matrix/M3 = matrix()
|
||||
var/matrix/M4 = matrix()
|
||||
M1.Translate(-1, 0)
|
||||
M2.Translate(0, 1)
|
||||
M3.Translate(1, 0)
|
||||
M4.Translate(0, -1)
|
||||
transforms = list(M1, M2, M3, M4)
|
||||
|
||||
animate(src, transform=transforms[1], time=0.2, loop=-1)
|
||||
animate(transform=transforms[2], time=0.1)
|
||||
animate(transform=transforms[3], time=0.2)
|
||||
animate(transform=transforms[4], time=0.3)
|
||||
|
||||
/obj/item/his_grace/proc/drowse() //Good night, Mr. Grace.
|
||||
if(!awakened || ascended)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='boldwarning'>[src] slowly stops rattling and falls still, His latch snapping shut.</span>")
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 100, 1)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
icon_state = initial(icon_state)
|
||||
animate(src, transform=matrix())
|
||||
gender = initial(gender)
|
||||
force = initial(force)
|
||||
force_bonus = initial(force_bonus)
|
||||
awakened = FALSE
|
||||
bloodthirst = 0
|
||||
|
||||
/obj/item/his_grace/proc/consume(mob/living/meal) //Here's your dinner, Mr. Grace.
|
||||
if(!meal)
|
||||
return
|
||||
var/victims = 0
|
||||
meal.visible_message("<span class='warning'>[src] swings open and devours [meal]!</span>", "<span class='his_grace big bold'>[src] consumes you!</span>")
|
||||
meal.adjustBruteLoss(200)
|
||||
playsound(meal, 'sound/misc/desceration-02.ogg', 75, 1)
|
||||
playsound(src, 'sound/items/eatfood.ogg', 100, 1)
|
||||
meal.forceMove(src)
|
||||
force_bonus += HIS_GRACE_FORCE_BONUS
|
||||
prev_bloodthirst = bloodthirst
|
||||
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER)
|
||||
bloodthirst = max(LAZYLEN(contents), 1) //Never fully sated, and His hunger will only grow.
|
||||
else
|
||||
bloodthirst = HIS_GRACE_CONSUME_OWNER
|
||||
for(var/mob/living/C in contents)
|
||||
if(C.mind)
|
||||
victims++
|
||||
if(victims >= victims_needed)
|
||||
ascend()
|
||||
update_stats()
|
||||
|
||||
/obj/item/his_grace/proc/adjust_bloodthirst(amt)
|
||||
prev_bloodthirst = bloodthirst
|
||||
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
|
||||
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
|
||||
else if(!ascended)
|
||||
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
|
||||
update_stats()
|
||||
|
||||
/obj/item/his_grace/proc/update_stats()
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||
var/mob/living/master = get_atom_on_turf(src, /mob/living)
|
||||
switch(bloodthirst)
|
||||
if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP)
|
||||
if(HIS_GRACE_CONSUME_OWNER > prev_bloodthirst)
|
||||
master.visible_message("<span class='userdanger'>[src] enters a frenzy!</span>")
|
||||
if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER)
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||
if(HIS_GRACE_STARVING > prev_bloodthirst)
|
||||
master.visible_message("<span class='boldwarning'>[src] is starving!</span>", "<span class='his_grace big'>[src]'s bloodlust overcomes you. [src] must be fed, or you will become His meal.\
|
||||
[force_bonus < 15 ? " And still, His power grows.":""]</span>")
|
||||
force_bonus = max(force_bonus, 15)
|
||||
if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING)
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||
if(HIS_GRACE_FAMISHED > prev_bloodthirst)
|
||||
master.visible_message("<span class='warning'>[src] is very hungry!</span>", "<span class='his_grace big'>Spines sink into your hand. [src] must feed immediately.\
|
||||
[force_bonus < 10 ? " His power grows.":""]</span>")
|
||||
force_bonus = max(force_bonus, 10)
|
||||
if(prev_bloodthirst >= HIS_GRACE_STARVING)
|
||||
master.visible_message("<span class='warning'>[src] is now only very hungry!</span>", "<span class='his_grace big'>Your bloodlust recedes.</span>")
|
||||
if(HIS_GRACE_HUNGRY to HIS_GRACE_FAMISHED)
|
||||
if(HIS_GRACE_HUNGRY > prev_bloodthirst)
|
||||
master.visible_message("<span class='warning'>[src] is getting hungry.</span>", "<span class='his_grace big'>You feel [src]'s hunger within you.\
|
||||
[force_bonus < 5 ? " His power grows.":""]</span>")
|
||||
force_bonus = max(force_bonus, 5)
|
||||
if(prev_bloodthirst >= HIS_GRACE_FAMISHED)
|
||||
master.visible_message("<span class='warning'>[src] is now only somewhat hungry.</span>", "<span class='his_grace'>[src]'s hunger recedes a little...</span>")
|
||||
if(HIS_GRACE_PECKISH to HIS_GRACE_HUNGRY)
|
||||
if(HIS_GRACE_PECKISH > prev_bloodthirst)
|
||||
master.visible_message("<span class='warning'>[src] is feeling snackish.</span>", "<span class='his_grace'>[src] begins to hunger.</span>")
|
||||
if(prev_bloodthirst >= HIS_GRACE_HUNGRY)
|
||||
master.visible_message("<span class='warning'>[src] is now only a little peckish.</span>", "<span class='his_grace big'>[src]'s hunger recedes somewhat...</span>")
|
||||
if(HIS_GRACE_SATIATED to HIS_GRACE_PECKISH)
|
||||
if(prev_bloodthirst >= HIS_GRACE_PECKISH)
|
||||
master.visible_message("<span class='warning'>[src] is satiated.</span>", "<span class='his_grace big'>[src]'s hunger recedes...</span>")
|
||||
force = initial(force) + force_bonus
|
||||
|
||||
/obj/item/his_grace/proc/ascend()
|
||||
if(ascended)
|
||||
return
|
||||
var/mob/living/carbon/human/master = loc
|
||||
force_bonus += ascend_bonus
|
||||
desc = "A legendary toolbox and a distant artifact from The Age of Three Powers. On its three latches engraved are the words \"The Sun\", \"The Moon\", and \"The Stars\". The entire toolbox has the words \"The World\" engraved into its sides."
|
||||
icon_state = "his_grace_ascended"
|
||||
item_state = "toolbox_gold"
|
||||
ascended = TRUE
|
||||
playsound(src, 'sound/effects/his_grace_ascend.ogg', 100)
|
||||
if(istype(master))
|
||||
master.visible_message("<span class='his_grace big bold'>Gods will be watching.</span>")
|
||||
name = "[master]'s mythical toolbox of three powers"
|
||||
@@ -0,0 +1,801 @@
|
||||
// CHAPLAIN CUSTOM ARMORS //
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain
|
||||
name = "crusader helmet"
|
||||
desc = "Deus Vult."
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
armor = list("melee" = 41, "bullet" = 15, "laser" = 5,"energy" = 5, "bomb" = 5, "bio" = 2, "rad" = 0, "fire" = 0, "acid" = 50)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
strip_delay = 80
|
||||
dog_fashion = null
|
||||
|
||||
// CITADEL CHANGES: More variants
|
||||
/obj/item/clothing/head/helmet/chaplain/bland
|
||||
icon_state = "knight_generic"
|
||||
item_state = "knight_generic"
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/bland/horned
|
||||
name = "horned crusader helmet"
|
||||
desc = "Helfen, Wehren, Heilen."
|
||||
icon_state = "knight_horned"
|
||||
item_state = "knight_horned"
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/bland/winged
|
||||
name = "winged crusader helmet"
|
||||
desc = "Helfen, Wehren, Heilen."
|
||||
icon_state = "knight_winged"
|
||||
item_state = "knight_winged"
|
||||
// CITADEL CHANGES ENDS HERE
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain
|
||||
name = "crusader armour"
|
||||
desc = "God wills it!"
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
|
||||
|
||||
// CITADEL CHANGES: More variants
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/teutonic
|
||||
desc = "Help, Defend, Heal!"
|
||||
icon_state = "knight_teutonic"
|
||||
item_state = "knight_teutonic"
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/teutonic/alt
|
||||
icon_state = "knight_teutonic_alt"
|
||||
item_state = "knight_teutonic_alt"
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/hospitaller
|
||||
icon_state = "knight_hospitaller"
|
||||
item_state = "knight_hospitaller"
|
||||
// CITADEL CHANGES ENDS HERE
|
||||
|
||||
/obj/item/holybeacon
|
||||
name = "armaments beacon"
|
||||
desc = "Contains a set of armaments for the chaplain."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-red"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/holybeacon/attack_self(mob/user)
|
||||
if(user.mind && (user.mind.isholy) && !GLOB.holy_armor_type)
|
||||
beacon_armor(user)
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
|
||||
/obj/item/holybeacon/proc/beacon_armor(mob/M)
|
||||
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_armor_list)
|
||||
var/atom/A = V
|
||||
display_names += list(initial(A.name) = A)
|
||||
|
||||
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type)
|
||||
return
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_armor_list[index]
|
||||
|
||||
GLOB.holy_armor_type = A
|
||||
var/holy_armor_box = new A
|
||||
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
|
||||
if(holy_armor_box)
|
||||
qdel(src)
|
||||
M.put_in_active_hand(holy_armor_box)///YOU COMPILED
|
||||
|
||||
/obj/item/storage/box/holy
|
||||
name = "Templar Kit"
|
||||
|
||||
/obj/item/storage/box/holy/PopulateContents()
|
||||
new /obj/item/clothing/head/helmet/chaplain(src)
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain(src)
|
||||
|
||||
// CITADEL CHANGES: More Variants
|
||||
/obj/item/storage/box/holy/teutonic
|
||||
name = "Teutonic Kit"
|
||||
|
||||
/obj/item/storage/box/holy/teutonic/PopulateContents() // It just works
|
||||
pick(new /obj/item/clothing/head/helmet/chaplain/bland/horned(src), new /obj/item/clothing/head/helmet/chaplain/bland/winged(src))
|
||||
pick(new /obj/item/clothing/suit/armor/riot/chaplain/teutonic(src), new /obj/item/clothing/suit/armor/riot/chaplain/teutonic/alt(src))
|
||||
|
||||
/obj/item/storage/box/holy/hospitaller
|
||||
name = "Hospitaller Kit"
|
||||
|
||||
/obj/item/storage/box/holy/hospitaller/PopulateContents()
|
||||
new /obj/item/clothing/head/helmet/chaplain/bland(src)
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/hospitaller(src)
|
||||
// CITADEL CHANGES ENDS HERE
|
||||
|
||||
/obj/item/storage/box/holy/student
|
||||
name = "Profane Scholar Kit"
|
||||
|
||||
/obj/item/storage/box/holy/student/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/studentuni(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/cage(src)
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/studentuni
|
||||
name = "student robe"
|
||||
desc = "The uniform of a bygone institute of learning."
|
||||
icon_state = "studentuni"
|
||||
item_state = "studentuni"
|
||||
body_parts_covered = ARMS|CHEST
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/cage
|
||||
name = "cage"
|
||||
desc = "A cage that restrains the will of the self, allowing one to see the profane world for what it is."
|
||||
alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
|
||||
icon_state = "cage"
|
||||
item_state = "cage"
|
||||
worn_x_dimension = 64
|
||||
worn_y_dimension = 64
|
||||
dynamic_hair_suffix = ""
|
||||
|
||||
/obj/item/storage/box/holy/sentinel
|
||||
name = "Stone Sentinel Kit"
|
||||
|
||||
/obj/item/storage/box/holy/sentinel/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/ancient(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/ancient(src)
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/ancient
|
||||
name = "ancient helmet"
|
||||
desc = "None may pass!"
|
||||
icon_state = "knight_ancient"
|
||||
item_state = "knight_ancient"
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/ancient
|
||||
name = "ancient armour"
|
||||
desc = "Defend the treasure..."
|
||||
icon_state = "knight_ancient"
|
||||
item_state = "knight_ancient"
|
||||
|
||||
/obj/item/storage/box/holy/witchhunter
|
||||
name = "Witchhunter Kit"
|
||||
|
||||
/obj/item/storage/box/holy/witchhunter/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/witchhunter(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/witchunter_hat(src)
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/witchhunter
|
||||
name = "witchunter garb"
|
||||
desc = "This worn outfit saw much use back in the day."
|
||||
icon_state = "witchhunter"
|
||||
item_state = "witchhunter"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/witchunter_hat
|
||||
name = "witchunter hat"
|
||||
desc = "This hat saw much use back in the day."
|
||||
icon_state = "witchhunterhat"
|
||||
item_state = "witchhunterhat"
|
||||
flags_cover = HEADCOVERSEYES
|
||||
|
||||
/obj/item/storage/box/holy/follower
|
||||
name = "Followers of the Chaplain Kit"
|
||||
|
||||
/obj/item/storage/box/holy/follower/PopulateContents()
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie/leader(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie
|
||||
name = "follower hoodie"
|
||||
desc = "Hoodie made for acolytes of the chaplain."
|
||||
icon_state = "chaplain_hoodie"
|
||||
item_state = "chaplain_hoodie"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
|
||||
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood
|
||||
|
||||
/obj/item/clothing/head/hooded/chaplain_hood
|
||||
name = "follower hood"
|
||||
desc = "Hood made for acolytes of the chaplain."
|
||||
icon_state = "chaplain_hood"
|
||||
body_parts_covered = HEAD
|
||||
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie/leader
|
||||
name = "leader hoodie"
|
||||
desc = "Now you're ready for some 50 dollar bling water."
|
||||
icon_state = "chaplain_hoodie_leader"
|
||||
item_state = "chaplain_hoodie_leader"
|
||||
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood/leader
|
||||
|
||||
/obj/item/clothing/head/hooded/chaplain_hood/leader
|
||||
name = "leader hood"
|
||||
desc = "I mean, you don't /have/ to seek bling water. I just think you should."
|
||||
icon_state = "chaplain_hood_leader"
|
||||
|
||||
|
||||
// CHAPLAIN NULLROD AND CUSTOM WEAPONS //
|
||||
|
||||
/obj/item/nullrod
|
||||
name = "null rod"
|
||||
desc = "A rod of pure obsidian; its very presence disrupts and dampens the powers of Nar'Sie and Ratvar's followers."
|
||||
icon_state = "nullrod"
|
||||
item_state = "nullrod"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 18
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/nullrod/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/nullrod/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is killing [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to get closer to god!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/nullrod/attack_self(mob/user)
|
||||
if(user.mind && (user.mind.isholy) && !reskinned)
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
if(GLOB.holy_weapon_type)
|
||||
return
|
||||
var/obj/item/holy_weapon
|
||||
var/list/holy_weapons_list = subtypesof(/obj/item/nullrod) + list(HOLY_WEAPONS)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_weapons_list)
|
||||
var/obj/item/nullrod/rodtype = V
|
||||
if (initial(rodtype.chaplain_spawnable))
|
||||
display_names[initial(rodtype.name)] = rodtype
|
||||
|
||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
|
||||
return
|
||||
|
||||
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
|
||||
holy_weapon = new A
|
||||
|
||||
GLOB.holy_weapon_type = holy_weapon.type
|
||||
|
||||
SSblackbox.record_feedback("tally", "chaplain_weapon", 1, "[choice]")
|
||||
|
||||
if(holy_weapon)
|
||||
holy_weapon.reskinned = TRUE
|
||||
qdel(src)
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
|
||||
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
|
||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||
user.setDir(i)
|
||||
if(i == WEST)
|
||||
user.emote("flip")
|
||||
sleep(1)
|
||||
|
||||
/obj/item/nullrod/godhand
|
||||
icon_state = "disintegrate"
|
||||
item_state = "disintegrate"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
name = "god hand"
|
||||
desc = "This hand of yours glows with an awesome power!"
|
||||
item_flags = ABSTRACT | DROPDEL
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
damtype = BURN
|
||||
attack_verb = list("punched", "cross countered", "pummeled")
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
|
||||
/obj/item/nullrod/godhand/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/nullrod/staff
|
||||
icon_state = "godstaff-red"
|
||||
item_state = "godstaff-red"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
name = "red holy staff"
|
||||
desc = "It has a mysterious, protective aura."
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 5
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
block_chance = 50
|
||||
var/shield_icon = "shield-red"
|
||||
|
||||
/obj/item/nullrod/staff/worn_overlays(isinhands)
|
||||
. = list()
|
||||
if(isinhands)
|
||||
. += mutable_appearance('icons/effects/effects.dmi', shield_icon, MOB_LAYER + 0.01)
|
||||
|
||||
/obj/item/nullrod/staff/blue
|
||||
name = "blue holy staff"
|
||||
icon_state = "godstaff-blue"
|
||||
item_state = "godstaff-blue"
|
||||
shield_icon = "shield-old"
|
||||
|
||||
/obj/item/nullrod/claymore
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "holy claymore"
|
||||
desc = "A weapon fit for a crusade!"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_BELT
|
||||
block_chance = 30
|
||||
sharpness = IS_SHARP
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
|
||||
/obj/item/nullrod/claymore/darkblade
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
name = "dark blade"
|
||||
desc = "Spread the glory of the dark gods!"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
hitsound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
/obj/item/nullrod/claymore/chainsaw_sword
|
||||
icon_state = "chainswordon"
|
||||
item_state = "chainswordon"
|
||||
name = "sacred chainsaw sword"
|
||||
desc = "Suffer not a heretic to live."
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 1.5 //slower than a real saw
|
||||
|
||||
/obj/item/nullrod/claymore/glowing
|
||||
icon_state = "swordon"
|
||||
item_state = "swordon"
|
||||
name = "force weapon"
|
||||
desc = "The blade glows with the power of faith. Or possibly a battery."
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/nullrod/claymore/katana
|
||||
name = "\improper Hanzo steel"
|
||||
desc = "Capable of cutting clean through a holy claymore."
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
|
||||
|
||||
/obj/item/nullrod/claymore/multiverse
|
||||
name = "extradimensional blade"
|
||||
desc = "Once the harbinger of an interdimensional war, its sharpness fluctuates wildly."
|
||||
icon_state = "multiverse"
|
||||
item_state = "multiverse"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/nullrod/claymore/multiverse/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
force = rand(1, 30)
|
||||
..()
|
||||
|
||||
/obj/item/nullrod/claymore/saber
|
||||
name = "light energy sword"
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
icon_state = "swordblue"
|
||||
item_state = "swordblue"
|
||||
desc = "If you strike me down, I shall become more robust than you can possibly imagine."
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/nullrod/claymore/saber/red
|
||||
name = "dark energy sword"
|
||||
icon_state = "swordred"
|
||||
item_state = "swordred"
|
||||
desc = "Woefully ineffective when used on steep terrain."
|
||||
|
||||
/obj/item/nullrod/claymore/saber/pirate
|
||||
name = "nautical energy sword"
|
||||
icon_state = "cutlass1"
|
||||
item_state = "cutlass1"
|
||||
desc = "Convincing HR that your religion involved piracy was no mean feat."
|
||||
|
||||
/obj/item/nullrod/sord
|
||||
name = "\improper UNREAL SORD"
|
||||
desc = "This thing is so unspeakably HOLY you are having a hard time even holding it."
|
||||
icon_state = "sord"
|
||||
item_state = "sord"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 4.13
|
||||
throwforce = 1
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/nullrod/scythe
|
||||
icon_state = "scythe1"
|
||||
item_state = "scythe1"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "reaper scythe"
|
||||
desc = "Ask not for whom the bell tolls..."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armour_penetration = 35
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/nullrod/scythe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 70, 110) //the harvest gives a high bonus chance
|
||||
|
||||
/obj/item/nullrod/scythe/vibro
|
||||
icon_state = "hfrequency0"
|
||||
item_state = "hfrequency1"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "high frequency blade"
|
||||
desc = "Bad references are the DNA of the soul."
|
||||
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
|
||||
|
||||
/obj/item/nullrod/scythe/spellblade
|
||||
icon_state = "spellblade"
|
||||
item_state = "spellblade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
name = "dormant spellblade"
|
||||
desc = "The blade grants the wielder nearly limitless power...if they can figure out how to turn it on, that is."
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
|
||||
/obj/item/nullrod/scythe/talking
|
||||
icon_state = "talking_sword"
|
||||
item_state = "talking_sword"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "possessed blade"
|
||||
desc = "When the station falls into chaos, it's nice to have a friend by your side."
|
||||
attack_verb = list("chopped", "sliced", "cut")
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
var/possessed = FALSE
|
||||
|
||||
/obj/item/nullrod/scythe/talking/relaymove(mob/user)
|
||||
return //stops buckled message spam for the ghost.
|
||||
|
||||
/obj/item/nullrod/scythe/talking/attack_self(mob/living/user)
|
||||
if(possessed)
|
||||
return
|
||||
|
||||
to_chat(user, "You attempt to wake the spirit of the blade...")
|
||||
|
||||
possessed = TRUE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
|
||||
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
var/mob/living/simple_animal/shade/S = new(src)
|
||||
S.real_name = name
|
||||
S.name = name
|
||||
S.ckey = C.ckey
|
||||
S.status_flags |= GODMODE
|
||||
S.language_holder = user.language_holder.copy(S)
|
||||
var/input = stripped_input(S,"What are you named?", ,"", MAX_NAME_LEN)
|
||||
|
||||
if(src && input)
|
||||
name = input
|
||||
S.real_name = input
|
||||
S.name = input
|
||||
else
|
||||
to_chat(user, "The blade is dormant. Maybe you can try again later.")
|
||||
possessed = FALSE
|
||||
|
||||
/obj/item/nullrod/scythe/talking/Destroy()
|
||||
for(var/mob/living/simple_animal/shade/S in contents)
|
||||
to_chat(S, "You were destroyed!")
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
/obj/item/nullrod/scythe/talking/chainsword
|
||||
icon_state = "chainswordon"
|
||||
item_state = "chainswordon"
|
||||
name = "possessed chainsaw sword"
|
||||
desc = "Suffer not a heretic to live."
|
||||
chaplain_spawnable = FALSE
|
||||
force = 30
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/nullrod/hammmer
|
||||
icon_state = "hammeron"
|
||||
item_state = "hammeron"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
||||
name = "relic war hammer"
|
||||
desc = "This war hammer cost the chaplain forty thousand space dollars."
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
attack_verb = list("smashed", "bashed", "hammered", "crunched")
|
||||
|
||||
/obj/item/nullrod/chainsaw
|
||||
name = "chainsaw hand"
|
||||
desc = "Good? Bad? You're the guy with the chainsaw hand."
|
||||
icon_state = "chainsaw_on"
|
||||
item_state = "mounted_chainsaw"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
item_flags = ABSTRACT
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 2
|
||||
|
||||
/obj/item/nullrod/chainsaw/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
AddComponent(/datum/component/butchering, 30, 100, 0, hitsound)
|
||||
|
||||
/obj/item/nullrod/clown
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "clownrender"
|
||||
item_state = "render"
|
||||
name = "clown dagger"
|
||||
desc = "Used for absolutely hilarious sacrifices."
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/nullrod/pride_hammer
|
||||
icon_state = "pride"
|
||||
item_state = "pride"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
||||
name = "Pride-struck Hammer"
|
||||
desc = "It resonates an aura of Pride."
|
||||
force = 16
|
||||
throwforce = 15
|
||||
w_class = 4
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked")
|
||||
hitsound = 'sound/weapons/resonator_blast.ogg'
|
||||
|
||||
/obj/item/nullrod/pride_hammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(prob(30) && ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
user.reagents.trans_to(H, user.reagents.total_volume, 1, 1, 0)
|
||||
to_chat(user, "<span class='notice'>Your pride reflects on [H].</span>")
|
||||
to_chat(H, "<span class='userdanger'>You feel insecure, taking on [user]'s burden.</span>")
|
||||
|
||||
/obj/item/nullrod/whip
|
||||
name = "holy whip"
|
||||
desc = "What a terrible night to be on Space Station 13."
|
||||
icon_state = "chain"
|
||||
item_state = "chain"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 12
|
||||
reach = 2
|
||||
attack_verb = list("whipped", "lashed")
|
||||
hitsound = 'sound/weapons/chainhit.ogg'
|
||||
|
||||
/obj/item/nullrod/fedora
|
||||
name = "atheist's fedora"
|
||||
desc = "The brim of the hat is as sharp as your wit. The edge would hurt almost as much as disproving the existence of God."
|
||||
icon_state = "fedora"
|
||||
item_state = "fedora"
|
||||
slot_flags = ITEM_SLOT_HEAD
|
||||
icon = 'icons/obj/clothing/hats.dmi'
|
||||
force = 0
|
||||
throw_speed = 4
|
||||
throw_range = 7
|
||||
throwforce = 30
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("enlightened", "redpilled")
|
||||
|
||||
/obj/item/nullrod/armblade
|
||||
name = "dark blessing"
|
||||
desc = "Particularly twisted deities grant gifts of dubious value."
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
|
||||
item_flags = ABSTRACT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
sharpness = IS_SHARP
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
|
||||
/obj/item/nullrod/armblade/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
AddComponent(/datum/component/butchering, 80, 70)
|
||||
|
||||
/obj/item/nullrod/armblade/tentacle
|
||||
name = "unholy blessing"
|
||||
icon_state = "tentacle"
|
||||
item_state = "tentacle"
|
||||
|
||||
/obj/item/nullrod/carp
|
||||
name = "carp-sie plushie"
|
||||
desc = "An adorable stuffed toy that resembles the god of all carp. The teeth look pretty sharp. Activate it to receive the blessing of Carp-Sie."
|
||||
icon = 'icons/obj/plushes.dmi'
|
||||
icon_state = "carpplush"
|
||||
item_state = "carp_plushie"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
force = 15
|
||||
attack_verb = list("bitten", "eaten", "fin slapped")
|
||||
hitsound = 'sound/weapons/bite.ogg'
|
||||
var/used_blessing = FALSE
|
||||
|
||||
/obj/item/nullrod/carp/attack_self(mob/living/user)
|
||||
if(used_blessing)
|
||||
else if(user.mind && (user.mind.isholy))
|
||||
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
|
||||
user.faction |= "carp"
|
||||
used_blessing = TRUE
|
||||
|
||||
/obj/item/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking
|
||||
name = "monk's staff"
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, it is now used to harass the clown."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 15
|
||||
block_chance = 40
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
sharpness = IS_BLUNT
|
||||
hitsound = "swing_hit"
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "bostaff0"
|
||||
item_state = "bostaff0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
|
||||
/obj/item/nullrod/claymore/bostaff/attack(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(iscyborg(target))
|
||||
return ..()
|
||||
if(!isliving(target))
|
||||
return ..()
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat || C.health < 0 || C.staminaloss > 130 )
|
||||
to_chat(user, "<span class='warning'>It would be dishonorable to attack a foe while they cannot retaliate.</span>")
|
||||
return
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/list/fluffmessages = list("[user] clubs [H] with [src]!", \
|
||||
"[user] smacks [H] with the butt of [src]!", \
|
||||
"[user] broadsides [H] with [src]!", \
|
||||
"[user] smashes [H]'s head with [src]!", \
|
||||
"[user] beats [H] with front of [src]!", \
|
||||
"[user] twirls and slams [H] with [src]!")
|
||||
H.visible_message("<span class='warning'>[pick(fluffmessages)]</span>", \
|
||||
"<span class='userdanger'>[pick(fluffmessages)]</span>")
|
||||
playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
H.adjustStaminaLoss(rand(12,18))
|
||||
if(prob(25))
|
||||
(INVOKE_ASYNC(src, .proc/jedi_spin, user))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/nullrod/tribal_knife
|
||||
icon_state = "crysknife"
|
||||
item_state = "crysknife"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "arrhythmic knife"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
|
||||
sharpness = IS_SHARP
|
||||
slot_flags = null
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/butchering, 50, 100)
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/nullrod/tribal_knife/process()
|
||||
slowdown = rand(-2, 2)
|
||||
|
||||
|
||||
/obj/item/nullrod/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "unholy pitchfork"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
desc = "Holding this makes you look absolutely devilish."
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/nullrod/egyptian
|
||||
name = "egyptian staff"
|
||||
desc = "A tutorial in mummification is carved into the staff. You could probably craft the wraps if you had some cloth."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "pharaoh_sceptre"
|
||||
item_state = "pharaoh_sceptre"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashes", "smacks", "whacks")
|
||||
|
||||
/obj/item/nullrod/rosary
|
||||
icon_state = "rosary"
|
||||
item_state = null
|
||||
name = "prayer beads"
|
||||
desc = "A set of prayer beads used by many of the more traditional religions in space"
|
||||
force = 4
|
||||
throwforce = 0
|
||||
attack_verb = list("whipped", "repented", "lashed", "flagellated")
|
||||
var/praying = FALSE
|
||||
var/deity_name = "Coderbus" //This is the default, hopefully won't actually appear if the religion subsystem is running properly
|
||||
|
||||
/obj/item/nullrod/rosary/Initialize()
|
||||
.=..()
|
||||
if(GLOB.deity)
|
||||
deity_name = GLOB.deity
|
||||
|
||||
/obj/item/nullrod/rosary/attack(mob/living/M, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
if(!user.mind || user.mind.assigned_role != "Chaplain")
|
||||
to_chat(user, "<span class='notice'>You are not close enough with [deity_name] to use [src].</span>")
|
||||
return
|
||||
|
||||
if(praying)
|
||||
to_chat(user, "<span class='notice'>You are already using [src].</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='info'>[user] kneels[M == user ? null : " next to [M]"] and begins to utter a prayer to [deity_name].</span>", \
|
||||
"<span class='info'>You kneel[M == user ? null : " next to [M]"] and begin a prayer to [deity_name].</span>")
|
||||
|
||||
praying = TRUE
|
||||
if(do_after(user, 20, target = M))
|
||||
M.reagents?.add_reagent("holywater", 5)
|
||||
to_chat(M, "<span class='notice'>[user]'s prayer to [deity_name] has eased your pain!</span>")
|
||||
M.adjustToxLoss(-5, TRUE, TRUE)
|
||||
M.adjustOxyLoss(-5)
|
||||
M.adjustBruteLoss(-5)
|
||||
M.adjustFireLoss(-5)
|
||||
praying = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Your prayer to [deity_name] was interrupted.</span>")
|
||||
praying = FALSE
|
||||
@@ -0,0 +1,114 @@
|
||||
/obj/item/implant
|
||||
name = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate)
|
||||
var/activated = TRUE //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
|
||||
var/mob/living/imp_in = null
|
||||
item_color = "b"
|
||||
var/allow_multiple = FALSE
|
||||
var/uses = -1
|
||||
item_flags = DROPDEL
|
||||
|
||||
|
||||
/obj/item/implant/proc/trigger(emote, mob/living/carbon/source)
|
||||
return
|
||||
|
||||
/obj/item/implant/proc/on_death(emote, mob/living/carbon/source)
|
||||
return
|
||||
|
||||
/obj/item/implant/proc/activate()
|
||||
SEND_SIGNAL(src, COMSIG_IMPLANT_ACTIVATED)
|
||||
|
||||
/obj/item/implant/ui_action_click()
|
||||
activate("action_button")
|
||||
|
||||
/obj/item/implant/proc/can_be_implanted_in(mob/living/target) // for human-only and other special requirements
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/can_be_implanted()
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/can_be_implanted()
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/can_be_implanted()
|
||||
return healable //Applies to robots and most non-organics, exceptions can override.
|
||||
|
||||
|
||||
|
||||
//What does the implant do upon injection?
|
||||
//return 1 if the implant injects
|
||||
//return 0 if there is no room for implant / it fails
|
||||
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
if(SEND_SIGNAL(src, COMSIG_IMPLANT_IMPLANTING, args) & COMPONENT_STOP_IMPLANTING)
|
||||
return
|
||||
LAZYINITLIST(target.implants)
|
||||
if(!target.can_be_implanted() || !can_be_implanted_in(target))
|
||||
return FALSE
|
||||
for(var/X in target.implants)
|
||||
var/obj/item/implant/imp_e = X
|
||||
var/flags = SEND_SIGNAL(imp_e, COMSIG_IMPLANT_OTHER, args, src)
|
||||
if(flags & COMPONENT_DELETE_NEW_IMPLANT)
|
||||
UNSETEMPTY(target.implants)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
if(flags & COMPONENT_DELETE_OLD_IMPLANT)
|
||||
qdel(imp_e)
|
||||
continue
|
||||
if(flags & COMPONENT_STOP_IMPLANTING)
|
||||
UNSETEMPTY(target.implants)
|
||||
return FALSE
|
||||
|
||||
if(istype(imp_e, type))
|
||||
if(!allow_multiple)
|
||||
if(imp_e.uses < initial(imp_e.uses)*2)
|
||||
if(uses == -1)
|
||||
imp_e.uses = -1
|
||||
else
|
||||
imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
moveToNullspace()
|
||||
imp_in = target
|
||||
target.implants += src
|
||||
if(activated)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
if(user)
|
||||
log_combat(user, target, "implanted", "\a [name]")
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
|
||||
SEND_SIGNAL(src, COMSIG_IMPLANT_REMOVING, args)
|
||||
imp_in = null
|
||||
source.implants -= src
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(source)
|
||||
if(ishuman(source))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/implant/Destroy()
|
||||
if(imp_in)
|
||||
removed(imp_in)
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/proc/get_data()
|
||||
return "No information available"
|
||||
|
||||
/obj/item/implant/dropped(mob/user)
|
||||
. = 1
|
||||
..()
|
||||
@@ -0,0 +1,47 @@
|
||||
/obj/item/implant/storage
|
||||
name = "storage implant"
|
||||
desc = "Stores up to two big items in a bluespace pocket."
|
||||
icon_state = "storage"
|
||||
item_color = "r"
|
||||
var/max_slot_stacking = 4
|
||||
var/obj/item/storage/bluespace_pocket/pocket
|
||||
|
||||
/obj/item/implant/storage/activate()
|
||||
. = ..()
|
||||
SEND_SIGNAL(pocket, COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE)
|
||||
|
||||
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
|
||||
if(!special)
|
||||
QDEL_NULL(pocket)
|
||||
else
|
||||
pocket?.moveToNullspace()
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/storage/imp_e = X
|
||||
var/datum/component/storage/STR = imp_e.pocket.GetComponent(/datum/component/storage)
|
||||
if(!STR || (STR && STR.max_items < max_slot_stacking))
|
||||
imp_e.pocket.AddComponent(/datum/component/storage/concrete/implant)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(.)
|
||||
if(!QDELETED(pocket))
|
||||
pocket.forceMove(target)
|
||||
else
|
||||
pocket = new(target)
|
||||
|
||||
/obj/item/storage/bluespace_pocket
|
||||
name = "internal bluespace pocket"
|
||||
icon_state = "pillbox"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
desc = "A tiny yet spacious pocket, usually found implanted inside sneaky syndicate agents and nowhere else."
|
||||
component_type = /datum/component/storage/concrete/implant
|
||||
resistance_flags = INDESTRUCTIBLE //A bomb!
|
||||
|
||||
/obj/item/implanter/storage
|
||||
name = "implanter (storage)"
|
||||
imp_type = /obj/item/implant/storage
|
||||
@@ -0,0 +1,76 @@
|
||||
/obj/item/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
activated = FALSE
|
||||
var/lifespan_postmortem = 10 MINUTES //for how many deciseconds after user death will the implant work?
|
||||
var/allow_teleport = TRUE //will people implanted with this act as teleporter beacons?
|
||||
|
||||
/obj/item/implant/tracking/c38
|
||||
name = "TRAC implant"
|
||||
desc = "A smaller tracking implant that supplies power for only a few minutes."
|
||||
var/lifespan = 5 MINUTES //how many deciseconds does the implant last?
|
||||
allow_teleport = FALSE
|
||||
|
||||
/obj/item/implant/tracking/c38/Initialize()
|
||||
. = ..()
|
||||
QDEL_IN(src, lifespan)
|
||||
|
||||
/obj/item/implant/tracking/Initialize()
|
||||
. = ..()
|
||||
GLOB.tracked_implants += src
|
||||
|
||||
/obj/item/implant/tracking/Destroy()
|
||||
. = ..()
|
||||
GLOB.tracked_implants -= src
|
||||
|
||||
/obj/item/implanter/tracking
|
||||
imp_type = /obj/item/implant/tracking
|
||||
|
||||
/obj/item/implanter/tracking/gps
|
||||
imp_type = /obj/item/implant/gps
|
||||
|
||||
/obj/item/implant/gps
|
||||
name = "\improper GPS implant"
|
||||
desc = "Track with this and a GPS."
|
||||
activated = FALSE
|
||||
var/obj/item/gps/internal/mining/real_gps
|
||||
|
||||
/obj/item/implant/gps/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(real_gps)
|
||||
real_gps.forceMove(target)
|
||||
else
|
||||
real_gps = new(target)
|
||||
|
||||
/obj/item/implant/gps/removed(mob/living/source, silent = FALSE, special = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!special)
|
||||
qdel(real_gps)
|
||||
else
|
||||
real_gps?.moveToNullspace()
|
||||
|
||||
/obj/item/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Tracking Beacon<BR>
|
||||
<b>Life:</b> 10 minutes after death of host<BR>
|
||||
<b>Important Notes:</b> Implant also works as a teleporter beacon.<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Continuously transmits low power signal. Useful for tracking.<BR>
|
||||
<b>Special Features:</b><BR>
|
||||
<i>Neuro-Safe</i>- Specialized shell absorbs excess voltages self-destructing the chip if
|
||||
a malfunction occurs thereby securing safety of subject. The implant will melt and
|
||||
disintegrate into bio-safe elements.<BR>
|
||||
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
|
||||
circuitry. As a result neurotoxins can cause massive damage."}
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/implantcase/track
|
||||
name = "implant case - 'Tracking'"
|
||||
desc = "A glass case containing a tracking implant."
|
||||
imp_type = /obj/item/implant/tracking
|
||||
@@ -0,0 +1,56 @@
|
||||
/obj/item/latexballon
|
||||
name = "latex glove"
|
||||
desc = "Sterile and airtight."
|
||||
icon_state = "latexballon"
|
||||
item_state = "lgloves"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
var/state
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
|
||||
/obj/item/latexballon/proc/blow(obj/item/tank/tank, mob/user)
|
||||
if (icon_state == "latexballon_bursted")
|
||||
return
|
||||
icon_state = "latexballon_blow"
|
||||
item_state = "latexballon"
|
||||
user.update_inv_hands()
|
||||
to_chat(user, "<span class='notice'>You blow up [src] with [tank].</span>")
|
||||
air_contents = tank.remove_air_volume(3)
|
||||
|
||||
/obj/item/latexballon/proc/burst()
|
||||
if (!air_contents || icon_state != "latexballon_blow")
|
||||
return
|
||||
playsound(src, 'sound/weapons/gunshot.ogg', 100, 1)
|
||||
icon_state = "latexballon_bursted"
|
||||
item_state = "lgloves"
|
||||
if(isliving(loc))
|
||||
var/mob/living/user = src.loc
|
||||
user.update_inv_hands()
|
||||
loc.assume_air(air_contents)
|
||||
|
||||
/obj/item/latexballon/ex_act(severity, target)
|
||||
burst()
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/latexballon/bullet_act()
|
||||
burst()
|
||||
|
||||
/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if(temperature > T0C+100)
|
||||
burst()
|
||||
|
||||
/obj/item/latexballon/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/tank))
|
||||
var/obj/item/tank/T = W
|
||||
blow(T, user)
|
||||
return
|
||||
if (W.get_sharpness() || W.get_temperature() || is_pointed(W))
|
||||
burst()
|
||||
@@ -0,0 +1,506 @@
|
||||
/*********************MANUALS (BOOKS)***********************/
|
||||
|
||||
//Oh god what the fuck I am not good at computer
|
||||
/obj/item/book/manual
|
||||
icon = 'icons/obj/library.dmi'
|
||||
due_date = 0 // Game time in 1/10th seconds
|
||||
unique = TRUE // FALSE - Normal book, TRUE - Should not be treated as normal book, unable to be copied, unable to be modified
|
||||
|
||||
/obj/item/book/manual/hydroponics_pod_people
|
||||
name = "The Human Harvest - From seed to market"
|
||||
icon_state ="bookHydroponicsPodPeople"
|
||||
author = "Farmer John" // Whoever wrote the paper or book, can be changed by pen or PC. It is not automatically assigned.
|
||||
title = "The Human Harvest - From seed to market"
|
||||
//book contents below
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Growing Humans</h3>
|
||||
|
||||
Why would you want to grow humans? Well I'm expecting most readers to be in the slave trade, but a few might actually
|
||||
want to revive fallen comrades. Growing pod people is easy, but prone to disaster.
|
||||
<p>
|
||||
<ol>
|
||||
<li>Find a dead person who is in need of cloning. </li>
|
||||
<li>Take a blood sample with a syringe. </li>
|
||||
<li>Inject a seed pack with the blood sample. </li>
|
||||
<li>Plant the seeds. </li>
|
||||
<li>Tend to the plants water and nutrition levels until it is time to harvest the cloned human.</li>
|
||||
</ol>
|
||||
<p>
|
||||
It really is that easy! Good luck!
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/ripley_build_and_repair
|
||||
name = "APLU \"Ripley\" Construction and Operation Manual"
|
||||
icon_state ="book"
|
||||
author = "Weyland-Yutani Corp"
|
||||
title = "APLU \"Ripley\" Construction and Operation Manual"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<b style='font-size: 12px;'>Weyland-Yutani - Building Better Worlds</b>
|
||||
<h1>Autonomous Power Loader Unit \"Ripley\"</h1>
|
||||
</center>
|
||||
<h2>Specifications:</h2>
|
||||
<ul>
|
||||
<li><b>Class:</b> Autonomous Power Loader</li>
|
||||
<li><b>Scope:</b> Logistics and Construction</li>
|
||||
<li><b>Weight:</b> 820kg (without operator and with empty cargo compartment)</li>
|
||||
<li><b>Height:</b> 2.5m</li>
|
||||
<li><b>Width:</b> 1.8m</li>
|
||||
<li><b>Top speed:</b> 5km/hour</li>
|
||||
<li><b>Operation in vacuum/hostile environment:</b> Possible</b>
|
||||
<li><b>Airtank Volume:</b> 500liters</li>
|
||||
<li><b>Devices:</b>
|
||||
<ul>
|
||||
<li>Hydraulic Clamp</li>
|
||||
<li>High-speed Drill</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Propulsion Device:</b> Powercell-powered electro-hydraulic system.</li>
|
||||
<li><b>Powercell capacity:</b> Varies.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Construction:</h2>
|
||||
<ol>
|
||||
<li>Connect all exosuit parts to the chassis frame</li>
|
||||
<li>Connect all hydraulic fittings and tighten them up with a wrench</li>
|
||||
<li>Adjust the servohydraulics with a screwdriver</li>
|
||||
<li>Wire the chassis. (Cable is not included.)</li>
|
||||
<li>Use the wirecutters to remove the excess cable if needed.</li>
|
||||
<li>Install the central control module (Not included. Use supplied datadisk to create one).</li>
|
||||
<li>Secure the mainboard with a screwdriver.</li>
|
||||
<li>Install the peripherals control module (Not included. Use supplied datadisk to create one).</li>
|
||||
<li>Secure the peripherals control module with a screwdriver</li>
|
||||
<li>Install the internal armor plating (Not included due to Nanotrasen regulations. Can be made using 5 metal sheets.)</li>
|
||||
<li>Secure the internal armor plating with a wrench</li>
|
||||
<li>Weld the internal armor plating to the chassis</li>
|
||||
<li>Install the external reinforced armor plating (Not included due to Nanotrasen regulations. Can be made using 5 reinforced metal sheets.)</li>
|
||||
<li>Secure the external reinforced armor plating with a wrench</li>
|
||||
<li>Weld the external reinforced armor plating to the chassis</li>
|
||||
<li></li>
|
||||
<li>Additional Information:</li>
|
||||
<li>The firefighting variation is made in a similar fashion.</li>
|
||||
<li>A firesuit must be connected to the Firefighter chassis for heat shielding.</li>
|
||||
<li>Internal armor is plasteel for additional strength.</li>
|
||||
<li>External armor must be installed in 2 parts, totaling 10 sheets.</li>
|
||||
<li>Completed mech is more resiliant against fire, and is a bit more durable overall</li>
|
||||
<li>Nanotrasen is determined to the safety of its <s>investments</s> employees.</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<h2>Operation</h2>
|
||||
Please consult the Nanotrasen compendium "Robotics for Dummies".
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/chef_recipes
|
||||
name = "Chef Recipes"
|
||||
icon_state = "cooked_book"
|
||||
author = "Lord Frenrir Cageth"
|
||||
title = "Chef Recipes"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Food for Dummies</h1>
|
||||
Here is a guide on basic food recipes and also how to not poison your customers accidentally.
|
||||
|
||||
|
||||
<h2>Basic ingredients preparation:</h2>
|
||||
|
||||
<b>Dough:</b> 10u water + 15u flour for simple dough.<br>
|
||||
15u egg yolk + 15u flour + 5u sugar for cake batter.<br>
|
||||
Doughs can be transformed by using a knife and rolling pin.<br>
|
||||
All doughs can be microwaved.<br>
|
||||
<b>Bowl:</b> Add water to it for soup preparation.<br>
|
||||
<b>Meat:</b> Microwave it, process it, slice it into microwavable cutlets with your knife, or use it raw.<br>
|
||||
<b>Cheese:</b> Add 5u universal enzyme (catalyst) to milk and soy milk to prepare cheese (sliceable) and tofu.<br>
|
||||
<b>Rice:</b> Mix 10u rice with 10u water in a bowl then microwave it.
|
||||
|
||||
<h2>Custom food:</h2>
|
||||
Add ingredients to a base item to prepare a custom meal.<br>
|
||||
The bases are:<br>
|
||||
- bun (burger)<br>
|
||||
- breadslices(sandwich)<br>
|
||||
- plain bread<br>
|
||||
- plain pie<br>
|
||||
- vanilla cake<br>
|
||||
- empty bowl (salad)<br>
|
||||
- bowl with 10u water (soup)<br>
|
||||
- boiled spaghetti<br>
|
||||
- pizza bread<br>
|
||||
- metal rod (kebab)
|
||||
|
||||
<h2>Table Craft:</h2>
|
||||
Put ingredients on table, then click and drag the table onto yourself to see what recipes you can prepare.
|
||||
|
||||
<h2>Microwave:</h2>
|
||||
Use it to cook or boil food ingredients (meats, doughs, egg, spaghetti, donkpocket, etc...).
|
||||
It can cook multiple items at once.
|
||||
|
||||
<h2>Processor:</h2>
|
||||
Use it to process certain ingredients (meat into faggot, doughslice into spaghetti, potato into fries,etc...)
|
||||
|
||||
<h2>Gibber:</h2>
|
||||
Stuff an animal in it to grind it into meat.
|
||||
|
||||
<h2>Meat spike:</h2>
|
||||
Stick an animal on it then begin collecting its meat.
|
||||
|
||||
|
||||
<h2>Example recipes:</h2>
|
||||
<b>Vanilla Cake</b>: Microwave cake batter.<br>
|
||||
<b>Burger:</b> 1 bun + 1 meat steak<br>
|
||||
<b>Bread:</b> Microwave dough.<br>
|
||||
<b>Waffles:</b> 2 pastry base<br>
|
||||
<b>Popcorn:</b> Microwave corn.<br>
|
||||
<b>Meat Steak:</b> Microwave meat.<br>
|
||||
<b>Meat Pie:</b> 1 plain pie + 1u black pepper + 1u salt + 2 meat cutlets<br>
|
||||
<b>Boiled Spagetti:</b> Microwave spaghetti.<br>
|
||||
<b>Donuts:</b> 1u sugar + 1 pastry base<br>
|
||||
<b>Fries:</b> Process potato.
|
||||
|
||||
<h2>Sharing your food:</h2>
|
||||
You can put your meals on your kitchen counter or load them in the snack vending machines.
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/nuclear
|
||||
name = "Fission Mailed: Nuclear Sabotage 101"
|
||||
icon_state ="bookNuclear"
|
||||
author = "Syndicate"
|
||||
title = "Fission Mailed: Nuclear Sabotage 101"
|
||||
dat = {"<html>
|
||||
Nuclear Explosives 101:<br>
|
||||
Hello and thank you for choosing the Syndicate for your nuclear information needs.<br>
|
||||
Today's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.<br>
|
||||
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.<br>
|
||||
Pressing any button on the compacted bomb will cause it to extend and bolt itself into place.<br>
|
||||
If this is done to unbolt it one must completely log in which at this time may not be possible.<br>
|
||||
To make the nuclear device functional:<br>
|
||||
<li>Place the nuclear device in the designated detonation zone.</li>
|
||||
<li>Extend and anchor the nuclear device from its interface.</li>
|
||||
<li>Insert the nuclear authorisation disk into slot.</li>
|
||||
<li>Type numeric authorisation code into the keypad. This should have been provided. Note: If you make a mistake press R to reset the device.
|
||||
<li>Press the E button to log onto the device.</li>
|
||||
You now have activated the device. To deactivate the buttons at anytime for example when you've already prepped the bomb for detonation remove the auth disk OR press the R on the keypad.<br>
|
||||
Now the bomb CAN ONLY be detonated using the timer. Manual detonation is not an option.<br>
|
||||
Note: Nanotrasen is a pain in the neck.<br>
|
||||
Toggle off the SAFETY.<br>
|
||||
Note: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step.<br>
|
||||
So use the - - and + + to set a det time between 5 seconds and 10 minutes.<br>
|
||||
Then press the timer toggle button to start the countdown.<br>
|
||||
Now remove the auth. disk so that the buttons deactivate.<br>
|
||||
Note: THE BOMB IS STILL SET AND WILL DETONATE<br>
|
||||
Now before you remove the disk if you need to move the bomb you can:<br>
|
||||
Toggle off the anchor, move it, and re-anchor.<br><br>
|
||||
Good luck. Remember the order:<br>
|
||||
<b>Disk, Code, Safety, Timer, Disk, RUN!</b><br>
|
||||
Intelligence Analysts believe that normal Nanotrasen procedure is for the Captain to secure the nuclear authorisation disk.<br>
|
||||
Good luck!
|
||||
</html>"}
|
||||
|
||||
// Wiki books that are linked to the configured wiki link.
|
||||
|
||||
// A book that links to the wiki
|
||||
/obj/item/book/manual/wiki
|
||||
var/page_link = ""
|
||||
window_size = "970x710"
|
||||
|
||||
/obj/item/book/manual/wiki/attack_self()
|
||||
if(!dat)
|
||||
initialize_wikibook()
|
||||
..()
|
||||
|
||||
/obj/item/book/manual/wiki/proc/initialize_wikibook()
|
||||
var/wikiurl = CONFIG_GET(string/wikiurltg)
|
||||
if(wikiurl)
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
<style>
|
||||
iframe {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function pageloaded(myframe) {
|
||||
document.getElementById("loading").style.display = "none";
|
||||
myframe.style.display = "inline";
|
||||
}
|
||||
</script>
|
||||
<p id='loading'>You start skimming through the manual...</p>
|
||||
<iframe width='100%' height='97%' onload="pageloaded(this)" src="[wikiurl]/[page_link]?printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/wiki/cit
|
||||
name = "Citadel infobook"
|
||||
icon_state ="book8"
|
||||
author = "Nanotrasen"
|
||||
title = "Citadel infobook"
|
||||
page_link = ""
|
||||
window_size = "1500x800" //Too squashed otherwise
|
||||
|
||||
/obj/item/book/manual/wiki/cit/initialize_wikibook()
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
if(wikiurl)
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
<style>
|
||||
iframe {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function pageloaded(myframe) {
|
||||
document.getElementById("loading").style.display = "none";
|
||||
myframe.style.display = "block";
|
||||
}
|
||||
</script>
|
||||
<p id='loading'>You start skimming through the manual...</p>
|
||||
<iframe width='100%' height='97%' onload="pageloaded(this)" src="[wikiurl]/[page_link]" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/wiki/cit/chemistry
|
||||
name = "Chemistry Textbook"
|
||||
icon_state ="chemistrybook"
|
||||
author = "Nanotrasen"
|
||||
title = "Chemistry Textbook"
|
||||
page_link = "main/guides/guide_chemistry"
|
||||
|
||||
/obj/item/book/manual/wiki/cit/chem_recipies
|
||||
name = "Chemistry Recipies"
|
||||
icon_state ="chemrecibook"
|
||||
author = "Chemcat"
|
||||
title = "Chemistry Recipies"
|
||||
page_link = "main/guides/chem_recipies"
|
||||
|
||||
/obj/item/book/manual/wiki/chemistry
|
||||
name = "Outdated Chemistry Textbook"
|
||||
icon_state ="chemistrybook_old"
|
||||
author = "Nanotrasen"
|
||||
title = "Outdated Chemistry Textbook"
|
||||
page_link = "Guide_to_chemistry"
|
||||
|
||||
/obj/item/book/manual/wiki/chemistry/Initialize()
|
||||
..()
|
||||
new /obj/item/book/manual/wiki/cit/chemistry(loc)
|
||||
new /obj/item/book/manual/wiki/cit/chem_recipies(loc)
|
||||
|
||||
/obj/item/book/manual/wiki/engineering_construction
|
||||
name = "Station Repairs and Construction"
|
||||
icon_state ="bookEngineering"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Station Repairs and Construction"
|
||||
page_link = "Guide_to_construction"
|
||||
|
||||
/obj/item/book/manual/wiki/engineering_guide
|
||||
name = "Engineering Textbook"
|
||||
icon_state ="bookEngineering2"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Engineering Textbook"
|
||||
page_link = "Guide_to_engineering"
|
||||
|
||||
/obj/item/book/manual/wiki/engineering_singulo_tesla
|
||||
name = "Singularity and Tesla for Dummies"
|
||||
icon_state ="bookEngineeringSingularitySafety"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Singularity and Tesla for Dummies"
|
||||
page_link = "Singularity_and_Tesla_engines"
|
||||
|
||||
/obj/item/book/manual/wiki/security_space_law
|
||||
name = "Space Law"
|
||||
desc = "A set of Nanotrasen guidelines for keeping law and order on their space stations."
|
||||
icon_state = "bookSpaceLaw"
|
||||
author = "Nanotrasen"
|
||||
title = "Space Law"
|
||||
page_link = "Space_Law"
|
||||
|
||||
/obj/item/book/manual/wiki/security_space_law/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] pretends to read \the [src] intently... then promptly dies of laughter!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/book/manual/wiki/infections
|
||||
name = "Infections - Making your own pandemic!"
|
||||
icon_state = "bookInfections"
|
||||
author = "Infections Encyclopedia"
|
||||
title = "Infections - Making your own pandemic!"
|
||||
page_link = "Infections"
|
||||
|
||||
/obj/item/book/manual/wiki/telescience
|
||||
name = "Teleportation Science - Bluespace for dummies!"
|
||||
icon_state = "book7"
|
||||
author = "University of Bluespace"
|
||||
title = "Teleportation Science - Bluespace for dummies!"
|
||||
page_link = "Guide_to_telescience"
|
||||
|
||||
/obj/item/book/manual/wiki/engineering_hacking
|
||||
name = "Hacking"
|
||||
icon_state ="bookHacking"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Hacking"
|
||||
page_link = "Hacking"
|
||||
|
||||
/obj/item/book/manual/wiki/detective
|
||||
name = "The Film Noir: Proper Procedures for Investigations"
|
||||
icon_state ="bookDetective"
|
||||
author = "Nanotrasen"
|
||||
title = "The Film Noir: Proper Procedures for Investigations"
|
||||
page_link = "Detective"
|
||||
|
||||
/obj/item/book/manual/wiki/barman_recipes
|
||||
name = "Barman Recipes: Mixing Drinks and Changing Lives"
|
||||
icon_state = "barbook"
|
||||
author = "Sir John Rose"
|
||||
title = "Barman Recipes: Mixing Drinks and Changing Lives"
|
||||
page_link = "Guide_to_food_and_drinks"
|
||||
|
||||
/obj/item/book/manual/wiki/robotics_cyborgs
|
||||
name = "Robotics for Dummies"
|
||||
icon_state = "borgbook"
|
||||
author = "XISC"
|
||||
title = "Robotics for Dummies"
|
||||
page_link = "Guide_to_robotics"
|
||||
|
||||
/obj/item/book/manual/wiki/research_and_development
|
||||
name = "Research and Development 101"
|
||||
icon_state = "rdbook"
|
||||
author = "Dr. L. Ight"
|
||||
title = "Research and Development 101"
|
||||
page_link = "Guide_to_Research_and_Development"
|
||||
|
||||
/obj/item/book/manual/wiki/experimentor
|
||||
name = "Mentoring your Experiments"
|
||||
icon_state = "rdbook"
|
||||
author = "Dr. H.P. Kritz"
|
||||
title = "Mentoring your Experiments"
|
||||
page_link = "Experimentor"
|
||||
|
||||
/obj/item/book/manual/wiki/medical_cloning
|
||||
name = "Cloning techniques of the 26th century"
|
||||
icon_state ="bookCloning"
|
||||
author = "Medical Journal, volume 3"
|
||||
title = "Cloning techniques of the 26th century"
|
||||
page_link = "Guide_to_genetics#Cloning"
|
||||
|
||||
/obj/item/book/manual/wiki/cooking_to_serve_man
|
||||
name = "To Serve Man"
|
||||
desc = "It's a cookbook!"
|
||||
icon_state ="cooked_book"
|
||||
author = "the Kanamitan Empire"
|
||||
title = "To Serve Man"
|
||||
page_link = "Guide_to_food_and_drinks"
|
||||
|
||||
/obj/item/book/manual/wiki/circuitry
|
||||
name = "Circuitry for Dummies"
|
||||
icon_state = "book1"
|
||||
author = "Dr. Hans Asperger"
|
||||
title = "Circuitry for Dummies"
|
||||
page_link = "Guide_to_circuits"
|
||||
|
||||
/obj/item/book/manual/wiki/tcomms
|
||||
name = "Subspace Telecommunications And You"
|
||||
icon_state = "book3"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Subspace Telecommunications And You"
|
||||
page_link = "Guide_to_Telecommunications"
|
||||
|
||||
/obj/item/book/manual/wiki/atmospherics
|
||||
name = "Lexica Atmosia"
|
||||
icon_state = "book5"
|
||||
author = "the City-state of Atmosia"
|
||||
title = "Lexica Atmosia"
|
||||
page_link = "Guide_to_Atmospherics"
|
||||
|
||||
/obj/item/book/manual/wiki/medicine
|
||||
name = "Medical Space Compendium, Volume 638"
|
||||
icon_state = "book8"
|
||||
author = "Medical Journal"
|
||||
title = "Medical Space Compendium, Volume 638"
|
||||
page_link = "Guide_to_medicine"
|
||||
|
||||
/obj/item/book/manual/wiki/surgery
|
||||
name = "Brain Surgery for Dummies"
|
||||
icon_state = "book4"
|
||||
author = "Dr. F. Fran"
|
||||
title = "Brain Surgery for Dummies"
|
||||
page_link = "Surgery"
|
||||
|
||||
/obj/item/book/manual/wiki/grenades
|
||||
name = "DIY Chemical Grenades"
|
||||
icon_state = "book2"
|
||||
author = "W. Powell"
|
||||
title = "DIY Chemical Grenades"
|
||||
page_link = "Grenade"
|
||||
|
||||
/obj/item/book/manual/wiki/toxins
|
||||
name = "Toxins or: How I Learned to Stop Worrying and Love the Maxcap"
|
||||
icon_state = "book6"
|
||||
author = "Cuban Pete"
|
||||
title = "Toxins or: How I Learned to Stop Worrying and Love the Maxcap"
|
||||
page_link = "Guide_to_toxins"
|
||||
|
||||
/obj/item/book/manual/wiki/toxins/suicide_act(mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='suicide'>[user] starts dancing to the Rhumba Beat! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
if (!QDELETED(H))
|
||||
H.emote("spin")
|
||||
sleep(20)
|
||||
for(var/obj/item/W in H)
|
||||
H.dropItemToGround(W)
|
||||
if(prob(50))
|
||||
step(W, pick(GLOB.alldirs))
|
||||
ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
H.bleed_rate = 5
|
||||
H.gib_animation()
|
||||
sleep(3)
|
||||
H.adjustBruteLoss(1000) //to make the body super-bloody
|
||||
H.spawn_gibs()
|
||||
H.spill_organs()
|
||||
H.spread_bodyparts()
|
||||
return (BRUTELOSS)
|
||||
@@ -0,0 +1,384 @@
|
||||
/obj/item/melee/transforming/energy
|
||||
hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
heat = 3500
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/brightness_on = 3
|
||||
total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
|
||||
|
||||
|
||||
/obj/item/melee/transforming/energy/Initialize()
|
||||
. = ..()
|
||||
total_mass_on = (total_mass_on ? total_mass_on : (w_class_on * 0.75))
|
||||
if(active)
|
||||
set_light(brightness_on)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/melee/transforming/energy/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/suicide_act(mob/user)
|
||||
if(!active)
|
||||
transform_weapon(user, TRUE)
|
||||
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/melee/transforming/energy/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
|
||||
/obj/item/melee/transforming/energy/get_sharpness()
|
||||
return active * sharpness
|
||||
|
||||
/obj/item/melee/transforming/energy/process()
|
||||
open_flame()
|
||||
|
||||
/obj/item/melee/transforming/energy/transform_weapon(mob/living/user, supress_message_text)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(active)
|
||||
if(item_color)
|
||||
icon_state = "sword[item_color]"
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/melee/transforming/energy/get_temperature()
|
||||
return active * heat
|
||||
|
||||
/obj/item/melee/transforming/energy/ignition_effect(atom/A, mob/user)
|
||||
if(!active)
|
||||
return ""
|
||||
|
||||
var/in_mouth = ""
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.wear_mask)
|
||||
in_mouth = ", barely missing [C.p_their()] nose"
|
||||
. = "<span class='warning'>[user] swings [user.p_their()] [name][in_mouth]. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [A.name] in the process.</span>"
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/transforming/energy/axe
|
||||
name = "energy axe"
|
||||
desc = "An energized battle axe."
|
||||
icon_state = "axe0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/axes_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/axes_righthand.dmi'
|
||||
force = 40
|
||||
force_on = 150
|
||||
throwforce = 25
|
||||
throwforce_on = 30
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class_on = WEIGHT_CLASS_HUGE
|
||||
flags_1 = CONDUCT_1
|
||||
armour_penetration = 100
|
||||
attack_verb_off = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
attack_verb_on = list()
|
||||
light_color = "#40ceff"
|
||||
total_mass = null
|
||||
|
||||
/obj/item/melee/transforming/energy/axe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] swings [src] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword
|
||||
name = "energy sword"
|
||||
desc = "May the force be within you."
|
||||
icon_state = "sword0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit" //it starts deactivated
|
||||
attack_verb_off = list("tapped", "poked")
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
embedding = list("embed_chance" = 75, "embedded_impact_pain_multiplier" = 10)
|
||||
armour_penetration = 35
|
||||
block_chance = 50
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/transform_weapon(mob/living/user, supress_message_text)
|
||||
. = ..()
|
||||
if(. && active && item_color)
|
||||
icon_state = "sword[item_color]"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg
|
||||
item_color = "red"
|
||||
var/hitcost = 50
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
|
||||
if(R.cell)
|
||||
var/obj/item/stock_parts/cell/C = R.cell
|
||||
if(active && !(C.use(hitcost)))
|
||||
attack_self(R)
|
||||
to_chat(R, "<span class='notice'>It's out of charge!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg/saw //Used by medical Syndicate cyborgs
|
||||
name = "energy saw"
|
||||
desc = "For heavy duty cutting. It has a carbon-fiber blade in addition to a toggleable hard-light edge to dramatically increase sharpness."
|
||||
force_on = 30
|
||||
force = 18 //About as much as a spear
|
||||
hitsound = 'sound/weapons/circsawhit.ogg'
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "esaw_0"
|
||||
icon_state_on = "esaw_1"
|
||||
item_color = null //stops icon from breaking when turned on.
|
||||
hitcost = 75 //Costs more than a standard cyborg esword
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
sharpness = IS_SHARP
|
||||
light_color = "#40ceff"
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 0.7
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber
|
||||
var/list/possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
|
||||
var/hacked = FALSE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/Initialize(mapload)
|
||||
. = ..()
|
||||
if(LAZYLEN(possible_colors))
|
||||
var/set_color = pick(possible_colors)
|
||||
item_color = set_color
|
||||
light_color = possible_colors[set_color]
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/process()
|
||||
. = ..()
|
||||
if(hacked)
|
||||
var/set_color = pick(possible_colors)
|
||||
light_color = possible_colors[set_color]
|
||||
update_light()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/red
|
||||
possible_colors = list("red" = LIGHT_COLOR_RED)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/blue
|
||||
possible_colors = list("blue" = LIGHT_COLOR_LIGHT_CYAN)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/green
|
||||
possible_colors = list("green" = LIGHT_COLOR_GREEN)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/purple
|
||||
possible_colors = list("purple" = LIGHT_COLOR_LAVENDER)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
item_color = "rainbow"
|
||||
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
|
||||
|
||||
if(active)
|
||||
icon_state = "swordrainbow"
|
||||
user.update_inv_hands()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/pirate
|
||||
name = "energy cutlass"
|
||||
desc = "Arrrr matey."
|
||||
icon_state = "cutlass0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
icon_state_on = "cutlass1"
|
||||
light_color = "#ff0000"
|
||||
|
||||
/obj/item/melee/transforming/energy/blade
|
||||
name = "energy blade"
|
||||
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
|
||||
icon_state = "blade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
force = 30 //Normal attacks deal esword damage
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
active = 1
|
||||
throwforce = 1 //Throwing or dropping the item deletes it.
|
||||
throw_speed = 3
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_BULKY//So you can't hide it in your pocket or some such.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
sharpness = IS_SHARP
|
||||
|
||||
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
|
||||
/obj/item/melee/transforming/energy/blade/Initialize()
|
||||
. = ..()
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/melee/transforming/energy/blade/transform_weapon(mob/living/user, supress_message_text)
|
||||
return
|
||||
|
||||
/obj/item/melee/transforming/energy/blade/hardlight
|
||||
name = "hardlight blade"
|
||||
desc = "An extremely sharp blade made out of hard light. Packs quite a punch."
|
||||
icon_state = "lightblade"
|
||||
item_state = "lightblade"
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
///////////// The TRUE Energy Sword ///////////////////////////
|
||||
*//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx
|
||||
name = "non-eutactic blade"
|
||||
desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable."
|
||||
icon_state = "cxsword_hilt"
|
||||
item_state = "cxsword"
|
||||
force = 3
|
||||
force_on = 21
|
||||
throwforce = 5
|
||||
throwforce_on = 20
|
||||
hitsound = "swing_hit" //it starts deactivated
|
||||
hitsound_on = 'sound/weapons/nebhit.ogg'
|
||||
attack_verb_off = list("tapped", "poked")
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 20, "embedded_fall_chance" = 60)
|
||||
armour_penetration = 10
|
||||
block_chance = 35
|
||||
light_color = "#37FFF7"
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes
|
||||
altafterattack(A, user, TRUE, params)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes
|
||||
if(istype(user))
|
||||
user.visible_message("<span class='notice'>[user] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text)
|
||||
active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE
|
||||
if(active) //also I'd need to rip out the iconstate changing bits
|
||||
force = force_on
|
||||
throwforce = throwforce_on
|
||||
hitsound = hitsound_on
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
w_class = w_class_on
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_light(brightness_on)
|
||||
update_icon()
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
hitsound = initial(hitsound)
|
||||
throw_speed = initial(throw_speed)
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
w_class = initial(w_class)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light(0)
|
||||
update_icon()
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/nebon.ogg' : 'sound/weapons/neboff.ogg', 65, 1)
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/update_icon()
|
||||
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade")
|
||||
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem")
|
||||
|
||||
if(light_color)
|
||||
blade_overlay.color = light_color
|
||||
gem_overlay.color = light_color
|
||||
|
||||
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
|
||||
|
||||
add_overlay(gem_overlay)
|
||||
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
|
||||
if(!in_range(src, user)) //Basic checks to prevent abuse
|
||||
return
|
||||
if(user.incapacitated() || !istype(user))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
|
||||
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
|
||||
if(energy_color_input)
|
||||
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
update_light()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(isinhands)
|
||||
var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade")
|
||||
blade_inhand.color = light_color
|
||||
. += blade_inhand
|
||||
|
||||
//Broken version. Not a toy, but not as strong.
|
||||
/obj/item/melee/transforming/energy/sword/cx/broken
|
||||
name = "misaligned non-eutactic blade"
|
||||
desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. This one seems to have a damaged handle and misaligned components, causing the blade to be unstable at best"
|
||||
force_on = 15 //As strong a survival knife/bone dagger
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/melee/transforming/energy/sword/cx))
|
||||
if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP))
|
||||
to_chat(user, "<span class='warning'>\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You combine the two light swords, making a single supermassive blade! You're cool.</span>")
|
||||
new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location())
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
//////// Tatortot NEB /////////////// (same stats as regular esword)
|
||||
/obj/item/melee/transforming/energy/sword/cx/traitor
|
||||
name = "\improper Dragon's Tooth Sword"
|
||||
desc = "The Dragon's Tooth sword is a blackmarket modification of a Non-Eutactic Blade, \
|
||||
which utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. \
|
||||
It appears to have a wooden grip and a shaved down guard."
|
||||
icon_state = "cxsword_hilt_traitor"
|
||||
force_on = 30
|
||||
armour_penetration = 50
|
||||
embedding = list("embedded_pain_multiplier" = 10, "embed_chance" = 75, "embedded_fall_chance" = 0, "embedded_impact_pain_multiplier" = 10)
|
||||
block_chance = 50
|
||||
hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
light_color = "#37F0FF"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/traitor/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
@@ -0,0 +1,507 @@
|
||||
/obj/item/melee
|
||||
item_flags = NEEDS_PERMIT
|
||||
|
||||
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(40)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/melee/chainofcommand
|
||||
name = "chain of command"
|
||||
desc = "A tool used by great men to placate the frothing masses."
|
||||
icon_state = "chain"
|
||||
item_state = "chain"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 14
|
||||
throwforce = 10
|
||||
reach = 2
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
hitsound = 'sound/weapons/chainhit.ogg'
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
/obj/item/melee/chainofcommand/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/melee/synthetic_arm_blade
|
||||
name = "synthetic arm blade"
|
||||
desc = "A grotesque blade that on closer inspection seems made of synthetic flesh, it still feels like it would hurt very badly as a weapon."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 20
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "impaled", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
|
||||
/obj/item/melee/synthetic_arm_blade/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 60, 80) //very imprecise
|
||||
|
||||
/obj/item/melee/sabre
|
||||
name = "officer's sabre"
|
||||
desc = "An elegant weapon, its monomolecular edge is capable of cutting through flesh and bone with ease."
|
||||
icon_state = "sabre"
|
||||
item_state = "sabre"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
obj_flags = UNIQUE_RENAME
|
||||
force = 18
|
||||
throwforce = 15
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
block_chance = 50
|
||||
armour_penetration = 75
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("slashed", "cut")
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
materials = list(MAT_METAL = 1000)
|
||||
total_mass = 3.4
|
||||
|
||||
/obj/item/melee/sabre/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 30, 95, 5) //fast and effective, but as a sword, it might damage the results.
|
||||
|
||||
/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/sabre/on_exit_storage(obj/item/storage/S)
|
||||
..()
|
||||
var/obj/item/storage/belt/sabre/B = S
|
||||
if(istype(B))
|
||||
playsound(B, 'sound/items/unsheath.ogg', 25, 1)
|
||||
|
||||
/obj/item/melee/sabre/on_enter_storage(obj/item/storage/S)
|
||||
..()
|
||||
var/obj/item/storage/belt/sabre/B = S
|
||||
if(istype(B))
|
||||
playsound(B, 'sound/items/sheath.ogg', 25, 1)
|
||||
|
||||
/obj/item/melee/sabre/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "sabre")
|
||||
|
||||
/obj/item/melee/sabre/get_worn_belt_overlay(icon_file)
|
||||
return mutable_appearance(icon_file, "-sabre")
|
||||
|
||||
/obj/item/melee/sabre/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is trying to cut off all [user.p_their()] limbs with [src]! it looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/i = 0
|
||||
ADD_TRAIT(src, TRAIT_NODROP, SABRE_SUICIDE_TRAIT)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/Cuser = user
|
||||
var/obj/item/bodypart/holding_bodypart = Cuser.get_holding_bodypart_of_item(src)
|
||||
var/list/limbs_to_dismember
|
||||
var/list/arms = list()
|
||||
var/list/legs = list()
|
||||
var/obj/item/bodypart/bodypart
|
||||
|
||||
for(bodypart in Cuser.bodyparts)
|
||||
if(bodypart == holding_bodypart)
|
||||
continue
|
||||
if(bodypart.body_part & ARMS)
|
||||
arms += bodypart
|
||||
else if (bodypart.body_part & LEGS)
|
||||
legs += bodypart
|
||||
|
||||
limbs_to_dismember = arms + legs
|
||||
if(holding_bodypart)
|
||||
limbs_to_dismember += holding_bodypart
|
||||
|
||||
var/speedbase = abs((4 SECONDS) / limbs_to_dismember.len)
|
||||
for(bodypart in limbs_to_dismember)
|
||||
i++
|
||||
addtimer(CALLBACK(src, .proc/suicide_dismember, user, bodypart), speedbase * i)
|
||||
addtimer(CALLBACK(src, .proc/manual_suicide, user), (5 SECONDS) * i)
|
||||
return MANUAL_SUICIDE
|
||||
|
||||
/obj/item/melee/sabre/proc/suicide_dismember(mob/living/user, obj/item/bodypart/affecting)
|
||||
if(!QDELETED(affecting) && affecting.dismemberable && affecting.owner == user && !QDELETED(user))
|
||||
playsound(user, hitsound, 25, 1)
|
||||
affecting.dismember(BRUTE)
|
||||
user.adjustBruteLoss(20)
|
||||
|
||||
/obj/item/melee/sabre/proc/manual_suicide(mob/living/user, originally_nodropped)
|
||||
if(!QDELETED(user))
|
||||
user.adjustBruteLoss(200)
|
||||
user.death(FALSE)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, SABRE_SUICIDE_TRAIT)
|
||||
|
||||
/obj/item/melee/rapier
|
||||
name = "plastitanium rapier"
|
||||
desc = "A impossibly thin blade made of plastitanium with a tip made of diamond. It looks to be able to cut through any armor."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "rapier"
|
||||
item_state = "rapier"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
force = 25
|
||||
throwforce = 35
|
||||
block_chance = 0
|
||||
armour_penetration = 100
|
||||
flags_1 = CONDUCT_1
|
||||
obj_flags = UNIQUE_RENAME
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_-
|
||||
attack_verb = list("slashed", "cut", "pierces", "pokes")
|
||||
total_mass = 3.4
|
||||
|
||||
/obj/item/melee/rapier/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 20, 65, 0)
|
||||
|
||||
/obj/item/melee/rapier/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "rapier")
|
||||
|
||||
/obj/item/melee/rapier/get_worn_belt_overlay(icon_file)
|
||||
return mutable_appearance(icon_file, "-rapier")
|
||||
|
||||
/obj/item/melee/classic_baton
|
||||
name = "police baton"
|
||||
desc = "A wooden truncheon for beating criminal scum."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "baton"
|
||||
item_state = "classic_baton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 12 //9 hit crit
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/cooldown = 13
|
||||
var/on = TRUE
|
||||
var/last_hit = 0
|
||||
var/stun_stam_cost_coeff = 1.25
|
||||
var/hardstun_ds = 1
|
||||
var/softstun_ds = 0
|
||||
var/stam_dmg = 30
|
||||
|
||||
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
|
||||
if(!on)
|
||||
return ..()
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes batons unusuable in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
|
||||
return //CIT CHANGE - ditto
|
||||
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Knockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(iscyborg(target))
|
||||
..()
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
if (user.a_intent == INTENT_HARM)
|
||||
if(!..() || !iscyborg(target))
|
||||
return
|
||||
else
|
||||
if(last_hit < world.time)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
return
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
log_combat(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
target.LAssailant = user
|
||||
last_hit = world.time + cooldown
|
||||
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic
|
||||
name = "telescopic baton"
|
||||
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "telebaton_0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
item_state = null
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = NONE
|
||||
force = 0
|
||||
on = FALSE
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/brain/B = H.getorgan(/obj/item/organ/brain)
|
||||
|
||||
user.visible_message("<span class='suicide'>[user] stuffs [src] up [user.p_their()] nose and presses the 'extend' button! It looks like [user.p_theyre()] trying to clear [user.p_their()] mind.</span>")
|
||||
if(!on)
|
||||
src.attack_self(user)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
sleep(3)
|
||||
if (H && !QDELETED(H))
|
||||
if (B && !QDELETED(B))
|
||||
H.internal_organs -= B
|
||||
qdel(B)
|
||||
H.spawn_gibs()
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
|
||||
on = !on
|
||||
if(on)
|
||||
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
|
||||
icon_state = "telebaton_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
|
||||
force = 10 //stunbaton damage
|
||||
attack_verb = list("smacked", "struck", "cracked", "beaten")
|
||||
else
|
||||
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
|
||||
icon_state = "telebaton_0"
|
||||
item_state = null //no sprite for concealment even when in hand
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 0 //not so robust now
|
||||
attack_verb = list("hit", "poked")
|
||||
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/supermatter_sword
|
||||
name = "supermatter sword"
|
||||
desc = "In a station full of bad ideas, this might just be the worst."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "supermatter_sword"
|
||||
item_state = "supermatter_sword"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
slot_flags = null
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 0.001
|
||||
armour_penetration = 1000
|
||||
var/obj/machinery/power/supermatter_crystal/shard
|
||||
var/balanced = 1
|
||||
force_string = "INFINITE"
|
||||
|
||||
/obj/item/melee/supermatter_sword/Initialize()
|
||||
. = ..()
|
||||
shard = new /obj/machinery/power/supermatter_crystal(src)
|
||||
qdel(shard.countdown)
|
||||
shard.countdown = null
|
||||
START_PROCESSING(SSobj, src)
|
||||
visible_message("<span class='warning'>[src] appears, balanced ever so perfectly on its hilt. This isn't ominous at all.</span>")
|
||||
|
||||
/obj/item/melee/supermatter_sword/process()
|
||||
if(balanced || throwing || ismob(src.loc) || isnull(src.loc))
|
||||
return
|
||||
if(!isturf(src.loc))
|
||||
var/atom/target = src.loc
|
||||
forceMove(target.loc)
|
||||
consume_everything(target)
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
if(!isspaceturf(T))
|
||||
shard.consume_turf(T)
|
||||
|
||||
/obj/item/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(user && target == user)
|
||||
user.dropItemToGround(src)
|
||||
if(proximity_flag)
|
||||
consume_everything(target)
|
||||
|
||||
/obj/item/melee/supermatter_sword/throw_impact(target)
|
||||
..()
|
||||
if(ismob(target))
|
||||
var/mob/M
|
||||
if(src.loc == M)
|
||||
M.dropItemToGround(src)
|
||||
consume_everything(target)
|
||||
|
||||
/obj/item/melee/supermatter_sword/pickup(user)
|
||||
..()
|
||||
balanced = 0
|
||||
|
||||
/obj/item/melee/supermatter_sword/ex_act(severity, target)
|
||||
visible_message("<span class='danger'>The blast wave smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything()
|
||||
|
||||
/obj/item/melee/supermatter_sword/acid_act()
|
||||
visible_message("<span class='danger'>The acid smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything()
|
||||
|
||||
/obj/item/melee/supermatter_sword/bullet_act(obj/item/projectile/P)
|
||||
visible_message("<span class='danger'>[P] smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything()
|
||||
|
||||
/obj/item/melee/supermatter_sword/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] touches [src]'s blade. It looks like [user.p_theyre()] tired of waiting for the radiation to kill [user.p_them()]!</span>")
|
||||
user.dropItemToGround(src, TRUE)
|
||||
shard.Bumped(user)
|
||||
|
||||
/obj/item/melee/supermatter_sword/proc/consume_everything(target)
|
||||
if(isnull(target))
|
||||
shard.Consume()
|
||||
else if(!isturf(target))
|
||||
shard.Bumped(target)
|
||||
else
|
||||
shard.consume_turf(target)
|
||||
|
||||
/obj/item/melee/supermatter_sword/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
|
||||
/obj/item/melee/curator_whip
|
||||
name = "curator's whip"
|
||||
desc = "Somewhat eccentric and outdated, it still stings like hell to be hit by."
|
||||
icon_state = "whip"
|
||||
item_state = "chain"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 15
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
hitsound = 'sound/weapons/whip.ogg'
|
||||
|
||||
/obj/item/melee/curator_whip/afterattack(target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(ishuman(target) && proximity_flag)
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.drop_all_held_items()
|
||||
H.visible_message("<span class='danger'>[user] disarms [H]!</span>", "<span class='userdanger'>[user] disarmed you!</span>")
|
||||
|
||||
/obj/item/melee/roastingstick
|
||||
name = "advanced roasting stick"
|
||||
desc = "A telescopic roasting stick with a miniature shield generator designed to ensure entry into various high-tech shielded cooking ovens and firepits."
|
||||
icon_state = "roastingstick_0"
|
||||
item_state = "null"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = NONE
|
||||
force = 0
|
||||
attack_verb = list("hit", "poked")
|
||||
var/obj/item/reagent_containers/food/snacks/sausage/held_sausage
|
||||
var/static/list/ovens
|
||||
var/on = FALSE
|
||||
var/datum/beam/beam
|
||||
total_mass = 2.5
|
||||
|
||||
/obj/item/melee/roastingstick/Initialize()
|
||||
. = ..()
|
||||
if (!ovens)
|
||||
ovens = typecacheof(list(/obj/singularity, /obj/machinery/power/supermatter_crystal, /obj/structure/bonfire, /obj/structure/destructible/clockwork/massive/ratvar))
|
||||
|
||||
/obj/item/melee/roastingstick/attack_self(mob/user)
|
||||
on = !on
|
||||
if(on)
|
||||
extend(user)
|
||||
else
|
||||
if (held_sausage)
|
||||
to_chat(user, "<span class='warning'>You can't retract [src] while [held_sausage] is attached!</span>")
|
||||
return
|
||||
retract(user)
|
||||
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/roastingstick/attackby(atom/target, mob/user)
|
||||
..()
|
||||
if (istype(target, /obj/item/reagent_containers/food/snacks/sausage))
|
||||
if (!on)
|
||||
to_chat(user, "<span class='warning'>You must extend [src] to attach anything to it!</span>")
|
||||
return
|
||||
if (held_sausage)
|
||||
to_chat(user, "<span class='warning'>[held_sausage] is already attached to [src]!</span>")
|
||||
return
|
||||
if (user.transferItemToLoc(target, src))
|
||||
held_sausage = target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user)
|
||||
..()
|
||||
if (held_sausage)
|
||||
user.put_in_hands(held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if (held_sausage)
|
||||
var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage")
|
||||
add_overlay(sausage)
|
||||
|
||||
/obj/item/melee/roastingstick/proc/extend(user)
|
||||
to_chat(user, "<span class ='warning'>You extend [src].</span>")
|
||||
icon_state = "roastingstick_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/melee/roastingstick/proc/retract(user)
|
||||
to_chat(user, "<span class ='notice'>You collapse [src].</span>")
|
||||
icon_state = "roastingstick_0"
|
||||
item_state = null
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/melee/roastingstick/handle_atom_del(atom/target)
|
||||
if (target == held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if (!on)
|
||||
return
|
||||
if (is_type_in_typecache(target, ovens))
|
||||
if (held_sausage && held_sausage.roasted)
|
||||
to_chat("Your [held_sausage] has already been cooked.")
|
||||
return
|
||||
if (istype(target, /obj/singularity) && get_dist(user, target) < 10)
|
||||
to_chat(user, "You send [held_sausage] towards [target].")
|
||||
playsound(src, 'sound/items/rped.ogg', 50, 1)
|
||||
beam = user.Beam(target,icon_state="rped_upgrade",time=100)
|
||||
else if (user.Adjacent(target))
|
||||
to_chat(user, "You extend [src] towards [target].")
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
if(do_after(user, 100, target = user))
|
||||
finish_roasting(user, target)
|
||||
else
|
||||
QDEL_NULL(beam)
|
||||
playsound(src, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
|
||||
/obj/item/melee/roastingstick/proc/finish_roasting(user, atom/target)
|
||||
to_chat(user, "You finish roasting [held_sausage]")
|
||||
playsound(src,'sound/items/welder2.ogg',50,1)
|
||||
held_sausage.add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
held_sausage.name = "[target.name]-roasted [held_sausage.name]"
|
||||
held_sausage.desc = "[held_sausage.desc] It has been cooked to perfection on \a [target]."
|
||||
update_icon()
|
||||
@@ -0,0 +1,90 @@
|
||||
/obj/item/melee/transforming
|
||||
sharpness = IS_SHARP
|
||||
var/active = FALSE
|
||||
var/force_on = 30 //force when active
|
||||
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
|
||||
var/throwforce_on = 20
|
||||
var/icon_state_on = "axe1"
|
||||
var/hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/list/attack_verb_off = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/bonus_active = FALSE //If the faction damage bonus is active
|
||||
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
var/clumsy_check = TRUE
|
||||
var/total_mass_on //Total mass in ounces when transformed. Primarily for balance purposes. Don't think about it too hard.
|
||||
|
||||
/obj/item/melee/transforming/Initialize()
|
||||
. = ..()
|
||||
if(active)
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
else
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
if(get_sharpness())
|
||||
AddComponent(/datum/component/butchering, 50, 100, 0, hitsound, !active)
|
||||
|
||||
/obj/item/melee/transforming/attack_self(mob/living/carbon/user)
|
||||
if(transform_weapon(user))
|
||||
clumsy_transform_effect(user)
|
||||
|
||||
/obj/item/melee/transforming/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
var/nemesis_faction = FALSE
|
||||
if(LAZYLEN(nemesis_factions))
|
||||
for(var/F in target.faction)
|
||||
if(F in nemesis_factions)
|
||||
nemesis_faction = TRUE
|
||||
force += faction_bonus_force
|
||||
nemesis_effects(user, target)
|
||||
break
|
||||
. = ..()
|
||||
if(nemesis_faction)
|
||||
force -= faction_bonus_force
|
||||
|
||||
/obj/item/melee/transforming/proc/transform_weapon(mob/living/user, supress_message_text)
|
||||
active = !active
|
||||
if(active)
|
||||
force = force_on
|
||||
total_mass = total_mass_on
|
||||
throwforce = throwforce_on
|
||||
hitsound = hitsound_on
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
icon_state = icon_state_on
|
||||
w_class = w_class_on
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
hitsound = initial(hitsound)
|
||||
throw_speed = initial(throw_speed)
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
total_mass = initial(total_mass)
|
||||
if(get_sharpness())
|
||||
var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering)
|
||||
BT.butchering_enabled = TRUE
|
||||
else
|
||||
var/datum/component/butchering/BT = GetComponent(/datum/component/butchering)
|
||||
if(BT)
|
||||
BT.butchering_enabled = FALSE
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/proc/nemesis_effects(mob/living/user, mob/living/target)
|
||||
return
|
||||
|
||||
/obj/item/melee/transforming/proc/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
@@ -0,0 +1,131 @@
|
||||
/obj/item/mop
|
||||
desc = "The world of janitalia wouldn't be complete without a mop."
|
||||
name = "mop"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mop"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
|
||||
resistance_flags = FLAMMABLE
|
||||
var/mopping = 0
|
||||
var/mopcount = 0
|
||||
var/mopcap = 5
|
||||
var/stamusage = 2
|
||||
force_string = "robust... against germs"
|
||||
var/insertable = TRUE
|
||||
|
||||
/obj/item/mop/New()
|
||||
..()
|
||||
create_reagents(mopcap)
|
||||
|
||||
|
||||
/obj/item/mop/proc/clean(turf/A)
|
||||
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1))
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
A.clean_blood()
|
||||
for(var/obj/effect/O in A)
|
||||
if(is_cleanable(O))
|
||||
qdel(O)
|
||||
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.
|
||||
reagents.remove_any(1) //reaction() doesn't use up the reagents
|
||||
|
||||
|
||||
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
var/mob/living/L = user
|
||||
|
||||
if(istype(L) && L.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(A)
|
||||
|
||||
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart))
|
||||
return
|
||||
|
||||
if(T)
|
||||
user.visible_message("[user] cleans \the [T] with [src].", "<span class='notice'>You clean \the [T] with [src].</span>")
|
||||
clean(T)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(T, used_item = src)
|
||||
if(istype(L))
|
||||
L.adjustStaminaLossBuffered(stamusage)
|
||||
playsound(T, "slosh", 50, 1)
|
||||
|
||||
|
||||
/obj/effect/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mymop=src
|
||||
J.update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
|
||||
/obj/item/mop/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
/obj/item/mop/advanced
|
||||
desc = "The most advanced tool in a custodian's arsenal, complete with a condenser for self-wetting! Just think of all the viscera you will clean up with this!"
|
||||
name = "advanced mop"
|
||||
mopcap = 10
|
||||
icon_state = "advmop"
|
||||
item_state = "mop"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
force = 6
|
||||
throwforce = 8
|
||||
throw_range = 4
|
||||
stamusage = 1
|
||||
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
|
||||
var/refill_rate = 1 //Rate per process() tick mop refills itself
|
||||
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
|
||||
|
||||
/obj/item/mop/advanced/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/mop/advanced/attack_self(mob/user)
|
||||
refill_enabled = !refill_enabled
|
||||
if(refill_enabled)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 30, 1)
|
||||
|
||||
/obj/item/mop/advanced/process()
|
||||
|
||||
if(reagents.total_volume < mopcap)
|
||||
reagents.add_reagent(refill_reagent, refill_rate)
|
||||
|
||||
/obj/item/mop/advanced/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>")
|
||||
|
||||
/obj/item/mop/advanced/Destroy()
|
||||
if(refill_enabled)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/mop/advanced/cyborg
|
||||
insertable = FALSE
|
||||
@@ -0,0 +1,195 @@
|
||||
#define pet_carrier_full(carrier) carrier.occupants.len >= carrier.max_occupants || carrier.occupant_weight >= carrier.max_occupant_weight
|
||||
|
||||
//Used to transport little animals without having to drag them across the station.
|
||||
//Comes with a handy lock to prevent them from running off.
|
||||
/obj/item/pet_carrier
|
||||
name = "pet carrier"
|
||||
desc = "A big white-and-blue pet carrier. Good for carrying <s>meat to the chef</s> cute animals around."
|
||||
icon = 'icons/obj/pet_carrier.dmi'
|
||||
icon_state = "pet_carrier_open"
|
||||
item_state = "pet_carrier"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
force = 5
|
||||
attack_verb = list("bashed", "carried")
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL = 7500, MAT_GLASS = 100)
|
||||
var/open = TRUE
|
||||
var/locked = FALSE
|
||||
var/list/occupants = list()
|
||||
var/occupant_weight = 0
|
||||
var/max_occupants = 3 //Hard-cap so you can't have infinite mice or something in one carrier
|
||||
var/max_occupant_weight = MOB_SIZE_SMALL //This is calculated from the mob sizes of occupants
|
||||
|
||||
/obj/item/pet_carrier/Destroy()
|
||||
if(occupants.len)
|
||||
for(var/V in occupants)
|
||||
remove_occupant(V)
|
||||
return ..()
|
||||
|
||||
/obj/item/pet_carrier/Exited(atom/movable/occupant)
|
||||
if(occupant in occupants && isliving(occupant))
|
||||
var/mob/living/L = occupant
|
||||
occupants -= occupant
|
||||
occupant_weight -= L.mob_size
|
||||
|
||||
/obj/item/pet_carrier/handle_atom_del(atom/A)
|
||||
if(A in occupants && isliving(A))
|
||||
var/mob/living/L = A
|
||||
occupants -= L
|
||||
occupant_weight -= L.mob_size
|
||||
..()
|
||||
|
||||
/obj/item/pet_carrier/examine(mob/user)
|
||||
..()
|
||||
if(occupants.len)
|
||||
for(var/V in occupants)
|
||||
var/mob/living/L = V
|
||||
to_chat(user, "<span class='notice'>It has [L] inside.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It has nothing inside.</span>")
|
||||
if(user.canUseTopic(src))
|
||||
to_chat(user, "<span class='notice'>Activate it in your hand to [open ? "close" : "open"] its door.</span>")
|
||||
if(!open)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] its door.</span>")
|
||||
|
||||
/obj/item/pet_carrier/attack_self(mob/living/user)
|
||||
if(open)
|
||||
to_chat(user, "<span class='notice'>You close [src]'s door.</span>")
|
||||
playsound(user, 'sound/effects/bin_close.ogg', 50, TRUE)
|
||||
open = FALSE
|
||||
else
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>[src] is locked!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You open [src]'s door.</span>")
|
||||
playsound(user, 'sound/effects/bin_open.ogg', 50, TRUE)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/pet_carrier/AltClick(mob/living/user)
|
||||
if(open || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You flip the lock switch [locked ? "down" : "up"].</span>")
|
||||
if(locked)
|
||||
playsound(user, 'sound/machines/boltsdown.ogg', 30, TRUE)
|
||||
else
|
||||
playsound(user, 'sound/machines/boltsup.ogg', 30, TRUE)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pet_carrier/attack(mob/living/target, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
if(!open)
|
||||
to_chat(user, "<span class='warning'>You need to open [src]'s door!</span>")
|
||||
return
|
||||
if(target.mob_size > max_occupant_weight)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(iscatperson(H))
|
||||
to_chat(user, "<span class='warning'>You'd need a lot of catnip and treats, plus maybe a laser pointer, for that to work.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Humans, generally, do not fit into pet carriers.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You get the feeling [target] isn't meant for a [name].</span>")
|
||||
return
|
||||
if(user == target)
|
||||
to_chat(user, "<span class='warning'>Why would you ever do that?</span>")
|
||||
return
|
||||
load_occupant(user, target)
|
||||
|
||||
/obj/item/pet_carrier/relaymove(mob/living/user, direction)
|
||||
if(open)
|
||||
loc.visible_message("<span class='notice'>[user] climbs out of [src]!</span>", \
|
||||
"<span class='warning'>[user] jumps out of [src]!</span>")
|
||||
remove_occupant(user)
|
||||
return
|
||||
else if(!locked)
|
||||
loc.visible_message("<span class='notice'>[user] pushes open the door to [src]!</span>", \
|
||||
"<span class='warning'>[user] pushes open the door of [src]!</span>")
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return
|
||||
else if(user.client)
|
||||
container_resist(user)
|
||||
|
||||
/obj/item/pet_carrier/container_resist(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
if(user.mob_size <= MOB_SIZE_SMALL)
|
||||
to_chat(user, "<span class='notice'>You poke a limb through [src]'s bars and start fumbling for the lock switch... (This will take some time.)</span>")
|
||||
to_chat(loc, "<span class='warning'>You see [user] reach through the bars and fumble for the lock switch!</span>")
|
||||
if(!do_after(user, rand(300, 400), target = user) || open || !locked || !(user in occupants))
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] flips the lock switch on [src] by reaching through!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='boldannounce'>Bingo! The lock pops open!</span>")
|
||||
locked = FALSE
|
||||
playsound(src, 'sound/machines/boltsup.ogg', 30, TRUE)
|
||||
update_icon()
|
||||
else
|
||||
loc.visible_message("<span class='warning'>[src] starts rattling as something pushes against the door!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You start pushing out of [src]... (This will take about 20 seconds.)</span>")
|
||||
if(!do_after(user, 200, target = user) || open || !locked || !(user in occupants))
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] shoves out of [src]!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You shove open [src]'s door against the lock's resistance and fall out!</span>")
|
||||
locked = FALSE
|
||||
open = TRUE
|
||||
update_icon()
|
||||
remove_occupant(user)
|
||||
|
||||
/obj/item/pet_carrier/update_icon()
|
||||
cut_overlay("unlocked")
|
||||
cut_overlay("locked")
|
||||
if(open)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
|
||||
add_overlay("[locked ? "" : "un"]locked")
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
. = ..()
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
usr.visible_message("<span class='notice'>[usr] unloads [src].</span>", \
|
||||
"<span class='notice'>You unload [src] onto [over_atom].</span>")
|
||||
for(var/V in occupants)
|
||||
remove_occupant(V, over_atom)
|
||||
|
||||
/obj/item/pet_carrier/proc/load_occupant(mob/living/user, mob/living/target)
|
||||
if(pet_carrier_full(src))
|
||||
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts loading [target] into [src].</span>", \
|
||||
"<span class='notice'>You start loading [target] into [src]...</span>", null, null, target)
|
||||
to_chat(target, "<span class='userdanger'>[user] starts loading you into [user.p_their()] [name]!</span>")
|
||||
if(!do_mob(user, target, 30))
|
||||
return
|
||||
if(target in occupants)
|
||||
return
|
||||
if(pet_carrier_full(src)) //Run the checks again, just in case
|
||||
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] loads [target] into [src]!</span>", \
|
||||
"<span class='notice'>You load [target] into [src].</span>", null, null, target)
|
||||
to_chat(target, "<span class='userdanger'>[user] loads you into [user.p_their()] [name]!</span>")
|
||||
add_occupant(target)
|
||||
|
||||
/obj/item/pet_carrier/proc/add_occupant(mob/living/occupant)
|
||||
if(occupant in occupants || !istype(occupant))
|
||||
return
|
||||
occupant.forceMove(src)
|
||||
occupants += occupant
|
||||
occupant_weight += occupant.mob_size
|
||||
|
||||
/obj/item/pet_carrier/proc/remove_occupant(mob/living/occupant, turf/new_turf)
|
||||
if(!(occupant in occupants) || !istype(occupant))
|
||||
return
|
||||
occupant.forceMove(new_turf ? new_turf : drop_location())
|
||||
occupants -= occupant
|
||||
occupant_weight -= occupant.mob_size
|
||||
occupant.setDir(SOUTH)
|
||||
|
||||
#undef pet_carrier_full
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,317 @@
|
||||
/obj/item/banner
|
||||
name = "banner"
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "banner"
|
||||
item_state = "banner"
|
||||
force = 8
|
||||
attack_verb = list("forcefully inspired", "violently encouraged", "relentlessly galvanized")
|
||||
lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi'
|
||||
var/inspiration_available = TRUE //If this banner can be used to inspire crew
|
||||
var/morale_time = 0
|
||||
var/morale_cooldown = 600 //How many deciseconds between uses
|
||||
var/list/job_loyalties //Mobs with any of these assigned roles will be inspired
|
||||
var/list/role_loyalties //Mobs with any of these special roles will be inspired
|
||||
var/warcry
|
||||
|
||||
/obj/item/banner/examine(mob/user)
|
||||
..()
|
||||
if(inspiration_available)
|
||||
to_chat(user, "<span class='notice'>Activate it in your hand to inspire nearby allies of this banner's allegiance!</span>")
|
||||
|
||||
/obj/item/banner/attack_self(mob/living/carbon/human/user)
|
||||
if(!inspiration_available)
|
||||
return
|
||||
if(morale_time > world.time)
|
||||
to_chat(user, "<span class='warning'>You aren't feeling inspired enough to flourish [src] again yet.</span>")
|
||||
return
|
||||
user.visible_message("<span class='big notice'>[user] flourishes [src]!</span>", \
|
||||
"<span class='notice'>You raise [src] skywards, inspiring your allies!</span>")
|
||||
playsound(src, "rustle", 100, FALSE)
|
||||
if(warcry)
|
||||
user.say("[warcry]", forced="banner")
|
||||
var/old_transform = user.transform
|
||||
user.transform *= 1.2
|
||||
animate(user, transform = old_transform, time = 10)
|
||||
morale_time = world.time + morale_cooldown
|
||||
|
||||
var/list/inspired = list()
|
||||
var/has_job_loyalties = LAZYLEN(job_loyalties)
|
||||
var/has_role_loyalties = LAZYLEN(role_loyalties)
|
||||
inspired += user //The user is always inspired, regardless of loyalties
|
||||
for(var/mob/living/carbon/human/H in range(4, get_turf(src)))
|
||||
if(H.stat == DEAD || H == user)
|
||||
continue
|
||||
if(H.mind && (has_job_loyalties || has_role_loyalties))
|
||||
if(has_job_loyalties && H.mind.assigned_role in job_loyalties)
|
||||
inspired += H
|
||||
else if(has_role_loyalties && H.mind.special_role in role_loyalties)
|
||||
inspired += H
|
||||
else if(check_inspiration(H))
|
||||
inspired += H
|
||||
|
||||
for(var/V in inspired)
|
||||
var/mob/living/carbon/human/H = V
|
||||
if(H != user)
|
||||
to_chat(H, "<span class='notice'>Your confidence surges as [user] flourishes [user.p_their()] [name]!</span>")
|
||||
inspiration(H)
|
||||
special_inspiration(H)
|
||||
|
||||
/obj/item/banner/proc/check_inspiration(mob/living/carbon/human/H) //Banner-specific conditions for being eligible
|
||||
return
|
||||
|
||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||
|
||||
/obj/item/banner/proc/special_inspiration(mob/living/carbon/human/H) //Any banner-specific inspiration effects go here
|
||||
return
|
||||
|
||||
/obj/item/banner/security
|
||||
name = "securistan banner"
|
||||
desc = "The banner of Securistan, ruling the station with an iron fist."
|
||||
icon_state = "banner_security"
|
||||
job_loyalties = list("Security Officer", "Warden", "Detective", "Head of Security")
|
||||
warcry = "EVERYONE DOWN ON THE GROUND!!"
|
||||
|
||||
/obj/item/banner/security/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/medical
|
||||
name = "meditopia banner"
|
||||
desc = "The banner of Meditopia, generous benefactors that cure wounds and shelter the weak."
|
||||
icon_state = "banner_medical"
|
||||
job_loyalties = list("Medical Doctor", "Chemist", "Geneticist", "Virologist", "Chief Medical Officer")
|
||||
warcry = "No wounds cannot be healed!"
|
||||
|
||||
/obj/item/banner/medical/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/medical/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.stat //Meditopia is moved to help those in need
|
||||
|
||||
/obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H)
|
||||
H.adjustToxLoss(-15)
|
||||
H.setOxyLoss(0)
|
||||
H.reagents.add_reagent("inaprovaline", 5)
|
||||
|
||||
/obj/item/banner/science
|
||||
name = "sciencia banner"
|
||||
desc = "The banner of Sciencia, bold and daring thaumaturges and researchers that take the path less traveled."
|
||||
icon_state = "banner_science"
|
||||
job_loyalties = list("Scientist", "Roboticist", "Research Director")
|
||||
warcry = "For Cuban Pete!"
|
||||
|
||||
/obj/item/banner/science/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/science/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.on_fire //Sciencia is pleased by dedication to the art of Toxins
|
||||
|
||||
/obj/item/banner/cargo
|
||||
name = "cargonia banner"
|
||||
desc = "The banner of the eternal Cargonia, with the mystical power of conjuring any object into existence."
|
||||
icon_state = "banner_cargo"
|
||||
job_loyalties = list("Cargo Technician", "Shaft Miner", "Quartermaster")
|
||||
warcry = "Hail Cargonia!"
|
||||
|
||||
/obj/item/banner/cargo/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/engineering
|
||||
name = "engitopia banner"
|
||||
desc = "The banner of Engitopia, wielders of limitless power."
|
||||
icon_state = "banner_engineering"
|
||||
job_loyalties = list("Station Engineer", "Atmospheric Technician", "Chief Engineer")
|
||||
warcry = "All hail lord Singuloth!!"
|
||||
|
||||
/obj/item/banner/engineering/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H)
|
||||
H.radiation = 0
|
||||
|
||||
/obj/item/banner/command
|
||||
name = "command banner"
|
||||
desc = "The banner of Command, a staunch and ancient line of bueraucratic kings and queens."
|
||||
//No icon state here since the default one is the NT banner
|
||||
job_loyalties = list("Captain", "Head of Personnel", "Chief Engineer", "Head of Security", "Research Director", "Chief Medical Officer")
|
||||
warcry = "Hail Nanotrasen!"
|
||||
|
||||
/obj/item/banner/command/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/command/check_inspiration(mob/living/carbon/human/H)
|
||||
return HAS_TRAIT(H, TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies.
|
||||
|
||||
/obj/item/banner/red
|
||||
name = "red banner"
|
||||
icon_state = "banner-red"
|
||||
item_state = "banner-red"
|
||||
desc = "A banner with the logo of the red deity."
|
||||
|
||||
/obj/item/banner/blue
|
||||
name = "blue banner"
|
||||
icon_state = "banner-blue"
|
||||
item_state = "banner-blue"
|
||||
desc = "A banner with the logo of the blue deity."
|
||||
|
||||
/obj/item/storage/backpack/bannerpack
|
||||
name = "nanotrasen banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A banner with Nanotrasen's logo is attached, that can't be removed."
|
||||
icon_state = "bannerpack"
|
||||
|
||||
/obj/item/storage/backpack/bannerpack/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times.
|
||||
|
||||
/obj/item/storage/backpack/bannerpack/red
|
||||
name = "red banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A red banner is attached, that can't be removed."
|
||||
icon_state = "bannerpack-red"
|
||||
|
||||
/obj/item/storage/backpack/bannerpack/blue
|
||||
name = "blue banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A blue banner is attached, that can't be removed."
|
||||
icon_state = "bannerpack-blue"
|
||||
|
||||
//this is all part of one item set
|
||||
/obj/item/clothing/suit/armor/plate/crusader
|
||||
name = "Crusader's Armour"
|
||||
desc = "Armour that's comprised of metal and cloth."
|
||||
icon_state = "crusader"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slowdown = 2.0 //gotta pretend we're balanced.
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
|
||||
|
||||
/obj/item/clothing/suit/armor/plate/crusader/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/suit/armor/plate/crusader/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader
|
||||
name = "Crusader's Hood"
|
||||
desc = "A brownish hood."
|
||||
icon_state = "crusader"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
flags_inv = HIDEHAIR|HIDEEARS|HIDEFACE
|
||||
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
//Prophet helmet
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet
|
||||
name = "Prophet's Hat"
|
||||
desc = "A religious-looking hat."
|
||||
alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
|
||||
flags_1 = 0
|
||||
armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 50, "bomb" = 70, "bio" = 50, "rad" = 50, "fire" = 60, "acid" = 60) //religion protects you from disease and radiation, honk.
|
||||
worn_x_dimension = 64
|
||||
worn_y_dimension = 64
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/red
|
||||
icon_state = "prophet-red"
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/blue
|
||||
icon_state = "prophet-blue"
|
||||
|
||||
//Structure conversion staff
|
||||
/obj/item/godstaff
|
||||
name = "godstaff"
|
||||
desc = "It's a stick..?"
|
||||
icon_state = "godstaff-red"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
var/conversion_color = "#ffffff"
|
||||
var/staffcooldown = 0
|
||||
var/staffwait = 30
|
||||
|
||||
/obj/item/godstaff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(staffcooldown + staffwait > world.time)
|
||||
return
|
||||
user.visible_message("[user] chants deeply and waves [user.p_their()] staff!")
|
||||
if(do_after(user, 20,1,src))
|
||||
target.add_atom_colour(conversion_color, WASHABLE_COLOUR_PRIORITY) //wololo
|
||||
staffcooldown = world.time
|
||||
|
||||
/obj/item/godstaff/red
|
||||
icon_state = "godstaff-red"
|
||||
conversion_color = "#ff0000"
|
||||
|
||||
/obj/item/godstaff/blue
|
||||
icon_state = "godstaff-blue"
|
||||
conversion_color = "#0000ff"
|
||||
|
||||
/obj/item/clothing/gloves/plate
|
||||
name = "Plate Gauntlets"
|
||||
icon_state = "crusader"
|
||||
desc = "They're like gloves, but made of metal."
|
||||
siemens_coefficient = 0
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
|
||||
/obj/item/clothing/gloves/plate/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/gloves/plate/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/clothing/shoes/plate
|
||||
name = "Plate Boots"
|
||||
desc = "Metal boots, they look heavy."
|
||||
icon_state = "crusader"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) //does this even do anything on boots?
|
||||
clothing_flags = NOSLIP
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT
|
||||
|
||||
/obj/item/clothing/shoes/plate/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/shoes/plate/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/storage/box/itemset/crusader
|
||||
name = "Crusader's Armour Set" //i can't into ck2 references
|
||||
desc = "This armour is said to be based on the armor of kings on another world thousands of years ago, who tended to assassinate, conspire, and plot against everyone who tried to do the same to them. Some things never change."
|
||||
|
||||
/obj/item/storage/box/itemset/crusader/blue/New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/suit/armor/plate/crusader/blue(src)
|
||||
new /obj/item/clothing/head/helmet/plate/crusader/blue(src)
|
||||
new /obj/item/clothing/gloves/plate/blue(src)
|
||||
new /obj/item/clothing/shoes/plate/blue(src)
|
||||
|
||||
/obj/item/storage/box/itemset/crusader/red/New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/suit/armor/plate/crusader/red(src)
|
||||
new /obj/item/clothing/head/helmet/plate/crusader/red(src)
|
||||
new /obj/item/clothing/gloves/plate/red(src)
|
||||
new /obj/item/clothing/shoes/plate/red(src)
|
||||
|
||||
/obj/item/claymore/weak
|
||||
desc = "This one is rusted."
|
||||
force = 30
|
||||
armour_penetration = 15
|
||||
@@ -0,0 +1,818 @@
|
||||
/**********************************************************************
|
||||
Cyborg Spec Items
|
||||
***********************************************************************/
|
||||
/obj/item/borg
|
||||
icon = 'icons/mob/robot_items.dmi'
|
||||
|
||||
|
||||
/obj/item/borg/stun
|
||||
name = "electrically-charged arm"
|
||||
icon_state = "elecarm"
|
||||
var/charge_cost = 30
|
||||
|
||||
/obj/item/borg/stun/attack(mob/living/M, mob/living/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.check_shields(src, 0, "[M]'s [name]", MELEE_ATTACK))
|
||||
playsound(M, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return FALSE
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell.use(charge_cost))
|
||||
return
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.Knockdown(100)
|
||||
M.apply_effect(EFFECT_STUTTER, 5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
|
||||
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
|
||||
log_combat(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
/obj/item/borg/cyborghug
|
||||
name = "hugging module"
|
||||
icon_state = "hugmodule"
|
||||
desc = "For when a someone really needs a hug."
|
||||
var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
|
||||
var/ccooldown = 0
|
||||
var/scooldown = 0
|
||||
var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default.
|
||||
var/boop = FALSE
|
||||
|
||||
/obj/item/borg/cyborghug/attack_self(mob/living/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/P = user
|
||||
if(P.emagged&&shockallowed == 1)
|
||||
if(mode < 3)
|
||||
mode++
|
||||
else
|
||||
mode = 0
|
||||
else if(mode < 1)
|
||||
mode++
|
||||
else
|
||||
mode = 0
|
||||
switch(mode)
|
||||
if(0)
|
||||
to_chat(user, "Power reset. Hugs!")
|
||||
if(1)
|
||||
to_chat(user, "Power increased!")
|
||||
if(2)
|
||||
to_chat(user, "BZZT. Electrifying arms...")
|
||||
if(3)
|
||||
to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.")
|
||||
|
||||
/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user)
|
||||
if(M == user)
|
||||
return
|
||||
switch(mode)
|
||||
if(0)
|
||||
if(M.health >= 0)
|
||||
if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
|
||||
"<span class='notice'>You playfully boop [M] on the head!</span>")
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
|
||||
else if(ishuman(M))
|
||||
if(M.lying)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
|
||||
if(M.resting && !M.recoveringstam)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
||||
"<span class='notice'>You pet [M]!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(1)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
if(M.lying)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
|
||||
else if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
||||
if(M.resting && !M.recoveringstam)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
|
||||
if(2)
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M)||ismonkey(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
M.update_canmove()
|
||||
else
|
||||
if(!iscyborg(M))
|
||||
M.adjustFireLoss(10)
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
|
||||
"<span class='danger'>You shock [M]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]. It does not seem to have an effect</span>", \
|
||||
"<span class='danger'>You shock [M] to no effect.</span>")
|
||||
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1)
|
||||
user.cell.charge -= 500
|
||||
scooldown = world.time + 20
|
||||
if(3)
|
||||
if(ccooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M] in [user.p_their()] grip!</span>", \
|
||||
"<span class='danger'>You crush [M] in your grip!</span>")
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M]!</span>", \
|
||||
"<span class='danger'>You crush [M]!</span>")
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1)
|
||||
M.adjustBruteLoss(15)
|
||||
user.cell.charge -= 300
|
||||
ccooldown = world.time + 10
|
||||
|
||||
/obj/item/borg/cyborghug/peacekeeper
|
||||
shockallowed = TRUE
|
||||
|
||||
/obj/item/borg/cyborghug/medical
|
||||
boop = TRUE
|
||||
|
||||
/obj/item/borg/charger
|
||||
name = "power connector"
|
||||
icon_state = "charger_draw"
|
||||
item_flags = NOBLUDGEON
|
||||
var/mode = "draw"
|
||||
var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port))
|
||||
var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy))
|
||||
|
||||
/obj/item/borg/charger/Initialize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/charger/update_icon()
|
||||
..()
|
||||
icon_state = "charger_[mode]"
|
||||
|
||||
/obj/item/borg/charger/attack_self(mob/user)
|
||||
if(mode == "draw")
|
||||
mode = "charge"
|
||||
else
|
||||
mode = "draw"
|
||||
to_chat(user, "<span class='notice'>You toggle [src] to \"[mode]\" mode.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
|
||||
. = ..()
|
||||
if(!proximity_flag || !iscyborg(user))
|
||||
return
|
||||
if(mode == "draw")
|
||||
if(is_type_in_list(target, charge_machines))
|
||||
var/obj/machinery/M = target
|
||||
if((M.stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
to_chat(user, "<span class='warning'>[M] is unpowered!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [M]'s power line...</span>")
|
||||
while(do_after(user, 15, target = M, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
return
|
||||
|
||||
if((M.stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
break
|
||||
|
||||
if(!user.cell.give(150))
|
||||
break
|
||||
|
||||
M.use_power(200)
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging yourself.</span>")
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
return
|
||||
|
||||
if(!cell.charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power!</span>")
|
||||
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
return
|
||||
|
||||
if(!cell || !target)
|
||||
return
|
||||
|
||||
if(cell != target && cell.loc != target)
|
||||
return
|
||||
|
||||
var/draw = min(cell.charge, cell.chargerate*0.5, user.cell.maxcharge-user.cell.charge)
|
||||
if(!cell.use(draw))
|
||||
break
|
||||
if(!user.cell.give(draw))
|
||||
break
|
||||
target.update_icon()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging yourself.</span>")
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
return
|
||||
|
||||
if(cell.charge >= cell.maxcharge)
|
||||
to_chat(user, "<span class='warning'>[target] is already charged!</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "charge")
|
||||
return
|
||||
|
||||
if(!cell || !target)
|
||||
return
|
||||
|
||||
if(cell != target && cell.loc != target)
|
||||
return
|
||||
|
||||
var/draw = min(user.cell.charge, cell.chargerate*0.5, cell.maxcharge-cell.charge)
|
||||
if(!user.cell.use(draw))
|
||||
break
|
||||
if(!cell.give(draw))
|
||||
break
|
||||
target.update_icon()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging [target].</span>")
|
||||
|
||||
/obj/item/harmalarm
|
||||
name = "\improper Sonic Harm Prevention Tool"
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/harmalarm/emag_act(mob/user)
|
||||
. = ..()
|
||||
obj_flags ^= EMAGGED
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<font color='red'>You short out the safeties on [src]!</font>")
|
||||
else
|
||||
to_chat(user, "<font color='red'>You reset the safeties on [src]!</font>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/harmalarm/attack_self(mob/user)
|
||||
var/safety = !(obj_flags & EMAGGED)
|
||||
if(cooldown > world.time)
|
||||
to_chat(user, "<font color='red'>The device is still recharging!</font>")
|
||||
return
|
||||
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 1200)
|
||||
to_chat(user, "<font color='red'>You don't have enough charge to do this!</font>")
|
||||
return
|
||||
R.cell.charge -= 1000
|
||||
if(R.emagged)
|
||||
safety = FALSE
|
||||
|
||||
if(safety == TRUE)
|
||||
user.visible_message("<font color='red' size='2'>[user] blares out a near-deafening siren from its speakers!</font>", \
|
||||
"<span class='userdanger'>The siren pierces your hearing and confuses you!</span>", \
|
||||
"<span class='danger'>The siren pierces your hearing!</span>")
|
||||
for(var/mob/living/carbon/M in get_hearers_in_view(9, user))
|
||||
if(M.get_ear_protection() == FALSE)
|
||||
M.confused += 6
|
||||
audible_message("<font color='red' size='7'>HUMAN HARM</font>")
|
||||
playsound(get_turf(src), 'sound/effects/harmalarm.ogg', 70, 3)
|
||||
cooldown = world.time + 200
|
||||
log_game("[key_name(user)] used a Cyborg Harm Alarm in [AREACOORD(user)]")
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
to_chat(R.connected_ai, "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>")
|
||||
|
||||
return
|
||||
|
||||
if(safety == FALSE)
|
||||
user.audible_message("<font color='red' size='7'>BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT</font>")
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(9, user))
|
||||
var/bang_effect = C.soundbang_act(2, 0, 0, 5)
|
||||
switch(bang_effect)
|
||||
if(1)
|
||||
C.confused += 5
|
||||
C.stuttering += 10
|
||||
C.Jitter(10)
|
||||
if(2)
|
||||
C.Knockdown(40)
|
||||
C.confused += 10
|
||||
C.stuttering += 15
|
||||
C.Jitter(25)
|
||||
playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3)
|
||||
cooldown = world.time + 600
|
||||
log_game("[key_name(user)] used an emagged Cyborg Harm Alarm in [AREACOORD(user)]")
|
||||
|
||||
#define DISPENSE_LOLLIPOP_MODE 1
|
||||
#define THROW_LOLLIPOP_MODE 2
|
||||
#define THROW_GUMBALL_MODE 3
|
||||
#define DISPENSE_ICECREAM_MODE 4
|
||||
|
||||
/obj/item/borg/lollipop
|
||||
name = "treat fabricator"
|
||||
desc = "Reward humans with various treats. Toggle in-module to switch between dispensing and high velocity ejection modes."
|
||||
icon_state = "lollipop"
|
||||
var/candy = 30
|
||||
var/candymax = 30
|
||||
var/charge_delay = 10
|
||||
var/charging = FALSE
|
||||
var/mode = DISPENSE_LOLLIPOP_MODE
|
||||
|
||||
var/firedelay = 0
|
||||
var/hitspeed = 2
|
||||
var/hitdamage = 0
|
||||
var/emaggedhitdamage = 3
|
||||
|
||||
/obj/item/borg/lollipop/clown
|
||||
emaggedhitdamage = 0
|
||||
|
||||
/obj/item/borg/lollipop/equipped()
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/dropped()
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/proc/check_amount() //Doesn't even use processing ticks.
|
||||
if(charging)
|
||||
return
|
||||
if(candy < candymax)
|
||||
addtimer(CALLBACK(src, .proc/charge_lollipops), charge_delay)
|
||||
charging = TRUE
|
||||
|
||||
/obj/item/borg/lollipop/proc/charge_lollipops()
|
||||
candy++
|
||||
charging = FALSE
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>No treats left in storage!</span>")
|
||||
return FALSE
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T || !istype(T) || !isopenturf(T))
|
||||
return FALSE
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
if(O.density)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/L
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE)
|
||||
L = new /obj/item/reagent_containers/food/snacks/lollipop(T)
|
||||
if(DISPENSE_ICECREAM_MODE)
|
||||
L = new /obj/item/reagent_containers/food/snacks/icecream(T)
|
||||
var/obj/item/reagent_containers/food/snacks/icecream/I = L
|
||||
I.add_ice_cream("vanilla")
|
||||
I.desc = "Eat the ice cream."
|
||||
|
||||
var/into_hands = FALSE
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
into_hands = M.put_in_hands(L)
|
||||
|
||||
candy--
|
||||
check_amount()
|
||||
|
||||
if(into_hands)
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat into the hands of [A].</span>", "<span class='notice'>You dispense a treat into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat.</span>", "<span class='notice'>You dispense a treat.</span>", "<span class='italics'>You hear a click.</span>")
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootL(atom/target, mob/living/user, params)
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>Not enough lollipops left!</span>")
|
||||
return FALSE
|
||||
candy--
|
||||
var/obj/item/ammo_casing/caseless/lollipop/A = new /obj/item/ammo_casing/caseless/lollipop(src)
|
||||
A.BB.damage = hitdamage
|
||||
if(hitdamage)
|
||||
A.BB.nodamage = FALSE
|
||||
A.BB.speed = 0.5
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
A.fire_casing(target, user, params, 0, 0, null, 0, src)
|
||||
user.visible_message("<span class='warning'>[user] blasts a flying lollipop at [target]!</span>")
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootG(atom/target, mob/living/user, params) //Most certainly a good idea.
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>Not enough gumballs left!</span>")
|
||||
return FALSE
|
||||
candy--
|
||||
var/obj/item/ammo_casing/caseless/gumball/A = new /obj/item/ammo_casing/caseless/gumball(src)
|
||||
A.BB.damage = hitdamage
|
||||
if(hitdamage)
|
||||
A.BB.nodamage = FALSE
|
||||
A.BB.speed = 0.5
|
||||
A.BB.color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
|
||||
playsound(src.loc, 'sound/weapons/bulletflyby3.ogg', 50, 1)
|
||||
A.fire_casing(target, user, params, 0, 0, null, 0, src)
|
||||
user.visible_message("<span class='warning'>[user] shoots a high-velocity gumball at [target]!</span>")
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/afterattack(atom/target, mob/living/user, proximity, click_params)
|
||||
. = ..()
|
||||
check_amount()
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell.use(12))
|
||||
to_chat(user, "<span class='warning'>Not enough power.</span>")
|
||||
return FALSE
|
||||
if(R.emagged)
|
||||
hitdamage = emaggedhitdamage
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE, DISPENSE_ICECREAM_MODE)
|
||||
if(!proximity)
|
||||
return FALSE
|
||||
dispense(target, user)
|
||||
if(THROW_LOLLIPOP_MODE)
|
||||
shootL(target, user, click_params)
|
||||
if(THROW_GUMBALL_MODE)
|
||||
shootG(target, user, click_params)
|
||||
hitdamage = initial(hitdamage)
|
||||
|
||||
/obj/item/borg/lollipop/attack_self(mob/living/user)
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE)
|
||||
mode = THROW_LOLLIPOP_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
|
||||
if(THROW_LOLLIPOP_MODE)
|
||||
mode = THROW_GUMBALL_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
||||
if(THROW_GUMBALL_MODE)
|
||||
mode = DISPENSE_ICECREAM_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing ice cream.</span>")
|
||||
if(DISPENSE_ICECREAM_MODE)
|
||||
mode = DISPENSE_LOLLIPOP_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
||||
..()
|
||||
|
||||
#undef DISPENSE_LOLLIPOP_MODE
|
||||
#undef THROW_LOLLIPOP_MODE
|
||||
#undef THROW_GUMBALL_MODE
|
||||
#undef DISPENSE_ICECREAM_MODE
|
||||
|
||||
/obj/item/ammo_casing/caseless/gumball
|
||||
name = "Gumball"
|
||||
desc = "Why are you seeing this?!"
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/gumball
|
||||
click_cooldown_override = 2
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/reusable/gumball
|
||||
name = "gumball"
|
||||
desc = "Oh noes! A fast-moving gumball!"
|
||||
icon_state = "gumball"
|
||||
ammo_type = /obj/item/reagent_containers/food/snacks/gumball/cyborg
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/reusable/gumball/handle_drop()
|
||||
if(!dropped)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/reagent_containers/food/snacks/gumball/S = new ammo_type(T)
|
||||
S.color = color
|
||||
dropped = TRUE
|
||||
|
||||
/obj/item/ammo_casing/caseless/lollipop //NEEDS RANDOMIZED COLOR LOGIC.
|
||||
name = "Lollipop"
|
||||
desc = "Why are you seeing this?!"
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/lollipop
|
||||
click_cooldown_override = 2
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop
|
||||
name = "lollipop"
|
||||
desc = "Oh noes! A fast-moving lollipop!"
|
||||
icon_state = "lollipop_1"
|
||||
ammo_type = /obj/item/reagent_containers/food/snacks/lollipop/cyborg
|
||||
var/color2 = rgb(0, 0, 0)
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop/New()
|
||||
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(src)
|
||||
color2 = S.headcolor
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/projectiles.dmi', "lollipop_2")
|
||||
head.color = color2
|
||||
add_overlay(head)
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop/handle_drop()
|
||||
if(!dropped)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(T)
|
||||
S.change_head_color(color2)
|
||||
dropped = TRUE
|
||||
|
||||
#define PKBORG_DAMPEN_CYCLE_DELAY 20
|
||||
|
||||
//Peacekeeper Cyborg Projectile Dampenening Field
|
||||
/obj/item/borg/projectile_dampen
|
||||
name = "\improper Hyperkinetic Dampening projector"
|
||||
desc = "A device that projects a dampening field that weakens kinetic energy above a certain threshold. <span class='boldnotice'>Projects a field that drains power per second while active, that will weaken and slow damaging projectiles inside its field.</span> Still being a prototype, it tends to induce a charge on ungrounded metallic surfaces."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "shield"
|
||||
var/maxenergy = 1500
|
||||
var/energy = 1500
|
||||
var/energy_recharge = 7.5
|
||||
var/energy_recharge_cyborg_drain_coefficient = 0.4
|
||||
var/cyborg_cell_critical_percentage = 0.05
|
||||
var/mob/living/silicon/robot/host = null
|
||||
var/datum/proximity_monitor/advanced/dampening_field
|
||||
var/projectile_damage_coefficient = 0.5
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
var/active = FALSE
|
||||
var/cycle_delay = 0
|
||||
|
||||
/obj/item/borg/projectile_dampen/debug
|
||||
maxenergy = 50000
|
||||
energy = 50000
|
||||
energy_recharge = 5000
|
||||
|
||||
/obj/item/borg/projectile_dampen/Initialize()
|
||||
. = ..()
|
||||
projectile_effect = image('icons/effects/fields.dmi', "projectile_dampen_effect")
|
||||
tracked = list()
|
||||
icon_state = "shield0"
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/attack_self(mob/user)
|
||||
if(cycle_delay > world.time)
|
||||
to_chat(user, "<span class='boldwarning'>[src] is still recycling its projectors!</span>")
|
||||
return
|
||||
cycle_delay = world.time + PKBORG_DAMPEN_CYCLE_DELAY
|
||||
if(!active)
|
||||
if(!user.has_buckled_mobs())
|
||||
activate_field()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!</span>")
|
||||
else
|
||||
deactivate_field()
|
||||
update_icon()
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/update_icon()
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/activate_field()
|
||||
if(istype(dampening_field))
|
||||
QDEL_NULL(dampening_field)
|
||||
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
|
||||
var/mob/living/silicon/robot/owner = get_host()
|
||||
if(owner)
|
||||
owner.module.allow_riding = FALSE
|
||||
active = TRUE
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
visible_message("<span class='warning'>\The [src] shuts off!</span>")
|
||||
for(var/P in tracked)
|
||||
restore_projectile(P)
|
||||
active = FALSE
|
||||
|
||||
var/mob/living/silicon/robot/owner = get_host()
|
||||
if(owner)
|
||||
owner.module.allow_riding = TRUE
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/get_host()
|
||||
if(istype(host))
|
||||
return host
|
||||
else
|
||||
if(iscyborg(host.loc))
|
||||
return host.loc
|
||||
return null
|
||||
|
||||
/obj/item/borg/projectile_dampen/dropped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/equipped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/on_mob_death()
|
||||
deactivate_field()
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/process()
|
||||
process_recharge()
|
||||
process_usage()
|
||||
update_location()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/update_location()
|
||||
if(dampening_field)
|
||||
dampening_field.HandleMove()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
var/obj/item/projectile/P = I
|
||||
if(!P.stun && P.nodamage) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
|
||||
energy = CLAMP(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
visible_message("<span class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge()
|
||||
if(!istype(host))
|
||||
if(iscyborg(host.loc))
|
||||
host = host.loc
|
||||
else
|
||||
energy = CLAMP(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/dampen_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
if(tracked[P])
|
||||
return
|
||||
if(track_projectile)
|
||||
tracked[P] = P.damage
|
||||
P.damage *= projectile_damage_coefficient
|
||||
P.speed *= projectile_speed_coefficient
|
||||
P.add_overlay(projectile_effect)
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/restore_projectile(obj/item/projectile/P)
|
||||
tracked -= P
|
||||
P.damage *= (1/projectile_damage_coefficient)
|
||||
P.speed *= (1/projectile_speed_coefficient)
|
||||
P.cut_overlay(projectile_effect)
|
||||
|
||||
/**********************************************************************
|
||||
HUD/SIGHT things
|
||||
***********************************************************************/
|
||||
/obj/item/borg/sight
|
||||
var/sight_mode = null
|
||||
|
||||
|
||||
/obj/item/borg/sight/xray
|
||||
name = "\proper X-ray vision"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "securearea"
|
||||
sight_mode = BORGXRAY
|
||||
|
||||
/obj/item/borg/sight/xray/truesight_lens
|
||||
name = "truesight lens"
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
icon_state = "truesight_lens"
|
||||
|
||||
/obj/item/borg/sight/thermal
|
||||
name = "\proper thermal vision"
|
||||
sight_mode = BORGTHERM
|
||||
icon_state = "thermal"
|
||||
|
||||
|
||||
/obj/item/borg/sight/meson
|
||||
name = "\proper meson vision"
|
||||
sight_mode = BORGMESON
|
||||
icon_state = "meson"
|
||||
|
||||
/obj/item/borg/sight/material
|
||||
name = "\proper material vision"
|
||||
sight_mode = BORGMATERIAL
|
||||
icon_state = "material"
|
||||
|
||||
/obj/item/borg/sight/hud
|
||||
name = "hud"
|
||||
var/obj/item/clothing/glasses/hud/hud = null
|
||||
|
||||
|
||||
/obj/item/borg/sight/hud/med
|
||||
name = "medical hud"
|
||||
icon_state = "healthhud"
|
||||
|
||||
/obj/item/borg/sight/hud/med/New()
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/health(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/borg/sight/hud/sec
|
||||
name = "security hud"
|
||||
icon_state = "securityhud"
|
||||
|
||||
/obj/item/borg/sight/hud/sec/New()
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/security(src)
|
||||
return
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Grippers oh god oh fuck
|
||||
***********************************************************************/
|
||||
|
||||
/obj/item/weapon/gripper
|
||||
name = "circuit gripper"
|
||||
desc = "A simple grasping tool for inserting circuitboards into machinary."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
item_flags = NOBLUDGEON
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
/obj/item/circuitboard
|
||||
)
|
||||
|
||||
var/obj/item/wrapped = null // Item currently being held.
|
||||
|
||||
/obj/item/weapon/gripper/attack_self()
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
wrapped = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
||||
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(!wrapped)
|
||||
for(var/obj/item/thing in src.contents)
|
||||
wrapped = thing
|
||||
break
|
||||
|
||||
if(wrapped) //Already have an item.
|
||||
//Temporary put wrapped into user so target's attackby() checks pass.
|
||||
wrapped.loc = user
|
||||
|
||||
//Pass the attack on to the target. This might delete/relocate wrapped.
|
||||
var/resolved = target.attackby(wrapped,user)
|
||||
if(!resolved && wrapped && target)
|
||||
wrapped.afterattack(target,user,1)
|
||||
//If wrapped was neither deleted nor put into target, put it back into the gripper.
|
||||
if(wrapped && user && (wrapped.loc == user))
|
||||
wrapped.loc = src
|
||||
else
|
||||
wrapped = null
|
||||
return
|
||||
|
||||
else if(istype(target,/obj/item))
|
||||
|
||||
var/obj/item/I = target
|
||||
|
||||
var/grab = 0
|
||||
for(var/typepath in can_hold)
|
||||
if(istype(I,typepath))
|
||||
grab = 1
|
||||
break
|
||||
|
||||
//We can grab the item, finally.
|
||||
if(grab)
|
||||
to_chat(user, "You collect \the [I].")
|
||||
I.loc = src
|
||||
wrapped = I
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Your gripper cannot hold \the [target].</span>")
|
||||
@@ -0,0 +1,713 @@
|
||||
// robot_upgrades.dm
|
||||
// Contains various borg upgrades.
|
||||
|
||||
/obj/item/borg/upgrade
|
||||
name = "borg upgrade module."
|
||||
desc = "Protected by FRM."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade"
|
||||
var/locked = FALSE
|
||||
var/installed = 0
|
||||
var/require_module = 0
|
||||
var/list/module_type
|
||||
// if true, is not stored in the robot to be ejected
|
||||
// if module is reset
|
||||
var/one_use = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
|
||||
return FALSE
|
||||
if(module_type && !is_type_in_list(R.module, module_type))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(user, "There's no mounting point for the module!")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/proc/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
if (!(src in R.upgrades))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
name = "cyborg reclassification board"
|
||||
desc = "Used to rename a cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
var/heldname = ""
|
||||
one_use = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/oldname = R.real_name
|
||||
R.custom_name = heldname
|
||||
R.updatename()
|
||||
if(oldname == R.real_name)
|
||||
R.notify_ai(RENAME, oldname, R.real_name)
|
||||
|
||||
/obj/item/borg/upgrade/restart
|
||||
name = "cyborg emergency reboot module"
|
||||
desc = "Used to force a reboot of a disabled-but-repaired cyborg, bringing it back online."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
one_use = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R, user = usr)
|
||||
if(R.health < 0)
|
||||
to_chat(user, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
|
||||
return FALSE
|
||||
|
||||
if(R.mind)
|
||||
R.mind.grab_ghost()
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
|
||||
R.revive()
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "cyborg VTEC module"
|
||||
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
|
||||
icon_state = "cyborg_upgrade2"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.speed < 0)
|
||||
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
|
||||
to_chat(user, "<span class='notice'>There's no room for another VTEC unit!</span>")
|
||||
return FALSE
|
||||
|
||||
//R.speed = -2 // Gotta go fast.
|
||||
//Citadel change - makes vtecs give an ability rather than reducing the borg's speed instantly
|
||||
R.AddAbility(new/obj/effect/proc_holder/silicon/cyborg/vtecControl)
|
||||
|
||||
/obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
R.speed = initial(R.speed)
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler
|
||||
name = "cyborg rapid energy blaster cooling module"
|
||||
desc = "Used to cool a mounted energy-based firearm, increasing the potential current in it and thus its recharge rate."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/successflag
|
||||
for(var/obj/item/gun/energy/T in R.module.modules)
|
||||
if(T.charge_delay <= 2)
|
||||
successflag = successflag || 2
|
||||
continue
|
||||
T.charge_delay = max(2, T.charge_delay - 4)
|
||||
successflag = 1
|
||||
if(!successflag)
|
||||
to_chat(user, "<span class='notice'>There's no energy-based firearm in this unit!</span>")
|
||||
return FALSE
|
||||
if(successflag == 2)
|
||||
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
|
||||
to_chat(user, "<span class='notice'>There's no room for another cooling unit!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/gun/energy/T in R.module.modules)
|
||||
T.charge_delay = initial(T.charge_delay)
|
||||
return .
|
||||
return FALSE
|
||||
|
||||
/obj/item/borg/upgrade/thrusters
|
||||
name = "ion thruster upgrade"
|
||||
desc = "An energy-operated thruster system for cyborgs."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
|
||||
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.ionpulse)
|
||||
to_chat(user, "<span class='notice'>This unit already has ion thrusters installed!</span>")
|
||||
return FALSE
|
||||
|
||||
R.ionpulse = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/thrusters/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
R.ionpulse = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/ddrill
|
||||
name = "mining cyborg diamond drill"
|
||||
desc = "A diamond drill replacement for the mining module's standard drill."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/pickaxe/drill/cyborg/D in R.module)
|
||||
R.module.remove_module(D, TRUE)
|
||||
for(var/obj/item/shovel/S in R.module)
|
||||
R.module.remove_module(S, TRUE)
|
||||
|
||||
var/obj/item/pickaxe/drill/cyborg/diamond/DD = new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
|
||||
R.module.basic_modules += DD
|
||||
R.module.add_module(DD, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/pickaxe/drill/cyborg/diamond/DD in R.module)
|
||||
R.module.remove_module(DD, TRUE)
|
||||
|
||||
var/obj/item/pickaxe/drill/cyborg/D = new (R.module)
|
||||
R.module.basic_modules += D
|
||||
R.module.add_module(D, FALSE, TRUE)
|
||||
var/obj/item/shovel/S = new (R.module)
|
||||
R.module.basic_modules += S
|
||||
R.module.add_module(S, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/soh
|
||||
name = "mining cyborg satchel of holding"
|
||||
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
|
||||
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
|
||||
R.module.remove_module(S, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
|
||||
R.module.basic_modules += H
|
||||
R.module.add_module(H, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/soh/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/storage/bag/ore/holding/H in R.module)
|
||||
R.module.remove_module(H, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/ore/cyborg/S = new (R.module)
|
||||
R.module.basic_modules += S
|
||||
R.module.add_module(S, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/tboh
|
||||
name = "janitor cyborg trash bag of holding"
|
||||
desc = "A trash bag of holding replacement for the janiborg's standard trash bag."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/butler)
|
||||
|
||||
/obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/storage/bag/trash/cyborg/TB in R.module.modules)
|
||||
R.module.remove_module(TB, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/trash/bluespace/cyborg/B = new /obj/item/storage/bag/trash/bluespace/cyborg(R.module)
|
||||
R.module.basic_modules += B
|
||||
R.module.add_module(B, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/tboh/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/storage/bag/trash/bluespace/cyborg/B in R.module.modules)
|
||||
R.module.remove_module(B, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/trash/cyborg/TB = new (R.module)
|
||||
R.module.basic_modules += TB
|
||||
R.module.add_module(TB, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/amop
|
||||
name = "janitor cyborg advanced mop"
|
||||
desc = "An advanced mop replacement for the janiborg's standard mop."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/butler)
|
||||
|
||||
/obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/mop/cyborg/M in R.module.modules)
|
||||
R.module.remove_module(M, TRUE)
|
||||
|
||||
var/obj/item/mop/advanced/cyborg/A = new /obj/item/mop/advanced/cyborg(R.module)
|
||||
R.module.basic_modules += A
|
||||
R.module.add_module(A, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/amop/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/mop/advanced/cyborg/A in R.module.modules)
|
||||
R.module.remove_module(A, TRUE)
|
||||
|
||||
var/obj/item/mop/cyborg/M = new (R.module)
|
||||
R.module.basic_modules += M
|
||||
R.module.add_module(M, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.emagged)
|
||||
return FALSE
|
||||
|
||||
R.SetEmagged(1)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
R.SetEmagged(FALSE)
|
||||
|
||||
/obj/item/borg/upgrade/lavaproof
|
||||
name = "mining cyborg lavaproof tracks"
|
||||
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to mining cyborg tracks, enabling them to withstand exposure to molten rock."
|
||||
icon_state = "ash_plating"
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
|
||||
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
R.weather_immunities += "lava"
|
||||
|
||||
/obj/item/borg/upgrade/lavaproof/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
R.weather_immunities -= "lava"
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
name = "self-repair module"
|
||||
desc = "This module will repair the cyborg over time."
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
var/msg_cooldown = 0
|
||||
var/on = FALSE
|
||||
var/powercost = 10
|
||||
var/mob/living/silicon/robot/cyborg
|
||||
var/datum/action/toggle_action
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
|
||||
return FALSE
|
||||
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
toggle_action = new /datum/action/item_action/toggle(src)
|
||||
toggle_action.Grant(R)
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
toggle_action.Remove(cyborg)
|
||||
QDEL_NULL(toggle_action)
|
||||
cyborg = null
|
||||
deactivate_sr()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/dropped()
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/check_dropped), 1)
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/check_dropped()
|
||||
if(loc != cyborg)
|
||||
toggle_action.Remove(cyborg)
|
||||
QDEL_NULL(toggle_action)
|
||||
cyborg = null
|
||||
deactivate_sr()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
on = !on
|
||||
if(on)
|
||||
to_chat(cyborg, "<span class='notice'>You activate the self-repair module.</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate_sr()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
return
|
||||
|
||||
if(cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(!cyborg.cell)
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please, insert the power cell.</span>")
|
||||
deactivate_sr()
|
||||
return
|
||||
|
||||
if(cyborg.cell.charge < powercost * 2)
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
|
||||
deactivate_sr()
|
||||
return
|
||||
|
||||
if(cyborg.health < cyborg.maxHealth)
|
||||
if(cyborg.health < 0)
|
||||
repair_amount = -2.5
|
||||
powercost = 30
|
||||
else
|
||||
repair_amount = -1
|
||||
powercost = 10
|
||||
cyborg.adjustBruteLoss(repair_amount)
|
||||
cyborg.adjustFireLoss(repair_amount)
|
||||
cyborg.updatehealth()
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if((world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
to_chat(cyborg, "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>")
|
||||
msg_cooldown = world.time
|
||||
else
|
||||
deactivate_sr()
|
||||
|
||||
/obj/item/borg/upgrade/hypospray
|
||||
name = "medical cyborg hypospray advanced synthesiser"
|
||||
desc = "An upgrade to the Medical module cyborg's hypospray, allowing it \
|
||||
to produce more advanced and complex medical reagents."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical,
|
||||
/obj/item/robot_module/medihound)
|
||||
var/list/additional_reagents = list()
|
||||
|
||||
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
if(H.accepts_reagent_upgrades)
|
||||
for(var/re in additional_reagents)
|
||||
H.add_reagent(re)
|
||||
|
||||
/obj/item/borg/upgrade/hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
if(H.accepts_reagent_upgrades)
|
||||
for(var/re in additional_reagents)
|
||||
H.del_reagent(re)
|
||||
|
||||
/obj/item/borg/upgrade/hypospray/expanded
|
||||
name = "medical cyborg expanded hypospray"
|
||||
desc = "An upgrade to the Medical module's hypospray, allowing it \
|
||||
to treat a wider range of conditions and problems."
|
||||
additional_reagents = list("mannitol", "oculine", "inacusiate",
|
||||
"mutadone", "haloperidol")
|
||||
|
||||
/obj/item/borg/upgrade/hypospray/high_strength
|
||||
name = "medical cyborg high-strength hypospray"
|
||||
desc = "An upgrade to the Medical module's hypospray, containing \
|
||||
stronger versions of existing chemicals."
|
||||
additional_reagents = list("oxandrolone", "sal_acid", "rezadone",
|
||||
"pen_acid")
|
||||
|
||||
/obj/item/borg/upgrade/piercing_hypospray
|
||||
name = "cyborg piercing hypospray"
|
||||
desc = "An upgrade to a cyborg's hypospray, allowing it to \
|
||||
pierce armor and thick material."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
|
||||
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/found_hypo = FALSE
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
H.bypass_protection = TRUE
|
||||
found_hypo = TRUE
|
||||
|
||||
if(!found_hypo)
|
||||
return FALSE
|
||||
|
||||
/obj/item/borg/upgrade/piercing_hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
|
||||
H.bypass_protection = initial(H.bypass_protection)
|
||||
|
||||
/obj/item/borg/upgrade/defib
|
||||
name = "medical cyborg defibrillator"
|
||||
desc = "An upgrade to the Medical module, installing a built-in \
|
||||
defibrillator, for on the scene revival."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical,
|
||||
/obj/item/robot_module/medihound)
|
||||
|
||||
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/twohanded/shockpaddles/cyborg/S = new(R.module)
|
||||
R.module.basic_modules += S
|
||||
R.module.add_module(S, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/defib/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
|
||||
R.module.remove_module(S, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor
|
||||
name = "medical cyborg surgical processor"
|
||||
desc = "An upgrade to the Medical module, installing a processor \
|
||||
capable of scanning surgery disks and carrying \
|
||||
out procedures"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical,
|
||||
/obj/item/robot_module/medihound)
|
||||
|
||||
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/surgical_processor/SP = new(R.module)
|
||||
R.module.basic_modules += SP
|
||||
R.module.add_module(SP, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/surgical_processor/SP = locate() in R.module
|
||||
R.module.remove_module(SP, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/advhealth
|
||||
name = "advanced cyborg health scanner"
|
||||
desc = "An upgrade to the Medical modules, installing a built-in \
|
||||
advanced health scanner, for better readings on patients."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(
|
||||
/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical,
|
||||
/obj/item/robot_module/medihound)
|
||||
|
||||
/obj/item/borg/upgrade/advhealth/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/healthanalyzer/advanced/AH = new(R.module)
|
||||
R.module.basic_modules += AH
|
||||
R.module.add_module(AH, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/healthanalyzer/advanced/AH = locate() in R.module
|
||||
R.module.remove_module(AH, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/ai
|
||||
name = "B.O.R.I.S. module"
|
||||
desc = "Bluespace Optimized Remote Intelligence Synchronization. An uplink device which takes the place of an MMI in cyborg endoskeletons, creating a robotic shell controlled by an AI."
|
||||
icon_state = "boris"
|
||||
|
||||
/obj/item/borg/upgrade/ai/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.shell)
|
||||
to_chat(user, "<span class='warning'>This unit is already an AI shell!</span>")
|
||||
return FALSE
|
||||
if(R.key) //You cannot replace a player unless the key is completely removed.
|
||||
to_chat(user, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
|
||||
return FALSE
|
||||
|
||||
R.make_shell(src)
|
||||
|
||||
/obj/item/borg/upgrade/ai/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
if(R.shell)
|
||||
R.undeploy()
|
||||
R.notify_ai(AI_SHELL)
|
||||
|
||||
/obj/item/borg/upgrade/expand
|
||||
name = "borg expander"
|
||||
desc = "A cyborg resizer, it makes a cyborg huge."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
|
||||
/obj/item/borg/upgrade/expand/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
if(R.hasExpanded)
|
||||
to_chat(usr, "<span class='notice'>This unit already has an expand module installed!</span>")
|
||||
return FALSE
|
||||
|
||||
R.notransform = TRUE
|
||||
var/prev_lockcharge = R.lockcharge
|
||||
R.SetLockdown(1)
|
||||
R.anchored = TRUE
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(1, R.loc)
|
||||
smoke.start()
|
||||
sleep(2)
|
||||
for(var/i in 1 to 4)
|
||||
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
||||
sleep(12)
|
||||
if(!prev_lockcharge)
|
||||
R.SetLockdown(0)
|
||||
R.anchored = FALSE
|
||||
R.notransform = FALSE
|
||||
R.resize = 2
|
||||
R.hasExpanded = TRUE
|
||||
R.update_transform()
|
||||
|
||||
/obj/item/borg/upgrade/expand/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
R.resize = 0.5
|
||||
R.hasExpanded = FALSE
|
||||
R.update_transform()
|
||||
|
||||
/obj/item/borg/upgrade/rped
|
||||
name = "engineering cyborg BSRPED"
|
||||
desc = "A rapid part exchange device for the engineering cyborg."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "borg_BS_RPED"
|
||||
require_module = TRUE
|
||||
module_type = list(/obj/item/robot_module/engineering, /obj/item/robot_module/saboteur)
|
||||
|
||||
/obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
var/obj/item/storage/part_replacer/bluespace/cyborg/BSRPED = locate() in R
|
||||
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R
|
||||
if(!RPED)
|
||||
RPED = locate() in R.module
|
||||
if(!BSRPED)
|
||||
BSRPED = locate() in R.module //There's gotta be a smarter way to do this.
|
||||
if(BSRPED)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a BSRPED module.</span>")
|
||||
return FALSE
|
||||
|
||||
BSRPED = new(R.module)
|
||||
SEND_SIGNAL(RPED, COMSIG_TRY_STORAGE_QUICK_EMPTY)
|
||||
qdel(RPED)
|
||||
R.module.basic_modules += BSRPED
|
||||
R.module.add_module(BSRPED, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R.module
|
||||
if (RPED)
|
||||
R.module.remove_module(RPED, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/pinpointer
|
||||
name = "medical cyborg crew pinpointer"
|
||||
desc = "A crew pinpointer module for the medical cyborg."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pinpointer_crew"
|
||||
require_module = TRUE
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical,
|
||||
/obj/item/robot_module/medihound)
|
||||
|
||||
/obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
var/obj/item/pinpointer/crew/PP = locate() in R
|
||||
if(PP)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a pinpointer module.</span>")
|
||||
return FALSE
|
||||
|
||||
PP = new(R.module)
|
||||
R.module.basic_modules += PP
|
||||
R.module.add_module(PP, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/pinpointer/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/pinpointer/crew/PP = locate() in R.module
|
||||
if (PP)
|
||||
R.module.remove_module(PP, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/transform
|
||||
name = "borg module picker (Standard)"
|
||||
desc = "Allows you to to turn a cyborg into a standard cyborg."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
var/obj/item/robot_module/new_module = /obj/item/robot_module/standard
|
||||
|
||||
/obj/item/borg/upgrade/transform/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
R.module.transform_to(new_module)
|
||||
|
||||
/obj/item/borg/upgrade/transform/clown
|
||||
name = "borg module picker (Clown)"
|
||||
desc = "Allows you to to turn a cyborg into a clown, honk."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
new_module = /obj/item/robot_module/clown
|
||||
|
||||
// Citadel's Vtech Controller
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl
|
||||
name = "vTec Control"
|
||||
desc = "Allows finer-grained control of the vTec speed boost."
|
||||
action_icon = 'icons/mob/actions.dmi'
|
||||
action_icon_state = "Chevron_State_0"
|
||||
|
||||
var/currentState = 0
|
||||
var/maxReduction = 1
|
||||
|
||||
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user)
|
||||
var/mob/living/silicon/robot/self = usr
|
||||
|
||||
currentState = (currentState + 1) % 3
|
||||
|
||||
if(istype(self))
|
||||
switch(currentState)
|
||||
if (0)
|
||||
self.speed = initial(self.speed)
|
||||
if (1)
|
||||
self.speed = initial(self.speed) - maxReduction * 0.5
|
||||
if (2)
|
||||
self.speed = initial(self.speed) - maxReduction * 1
|
||||
|
||||
action.button_icon_state = "Chevron_State_[currentState]"
|
||||
action.UpdateButtonIcon()
|
||||
|
||||
return
|
||||
@@ -0,0 +1,175 @@
|
||||
/obj/item/stack/medical
|
||||
name = "medical pack"
|
||||
singular_name = "medical pack"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
amount = 6
|
||||
max_amount = 6
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
full_w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 40
|
||||
novariants = FALSE
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
var/stop_bleeding = 0
|
||||
var/self_delay = 50
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
if(M.stat == DEAD && !stop_bleeding)
|
||||
var/t_him = "it"
|
||||
if(M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if(M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
||||
return
|
||||
|
||||
if(!iscarbon(M) && !isanimal(M))
|
||||
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
||||
return 1
|
||||
|
||||
var/obj/item/bodypart/affecting
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(H.bleedsuppress)
|
||||
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
||||
return
|
||||
else if(!H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(isliving(M))
|
||||
if(!M.can_inject(user, 1))
|
||||
return
|
||||
|
||||
if(user)
|
||||
if (M != user)
|
||||
if (isanimal(M))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
|
||||
return
|
||||
else if(src.heal_brute < 1)
|
||||
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if(user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if(user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
|
||||
if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")
|
||||
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if(affecting.heal_damage(heal_brute, heal_burn))
|
||||
C.update_damage_overlays()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
else
|
||||
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "bruise pack"
|
||||
singular_name = "bruise pack"
|
||||
desc = "A therapeutic gel pack and bandages designed to treat blunt-force trauma."
|
||||
icon_state = "brutepack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
heal_brute = 40
|
||||
self_delay = 20
|
||||
grind_results = list("styptic_powder" = 10)
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/stack/medical/gauze
|
||||
name = "medical gauze"
|
||||
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "medical gauze"
|
||||
icon_state = "gauze"
|
||||
stop_bleeding = 1800
|
||||
self_delay = 20
|
||||
max_amount = 12
|
||||
|
||||
|
||||
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters) || I.get_sharpness())
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two gauzes to do this!</span>")
|
||||
return
|
||||
new /obj/item/stack/sheet/cloth(user.drop_location())
|
||||
user.visible_message("[user] cuts [src] into pieces of cloth with [I].", \
|
||||
"<span class='notice'>You cut [src] into pieces of cloth with [I].</span>", \
|
||||
"<span class='italics'>You hear cutting.</span>")
|
||||
use(2)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/medical/gauze/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins tightening \the [src] around [user.p_their()] neck! It looks like [user.p_they()] forgot how to use medical supplies!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/stack/medical/gauze/improvised
|
||||
name = "improvised gauze"
|
||||
singular_name = "improvised gauze"
|
||||
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
|
||||
stop_bleeding = 900
|
||||
|
||||
/obj/item/stack/medical/gauze/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
desc = "Used to treat those nasty burn wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
heal_burn = 40
|
||||
self_delay = 20
|
||||
grind_results = list("silver_sulfadiazine" = 10)
|
||||
|
||||
/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/stack/medical/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
@@ -0,0 +1,248 @@
|
||||
/obj/item/stack/sheet/animalhide
|
||||
name = "hide"
|
||||
desc = "Something went wrong."
|
||||
icon_state = "sheet-hide"
|
||||
item_state = "sheet-hide"
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human
|
||||
name = "human skin"
|
||||
desc = "The by-product of human farming."
|
||||
singular_name = "human skin piece"
|
||||
novariants = FALSE
|
||||
|
||||
GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.human_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/generic
|
||||
name = "skin"
|
||||
desc = "A piece of skin."
|
||||
singular_name = "skin piece"
|
||||
novariants = FALSE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi
|
||||
name = "corgi hide"
|
||||
desc = "The by-product of corgi farming."
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
item_state = "sheet-corgi"
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(gondola_recipes, list ( \
|
||||
new/datum/stack_recipe("gondola mask", /obj/item/clothing/mask/gondola, 1), \
|
||||
new/datum/stack_recipe("gondola suit", /obj/item/clothing/under/gondola, 2), \
|
||||
new/datum/stack_recipe("gondola bedsheet", /obj/item/bedsheet/gondola, 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/gondola
|
||||
name = "gondola hide"
|
||||
desc = "The extremely valuable product of gondola hunting."
|
||||
singular_name = "gondola hide piece"
|
||||
icon_state = "sheet-gondola"
|
||||
item_state = "sheet-gondola"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/gondola/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.gondola_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(corgi_recipes, list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.corgi_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/cat
|
||||
name = "cat hide"
|
||||
desc = "The by-product of cat farming."
|
||||
singular_name = "cat hide piece"
|
||||
icon_state = "sheet-cat"
|
||||
item_state = "sheet-cat"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey
|
||||
name = "monkey hide"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "monkey hide piece"
|
||||
icon_state = "sheet-monkey"
|
||||
icon_state = "sheet-monkey"
|
||||
|
||||
GLOBAL_LIST_INIT(monkey_recipes, list ( \
|
||||
new/datum/stack_recipe("monkey mask", /obj/item/clothing/mask/gas/monkeymask, 1), \
|
||||
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.monkey_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
item_state = "sheet-lizard"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon_state = "sheet-xeno"
|
||||
item_state = "sheet-xeno"
|
||||
|
||||
GLOBAL_LIST_INIT(xeno_recipes, list ( \
|
||||
new/datum/stack_recipe("alien helmet", /obj/item/clothing/head/xenos, 1), \
|
||||
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.xeno_recipes
|
||||
return ..()
|
||||
|
||||
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
|
||||
/obj/item/stack/sheet/xenochitin
|
||||
name = "alien chitin"
|
||||
desc = "A piece of the hide of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/xenos_claw
|
||||
name = "alien claw"
|
||||
desc = "The claw of a terrible creature."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "claw"
|
||||
|
||||
/obj/item/weed_extract
|
||||
name = "weed extract"
|
||||
desc = "A piece of slimy, purplish weed."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "weed_extract"
|
||||
|
||||
/obj/item/stack/sheet/hairlesshide
|
||||
name = "hairless hide"
|
||||
desc = "This hide was stripped of its hair, but still needs washing and tanning."
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
item_state = "sheet-hairlesshide"
|
||||
|
||||
/obj/item/stack/sheet/wetleather
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
singular_name = "wet leather piece"
|
||||
icon_state = "sheet-wetleather"
|
||||
item_state = "sheet-wetleather"
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
|
||||
/*
|
||||
* Leather SHeet
|
||||
*/
|
||||
/obj/item/stack/sheet/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of mob grinding."
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
item_state = "sheet-leather"
|
||||
|
||||
GLOBAL_LIST_INIT(leather_recipes, list ( \
|
||||
new/datum/stack_recipe("wallet", /obj/item/storage/wallet, 1), \
|
||||
new/datum/stack_recipe("muzzle", /obj/item/clothing/mask/muzzle, 2), \
|
||||
new/datum/stack_recipe("botany gloves", /obj/item/clothing/gloves/botanic_leather, 3), \
|
||||
new/datum/stack_recipe("toolbelt", /obj/item/storage/belt/utility, 4), \
|
||||
new/datum/stack_recipe("leather satchel", /obj/item/storage/backpack/satchel/leather, 5), \
|
||||
new/datum/stack_recipe("bandolier", /obj/item/storage/belt/bandolier, 5), \
|
||||
new/datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7), \
|
||||
new/datum/stack_recipe("leather shoes", /obj/item/clothing/shoes/laceup, 2), \
|
||||
new/datum/stack_recipe("leather overcoat", /obj/item/clothing/suit/jacket/leather/overcoat, 10), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/leather/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.leather_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Sinew
|
||||
*/
|
||||
/obj/item/stack/sheet/sinew
|
||||
name = "watcher sinew"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Long stringy filaments which presumably came from a watcher's wings."
|
||||
singular_name = "watcher sinew"
|
||||
icon_state = "sinew"
|
||||
novariants = TRUE
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
new/datum/stack_recipe("sinew restraints", /obj/item/restraints/handcuffs/sinew, 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sinew_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Plates
|
||||
*/
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide
|
||||
name = "goliath hide plates"
|
||||
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "goliath_hide"
|
||||
singular_name = "hide plate"
|
||||
max_amount = 6
|
||||
novariants = FALSE
|
||||
item_flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
/obj/item/stack/sheet/animalhide/ashdrake
|
||||
name = "ash drake hide"
|
||||
desc = "The strong, scaled hide of an ash drake."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "dragon_hide"
|
||||
singular_name = "drake plate"
|
||||
max_amount = 10
|
||||
novariants = FALSE
|
||||
item_flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
//Step one - dehairing.
|
||||
|
||||
/obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params)
|
||||
if(W.get_sharpness())
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
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, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
||||
new /obj/item/stack/sheet/hairlesshide(user.drop_location(), 1)
|
||||
use(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature >= drying_threshold_temperature)
|
||||
wetness--
|
||||
if(wetness == 0)
|
||||
new /obj/item/stack/sheet/leather(drop_location(), 1)
|
||||
wetness = initial(wetness)
|
||||
use(1)
|
||||
|
||||
/obj/item/stack/sheet/wetleather/microwave_act(obj/machinery/microwave/MW)
|
||||
..()
|
||||
new /obj/item/stack/sheet/leather(drop_location(), amount)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,409 @@
|
||||
/*
|
||||
Mineral Sheets
|
||||
Contains:
|
||||
- Sandstone
|
||||
- Sandbags
|
||||
- Diamond
|
||||
- Snow
|
||||
- Uranium
|
||||
- Plasma
|
||||
- Gold
|
||||
- Silver
|
||||
- Clown
|
||||
- Titanium
|
||||
- Plastitanium
|
||||
Others:
|
||||
- Adamantine
|
||||
- Mythril
|
||||
- Enriched Uranium
|
||||
- Abductor
|
||||
*/
|
||||
|
||||
/obj/item/stack/sheet/mineral/Initialize(mapload)
|
||||
pixel_x = rand(-4, 4)
|
||||
pixel_y = rand(-4, 4)
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Sandstone
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(sandstone_recipes, list ( \
|
||||
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("aesthetic volcanic floor tile", /obj/item/stack/tile/basalt, 2, 2, 4, 20), \
|
||||
new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, one_per_turf = 0, on_floor = 1) \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone
|
||||
name = "sandstone brick"
|
||||
desc = "This appears to be a combination of both sand and stone."
|
||||
singular_name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
item_state = "sheet-sandstone"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "sandstone"
|
||||
merge_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sandstone_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone/thirty
|
||||
amount = 30
|
||||
|
||||
/*
|
||||
* Sandbags
|
||||
*/
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandbags
|
||||
name = "sandbags"
|
||||
icon_state = "sandbags"
|
||||
singular_name = "sandbag"
|
||||
layer = LOW_ITEM_LAYER
|
||||
novariants = TRUE
|
||||
merge_type = /obj/item/stack/sheet/mineral/sandbags
|
||||
|
||||
GLOBAL_LIST_INIT(sandbag_recipes, list ( \
|
||||
new/datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandbags/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sandbag_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/emptysandbag
|
||||
name = "empty sandbag"
|
||||
desc = "A bag to be filled with sand."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "sandbag"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/emptysandbag/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/ore/glass))
|
||||
var/obj/item/stack/ore/glass/G = W
|
||||
to_chat(user, "<span class='notice'>You fill the sandbag.</span>")
|
||||
var/obj/item/stack/sheet/mineral/sandbags/I = new /obj/item/stack/sheet/mineral/sandbags(drop_location())
|
||||
qdel(src)
|
||||
if (Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(I)
|
||||
G.use(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Diamond
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
item_state = "sheet-diamond"
|
||||
singular_name = "diamond"
|
||||
sheettype = "diamond"
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list("carbon" = 20)
|
||||
point_value = 25
|
||||
merge_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
GLOBAL_LIST_INIT(diamond_recipes, list ( \
|
||||
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("diamond tile", /obj/item/stack/tile/mineral/diamond, 1, 4, 20), \
|
||||
new/datum/stack_recipe("Captain Statue", /obj/structure/statue/diamond/captain, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("AI Hologram Statue", /obj/structure/statue/diamond/ai1, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.diamond_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Uranium
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/uranium
|
||||
name = "uranium"
|
||||
icon_state = "sheet-uranium"
|
||||
item_state = "sheet-uranium"
|
||||
singular_name = "uranium sheet"
|
||||
sheettype = "uranium"
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list("uranium" = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
GLOBAL_LIST_INIT(uranium_recipes, list ( \
|
||||
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("uranium tile", /obj/item/stack/tile/mineral/uranium, 1, 4, 20), \
|
||||
new/datum/stack_recipe("Nuke Statue", /obj/structure/statue/uranium/nuke, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Engineer Statue", /obj/structure/statue/uranium/eng, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.uranium_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/plasma
|
||||
name = "solid plasma"
|
||||
icon_state = "sheet-plasma"
|
||||
item_state = "sheet-plasma"
|
||||
singular_name = "plasma sheet"
|
||||
sheettype = "plasma"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list("plasma" = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins licking \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return TOXLOSS//dont you kids know that stuff is toxic?
|
||||
|
||||
GLOBAL_LIST_INIT(plasma_recipes, list ( \
|
||||
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plasma tile", /obj/item/stack/tile/mineral/plasma, 1, 4, 20), \
|
||||
new/datum/stack_recipe("Scientist Statue", /obj/structure/statue/plasma/scientist, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plasma_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(W.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("Plasma sheets ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("Plasma sheets ignited by [key_name(user)] in [AREACOORD(T)]")
|
||||
fire_act(W.get_temperature())
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/fire_act(exposed_temperature, exposed_volume)
|
||||
atmos_spawn_air("plasma=[amount*10];TEMP=[exposed_temperature]")
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Gold
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
item_state = "sheet-gold"
|
||||
singular_name = "gold bar"
|
||||
sheettype = "gold"
|
||||
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list("gold" = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
GLOBAL_LIST_INIT(gold_recipes, list ( \
|
||||
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("gold tile", /obj/item/stack/tile/mineral/gold, 1, 4, 20), \
|
||||
new/datum/stack_recipe("HoS Statue", /obj/structure/statue/gold/hos, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("HoP Statue", /obj/structure/statue/gold/hop, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("CE Statue", /obj/structure/statue/gold/ce, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("RD Statue", /obj/structure/statue/gold/rd, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Simple Crown", /obj/item/clothing/head/crown, 5), \
|
||||
new/datum/stack_recipe("CMO Statue", /obj/structure/statue/gold/cmo, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.gold_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Silver
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/silver
|
||||
name = "silver"
|
||||
icon_state = "sheet-silver"
|
||||
item_state = "sheet-silver"
|
||||
singular_name = "silver bar"
|
||||
sheettype = "silver"
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list("silver" = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/silver
|
||||
tableVariant = /obj/structure/table/optable
|
||||
|
||||
GLOBAL_LIST_INIT(silver_recipes, list ( \
|
||||
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("silver tile", /obj/item/stack/tile/mineral/silver, 1, 4, 20), \
|
||||
new/datum/stack_recipe("Med Officer Statue", /obj/structure/statue/silver/md, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Janitor Statue", /obj/structure/statue/silver/janitor, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Sec Officer Statue", /obj/structure/statue/silver/sec, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Sec Borg Statue", /obj/structure/statue/silver/secborg, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Med Borg Statue", /obj/structure/statue/silver/medborg, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.silver_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Clown
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/bananium
|
||||
name = "bananium"
|
||||
icon_state = "sheet-bananium"
|
||||
item_state = "sheet-bananium"
|
||||
singular_name = "bananium sheet"
|
||||
sheettype = "bananium"
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list("banana" = 20)
|
||||
point_value = 50
|
||||
merge_type = /obj/item/stack/sheet/mineral/bananium
|
||||
|
||||
GLOBAL_LIST_INIT(bananium_recipes, list ( \
|
||||
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
|
||||
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.bananium_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Titanium
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/titanium
|
||||
name = "titanium"
|
||||
icon_state = "sheet-titanium"
|
||||
item_state = "sheet-titanium"
|
||||
singular_name = "titanium sheet"
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "titanium"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/titanium
|
||||
|
||||
GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.titanium_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/titanium/fifty
|
||||
amount = 50
|
||||
|
||||
|
||||
/*
|
||||
* Plastitanium
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/plastitanium
|
||||
name = "plastitanium"
|
||||
icon_state = "sheet-plastitanium"
|
||||
item_state = "sheet-plastitanium"
|
||||
singular_name = "plastitanium sheet"
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "plastitanium"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
point_value = 45
|
||||
merge_type = /obj/item/stack/sheet/mineral/plastitanium
|
||||
|
||||
GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
|
||||
new/datum/stack_recipe("plastitanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plastitanium_recipes
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Snow
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/snow
|
||||
name = "snow"
|
||||
icon_state = "sheet-snow"
|
||||
item_state = "sheet-snow"
|
||||
singular_name = "snow block"
|
||||
force = 1
|
||||
throwforce = 2
|
||||
grind_results = list("ice" = 20)
|
||||
merge_type = /obj/item/stack/sheet/mineral/snow
|
||||
|
||||
GLOBAL_LIST_INIT(snow_recipes, list ( \
|
||||
new/datum/stack_recipe("Snow Wall", /turf/closed/wall/mineral/snow, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Snowman", /obj/structure/statue/snow/snowman, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("Snowball", /obj/item/toy/snowball, 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/snow/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.snow_recipes
|
||||
. = ..()
|
||||
|
||||
/****************************** Others ****************************/
|
||||
|
||||
/*
|
||||
* Adamantine
|
||||
*/
|
||||
GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
new /datum/stack_recipe("incomplete servant golem shell", /obj/item/golem_shell/servant, req_amount=1, res_amount=1),
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/adamantine
|
||||
name = "adamantine"
|
||||
icon_state = "sheet-adamantine"
|
||||
item_state = "sheet-adamantine"
|
||||
singular_name = "adamantine sheet"
|
||||
merge_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
|
||||
/obj/item/stack/sheet/mineral/adamantine/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.adamantine_recipes
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
* Mythril
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/mythril
|
||||
name = "mythril"
|
||||
icon_state = "sheet-mythril"
|
||||
item_state = "sheet-mythril"
|
||||
singular_name = "mythril sheet"
|
||||
novariants = TRUE
|
||||
merge_type = /obj/item/stack/sheet/mineral/mythril
|
||||
|
||||
/*
|
||||
* Alien Alloy
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/abductor
|
||||
name = "alien alloy"
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "sheet-abductor"
|
||||
item_state = "sheet-abductor"
|
||||
singular_name = "alien alloy sheet"
|
||||
sheettype = "abductor"
|
||||
merge_type = /obj/item/stack/sheet/mineral/abductor
|
||||
|
||||
GLOBAL_LIST_INIT(abductor_recipes, list ( \
|
||||
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 2, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.abductor_recipes
|
||||
. = ..()
|
||||
@@ -0,0 +1,699 @@
|
||||
/* Diffrent misc types of sheets
|
||||
* Contains:
|
||||
* Metal
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Paper Frames
|
||||
* Runed Metal (cult)
|
||||
* Brass (clockwork cult)
|
||||
* Bronze (bake brass)
|
||||
* Cotton/Duracotton
|
||||
*/
|
||||
|
||||
/*
|
||||
* Metal
|
||||
*/
|
||||
GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
//CIT CHANGE - adds sofas to metal recipe list
|
||||
new/datum/stack_recipe_list("sofas", list( \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
//END OF CIT CHANGES
|
||||
null, \
|
||||
new/datum/stack_recipe_list("office chairs", list( \
|
||||
new/datum/stack_recipe("dark office chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("light office chair", /obj/structure/chair/office/light, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
new/datum/stack_recipe_list("comfy chairs", list( \
|
||||
new/datum/stack_recipe("beige comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("black comfy chair", /obj/structure/chair/comfy/black, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/chair/comfy/brown, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/chair/comfy/lime, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/chair/comfy/teal, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
|
||||
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
|
||||
null, \
|
||||
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("computer frame", /obj/structure/frame/computer, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("modular console", /obj/machinery/modular_computer/console/buildable/, 10, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("machine frame", /obj/structure/frame/machine, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new /datum/stack_recipe_list("airlock assemblies", list( \
|
||||
new /datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("public airlock assembly", /obj/structure/door_assembly/door_assembly_public, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("virology airlock assembly", /obj/structure/door_assembly/door_assembly_viro, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("external maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_extmai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
)), \
|
||||
null, \
|
||||
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/wallframe/light_fixture/small, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/wallframe/apc, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/wallframe/airalarm, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/wallframe/firealarm, 2), \
|
||||
new/datum/stack_recipe("extinguisher cabinet frame", /obj/item/wallframe/extinguisher_cabinet, 2), \
|
||||
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/metal
|
||||
name = "metal"
|
||||
desc = "Sheets made out of metal."
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
item_state = "sheet-metal"
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
resistance_flags = FIRE_PROOF
|
||||
merge_type = /obj/item/stack/sheet/metal
|
||||
grind_results = list("iron" = 20)
|
||||
point_value = 2
|
||||
tableVariant = /obj/structure/table
|
||||
|
||||
/obj/item/stack/sheet/metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/metal/narsie_act()
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/metal/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/metal/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/sheet/metal/ten
|
||||
amount = 10
|
||||
|
||||
/obj/item/stack/sheet/metal/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/metal/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.metal_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/metal/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self over the head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/*
|
||||
* Plasteel
|
||||
*/
|
||||
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
|
||||
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
|
||||
null, \
|
||||
new /datum/stack_recipe_list("airlock assemblies", list( \
|
||||
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 6, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("vault door assembly", /obj/structure/door_assembly/door_assembly_vault, 8, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
)), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/plasteel
|
||||
name = "plasteel"
|
||||
singular_name = "plasteel sheet"
|
||||
desc = "This sheet is an alloy of iron and plasma."
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
materials = list(MAT_METAL=2000, MAT_PLASMA=2000)
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
|
||||
resistance_flags = FIRE_PROOF
|
||||
merge_type = /obj/item/stack/sheet/plasteel
|
||||
grind_results = list("iron" = 20, "plasma" = 20)
|
||||
point_value = 23
|
||||
tableVariant = /obj/structure/table/reinforced
|
||||
|
||||
/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plasteel_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/plasteel/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/sheet/plasteel/fifty
|
||||
amount = 50
|
||||
|
||||
/*
|
||||
* Wood
|
||||
*/
|
||||
GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
||||
new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \
|
||||
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
|
||||
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
|
||||
null, \
|
||||
new/datum/stack_recipe_list("pews", list(
|
||||
new /datum/stack_recipe("pew (middle)", /obj/structure/chair/pew, 3, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new /datum/stack_recipe("pew (left)", /obj/structure/chair/pew/left, 3, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
)),
|
||||
null, \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
|
||||
null, \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("plywood chair", /obj/structure/chair/comfy/plywood, 4, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("rustic wooden door", /obj/structure/mineral_door/woodrustic, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("wooden barrel", /obj/structure/fermenting_barrel, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
|
||||
null, \
|
||||
new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\
|
||||
new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood
|
||||
name = "wooden plank"
|
||||
desc = "One can only guess that this is a bunch of wood."
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
item_state = "sheet-wood"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
sheettype = "wood"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/mineral/wood
|
||||
novariants = TRUE
|
||||
grind_results = list("carbon" = 20)
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.wood_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood/fifty
|
||||
amount = 50
|
||||
|
||||
/*
|
||||
* Cloth
|
||||
*/
|
||||
GLOBAL_LIST_INIT(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/sneakers/black, 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("backpack", /obj/item/storage/backpack, 4), \
|
||||
new/datum/stack_recipe("duffel bag", /obj/item/storage/backpack/duffelbag, 6), \
|
||||
null, \
|
||||
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("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 6), \
|
||||
new/datum/stack_recipe("rag", /obj/item/reagent_containers/rag, 1), \
|
||||
new/datum/stack_recipe("towel", /obj/item/reagent_containers/rag/towel, 3), \
|
||||
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
|
||||
new/datum/stack_recipe("empty sandbag", /obj/item/emptysandbag, 4), \
|
||||
null, \
|
||||
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1),\
|
||||
new/datum/stack_recipe("white gloves", /obj/item/clothing/gloves/color/white, 1),\
|
||||
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
|
||||
null, \
|
||||
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/cloth
|
||||
name = "cloth"
|
||||
desc = "Is it cotton? Linen? Denim? Burlap? Canvas? You can't tell."
|
||||
singular_name = "cloth roll"
|
||||
icon_state = "sheet-cloth"
|
||||
item_state = "sheet-cloth"
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
pull_effort = 90
|
||||
is_fabric = TRUE
|
||||
loom_result = /obj/item/stack/sheet/silk
|
||||
merge_type = /obj/item/stack/sheet/cloth
|
||||
|
||||
/obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.cloth_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/cloth/ten
|
||||
amount = 10
|
||||
|
||||
/obj/item/stack/sheet/cloth/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/sheet/silk
|
||||
name = "silk"
|
||||
desc = "A long soft material. This one is just made out of cotton rather then any spiders or wyrms"
|
||||
singular_name = "silk sheet"
|
||||
icon_state = "sheet-silk"
|
||||
item_state = "sheet-cloth"
|
||||
novariants = TRUE
|
||||
merge_type = /obj/item/stack/sheet/silk
|
||||
|
||||
//obj/item/stack/sheet/silk/Initialize(mapload, new_amount, merge = TRUE)
|
||||
// recipes = GLOB.silk_recipes
|
||||
// return ..()
|
||||
|
||||
//Durathread fuck slash-asterisk comments
|
||||
GLOBAL_LIST_INIT(durathread_recipes, list ( \
|
||||
new/datum/stack_recipe("durathread jumpsuit", /obj/item/clothing/under/durathread, 4, time = 40),
|
||||
new/datum/stack_recipe("durathread beret", /obj/item/clothing/head/beret/durathread, 2, time = 40), \
|
||||
new/datum/stack_recipe("durathread beanie", /obj/item/clothing/head/beanie/durathread, 2, time = 40), \
|
||||
new/datum/stack_recipe("durathread bandana", /obj/item/clothing/mask/bandana/durathread, 1, time = 25), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/durathread
|
||||
name = "durathread"
|
||||
desc = "A fabric sown from incredibly durable threads, known for its usefulness in armor production."
|
||||
singular_name = "durathread roll"
|
||||
icon_state = "sheet-durathread"
|
||||
item_state = "sheet-cloth"
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
merge_type = /obj/item/stack/sheet/durathread
|
||||
|
||||
/obj/item/stack/sheet/durathread/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.durathread_recipes
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Cardboard
|
||||
*/
|
||||
GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
new/datum/stack_recipe("box", /obj/item/storage/box), \
|
||||
new/datum/stack_recipe("sec box", /obj/item/storage/box/seclooking), \
|
||||
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("pizza box", /obj/item/pizzabox), \
|
||||
new/datum/stack_recipe("power cell", /obj/item/storage/box/cells), \
|
||||
new/datum/stack_recipe("02", /obj/item/storage/box/otwo), \
|
||||
null, \
|
||||
new/datum/stack_recipe("lethal ammo box", /obj/item/storage/box/lethalshot), \
|
||||
new/datum/stack_recipe("rubber shot ammo box", /obj/item/storage/box/rubbershot), \
|
||||
new/datum/stack_recipe("bean bag ammo box", /obj/item/storage/box/beanbag), \
|
||||
new/datum/stack_recipe("12g ammo box", /obj/item/storage/box/lethalslugs), \
|
||||
new/datum/stack_recipe("stun slug ammo box", /obj/item/storage/box/stunslug), \
|
||||
new/datum/stack_recipe("tech shell ammo box", /obj/item/storage/box/techsslug), \
|
||||
new/datum/stack_recipe("incendiary ammo box", /obj/item/storage/box/fireshot), \
|
||||
new/datum/stack_recipe("firing pins", /obj/item/storage/box/firingpins), \
|
||||
new/datum/stack_recipe("loose ammo", /obj/item/storage/box/ammoshells), \
|
||||
null, \
|
||||
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("folder", /obj/item/folder), \
|
||||
new/datum/stack_recipe("large box", /obj/structure/closet/cardboard, 4), \
|
||||
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5), \
|
||||
null, \
|
||||
new/datum/stack_recipe("colored brown", /obj/item/storage/box/brown), \
|
||||
new/datum/stack_recipe("colored green", /obj/item/storage/box/green), \
|
||||
new/datum/stack_recipe("colored red", /obj/item/storage/box/blue), \
|
||||
new/datum/stack_recipe("colored blue", /obj/item/storage/box/red), \
|
||||
new/datum/stack_recipe("colored yellow", /obj/item/storage/box/yellow), \
|
||||
new/datum/stack_recipe("colored pink", /obj/item/storage/box/pink), \
|
||||
new/datum/stack_recipe("colored purple", /obj/item/storage/box/purple), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/cardboard //BubbleWrap //it's cardboard you fuck
|
||||
name = "cardboard"
|
||||
desc = "Large sheets of card, like boxes folded flat."
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
item_state = "sheet-card"
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
merge_type = /obj/item/stack/sheet/cardboard
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.cardboard_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/cardboard/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stamp/clown) && !istype(loc, /obj/item/storage))
|
||||
var/atom/droploc = drop_location()
|
||||
if(use(1))
|
||||
playsound(I, 'sound/items/bikehorn.ogg', 50, 1, -1)
|
||||
to_chat(user, "<span class='notice'>You stamp the cardboard! Its a clown box! Honk!</span>")
|
||||
if (amount >= 0)
|
||||
new/obj/item/storage/box/clown(droploc) //bugfix
|
||||
else
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Runed Metal
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
|
||||
new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("pylon", /obj/structure/destructible/cult/pylon, 4, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("forge", /obj/structure/destructible/cult/forge, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("archives", /obj/structure/destructible/cult/tome, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("altar", /obj/structure/destructible/cult/talisman, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/runed_metal
|
||||
name = "runed metal"
|
||||
desc = "Sheets of cold metal with shifting inscriptions writ upon them."
|
||||
singular_name = "runed metal sheet"
|
||||
icon_state = "sheet-runed"
|
||||
item_state = "sheet-runed"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
sheettype = "runed"
|
||||
merge_type = /obj/item/stack/sheet/runed_metal
|
||||
novariants = TRUE
|
||||
grind_results = list("iron" = 5, "blood" = 15)
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
|
||||
if(!iscultist(user))
|
||||
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
|
||||
return
|
||||
var/turf/T = get_turf(user) //we may have moved. adjust as needed...
|
||||
var/area/A = get_area(user)
|
||||
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !A.blob_allowed))
|
||||
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.runed_metal_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/ten
|
||||
amount = 10
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/five
|
||||
amount = 5
|
||||
|
||||
/*
|
||||
* Brass
|
||||
*/
|
||||
GLOBAL_LIST_INIT(brass_recipes, list ( \
|
||||
new/datum/stack_recipe("wall gear", /obj/structure/destructible/clockwork/wall_gear, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("brass pinion airlock", /obj/machinery/door/airlock/clockwork, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brass pinion airlock - windowed", /obj/machinery/door/airlock/clockwork/brass, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, on_floor = TRUE, window_checks = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("brass reflector", /obj/structure/destructible/clockwork/reflector, 10, time = 100, one_per_turf = TRUE, on_floor = TRUE, window_checks = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("brass window - directional", /obj/structure/window/reinforced/clockwork/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("brass window - fulltile", /obj/structure/window/reinforced/clockwork/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("brass chair", /obj/structure/chair/brass, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brass bar stool", /obj/structure/chair/stool/bar/brass, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brass stool", /obj/structure/chair/stool/brass, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("sender - pressure sensor", /obj/structure/destructible/clockwork/trap/trigger/pressure_sensor, 2, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("sender - mech sensor", /obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/mech, 2, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("sender - lever", /obj/structure/destructible/clockwork/trap/trigger/lever, 1, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("sender - repeater", /obj/structure/destructible/clockwork/trap/trigger/repeater, 2, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("receiver - brass skewer", /obj/structure/destructible/clockwork/trap/brass_skewer, 2, time = 20, one_per_turf = TRUE, on_floor = TRUE, placement_checks = STACK_CHECK_ADJACENT), \
|
||||
new/datum/stack_recipe("receiver - steam vent", /obj/structure/destructible/clockwork/trap/steam_vent, 3, time = 30, one_per_turf = TRUE, on_floor = TRUE, placement_checks = STACK_CHECK_CARDINALS), \
|
||||
new/datum/stack_recipe("receiver - power nullifier", /obj/structure/destructible/clockwork/trap/power_nullifier, 5, time = 20, one_per_turf = TRUE, on_floor = TRUE, placement_checks = STACK_CHECK_CARDINALS), \
|
||||
null,
|
||||
new/datum/stack_recipe("brass flask", /obj/item/reagent_containers/food/drinks/bottle/holyoil/empty), \
|
||||
|
||||
))
|
||||
|
||||
/obj/item/stack/tile/brass
|
||||
name = "brass"
|
||||
desc = "Sheets made out of brass."
|
||||
singular_name = "brass sheet"
|
||||
icon_state = "sheet-brass"
|
||||
item_state = "sheet-brass"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
throwforce = 10
|
||||
max_amount = 50
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
turf_type = /turf/open/floor/clockwork
|
||||
novariants = FALSE
|
||||
grind_results = list("iron" = 5, "teslium" = 15, "holyoil" = 1)
|
||||
merge_type = /obj/item/stack/tile/brass
|
||||
tableVariant = /obj/structure/table/reinforced/brass
|
||||
|
||||
/obj/item/stack/tile/brass/narsie_act()
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/tile/brass/attack_self(mob/living/user)
|
||||
if(!is_servant_of_ratvar(user))
|
||||
to_chat(user, "<span class='danger'>[src] seems far too fragile and rigid to build with.</span>") //haha that's because it's actually replicant alloy you DUMMY
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/stack/tile/brass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.brass_recipes
|
||||
. = ..()
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
/obj/item/stack/tile/brass/fifty
|
||||
amount = 50
|
||||
|
||||
/*
|
||||
* Bronze
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
new/datum/stack_recipe("wall gear", /obj/structure/girder/bronze, 2, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null,
|
||||
new/datum/stack_recipe("bronze hat", /obj/item/clothing/head/bronze), \
|
||||
new/datum/stack_recipe("bronze suit", /obj/item/clothing/suit/bronze), \
|
||||
new/datum/stack_recipe("bronze boots", /obj/item/clothing/shoes/bronze), \
|
||||
null,
|
||||
new/datum/stack_recipe("bronze chair", /obj/structure/chair/bronze, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bronze bar stool", /obj/structure/chair/stool/bar/bronze, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bronze stool", /obj/structure/chair/stool/bronze, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/tile/bronze
|
||||
name = "brass"
|
||||
desc = "On closer inspection, what appears to be wholly-unsuitable-for-building brass is actually more structurally stable bronze."
|
||||
singular_name = "bronze sheet"
|
||||
icon_state = "sheet-brass"
|
||||
item_state = "sheet-brass"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
throwforce = 10
|
||||
max_amount = 50
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
turf_type = /turf/open/floor/bronze
|
||||
novariants = FALSE
|
||||
grind_results = list("iron" = 5, "copper" = 3) //we have no "tin" reagent so this is the closest thing
|
||||
merge_type = /obj/item/stack/tile/bronze
|
||||
tableVariant = /obj/structure/table/bronze
|
||||
|
||||
/obj/item/stack/tile/bronze/attack_self(mob/living/user)
|
||||
if(is_servant_of_ratvar(user)) //still lets them build with it, just gives a message
|
||||
to_chat(user, "<span class='danger'>Wha... what is this cheap imitation crap? This isn't brass at all!</span>")
|
||||
..()
|
||||
|
||||
/obj/item/stack/tile/bronze/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.bronze_recipes
|
||||
. = ..()
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
/obj/item/stack/tile/bronze/thirty
|
||||
amount = 30
|
||||
|
||||
/*
|
||||
* Lesser and Greater gems - unused
|
||||
*/
|
||||
/obj/item/stack/sheet/lessergem
|
||||
name = "lesser gems"
|
||||
desc = "Rare kind of gems which are only gained by blood sacrifice to minor deities. They are needed in crafting powerful objects."
|
||||
singular_name = "lesser gem"
|
||||
icon_state = "sheet-lessergem"
|
||||
item_state = "sheet-lessergem"
|
||||
novariants = TRUE
|
||||
|
||||
|
||||
/obj/item/stack/sheet/greatergem
|
||||
name = "greater gems"
|
||||
desc = "Rare kind of gems which are only gained by blood sacrifice to minor deities. They are needed in crafting powerful objects."
|
||||
singular_name = "greater gem"
|
||||
icon_state = "sheet-greatergem"
|
||||
item_state = "sheet-greatergem"
|
||||
novariants = TRUE
|
||||
|
||||
/*
|
||||
* Bones
|
||||
*/
|
||||
/obj/item/stack/sheet/bone
|
||||
name = "bones"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "bone"
|
||||
item_state = "sheet-bone"
|
||||
singular_name = "bone"
|
||||
desc = "Someone's been drinking their milk."
|
||||
force = 7
|
||||
throwforce = 5
|
||||
max_amount = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
grind_results = list("carbon" = 10)
|
||||
merge_type = /obj/item/stack/sheet/bone
|
||||
|
||||
GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
|
||||
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/empty), \
|
||||
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
|
||||
new /datum/stack_recipe("wet floor sign", /obj/item/caution, 2)))
|
||||
|
||||
/obj/item/stack/sheet/plastic
|
||||
name = "plastic"
|
||||
desc = "Compress dinosaur over millions of years, then refine, split and mold, and voila! You have plastic."
|
||||
singular_name = "plastic sheet"
|
||||
icon_state = "sheet-plastic"
|
||||
item_state = "sheet-plastic"
|
||||
materials = list(MAT_PLASTIC=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 7
|
||||
merge_type = /obj/item/stack/sheet/plastic
|
||||
|
||||
/obj/item/stack/sheet/plastic/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/plastic/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plastic_recipes
|
||||
. = ..()
|
||||
|
||||
GLOBAL_LIST_INIT(paperframe_recipes, list(
|
||||
new /datum/stack_recipe("paper frame separator", /obj/structure/window/paperframe, 2, one_per_turf = TRUE, on_floor = TRUE, time = 10), \
|
||||
new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperframe, 3, one_per_turf = TRUE, on_floor = TRUE, time = 10 )))
|
||||
|
||||
/obj/item/stack/sheet/paperframes
|
||||
name = "paper frames"
|
||||
desc = "A thin wooden frame with paper attached."
|
||||
singular_name = "paper frame"
|
||||
icon_state = "sheet-paper"
|
||||
item_state = "sheet-paper"
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
|
||||
/obj/item/stack/sheet/paperframes/Initialize()
|
||||
recipes = GLOB.paperframe_recipes
|
||||
. = ..()
|
||||
/obj/item/stack/sheet/paperframes/five
|
||||
amount = 5
|
||||
/obj/item/stack/sheet/paperframes/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/paperframes/fifty
|
||||
amount = 50
|
||||
|
||||
|
||||
//durathread and cotton raw
|
||||
/obj/item/stack/sheet/cotton
|
||||
name = "raw cotton bundle"
|
||||
desc = "A bundle of raw cotton ready to be spun on the loom."
|
||||
singular_name = "raw cotton ball"
|
||||
icon_state = "sheet-cotton"
|
||||
is_fabric = TRUE
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
merge_type = /obj/item/stack/sheet/cotton
|
||||
pull_effort = 30
|
||||
loom_result = /obj/item/stack/sheet/cloth
|
||||
|
||||
/obj/item/stack/sheet/cotton/ten
|
||||
amount = 10
|
||||
|
||||
/obj/item/stack/sheet/cotton/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/sheet/cotton/durathread
|
||||
name = "raw durathread bundle"
|
||||
desc = "A bundle of raw durathread ready to be spun on the loom."
|
||||
singular_name = "raw durathread ball"
|
||||
icon_state = "sheet-durathreadraw"
|
||||
merge_type = /obj/item/stack/sheet/cotton/durathread
|
||||
pull_effort = 70
|
||||
loom_result = /obj/item/stack/sheet/durathread
|
||||
|
||||
|
||||
@@ -0,0 +1,440 @@
|
||||
/* Stack type objects!
|
||||
* Contains:
|
||||
* Stacks
|
||||
* Recipe datum
|
||||
* Recipe list datum
|
||||
*/
|
||||
|
||||
/*
|
||||
* Stacks
|
||||
*/
|
||||
/obj/item/stack
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
gender = PLURAL
|
||||
var/list/datum/stack_recipe/recipes
|
||||
var/singular_name
|
||||
var/amount = 1
|
||||
var/max_amount = 50 //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
|
||||
var/is_cyborg = 0 // It's 1 if module is used by a cyborg, and uses its storage
|
||||
var/datum/robot_energy_storage/source
|
||||
var/cost = 1 // How much energy from storage it costs
|
||||
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
|
||||
var/full_w_class = WEIGHT_CLASS_NORMAL //The weight class the stack should have at amount > 2/3rds max_amount
|
||||
var/novariants = TRUE //Determines whether the item should update it's sprites based on amount.
|
||||
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
|
||||
var/obj/structure/table/tableVariant // we tables now (stores table variant to be built from this stack)
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
|
||||
/obj/item/stack/grind_requirements()
|
||||
if(is_cyborg)
|
||||
to_chat(usr, "<span class='danger'>[src] is electronically synthesized in your chassis and can't be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
|
||||
. = ..()
|
||||
if(new_amount != null)
|
||||
amount = new_amount
|
||||
while(amount > max_amount)
|
||||
amount -= max_amount
|
||||
new type(loc, max_amount, FALSE)
|
||||
if(!merge_type)
|
||||
merge_type = type
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
if(S.merge_type == merge_type)
|
||||
merge(S)
|
||||
update_weight()
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/proc/update_weight()
|
||||
if(amount <= (max_amount * (1/3)))
|
||||
w_class = CLAMP(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
|
||||
else if (amount <= (max_amount * (2/3)))
|
||||
w_class = CLAMP(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
|
||||
else
|
||||
w_class = full_w_class
|
||||
|
||||
/obj/item/stack/update_icon()
|
||||
if(novariants)
|
||||
return ..()
|
||||
if(amount <= (max_amount * (1/3)))
|
||||
icon_state = initial(icon_state)
|
||||
else if (amount <= (max_amount * (2/3)))
|
||||
icon_state = "[initial(icon_state)]_2"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if (usr && usr.machine==src)
|
||||
usr << browse(null, "window=stack")
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
..()
|
||||
if (is_cyborg)
|
||||
if(singular_name)
|
||||
to_chat(user, "There is enough energy for [get_amount()] [singular_name]\s.")
|
||||
else
|
||||
to_chat(user, "There is enough energy for [get_amount()].")
|
||||
return
|
||||
if(singular_name)
|
||||
if(get_amount()>1)
|
||||
to_chat(user, "There are [get_amount()] [singular_name]\s in the stack.")
|
||||
else
|
||||
to_chat(user, "There is [get_amount()] [singular_name] in the stack.")
|
||||
else if(get_amount()>1)
|
||||
to_chat(user, "There are [get_amount()] in the stack.")
|
||||
else
|
||||
to_chat(user, "There is [get_amount()] in the stack.")
|
||||
to_chat(user, "<span class='notice'>Alt-click to take a custom amount.</span>")
|
||||
|
||||
/obj/item/stack/proc/get_amount()
|
||||
if(is_cyborg)
|
||||
. = round(source.energy / cost)
|
||||
else
|
||||
. = (amount)
|
||||
|
||||
/obj/item/stack/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/stack/interact(mob/user, sublist)
|
||||
ui_interact(user, sublist)
|
||||
|
||||
/obj/item/stack/ui_interact(mob/user, recipes_sublist)
|
||||
. = ..()
|
||||
if (!recipes)
|
||||
return
|
||||
if (!src || get_amount() <= 0)
|
||||
user << browse(null, "window=stack")
|
||||
user.set_machine(src) //for correct work of onclose
|
||||
var/list/recipe_list = recipes
|
||||
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
|
||||
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
|
||||
recipe_list = srl.recipes
|
||||
var/t1 = "Amount Left: [get_amount()]<br>"
|
||||
for(var/i in 1 to length(recipe_list))
|
||||
var/E = recipe_list[i]
|
||||
if (isnull(E))
|
||||
t1 += "<hr>"
|
||||
continue
|
||||
if (i>1 && !isnull(recipe_list[i-1]))
|
||||
t1+="<br>"
|
||||
|
||||
if (istype(E, /datum/stack_recipe_list))
|
||||
var/datum/stack_recipe_list/srl = E
|
||||
t1 += "<a href='?src=[REF(src)];sublist=[i]'>[srl.title]</a>"
|
||||
|
||||
if (istype(E, /datum/stack_recipe))
|
||||
var/datum/stack_recipe/R = E
|
||||
var/max_multiplier = round(get_amount() / R.req_amount)
|
||||
var/title
|
||||
var/can_build = 1
|
||||
can_build = can_build && (max_multiplier>0)
|
||||
|
||||
if (R.res_amount>1)
|
||||
title+= "[R.res_amount]x [R.title]\s"
|
||||
else
|
||||
title+= "[R.title]"
|
||||
title+= " ([R.req_amount] [singular_name]\s)"
|
||||
if (can_build)
|
||||
t1 += text("<A href='?src=[REF(src)];sublist=[recipes_sublist];make=[i];multiplier=1'>[title]</A> ")
|
||||
else
|
||||
t1 += text("[]", title)
|
||||
continue
|
||||
if (R.max_res_amount>1 && max_multiplier>1)
|
||||
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
|
||||
t1 += " |"
|
||||
var/list/multipliers = list(5,10,25)
|
||||
for (var/n in multipliers)
|
||||
if (max_multiplier>=n)
|
||||
t1 += " <A href='?src=[REF(src)];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
|
||||
if (!(max_multiplier in multipliers))
|
||||
t1 += " <A href='?src=[REF(src)];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "stack", name, 400, 400)
|
||||
popup.set_content(t1)
|
||||
popup.open(0)
|
||||
onclose(user, "stack")
|
||||
|
||||
/obj/item/stack/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
|
||||
return
|
||||
if (href_list["sublist"] && !href_list["make"])
|
||||
interact(usr, text2num(href_list["sublist"]))
|
||||
if (href_list["make"])
|
||||
if (get_amount() < 1 && !is_cyborg)
|
||||
qdel(src)
|
||||
|
||||
var/list/recipes_list = recipes
|
||||
if (href_list["sublist"])
|
||||
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
|
||||
recipes_list = srl.recipes
|
||||
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
if (!multiplier ||(multiplier <= 0)) //href protection
|
||||
return
|
||||
if(!building_checks(R, multiplier))
|
||||
return
|
||||
if (R.time)
|
||||
usr.visible_message("<span class='notice'>[usr] starts building [R.title].</span>", "<span class='notice'>You start building [R.title]...</span>")
|
||||
if (!do_after(usr, R.time, target = usr))
|
||||
return
|
||||
if(!building_checks(R, multiplier))
|
||||
return
|
||||
|
||||
var/obj/O
|
||||
if(R.max_res_amount > 1) //Is it a stack?
|
||||
O = new R.result_type(usr.drop_location(), R.res_amount * multiplier)
|
||||
else
|
||||
O = new R.result_type(usr.drop_location())
|
||||
O.setDir(usr.dir)
|
||||
use(R.req_amount * multiplier)
|
||||
|
||||
//START: oh fuck i'm so sorry
|
||||
if(istype(O, /obj/structure/windoor_assembly))
|
||||
var/obj/structure/windoor_assembly/W = O
|
||||
W.ini_dir = W.dir
|
||||
else if(istype(O, /obj/structure/window))
|
||||
var/obj/structure/window/W = O
|
||||
W.ini_dir = W.dir
|
||||
//END: oh fuck i'm so sorry
|
||||
|
||||
else if(istype(O, /obj/item/restraints/handcuffs/cable))
|
||||
var/obj/item/cuffs = O
|
||||
cuffs.item_color = item_color
|
||||
cuffs.update_icon()
|
||||
|
||||
if (QDELETED(O))
|
||||
return //It's a stack and has already been merged
|
||||
|
||||
if (isitem(O))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if ( istype(O, /obj/item/storage) )
|
||||
for (var/obj/item/I in O)
|
||||
qdel(I)
|
||||
//BubbleWrap END
|
||||
|
||||
/obj/item/stack/proc/building_checks(datum/stack_recipe/R, multiplier)
|
||||
if (get_amount() < R.req_amount*multiplier)
|
||||
if (R.req_amount*multiplier>1)
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
|
||||
return FALSE
|
||||
var/turf/T = get_turf(usr)
|
||||
|
||||
var/obj/D = R.result_type
|
||||
if(R.window_checks && !valid_window_location(T, initial(D.dir) == FULLTILE_WINDOW_DIR ? FULLTILE_WINDOW_DIR : 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 T))
|
||||
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
|
||||
return FALSE
|
||||
if(R.on_floor)
|
||||
if(!isfloorturf(T))
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
|
||||
return FALSE
|
||||
for(var/obj/AM in T)
|
||||
if(istype(AM,/obj/structure/grille))
|
||||
continue
|
||||
if(istype(AM,/obj/structure/table))
|
||||
continue
|
||||
if(istype(AM,/obj/structure/window))
|
||||
var/obj/structure/window/W = AM
|
||||
if(!W.fulltile)
|
||||
continue
|
||||
if(AM.density)
|
||||
to_chat(usr, "<span class='warning'>Theres a [AM.name] here. You cant make a [R.title] here!</span>")
|
||||
return FALSE
|
||||
if(R.placement_checks)
|
||||
switch(R.placement_checks)
|
||||
if(STACK_CHECK_CARDINALS)
|
||||
var/turf/step
|
||||
for(var/direction in GLOB.cardinals)
|
||||
step = get_step(T, direction)
|
||||
if(locate(R.result_type) in step)
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must not be built directly adjacent to another!</span>")
|
||||
return FALSE
|
||||
if(STACK_CHECK_ADJACENT)
|
||||
if(locate(R.result_type) in range(1, T))
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed at least one tile away from others of its type!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/use(used, transfer = FALSE, check = TRUE) // return 0 = borked; return 1 = had enough
|
||||
if(check && zero_amount())
|
||||
return FALSE
|
||||
if (is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
if (amount < used)
|
||||
return FALSE
|
||||
amount -= used
|
||||
if(check)
|
||||
zero_amount()
|
||||
update_icon()
|
||||
update_weight()
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/tool_use_check(mob/living/user, amount)
|
||||
if(get_amount() < amount)
|
||||
if(singular_name)
|
||||
if(amount > 1)
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name]\s to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name] to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] to do this!</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/zero_amount()
|
||||
if(is_cyborg)
|
||||
return source.energy < cost
|
||||
if(amount < 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/stack/proc/add(amount)
|
||||
if (is_cyborg)
|
||||
source.add_charge(amount * cost)
|
||||
else
|
||||
src.amount += amount
|
||||
update_icon()
|
||||
update_weight()
|
||||
|
||||
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
|
||||
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
|
||||
return
|
||||
var/transfer = get_amount()
|
||||
if(S.is_cyborg)
|
||||
transfer = min(transfer, round((S.source.max_energy - S.source.energy) / S.cost))
|
||||
else
|
||||
transfer = min(transfer, S.max_amount - S.amount)
|
||||
if(pulledby)
|
||||
pulledby.start_pulling(S)
|
||||
S.copy_evidences(src)
|
||||
use(transfer, TRUE)
|
||||
S.add(transfer)
|
||||
return transfer
|
||||
|
||||
/obj/item/stack/Crossed(obj/o)
|
||||
if(istype(o, merge_type) && !o.throwing)
|
||||
merge(o)
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/hitby(atom/movable/AM, skip, hitpush)
|
||||
if(istype(AM, merge_type))
|
||||
merge(AM)
|
||||
. = ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
return change_stack(user,1)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(is_cyborg)
|
||||
return
|
||||
else
|
||||
if(zero_amount())
|
||||
return
|
||||
//get amount from user
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
|
||||
max = get_amount()
|
||||
stackmaterial = min(max, stackmaterial)
|
||||
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else
|
||||
change_stack(user, stackmaterial)
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
|
||||
|
||||
/obj/item/stack/proc/change_stack(mob/user, amount)
|
||||
if(!use(amount, TRUE, FALSE))
|
||||
return FALSE
|
||||
var/obj/item/stack/F = new type(user? user : drop_location(), amount, FALSE)
|
||||
. = F
|
||||
F.copy_evidences(src)
|
||||
if(user)
|
||||
if(!user.put_in_hands(F, merge_stacks = FALSE))
|
||||
F.forceMove(user.drop_location())
|
||||
add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
zero_amount()
|
||||
|
||||
/obj/item/stack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, merge_type))
|
||||
var/obj/item/stack/S = W
|
||||
if(merge(S))
|
||||
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from)
|
||||
blood_DNA = from.blood_DNA
|
||||
fingerprints = from.fingerprints
|
||||
fingerprintshidden = from.fingerprintshidden
|
||||
fingerprintslast = from.fingerprintslast
|
||||
//TODO bloody overlay
|
||||
|
||||
/obj/item/stack/microwave_act(obj/machinery/microwave/M)
|
||||
if(istype(M) && M.dirty < 100)
|
||||
M.dirty += amount
|
||||
|
||||
/*
|
||||
* Recipe datum
|
||||
*/
|
||||
/datum/stack_recipe
|
||||
var/title = "ERROR"
|
||||
var/result_type
|
||||
var/req_amount = 1
|
||||
var/res_amount = 1
|
||||
var/max_res_amount = 1
|
||||
var/time = 0
|
||||
var/one_per_turf = FALSE
|
||||
var/on_floor = FALSE
|
||||
var/window_checks = FALSE
|
||||
var/placement_checks = FALSE
|
||||
|
||||
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1,time = 0, one_per_turf = FALSE, on_floor = FALSE, window_checks = FALSE, placement_checks = FALSE )
|
||||
|
||||
|
||||
src.title = title
|
||||
src.result_type = result_type
|
||||
src.req_amount = req_amount
|
||||
src.res_amount = res_amount
|
||||
src.max_res_amount = max_res_amount
|
||||
src.time = time
|
||||
src.one_per_turf = one_per_turf
|
||||
src.on_floor = on_floor
|
||||
src.window_checks = window_checks
|
||||
src.placement_checks = placement_checks
|
||||
/*
|
||||
* Recipe list datum
|
||||
*/
|
||||
/datum/stack_recipe_list
|
||||
var/title = "ERROR"
|
||||
var/list/recipes
|
||||
|
||||
/datum/stack_recipe_list/New(title, recipes)
|
||||
src.title = title
|
||||
src.recipes = recipes
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/item/stack/telecrystal
|
||||
name = "telecrystal"
|
||||
desc = "It seems to be pulsing with suspiciously enticing energies."
|
||||
singular_name = "telecrystal"
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "telecrystal"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
max_amount = 50
|
||||
item_flags = NOBLUDGEON
|
||||
|
||||
/obj/item/stack/telecrystal/attack(mob/target, mob/user)
|
||||
if(target == user && isliving(user)) //You can't go around smacking people with crystals to find out if they have an uplink or not.
|
||||
var/mob/living/L = user
|
||||
for(var/obj/item/implant/uplink/I in L.implants)
|
||||
if(I?.imp_in)
|
||||
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/cartridge/virus/frame))
|
||||
var/obj/item/cartridge/virus/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
|
||||
@@ -0,0 +1,620 @@
|
||||
/* Backpacks
|
||||
* Contains:
|
||||
* Backpack
|
||||
* Backpack Types
|
||||
* Satchel Types
|
||||
*/
|
||||
|
||||
/*
|
||||
* Backpack
|
||||
*/
|
||||
|
||||
/obj/item/storage/backpack
|
||||
name = "backpack"
|
||||
desc = "You wear this on your back and put items into it."
|
||||
icon_state = "backpack"
|
||||
item_state = "backpack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK //ERROOOOO
|
||||
resistance_flags = NONE
|
||||
max_integrity = 300
|
||||
|
||||
/obj/item/storage/backpack/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_items = 21
|
||||
|
||||
/*
|
||||
* Backpack Types
|
||||
*/
|
||||
|
||||
/obj/item/storage/backpack/old/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 12
|
||||
|
||||
/obj/item/storage/backpack/holding
|
||||
name = "bag of holding"
|
||||
desc = "A backpack that opens into a localized pocket of Blue Space."
|
||||
icon_state = "holdingpack"
|
||||
item_state = "holdingpack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
|
||||
component_type = /datum/component/storage/concrete/bluespace/bag_of_holding
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/holding/satchel
|
||||
name = "satchel of holding"
|
||||
desc = "A satchel that opens into a localized pocket of Blue Space."
|
||||
icon_state = "holdingsat"
|
||||
item_state = "holdingsat"
|
||||
species_exception = list(/datum/species/angel)
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_big_nesting = TRUE
|
||||
STR.max_w_class = WEIGHT_CLASS_GIGANTIC
|
||||
STR.max_combined_w_class = 35
|
||||
|
||||
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Stun(100, ignore_canstun = TRUE)
|
||||
sleep(20)
|
||||
playsound(src, "rustle", 50, 1, -5)
|
||||
qdel(user)
|
||||
return
|
||||
|
||||
/obj/item/storage/backpack/holding/singularity_act(current_size)
|
||||
var/dist = max((current_size - 2),1)
|
||||
explosion(src.loc,(dist),(dist*2),(dist*4))
|
||||
return
|
||||
|
||||
/obj/item/storage/backpack/santabag
|
||||
name = "Santa's Gift Bag"
|
||||
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
|
||||
icon_state = "giftbag0"
|
||||
item_state = "giftbag"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/santabag/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 60
|
||||
|
||||
/obj/item/storage/backpack/santabag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] places [src] over [user.p_their()] head and pulls it tight! It looks like [user.p_they()] [user.p_are()]n't in the Christmas spirit...</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/storage/backpack/cultpack
|
||||
name = "trophy rack"
|
||||
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
|
||||
icon_state = "cultpack"
|
||||
item_state = "backpack"
|
||||
|
||||
/obj/item/storage/backpack/clown
|
||||
name = "Giggles von Honkerton"
|
||||
desc = "It's a backpack made by Honk! Co."
|
||||
icon_state = "clownpack"
|
||||
item_state = "clownpack"
|
||||
|
||||
/obj/item/storage/backpack/explorer
|
||||
name = "explorer bag"
|
||||
desc = "A robust backpack for stashing your loot."
|
||||
icon_state = "explorerpack"
|
||||
item_state = "explorerpack"
|
||||
|
||||
/obj/item/storage/backpack/mime
|
||||
name = "Parcel Parceaux"
|
||||
desc = "A silent backpack made for those silent workers. Silence Co."
|
||||
icon_state = "mimepack"
|
||||
item_state = "mimepack"
|
||||
|
||||
/obj/item/storage/backpack/medic
|
||||
name = "medical backpack"
|
||||
desc = "It's a backpack especially designed for use in a sterile environment."
|
||||
icon_state = "medicalpack"
|
||||
item_state = "medicalpack"
|
||||
|
||||
/obj/item/storage/backpack/security
|
||||
name = "security backpack"
|
||||
desc = "It's a very robust backpack."
|
||||
icon_state = "securitypack"
|
||||
item_state = "securitypack"
|
||||
|
||||
/obj/item/storage/backpack/captain
|
||||
name = "captain's backpack"
|
||||
desc = "It's a special backpack made exclusively for Nanotrasen officers."
|
||||
icon_state = "captainpack"
|
||||
item_state = "captainpack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/industrial
|
||||
name = "industrial backpack"
|
||||
desc = "It's a tough backpack for the daily grind of station life."
|
||||
icon_state = "engiepack"
|
||||
item_state = "engiepack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/botany
|
||||
name = "botany backpack"
|
||||
desc = "It's a backpack made of all-natural fibers."
|
||||
icon_state = "botpack"
|
||||
item_state = "botpack"
|
||||
|
||||
/obj/item/storage/backpack/chemistry
|
||||
name = "chemistry backpack"
|
||||
desc = "A backpack specially designed to repel stains and hazardous liquids."
|
||||
icon_state = "chempack"
|
||||
item_state = "chempack"
|
||||
|
||||
/obj/item/storage/backpack/genetics
|
||||
name = "genetics backpack"
|
||||
desc = "A bag designed to be super tough, just in case someone hulks out on you."
|
||||
icon_state = "genepack"
|
||||
item_state = "genepack"
|
||||
|
||||
/obj/item/storage/backpack/science
|
||||
name = "science backpack"
|
||||
desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma."
|
||||
icon_state = "toxpack"
|
||||
item_state = "toxpack"
|
||||
|
||||
/obj/item/storage/backpack/virology
|
||||
name = "virology backpack"
|
||||
desc = "A backpack made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey."
|
||||
icon_state = "viropack"
|
||||
item_state = "viropack"
|
||||
|
||||
/*
|
||||
* Satchel Types
|
||||
*/
|
||||
|
||||
/obj/item/storage/backpack/satchel
|
||||
name = "satchel"
|
||||
desc = "A trendy looking satchel."
|
||||
icon_state = "satchel-norm"
|
||||
species_exception = list(/datum/species/angel) //satchels can be equipped since they are on the side, not back
|
||||
|
||||
/obj/item/storage/backpack/satchel/leather
|
||||
name = "leather satchel"
|
||||
desc = "It's a very fancy satchel made with fine leather."
|
||||
icon_state = "satchel"
|
||||
|
||||
/obj/item/storage/backpack/satchel/leather/withwallet/PopulateContents()
|
||||
new /obj/item/storage/wallet/random(src)
|
||||
|
||||
/obj/item/storage/backpack/satchel/eng
|
||||
name = "industrial satchel"
|
||||
desc = "A tough satchel with extra pockets."
|
||||
icon_state = "satchel-eng"
|
||||
item_state = "engiepack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/satchel/med
|
||||
name = "medical satchel"
|
||||
desc = "A sterile satchel used in medical departments."
|
||||
icon_state = "satchel-med"
|
||||
item_state = "medicalpack"
|
||||
|
||||
/obj/item/storage/backpack/satchel/vir
|
||||
name = "virologist satchel"
|
||||
desc = "A sterile satchel with virologist colours."
|
||||
icon_state = "satchel-vir"
|
||||
item_state = "satchel-vir"
|
||||
|
||||
/obj/item/storage/backpack/satchel/chem
|
||||
name = "chemist satchel"
|
||||
desc = "A sterile satchel with chemist colours."
|
||||
icon_state = "satchel-chem"
|
||||
item_state = "satchel-chem"
|
||||
|
||||
/obj/item/storage/backpack/satchel/gen
|
||||
name = "geneticist satchel"
|
||||
desc = "A sterile satchel with geneticist colours."
|
||||
icon_state = "satchel-gen"
|
||||
item_state = "satchel-gen"
|
||||
|
||||
/obj/item/storage/backpack/satchel/tox
|
||||
name = "scientist satchel"
|
||||
desc = "Useful for holding research materials."
|
||||
icon_state = "satchel-tox"
|
||||
item_state = "satchel-tox"
|
||||
|
||||
/obj/item/storage/backpack/satchel/hyd
|
||||
name = "botanist satchel"
|
||||
desc = "A satchel made of all natural fibers."
|
||||
icon_state = "satchel-hyd"
|
||||
item_state = "satchel-hyd"
|
||||
|
||||
/obj/item/storage/backpack/satchel/sec
|
||||
name = "security satchel"
|
||||
desc = "A robust satchel for security related needs."
|
||||
icon_state = "satchel-sec"
|
||||
item_state = "securitypack"
|
||||
|
||||
/obj/item/storage/backpack/satchel/explorer
|
||||
name = "explorer satchel"
|
||||
desc = "A robust satchel for stashing your loot."
|
||||
icon_state = "satchel-explorer"
|
||||
item_state = "securitypack"
|
||||
|
||||
/obj/item/storage/backpack/satchel/bone
|
||||
name = "bone satchel"
|
||||
desc = "A bone satchel fashend with watcher wings and large bones from goliath. Can be worn on the belt."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "goliath_saddle"
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
|
||||
/obj/item/storage/backpack/satchel/bone/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 20
|
||||
STR.max_items = 15
|
||||
|
||||
/obj/item/storage/backpack/satchel/cap
|
||||
name = "captain's satchel"
|
||||
desc = "An exclusive satchel for Nanotrasen officers."
|
||||
icon_state = "satchel-cap"
|
||||
item_state = "captainpack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat
|
||||
name = "smuggler's satchel"
|
||||
desc = "A very slim satchel that can easily fit into tight spaces."
|
||||
icon_state = "satchel-flat"
|
||||
w_class = WEIGHT_CLASS_BULKY //Can fit in backpacks itself.
|
||||
level = 1
|
||||
component_type = /datum/component/storage/concrete/secret_satchel
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/Initialize()
|
||||
. = ..()
|
||||
SSpersistence.new_secret_satchels += src
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 6
|
||||
STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/hide(intact)
|
||||
if(intact)
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
anchored = TRUE //otherwise you can start pulling, cover it, and drag around an invisible backpack.
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else
|
||||
invisibility = initial(invisibility)
|
||||
anchored = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/PopulateContents()
|
||||
new /obj/item/stack/tile/plasteel(src)
|
||||
new /obj/item/crowbar(src)
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/Destroy()
|
||||
SSpersistence.new_secret_satchels -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/secret
|
||||
var/list/reward_one_of_these = list() //Intended for map editing
|
||||
var/list/reward_all_of_these = list() //use paths!
|
||||
var/revealed = FALSE
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/secret/Initialize()
|
||||
. = ..()
|
||||
|
||||
if(isfloorturf(loc) && !isplatingturf(loc))
|
||||
hide(1)
|
||||
|
||||
/obj/item/storage/backpack/satchel/flat/secret/hide(intact)
|
||||
..()
|
||||
if(!intact && !revealed)
|
||||
if(reward_one_of_these.len > 0)
|
||||
var/reward = pick(reward_one_of_these)
|
||||
new reward(src)
|
||||
for(var/R in reward_all_of_these)
|
||||
new R(src)
|
||||
revealed = TRUE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag
|
||||
name = "duffel bag"
|
||||
desc = "A large duffel bag for holding extra things."
|
||||
icon_state = "duffel"
|
||||
item_state = "duffel"
|
||||
slowdown = 1
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 30
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/captain
|
||||
name = "captain's duffel bag"
|
||||
desc = "A large duffel bag for holding extra captainly goods."
|
||||
icon_state = "duffel-captain"
|
||||
item_state = "duffel-captain"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/med
|
||||
name = "medical duffel bag"
|
||||
desc = "A large duffel bag for holding extra medical supplies."
|
||||
icon_state = "duffel-med"
|
||||
item_state = "duffel-med"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/med/surgery
|
||||
name = "surgical duffel bag"
|
||||
desc = "A large duffel bag for holding extra medical supplies - this one seems to be designed for holding surgical tools."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/med/surgery/PopulateContents()
|
||||
new /obj/item/scalpel(src)
|
||||
new /obj/item/hemostat(src)
|
||||
new /obj/item/retractor(src)
|
||||
new /obj/item/circular_saw(src)
|
||||
new /obj/item/surgicaldrill(src)
|
||||
new /obj/item/cautery(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/reagent_containers/medspray/sterilizine(src)
|
||||
new /obj/item/razor(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/sec
|
||||
name = "security duffel bag"
|
||||
desc = "A large duffel bag for holding extra security supplies and ammunition."
|
||||
icon_state = "duffel-sec"
|
||||
item_state = "duffel-sec"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/sec/surgery
|
||||
name = "surgical duffel bag"
|
||||
desc = "A large duffel bag for holding extra supplies - this one has a material inlay with space for various sharp-looking tools."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/sec/surgery/PopulateContents()
|
||||
new /obj/item/scalpel(src)
|
||||
new /obj/item/hemostat(src)
|
||||
new /obj/item/retractor(src)
|
||||
new /obj/item/circular_saw(src)
|
||||
new /obj/item/surgicaldrill(src)
|
||||
new /obj/item/cautery(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/reagent_containers/medspray/sterilizine(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/engineering
|
||||
name = "industrial duffel bag"
|
||||
desc = "A large duffel bag for holding extra tools and supplies."
|
||||
icon_state = "duffel-eng"
|
||||
item_state = "duffel-eng"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/durathread
|
||||
name = "durathread duffel bag"
|
||||
desc = "A lightweight duffel bag made out of durathread."
|
||||
icon_state = "duffel-durathread"
|
||||
item_state = "duffel-durathread"
|
||||
resistance_flags = FIRE_PROOF
|
||||
slowdown = 0
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/drone
|
||||
name = "drone duffel bag"
|
||||
desc = "A large duffel bag for holding tools and hats."
|
||||
icon_state = "duffel-drone"
|
||||
item_state = "duffel-drone"
|
||||
resistance_flags = FIRE_PROOF
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/drone/PopulateContents()
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/pipe_dispenser(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/clown
|
||||
name = "clown's duffel bag"
|
||||
desc = "A large duffel bag for holding lots of funny gags!"
|
||||
icon_state = "duffel-clown"
|
||||
item_state = "duffel-clown"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/clown/cream_pie/PopulateContents()
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/reagent_containers/food/snacks/pie/cream(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie
|
||||
name = "suspicious looking duffel bag"
|
||||
desc = "A large duffel bag for holding extra tactical supplies."
|
||||
icon_state = "duffel-syndie"
|
||||
item_state = "duffel-syndieammo"
|
||||
slowdown = 0
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.silent = TRUE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/hitman
|
||||
desc = "A large duffel bag for holding extra things. There is a Nanotrasen logo on the back."
|
||||
icon_state = "duffel-syndieammo"
|
||||
item_state = "duffel-syndieammo"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/hitman/PopulateContents()
|
||||
new /obj/item/clothing/under/lawyer/blacksuit(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/suit/toggle/lawyer/black(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/head/fedora(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/med
|
||||
name = "medical duffel bag"
|
||||
desc = "A large duffel bag for holding extra tactical medical supplies."
|
||||
icon_state = "duffel-syndiemed"
|
||||
item_state = "duffel-syndiemed"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery
|
||||
name = "surgery duffel bag"
|
||||
desc = "A suspicious looking duffel bag for holding surgery tools."
|
||||
icon_state = "duffel-syndiemed"
|
||||
item_state = "duffel-syndiemed"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery/PopulateContents()
|
||||
new /obj/item/scalpel(src)
|
||||
new /obj/item/hemostat(src)
|
||||
new /obj/item/retractor(src)
|
||||
new /obj/item/circular_saw(src)
|
||||
new /obj/item/surgicaldrill(src)
|
||||
new /obj/item/cautery(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
new /obj/item/clothing/suit/straight_jacket(src)
|
||||
new /obj/item/clothing/mask/muzzle(src)
|
||||
new /obj/item/mmi/syndie(src)
|
||||
new /obj/item/implantcase(src)
|
||||
new /obj/item/implanter(src)
|
||||
new /obj/item/reagent_containers/medspray/sterilizine(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery_adv
|
||||
name = "advanced surgery duffel bag"
|
||||
desc = "A large duffel bag for holding surgical tools. Bears the logo of an advanced med-tech firm."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery_adv/PopulateContents()
|
||||
new /obj/item/scalpel/advanced(src)
|
||||
new /obj/item/retractor/advanced(src)
|
||||
new /obj/item/surgicaldrill/advanced(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
new /obj/item/storage/firstaid/tactical(src)
|
||||
new /obj/item/clothing/suit/straight_jacket(src)
|
||||
new /obj/item/clothing/mask/muzzle(src)
|
||||
new /obj/item/mmi/syndie(src)
|
||||
new /obj/item/implantcase(src)
|
||||
new /obj/item/implanter(src)
|
||||
new /obj/item/reagent_containers/medspray/sterilizine(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ammo
|
||||
name = "ammunition duffel bag"
|
||||
desc = "A large duffel bag for holding extra weapons ammunition and supplies."
|
||||
icon_state = "duffel-syndieammo"
|
||||
item_state = "duffel-syndieammo"
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ammo/shotgun
|
||||
desc = "A large duffel bag, packed to the brim with Bulldog shotgun drum magazines."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ammo/shotgun/PopulateContents()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/ammo_box/magazine/m12g(src)
|
||||
new /obj/item/ammo_box/magazine/m12g/stun(src)
|
||||
new /obj/item/ammo_box/magazine/m12g/slug(src)
|
||||
new /obj/item/ammo_box/magazine/m12g/dragon(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ammo/smg
|
||||
desc = "A large duffel bag, packed to the brim with C-20r magazines."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/ammo/smg/PopulateContents()
|
||||
for(var/i in 1 to 9)
|
||||
new /obj/item/ammo_box/magazine/smgm45(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/c20rbundle
|
||||
desc = "A large duffel bag containing a C-20r, some magazines, and a cheap looking suppressor."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/c20rbundle/PopulateContents()
|
||||
new /obj/item/ammo_box/magazine/smgm45(src)
|
||||
new /obj/item/ammo_box/magazine/smgm45(src)
|
||||
new /obj/item/gun/ballistic/automatic/c20r(src)
|
||||
new /obj/item/suppressor/specialoffer(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/bulldogbundle
|
||||
desc = "A large duffel bag containing a Bulldog, some drums, and a pair of thermal imaging glasses."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/bulldogbundle/PopulateContents()
|
||||
new /obj/item/ammo_box/magazine/m12g(src)
|
||||
new /obj/item/gun/ballistic/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/ammo_box/magazine/m12g/stun(src)
|
||||
new /obj/item/clothing/glasses/thermal/syndi(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle
|
||||
desc = "A large duffel bag containing a tactical medkit, a Donksoft machine gun, a big jumbo box of riot darts, and a knock-off pair of magboots."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle/PopulateContents()
|
||||
new /obj/item/clothing/shoes/magboots/syndie(src)
|
||||
new /obj/item/storage/firstaid/tactical(src)
|
||||
new /obj/item/gun/ballistic/automatic/l6_saw/toy(src)
|
||||
new /obj/item/ammo_box/foambox/riot(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle
|
||||
desc = "A large duffel bag containing deadly chemicals, a handheld chem sprayer, Bioterror foam grenade, a Donksoft assault rifle, box of riot grade darts, a dart pistol, and a box of syringes."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle/PopulateContents()
|
||||
new /obj/item/reagent_containers/spray/chemsprayer/bioterror(src)
|
||||
new /obj/item/storage/box/syndie_kit/chemical(src)
|
||||
new /obj/item/gun/syringe/syndicate(src)
|
||||
new /obj/item/gun/ballistic/automatic/c20r/toy(src)
|
||||
new /obj/item/storage/box/syringes(src)
|
||||
new /obj/item/ammo_box/foambox/riot(src)
|
||||
new /obj/item/grenade/chem_grenade/bioterrorfoam(src)
|
||||
if(prob(5))
|
||||
new /obj/item/reagent_containers/food/snacks/pizza/pineapple(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/c4/PopulateContents()
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/grenade/plastic/c4(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/x4/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/grenade/plastic/x4(src)
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/firestarter
|
||||
desc = "A large duffel bag containing a New Russian pyro backpack sprayer, Elite hardsuit, a Stechkin APS pistol, minibomb, ammo, and other equipment."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/firestarter/PopulateContents()
|
||||
new /obj/item/clothing/under/syndicate/soviet(src)
|
||||
new /obj/item/watertank/op(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
|
||||
new /obj/item/gun/ballistic/automatic/pistol/APS(src)
|
||||
new /obj/item/ammo_box/magazine/pistolm9mm(src)
|
||||
new /obj/item/ammo_box/magazine/pistolm9mm(src)
|
||||
new /obj/item/reagent_containers/food/drinks/bottle/vodka/badminka(src)
|
||||
new /obj/item/reagent_containers/syringe/stimulants(src)
|
||||
new /obj/item/grenade/syndieminibomb(src)
|
||||
|
||||
// For ClownOps.
|
||||
/obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
slowdown = 0
|
||||
STR.silent = TRUE
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/clown/syndie/PopulateContents()
|
||||
new /obj/item/pda/clown(src)
|
||||
new /obj/item/clothing/under/rank/clown(src)
|
||||
new /obj/item/clothing/shoes/clown_shoes(src)
|
||||
new /obj/item/clothing/mask/gas/clown_hat(src)
|
||||
new /obj/item/bikehorn(src)
|
||||
new /obj/item/implanter/sad_trombone(src)
|
||||
|
||||
obj/item/storage/backpack/duffelbag/syndie/shredderbundle
|
||||
desc = "A large duffel bag containing two CX Shredders, some magazines, an elite hardsuit, and a chest rig."
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/syndie/shredderbundle/PopulateContents()
|
||||
new /obj/item/ammo_box/magazine/flechette/shredder(src)
|
||||
new /obj/item/ammo_box/magazine/flechette/shredder(src)
|
||||
new /obj/item/ammo_box/magazine/flechette/shredder(src)
|
||||
new /obj/item/ammo_box/magazine/flechette/shredder(src)
|
||||
new /obj/item/gun/ballistic/automatic/flechette/shredder(src)
|
||||
new /obj/item/gun/ballistic/automatic/flechette/shredder(src)
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
|
||||
@@ -0,0 +1,406 @@
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/storage/bag
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/storage/bag/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_quick_gather = TRUE
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.click_gather = TRUE
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/insertable = TRUE
|
||||
|
||||
/obj/item/storage/bag/trash/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_combined_w_class = 30
|
||||
STR.max_items = 30
|
||||
STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
|
||||
STR.limited_random_access = TRUE
|
||||
STR.limited_random_access_stack_position = 3
|
||||
|
||||
/obj/item/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
/obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 60
|
||||
STR.max_items = 60
|
||||
STR.limited_random_access_stack_position = 5
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/cyborg
|
||||
insertable = FALSE
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
|
||||
var/mob/listeningTo
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/bag/ore/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 50
|
||||
|
||||
/obj/item/storage/bag/ore/equipped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo == user)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/storage/bag/ore/dropped()
|
||||
. = ..()
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
|
||||
/obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user)
|
||||
var/show_message = FALSE
|
||||
var/obj/structure/ore_box/box
|
||||
var/turf/tile = user.loc
|
||||
if (!isturf(tile))
|
||||
return
|
||||
if (istype(user.pulling, /obj/structure/ore_box))
|
||||
box = user.pulling
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
for(var/A in tile)
|
||||
if (!is_type_in_typecache(A, STR.can_hold))
|
||||
continue
|
||||
if (box)
|
||||
user.transferItemToLoc(A, box)
|
||||
show_message = TRUE
|
||||
else if(SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, A, user, TRUE))
|
||||
show_message = TRUE
|
||||
else
|
||||
if(!spam_protection)
|
||||
to_chat(user, "<span class='warning'>Your [name] is full and can't hold any more!</span>")
|
||||
spam_protection = TRUE
|
||||
continue
|
||||
if(show_message)
|
||||
playsound(user, "rustle", 50, TRUE)
|
||||
if (box)
|
||||
user.visible_message("<span class='notice'>[user] offloads the ores beneath [user.p_them()] into [box].</span>", \
|
||||
"<span class='notice'>You offload the ores beneath you into your [box].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scoops up the ores beneath [user.p_them()].</span>", \
|
||||
"<span class='notice'>You scoop up the ores beneath you with your [name].</span>")
|
||||
spam_protection = FALSE
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/large
|
||||
name = "large mining satchel"
|
||||
desc = "This bag can hold three times the ore in many small pockets. Shockingly foldable and compact for its volume."
|
||||
|
||||
/obj/item/storage/bag/ore/large/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
STR.max_combined_stack_amount = 150
|
||||
|
||||
/obj/item/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
/obj/item/storage/bag/ore/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_items = INFINITY
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_combined_stack_amount = INFINITY
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/plants/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 100
|
||||
STR.max_items = 100
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb))
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
|
||||
/obj/item/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
component_type = /datum/component/storage/concrete/stack
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/stack/sheet))
|
||||
STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood))
|
||||
STR.max_combined_stack_amount = 300
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
/obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
|
||||
STR.max_combined_stack_amount = 500
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/books/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_items = 7
|
||||
STR.display_numerical_stacking = FALSE
|
||||
STR.can_hold = typecacheof(list(/obj/item/book, /obj/item/storage/book, /obj/item/spellbook))
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
materials = list(MAT_METAL=3000)
|
||||
|
||||
/obj/item/storage/bag/tray/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.insert_preposition = "on"
|
||||
|
||||
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_QUICK_EMPTY)
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/update_icon()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
add_overlay(new /mutable_appearance(I))
|
||||
|
||||
/obj/item/storage/bag/tray/Entered()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/Exited()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/chemistry/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 50
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/syringe/dart))
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/storage/bag/bio/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 25
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube))
|
||||
|
||||
/obj/item/storage/bag/bio/holding
|
||||
name = "bio bag of holding"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bspace_biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/bag/bio/holding/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = INFINITY
|
||||
STR.max_items = 100
|
||||
Executable
+800
@@ -0,0 +1,800 @@
|
||||
/obj/item/storage/belt
|
||||
name = "belt"
|
||||
desc = "Can hold various things."
|
||||
icon = 'icons/obj/clothing/belts.dmi'
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
max_integrity = 300
|
||||
var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding
|
||||
var/worn_overlays = FALSE //worn counterpart of the above.
|
||||
|
||||
/obj/item/storage/belt/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins belting [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/storage/belt/update_icon()
|
||||
cut_overlays()
|
||||
if(content_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
var/mutable_appearance/M = I.get_belt_overlay()
|
||||
add_overlay(M)
|
||||
..()
|
||||
|
||||
/obj/item/storage/belt/worn_overlays(isinhands, icon_file)
|
||||
. = ..()
|
||||
if(!isinhands && worn_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
. += I.get_worn_belt_overlay(icon_file)
|
||||
|
||||
/obj/item/storage/belt/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/belt/utility
|
||||
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
desc = "Holds tools."
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
content_overlays = TRUE
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE //because this is easier than trying to have showers wash all contents.
|
||||
|
||||
/obj/item/storage/belt/utility/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
var/static/list/can_hold = typecacheof(list(
|
||||
/obj/item/crowbar,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/weldingtool,
|
||||
/obj/item/wirecutters,
|
||||
/obj/item/wrench,
|
||||
/obj/item/multitool,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/t_scanner,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/geiger_counter,
|
||||
/obj/item/extinguisher/mini,
|
||||
/obj/item/radio,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/holosign_creator,
|
||||
/obj/item/assembly/signaler
|
||||
))
|
||||
STR.can_hold = can_hold
|
||||
|
||||
/obj/item/storage/belt/utility/chief
|
||||
name = "\improper Chief Engineer's toolbelt" //"the Chief Engineer's toolbelt", because "Chief Engineer's toolbelt" is not a proper noun
|
||||
desc = "Holds tools, looks snazzy."
|
||||
icon_state = "utilitybelt_ce"
|
||||
item_state = "utility_ce"
|
||||
|
||||
/obj/item/storage/belt/utility/chief/full/PopulateContents()
|
||||
new /obj/item/screwdriver/power(src)
|
||||
new /obj/item/crowbar/power(src)
|
||||
new /obj/item/weldingtool/experimental(src)//This can be changed if this is too much
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
new /obj/item/extinguisher/mini(src)
|
||||
new /obj/item/analyzer(src)
|
||||
//much roomier now that we've managed to remove two tools
|
||||
|
||||
/obj/item/storage/belt/utility/full/PopulateContents()
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
|
||||
/obj/item/storage/belt/utility/full/engi/PopulateContents()
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
|
||||
|
||||
/obj/item/storage/belt/utility/atmostech/PopulateContents()
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/t_scanner(src)
|
||||
new /obj/item/extinguisher/mini(src)
|
||||
|
||||
/obj/item/storage/belt/utility/servant/PopulateContents()
|
||||
new /obj/item/screwdriver/brass(src)
|
||||
new /obj/item/wirecutters/brass(src)
|
||||
new /obj/item/wrench/brass(src)
|
||||
new /obj/item/crowbar/brass(src)
|
||||
new /obj/item/weldingtool/experimental/brass(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/stack/cable_coil(src, 30, "yellow")
|
||||
|
||||
/obj/item/storage/belt/medical
|
||||
name = "medical belt"
|
||||
desc = "Can hold various medical equipment."
|
||||
icon_state = "medicalbelt"
|
||||
item_state = "medical"
|
||||
content_overlays = TRUE
|
||||
|
||||
/obj/item/storage/belt/medical/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/healthanalyzer,
|
||||
/obj/item/dnainjector,
|
||||
/obj/item/reagent_containers/dropper,
|
||||
/obj/item/reagent_containers/glass/beaker,
|
||||
/obj/item/reagent_containers/glass/bottle,
|
||||
/obj/item/reagent_containers/pill,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/reagent_containers/medspray,
|
||||
/obj/item/lighter,
|
||||
/obj/item/storage/fancy/cigarettes,
|
||||
/obj/item/storage/pill_bottle,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/flashlight/pen,
|
||||
/obj/item/extinguisher/mini,
|
||||
/obj/item/reagent_containers/hypospray,
|
||||
/obj/item/hypospray/mkii,
|
||||
/obj/item/sensor_device,
|
||||
/obj/item/radio,
|
||||
/obj/item/clothing/gloves/,
|
||||
/obj/item/lazarus_injector,
|
||||
/obj/item/bikehorn/rubberducky,
|
||||
/obj/item/clothing/mask/surgical,
|
||||
/obj/item/clothing/mask/breath,
|
||||
/obj/item/clothing/mask/breath/medical,
|
||||
/obj/item/surgical_drapes, //for true paramedics
|
||||
/obj/item/scalpel,
|
||||
/obj/item/circular_saw,
|
||||
/obj/item/surgicaldrill,
|
||||
/obj/item/retractor,
|
||||
/obj/item/cautery,
|
||||
/obj/item/hemostat,
|
||||
/obj/item/geiger_counter,
|
||||
/obj/item/clothing/neck/stethoscope,
|
||||
/obj/item/stamp,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/wrench/medical,
|
||||
/obj/item/clothing/mask/muzzle,
|
||||
/obj/item/storage/bag/chemistry,
|
||||
/obj/item/storage/bag/bio,
|
||||
/obj/item/reagent_containers/blood,
|
||||
/obj/item/tank/internals/emergency_oxygen,
|
||||
/obj/item/gun/syringe/syndicate,
|
||||
/obj/item/implantcase,
|
||||
/obj/item/implant,
|
||||
/obj/item/implanter,
|
||||
/obj/item/pinpointer/crew
|
||||
))
|
||||
|
||||
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv
|
||||
name = "surgical supply belt"
|
||||
desc = "A specialized belt designed for holding surgical equipment. It seems to have specific pockets for each and every surgical tool you can think of."
|
||||
content_overlays = FALSE
|
||||
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv/PopulateContents()
|
||||
new /obj/item/scalpel/advanced(src)
|
||||
new /obj/item/retractor/advanced(src)
|
||||
new /obj/item/surgicaldrill/advanced(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
|
||||
/obj/item/storage/belt/security
|
||||
name = "security belt"
|
||||
desc = "Can hold security gear like handcuffs and flashes."
|
||||
icon_state = "securitybelt"
|
||||
item_state = "security"//Could likely use a better one.
|
||||
content_overlays = TRUE
|
||||
|
||||
/obj/item/storage/belt/security/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 5
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/melee/classic_baton,
|
||||
/obj/item/grenade,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/assembly/flash/handheld,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/reagent_containers/food/snacks/donut,
|
||||
/obj/item/kitchen/knife/combat,
|
||||
/obj/item/flashlight/seclite,
|
||||
/obj/item/melee/classic_baton/telescopic,
|
||||
/obj/item/radio,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/restraints/legcuffs/bola
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/security/full/PopulateContents()
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/restraints/handcuffs(src)
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/assembly/flash/handheld(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/belt/mining
|
||||
name = "explorer's webbing"
|
||||
desc = "A versatile chest rig, cherished by miners and hunters alike."
|
||||
icon_state = "explorer1"
|
||||
item_state = "explorer1"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/storage/belt/mining/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.max_combined_w_class = 20
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/crowbar,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/weldingtool,
|
||||
/obj/item/wirecutters,
|
||||
/obj/item/wrench,
|
||||
/obj/item/multitool,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/extinguisher/mini,
|
||||
/obj/item/radio,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/resonator,
|
||||
/obj/item/mining_scanner,
|
||||
/obj/item/pickaxe,
|
||||
/obj/item/stack/sheet/animalhide,
|
||||
/obj/item/stack/sheet/sinew,
|
||||
/obj/item/stack/sheet/bone,
|
||||
/obj/item/lighter,
|
||||
/obj/item/storage/fancy/cigarettes,
|
||||
/obj/item/reagent_containers/food/drinks/bottle,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/kitchen/knife,
|
||||
/obj/item/reagent_containers/hypospray,
|
||||
/obj/item/gps,
|
||||
/obj/item/storage/bag/ore,
|
||||
/obj/item/survivalcapsule,
|
||||
/obj/item/t_scanner/adv_mining_scanner,
|
||||
/obj/item/reagent_containers/pill,
|
||||
/obj/item/storage/pill_bottle,
|
||||
/obj/item/stack/ore,
|
||||
/obj/item/reagent_containers/food/drinks,
|
||||
/obj/item/organ/regenerative_core,
|
||||
/obj/item/wormhole_jaunter,
|
||||
/obj/item/storage/bag/plants,
|
||||
/obj/item/stack/marker_beacon
|
||||
))
|
||||
|
||||
|
||||
/obj/item/storage/belt/mining/vendor
|
||||
contents = newlist(/obj/item/survivalcapsule)
|
||||
|
||||
/obj/item/storage/belt/mining/alt
|
||||
icon_state = "explorer2"
|
||||
item_state = "explorer2"
|
||||
|
||||
/obj/item/storage/belt/mining/primitive
|
||||
name = "hunter's belt"
|
||||
desc = "A versatile belt, woven from sinew."
|
||||
icon_state = "ebelt"
|
||||
item_state = "ebelt"
|
||||
|
||||
/obj/item/storage/belt/mining/primitive/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 5
|
||||
|
||||
/obj/item/storage/belt/soulstone
|
||||
name = "soul stone belt"
|
||||
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away."
|
||||
icon_state = "soulstonebelt"
|
||||
item_state = "soulstonebelt"
|
||||
|
||||
/obj/item/storage/belt/soulstone/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/soulstone
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/soulstone/full/PopulateContents()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/soulstone(src)
|
||||
|
||||
/obj/item/storage/belt/soulstone/full/chappy/PopulateContents()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/soulstone/anybody/chaplain(src)
|
||||
|
||||
/obj/item/storage/belt/champion
|
||||
name = "championship belt"
|
||||
desc = "Proves to the world that you are the strongest!"
|
||||
icon_state = "championbelt"
|
||||
item_state = "champion"
|
||||
materials = list(MAT_GOLD=400)
|
||||
|
||||
/obj/item/storage/belt/champion/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 1
|
||||
STR.can_hold = list(
|
||||
/obj/item/clothing/mask/luchador
|
||||
)
|
||||
|
||||
/obj/item/storage/belt/military
|
||||
name = "chest rig"
|
||||
desc = "A set of tactical webbing worn by Syndicate boarding parties."
|
||||
icon_state = "militarywebbing"
|
||||
item_state = "militarywebbing"
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/belt/military/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/storage/belt/military/snack
|
||||
name = "tactical snack rig"
|
||||
|
||||
/obj/item/storage/belt/military/snack/Initialize()
|
||||
. = ..()
|
||||
var/sponsor = pick("DonkCo", "Waffle Co.", "Roffle Co.", "Gorlax Marauders", "Tiger Cooperative")
|
||||
desc = "A set of snack-tical webbing worn by athletes of the [sponsor] VR sports division."
|
||||
|
||||
/obj/item/storage/belt/military/snack/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/reagent_containers/food/snacks,
|
||||
/obj/item/reagent_containers/food/drinks
|
||||
))
|
||||
|
||||
var/amount = 5
|
||||
var/rig_snacks
|
||||
while(contents.len <= amount)
|
||||
rig_snacks = pick(list(
|
||||
/obj/item/reagent_containers/food/snacks/candy,
|
||||
/obj/item/reagent_containers/food/drinks/dry_ramen,
|
||||
/obj/item/reagent_containers/food/snacks/chips,
|
||||
/obj/item/reagent_containers/food/snacks/sosjerky,
|
||||
/obj/item/reagent_containers/food/snacks/syndicake,
|
||||
/obj/item/reagent_containers/food/snacks/spacetwinkie,
|
||||
/obj/item/reagent_containers/food/snacks/cheesiehonkers,
|
||||
/obj/item/reagent_containers/food/snacks/nachos,
|
||||
/obj/item/reagent_containers/food/snacks/cheesynachos,
|
||||
/obj/item/reagent_containers/food/snacks/cubannachos,
|
||||
/obj/item/reagent_containers/food/snacks/nugget,
|
||||
/obj/item/reagent_containers/food/snacks/pastatomato,
|
||||
/obj/item/reagent_containers/food/snacks/rofflewaffles,
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/cola,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/space_mountain_wind,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/dr_gibb,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/starkist,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/space_up,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/pwr_game,
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime,
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/filled/nuka_cola,
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/filled/syndicatebomb
|
||||
))
|
||||
new rig_snacks(src)
|
||||
|
||||
/obj/item/storage/belt/military/abductor
|
||||
name = "agent belt"
|
||||
desc = "A belt used by abductor agents."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "belt"
|
||||
item_state = "security"
|
||||
|
||||
/obj/item/storage/belt/military/abductor/full/PopulateContents()
|
||||
new /obj/item/screwdriver/abductor(src)
|
||||
new /obj/item/wrench/abductor(src)
|
||||
new /obj/item/weldingtool/abductor(src)
|
||||
new /obj/item/crowbar/abductor(src)
|
||||
new /obj/item/wirecutters/abductor(src)
|
||||
new /obj/item/multitool/abductor(src)
|
||||
new /obj/item/stack/cable_coil(src,30,"white")
|
||||
|
||||
/obj/item/storage/belt/military/army
|
||||
name = "army belt"
|
||||
desc = "A belt used by military forces."
|
||||
icon_state = "grenadebeltold"
|
||||
item_state = "security"
|
||||
|
||||
/obj/item/storage/belt/military/assault
|
||||
name = "assault belt"
|
||||
desc = "A tactical assault belt."
|
||||
icon_state = "assaultbelt"
|
||||
item_state = "security"
|
||||
|
||||
/obj/item/storage/belt/military/assault/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
|
||||
/obj/item/storage/belt/durathread
|
||||
name = "durathread toolbelt"
|
||||
desc = "A toolbelt made out of durathread, it seems resistant enough to hold even big tools like an RCD, it also has higher capacity."
|
||||
icon_state = "webbing-durathread"
|
||||
item_state = "webbing-durathread"
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/storage/belt/durathread/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 14
|
||||
STR.max_combined_w_class = 32
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/crowbar,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/weldingtool,
|
||||
/obj/item/wirecutters,
|
||||
/obj/item/wrench,
|
||||
/obj/item/multitool,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/t_scanner,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/geiger_counter,
|
||||
/obj/item/extinguisher/mini,
|
||||
/obj/item/radio,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/holosign_creator/atmos,
|
||||
/obj/item/holosign_creator/engineering,
|
||||
/obj/item/forcefield_projector,
|
||||
/obj/item/assembly/signaler,
|
||||
/obj/item/lightreplacer,
|
||||
/obj/item/rcd_ammo,
|
||||
/obj/item/construction/rcd,
|
||||
/obj/item/pipe_dispenser,
|
||||
/obj/item/stack/rods,
|
||||
/obj/item/stack/tile/plasteel,
|
||||
/obj/item/grenade/chem_grenade/metalfoam,
|
||||
/obj/item/grenade/chem_grenade/smart_metal_foam
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/grenade
|
||||
name = "grenadier belt"
|
||||
desc = "A belt for holding grenades."
|
||||
icon_state = "grenadebeltnew"
|
||||
item_state = "security"
|
||||
|
||||
/obj/item/storage/belt/grenade/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 30
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.max_combined_w_class = 60
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/grenade,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/lighter,
|
||||
/obj/item/multitool,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/molotov,
|
||||
/obj/item/grenade/plastic/c4,
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/grenade/full/PopulateContents()
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/syndieminibomb/concussion/frag(src)
|
||||
new /obj/item/grenade/gluon(src)
|
||||
new /obj/item/grenade/gluon(src)
|
||||
new /obj/item/grenade/gluon(src)
|
||||
new /obj/item/grenade/gluon(src)
|
||||
new /obj/item/grenade/chem_grenade/incendiary(src)
|
||||
new /obj/item/grenade/chem_grenade/incendiary(src)
|
||||
new /obj/item/grenade/chem_grenade/facid(src)
|
||||
new /obj/item/grenade/syndieminibomb(src)
|
||||
new /obj/item/grenade/syndieminibomb(src)
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/multitool(src)
|
||||
|
||||
/obj/item/storage/belt/wands
|
||||
name = "wand belt"
|
||||
desc = "A belt designed to hold various rods of power. A veritable fanny pack of exotic magic."
|
||||
icon_state = "soulstonebelt"
|
||||
item_state = "soulstonebelt"
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/storage/belt/wands/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/gun/magic/wand
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/wands/full/PopulateContents()
|
||||
new /obj/item/gun/magic/wand/death(src)
|
||||
new /obj/item/gun/magic/wand/resurrection(src)
|
||||
new /obj/item/gun/magic/wand/polymorph(src)
|
||||
new /obj/item/gun/magic/wand/teleport(src)
|
||||
new /obj/item/gun/magic/wand/door(src)
|
||||
new /obj/item/gun/magic/wand/fireball(src)
|
||||
|
||||
for(var/obj/item/gun/magic/wand/W in contents) //All wands in this pack come in the best possible condition
|
||||
W.max_charges = initial(W.max_charges)
|
||||
W.charges = W.max_charges
|
||||
|
||||
/obj/item/storage/belt/janitor
|
||||
name = "janibelt"
|
||||
desc = "A belt used to hold most janitorial supplies."
|
||||
icon_state = "janibelt"
|
||||
item_state = "janibelt"
|
||||
|
||||
/obj/item/storage/belt/janitor/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit.
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/grenade/chem_grenade,
|
||||
/obj/item/lightreplacer,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/reagent_containers/glass/beaker,
|
||||
/obj/item/reagent_containers/glass/bottle,
|
||||
/obj/item/reagent_containers/spray,
|
||||
/obj/item/soap,
|
||||
/obj/item/holosign_creator,
|
||||
/obj/item/key/janitor,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/melee/flyswatter,
|
||||
/obj/item/paint/paint_remover,
|
||||
/obj/item/assembly/mousetrap
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/bandolier
|
||||
name = "bandolier"
|
||||
desc = "A bandolier for holding shotgun ammunition."
|
||||
icon_state = "bandolier"
|
||||
item_state = "bandolier"
|
||||
|
||||
/obj/item/storage/belt/bandolier/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 18
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/ammo_casing/shotgun
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/bandolier/durathread
|
||||
name = "durathread bandolier"
|
||||
desc = "An double stacked bandolier made out of durathread."
|
||||
icon_state = "bandolier-durathread"
|
||||
item_state = "bandolier-durathread"
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/storage/belt/bandolier/durathread/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 32
|
||||
STR.display_numerical_stacking = TRUE
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/ammo_casing
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/medolier
|
||||
name = "medolier"
|
||||
desc = "A medical bandolier for holding smartdarts."
|
||||
icon_state = "medolier"
|
||||
item_state = "medolier"
|
||||
|
||||
/obj/item/storage/belt/medolier/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 15
|
||||
STR.display_numerical_stacking = FALSE
|
||||
STR.allow_quick_gather = TRUE
|
||||
STR.allow_quick_empty = TRUE
|
||||
STR.click_gather = TRUE
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/reagent_containers/syringe/dart
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/medolier/full/PopulateContents()
|
||||
for(var/i in 1 to 16)
|
||||
new /obj/item/reagent_containers/syringe/dart/(src)
|
||||
|
||||
/obj/item/storage/belt/medolier/afterattack(obj/target, mob/user , proximity)
|
||||
if(!(istype(target, /obj/item/reagent_containers/glass/beaker)))
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
for(var/obj/item/reagent_containers/syringe/dart/D in contents)
|
||||
if(round(target.reagents.total_volume, 1) <= 0)
|
||||
to_chat(user, "<span class='notice'>You soak as many of the darts as you can with the contents from [target].</span>")
|
||||
return
|
||||
if(D.mode == SYRINGE_INJECT)
|
||||
continue
|
||||
|
||||
D.afterattack(target, user, proximity)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/storage/belt/holster
|
||||
name = "shoulder holster"
|
||||
desc = "A holster to carry a handgun and ammo. WARNING: Badasses only."
|
||||
icon_state = "holster"
|
||||
item_state = "holster"
|
||||
alternate_worn_layer = UNDER_SUIT_LAYER
|
||||
|
||||
/obj/item/storage/belt/holster/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 3
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/gun/ballistic/automatic/pistol,
|
||||
/obj/item/gun/ballistic/revolver,
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/toy/gun,
|
||||
/obj/item/gun/energy/e_gun/mini
|
||||
))
|
||||
|
||||
/obj/item/storage/belt/holster/full/PopulateContents()
|
||||
new /obj/item/gun/ballistic/revolver/detective(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
|
||||
/obj/item/storage/belt/fannypack
|
||||
name = "fannypack"
|
||||
desc = "A dorky fannypack for keeping small items in."
|
||||
icon_state = "fannypack_leather"
|
||||
item_state = "fannypack_leather"
|
||||
|
||||
/obj/item/storage/belt/fannypack/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 3
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/storage/belt/fannypack/black
|
||||
name = "black fannypack"
|
||||
icon_state = "fannypack_black"
|
||||
item_state = "fannypack_black"
|
||||
|
||||
/obj/item/storage/belt/fannypack/red
|
||||
name = "red fannypack"
|
||||
icon_state = "fannypack_red"
|
||||
item_state = "fannypack_red"
|
||||
|
||||
/obj/item/storage/belt/fannypack/purple
|
||||
name = "purple fannypack"
|
||||
icon_state = "fannypack_purple"
|
||||
item_state = "fannypack_purple"
|
||||
|
||||
/obj/item/storage/belt/fannypack/blue
|
||||
name = "blue fannypack"
|
||||
icon_state = "fannypack_blue"
|
||||
item_state = "fannypack_blue"
|
||||
|
||||
/obj/item/storage/belt/fannypack/orange
|
||||
name = "orange fannypack"
|
||||
icon_state = "fannypack_orange"
|
||||
item_state = "fannypack_orange"
|
||||
|
||||
/obj/item/storage/belt/fannypack/white
|
||||
name = "white fannypack"
|
||||
icon_state = "fannypack_white"
|
||||
item_state = "fannypack_white"
|
||||
|
||||
/obj/item/storage/belt/fannypack/green
|
||||
name = "green fannypack"
|
||||
icon_state = "fannypack_green"
|
||||
item_state = "fannypack_green"
|
||||
|
||||
/obj/item/storage/belt/fannypack/pink
|
||||
name = "pink fannypack"
|
||||
icon_state = "fannypack_pink"
|
||||
item_state = "fannypack_pink"
|
||||
|
||||
/obj/item/storage/belt/fannypack/cyan
|
||||
name = "cyan fannypack"
|
||||
icon_state = "fannypack_cyan"
|
||||
item_state = "fannypack_cyan"
|
||||
|
||||
/obj/item/storage/belt/fannypack/yellow
|
||||
name = "yellow fannypack"
|
||||
icon_state = "fannypack_yellow"
|
||||
item_state = "fannypack_yellow"
|
||||
|
||||
/obj/item/storage/belt/sabre
|
||||
name = "sabre sheath"
|
||||
desc = "An ornate sheath designed to hold an officer's blade."
|
||||
icon_state = "sheath"
|
||||
item_state = "sheath"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
content_overlays = TRUE
|
||||
worn_overlays = TRUE
|
||||
var/list/fitting_swords = list(/obj/item/melee/sabre, /obj/item/melee/baton/stunsword)
|
||||
var/starting_sword = /obj/item/melee/sabre
|
||||
|
||||
/obj/item/storage/belt/sabre/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 1
|
||||
STR.rustle_sound = FALSE
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.can_hold = typecacheof(fitting_swords)
|
||||
|
||||
/obj/item/storage/belt/sabre/examine(mob/user)
|
||||
..()
|
||||
if(length(contents))
|
||||
to_chat(user, "<span class='notice'>Alt-click it to quickly draw the blade.</span>")
|
||||
|
||||
/obj/item/storage/belt/sabre/AltClick(mob/user)
|
||||
if(!iscarbon(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(length(contents))
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("[user] takes [I] out of [src].", "<span class='notice'>You take [I] out of [src].</span>")
|
||||
user.put_in_hands(I)
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "[src] is empty.")
|
||||
|
||||
/obj/item/storage/belt/sabre/update_icon()
|
||||
. = ..()
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.regenerate_icons()
|
||||
|
||||
/obj/item/storage/belt/sabre/PopulateContents()
|
||||
new starting_sword(src)
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier
|
||||
name = "rapier sheath"
|
||||
desc = "A black, thin sheath that looks to house only a long thin blade. Feels like its made of metal."
|
||||
icon_state = "rsheath"
|
||||
item_state = "rsheath"
|
||||
force = 5
|
||||
throwforce = 15
|
||||
block_chance = 30
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "slashes", "prods", "pokes")
|
||||
fitting_swords = list(/obj/item/melee/rapier)
|
||||
starting_sword = /obj/item/melee/rapier
|
||||
|
||||
/obj/item/storage/belt/sabre/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //To thin to block bullets
|
||||
return ..()
|
||||
@@ -0,0 +1,246 @@
|
||||
/obj/item/storage/book
|
||||
name = "hollowed book"
|
||||
desc = "I guess someone didn't like it."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state ="book"
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
resistance_flags = FLAMMABLE
|
||||
var/title = "book"
|
||||
|
||||
/obj/item/storage/book/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 1
|
||||
|
||||
/obj/item/storage/book/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>The pages of [title] have been cut out!</span>")
|
||||
|
||||
GLOBAL_LIST_INIT(biblenames, list("Bible", "Quran", "Scrapbook", "Burning Bible", "Clown Bible", "Banana Bible", "Creeper Bible", "White Bible", "Holy Light", "The God Delusion", "Tome", "The King in Yellow", "Ithaqua", "Scientology", "Melted Bible", "Necronomicon"))
|
||||
GLOBAL_LIST_INIT(biblestates, list("bible", "koran", "scrapbook", "burning", "honk1", "honk2", "creeper", "white", "holylight", "atheist", "tome", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon"))
|
||||
GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", "bible", "bible", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon"))
|
||||
|
||||
/mob/proc/bible_check() //The bible, if held, might protect against certain things
|
||||
var/obj/item/storage/book/bible/B = locate() in src
|
||||
if(is_holding(B))
|
||||
return B
|
||||
return 0
|
||||
|
||||
/obj/item/storage/book/bible
|
||||
name = "bible"
|
||||
desc = "Apply to head repeatedly."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "bible"
|
||||
item_state = "bible"
|
||||
lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi'
|
||||
var/mob/affecting = null
|
||||
var/deity_name = "Christ"
|
||||
force_string = "holy"
|
||||
|
||||
/obj/item/storage/book/bible/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, FALSE, TRUE)
|
||||
|
||||
/obj/item/storage/book/bible/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is offering [user.p_them()]self to [deity_name]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/storage/book/bible/attack_self(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return
|
||||
// If H is the Chaplain, we can set the icon_state of the bible (but only once!)
|
||||
if(!GLOB.bible_icon_state && H.job == "Chaplain")
|
||||
var/dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
|
||||
for(var/i in 1 to GLOB.biblestates.len)
|
||||
var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i])
|
||||
var/nicename = GLOB.biblenames[i]
|
||||
H << browse_rsc(bibleicon, nicename)
|
||||
dat += {"<tr><td><img src="[nicename]"></td><td><a href="?src=[REF(src)];seticon=[i]">[nicename]</a></td></tr>"}
|
||||
dat += "</table></body></html>"
|
||||
H << browse(dat, "window=editicon;can_close=0;can_minimize=0;size=250x650")
|
||||
|
||||
/obj/item/storage/book/bible/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(src))
|
||||
return
|
||||
if(href_list["seticon"] && GLOB && !GLOB.bible_icon_state)
|
||||
var/iconi = text2num(href_list["seticon"])
|
||||
var/biblename = GLOB.biblenames[iconi]
|
||||
var/obj/item/storage/book/bible/B = locate(href_list["src"])
|
||||
B.icon_state = GLOB.biblestates[iconi]
|
||||
B.item_state = GLOB.bibleitemstates[iconi]
|
||||
|
||||
if(B.icon_state == "honk1" || B.icon_state == "honk2")
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.dna.add_mutation(SMILE)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), SLOT_WEAR_MASK)
|
||||
|
||||
GLOB.bible_icon_state = B.icon_state
|
||||
GLOB.bible_item_state = B.item_state
|
||||
|
||||
SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]")
|
||||
usr << browse(null, "window=editicon")
|
||||
|
||||
/obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user)
|
||||
for(var/X in H.bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.status == BODYPART_ROBOTIC)
|
||||
to_chat(user, "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>")
|
||||
return 0
|
||||
|
||||
var/heal_amt = 5
|
||||
var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1)
|
||||
|
||||
if(hurt_limbs.len)
|
||||
for(var/X in hurt_limbs)
|
||||
var/obj/item/bodypart/affecting = X
|
||||
if(affecting.heal_damage(heal_amt, heal_amt))
|
||||
H.update_damage_overlays()
|
||||
H.visible_message("<span class='notice'>[user] heals [H] with the power of [deity_name]!</span>")
|
||||
to_chat(H, "<span class='boldnotice'>May the power of [deity_name] compel you to be healed!</span>")
|
||||
playsound(src.loc, "punch", 25, 1, -1)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing)
|
||||
return 1
|
||||
|
||||
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_bodypart_damage(10)
|
||||
user.Unconscious(400)
|
||||
return
|
||||
|
||||
var/chaplain = 0
|
||||
if(user.mind && (user.mind.isholy))
|
||||
chaplain = 1
|
||||
|
||||
if(!chaplain)
|
||||
to_chat(user, "<span class='danger'>The book sizzles in your hands.</span>")
|
||||
user.take_bodypart_damage(0,10)
|
||||
return
|
||||
|
||||
if (!heal_mode)
|
||||
return ..()
|
||||
|
||||
var/smack = 1
|
||||
|
||||
if (M.stat != DEAD)
|
||||
if(chaplain && user == M)
|
||||
to_chat(user, "<span class='warning'>You can't heal yourself!</span>")
|
||||
return
|
||||
|
||||
if(ishuman(M) && prob(60) && bless(M, user))
|
||||
smack = 0
|
||||
else if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!istype(C.head, /obj/item/clothing/head))
|
||||
C.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10, 80)
|
||||
to_chat(C, "<span class='danger'>You feel dumber.</span>")
|
||||
|
||||
if(smack)
|
||||
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] beats [M] over the head with [src]!</span>")
|
||||
playsound(src.loc, "punch", 25, 1, -1)
|
||||
log_combat(user, M, "attacked", src)
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>")
|
||||
playsound(src.loc, "punch", 25, 1, -1)
|
||||
|
||||
/obj/item/storage/book/bible/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(isfloorturf(A))
|
||||
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
|
||||
if(user.mind && (user.mind.isholy))
|
||||
for(var/obj/effect/rune/R in orange(2,user))
|
||||
R.invisibility = 0
|
||||
if(user.mind && (user.mind.isholy))
|
||||
if(A.reagents && A.reagents.has_reagent("water")) // blesses all the water in the holder
|
||||
to_chat(user, "<span class='notice'>You bless [A].</span>")
|
||||
var/water2holy = A.reagents.get_reagent_amount("water")
|
||||
A.reagents.del_reagent("water")
|
||||
A.reagents.add_reagent("holywater",water2holy)
|
||||
if(A.reagents && A.reagents.has_reagent("unholywater")) // yeah yeah, copy pasted code - sue me
|
||||
to_chat(user, "<span class='notice'>You purify [A].</span>")
|
||||
var/unholy2clean = A.reagents.get_reagent_amount("unholywater")
|
||||
A.reagents.del_reagent("unholywater")
|
||||
A.reagents.add_reagent("holywater",unholy2clean)
|
||||
if(istype(A, /obj/item/twohanded/required/cult_bastard) && !iscultist(user))
|
||||
var/obj/item/twohanded/required/cult_bastard/sword = A
|
||||
to_chat(user, "<span class='notice'>You begin to exorcise [sword].</span>")
|
||||
playsound(src,'sound/hallucinations/veryfar_noise.ogg',40,1)
|
||||
if(do_after(user, 40, target = sword))
|
||||
playsound(src,'sound/effects/pray_chaplain.ogg',60,1)
|
||||
for(var/obj/item/soulstone/SS in sword.contents)
|
||||
SS.usability = TRUE
|
||||
for(var/mob/living/simple_animal/shade/EX in SS)
|
||||
SSticker.mode.remove_cultist(EX.mind, 1, 0)
|
||||
EX.icon_state = "ghost1"
|
||||
EX.name = "Purified [EX.name]"
|
||||
SS.release_shades(user)
|
||||
qdel(SS)
|
||||
new /obj/item/nullrod/claymore(get_turf(sword))
|
||||
user.visible_message("<span class='notice'>[user] has purified the [sword]!</span>")
|
||||
qdel(sword)
|
||||
|
||||
else if(istype(A, /obj/item/soulstone) && !iscultist(user))
|
||||
var/obj/item/soulstone/SS = A
|
||||
to_chat(user, "<span class='notice'>You begin to exorcise [SS].</span>")
|
||||
playsound(src,'sound/hallucinations/veryfar_noise.ogg',40,1)
|
||||
if(do_after(user, 40, target = SS))
|
||||
playsound(src,'sound/effects/pray_chaplain.ogg',60,1)
|
||||
SS.usability = TRUE
|
||||
for(var/mob/living/simple_animal/shade/EX in SS)
|
||||
SSticker.mode.remove_cultist(EX.mind, 1, 0)
|
||||
EX.icon_state = "ghost1"
|
||||
EX.name = "Purified [EX.name]"
|
||||
SS.release_shades(user)
|
||||
user.visible_message("<span class='notice'>[user] has purified the [SS]!</span>")
|
||||
qdel(SS)
|
||||
|
||||
/obj/item/storage/book/bible/booze
|
||||
desc = "To be applied to the head repeatedly."
|
||||
|
||||
/obj/item/storage/book/bible/booze/PopulateContents()
|
||||
new /obj/item/reagent_containers/food/drinks/bottle/whiskey(src)
|
||||
|
||||
/obj/item/storage/book/bible/syndicate
|
||||
icon_state ="ebook"
|
||||
deity_name = "The Syndicate"
|
||||
throw_speed = 2
|
||||
throwforce = 18
|
||||
throw_range = 7
|
||||
force = 18
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
damtype = BURN
|
||||
name = "Syndicate Tome"
|
||||
attack_verb = list("attacked", "burned", "blessed", "damned", "scorched")
|
||||
var/uses = 1
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
||||
if (uses)
|
||||
H.mind.isholy = TRUE
|
||||
uses -= 1
|
||||
to_chat(H, "<span class='userdanger'>You try to open the book AND IT BITES YOU!</span>")
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
H.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
to_chat(H, "<span class='notice'>Your name appears on the inside cover, in blood.</span>")
|
||||
var/ownername = H.real_name
|
||||
desc += "<span class='warning'>The name [ownername] is written in blood inside the cover.</span>"
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
if (user.a_intent == INTENT_HELP)
|
||||
return ..()
|
||||
else
|
||||
return ..(M,user,heal_mode = FALSE)
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
||||
/obj/item/storage/briefcase
|
||||
name = "briefcase"
|
||||
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
|
||||
icon_state = "briefcase"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 150
|
||||
var/folder_path = /obj/item/folder //this is the path of the folder that gets spawned in New()
|
||||
|
||||
/obj/item/storage/briefcase/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 21
|
||||
|
||||
/obj/item/storage/briefcase/PopulateContents()
|
||||
new /obj/item/pen(src)
|
||||
var/obj/item/folder/folder = new folder_path(src)
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/paper(folder)
|
||||
|
||||
/obj/item/storage/briefcase/crafted
|
||||
desc = "Hand crafted suitcase made of leather and cloth."
|
||||
force = 6
|
||||
max_integrity = 50
|
||||
|
||||
/obj/item/storage/briefcase/crafted/PopulateContents()
|
||||
return //So we dont spawn items
|
||||
|
||||
/obj/item/storage/briefcase/lawyer
|
||||
folder_path = /obj/item/folder/blue
|
||||
|
||||
/obj/item/storage/briefcase/lawyer/family
|
||||
name = "battered briefcase"
|
||||
icon_state = "gbriefcase"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "An old briefcase with a golden trim. It's clear they don't make them as good as they used to. Comes with an added belt clip!"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/storage/briefcase/lawyer/family/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/briefcase/lawyer/family/PopulateContents()
|
||||
new /obj/item/stamp/law(src)
|
||||
new /obj/item/pen/fountain(src)
|
||||
new /obj/item/paper_bin(src)
|
||||
new /obj/item/storage/box/evidence(src)
|
||||
new /obj/item/storage/box/lawyer(src)
|
||||
|
||||
/obj/item/storage/box/lawyer
|
||||
name = "Box of lawyer tools"
|
||||
desc = "A custom made box, full of items used by a Lawyer, all packed into one box!"
|
||||
|
||||
/obj/item/storage/box/lawyer/PopulateContents()
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/folder/white(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/folder/red(src)
|
||||
new /obj/item/gavelhammer(src)
|
||||
new /obj/item/stack/sheet/cloth(src)
|
||||
new /obj/item/reagent_containers/glass/beaker/waterbottle(src)
|
||||
|
||||
/obj/item/storage/briefcase/lawyer/PopulateContents()
|
||||
new /obj/item/stamp/law(src)
|
||||
..()
|
||||
|
||||
/obj/item/storage/briefcase/sniperbundle
|
||||
desc = "Its label reads \"genuine hardened Captain leather\", but suspiciously has no other tags or branding. Smells like L'Air du Temps."
|
||||
force = 10
|
||||
/obj/item/storage/briefcase/sniperbundle/PopulateContents()
|
||||
..() // in case you need any paperwork done after your rampage
|
||||
new /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate(src)
|
||||
new /obj/item/clothing/neck/tie/red(src)
|
||||
new /obj/item/clothing/under/syndicate/sniper(src)
|
||||
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
|
||||
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
|
||||
new /obj/item/suppressor/specialoffer(src)
|
||||
|
||||
|
||||
/obj/item/storage/briefcase/modularbundle
|
||||
desc = "Its label reads \"genuine hardened Captain leather\", but suspiciously has no other tags or branding."
|
||||
force = 10
|
||||
|
||||
/obj/item/storage/briefcase/modularbundle/PopulateContents()
|
||||
new /obj/item/gun/ballistic/automatic/pistol/modular(src)
|
||||
new /obj/item/suppressor(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm/soporific(src)
|
||||
new /obj/item/ammo_box/c10mm/soporific(src)
|
||||
new /obj/item/clothing/under/lawyer/blacksuit(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/suit/toggle/lawyer/black/syndie(src)
|
||||
|
||||
/obj/item/storage/briefcase/medical
|
||||
name = "medical briefcase"
|
||||
icon_state = "medbriefcase"
|
||||
desc = "A white with a blue cross brieface, this is ment to hold medical gear that would not be able to normally fit in a bag."
|
||||
|
||||
/obj/item/storage/briefcase/medical/PopulateContents()
|
||||
new /obj/item/clothing/neck/stethoscope(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
..() //In case of paperwork
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
//////////////////////////////////
|
||||
//dakimakuras
|
||||
//////////////////////////////////
|
||||
|
||||
/obj/item/storage/daki
|
||||
name = "dakimakura"
|
||||
desc = "A large pillow depicting a girl in a compromising position. Featuring as many dimensions as you."
|
||||
icon = 'icons/obj/daki.dmi'
|
||||
icon_state = "daki_base"
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
var/cooldowntime = 20
|
||||
var/static/list/dakimakura_options = list("Callie","Casca","Chaika","Elisabeth","Foxy Grandpa","Haruko","Holo","Ian","Jolyne","Kurisu","Marie","Mugi","Nar'Sie","Patchouli","Plutia","Rei","Reisen","Naga","Squid","Squigly","Tomoko","Toriel","Umaru","Yaranaika","Yoko") //Kurisu is the ideal girl." - Me, Logos.
|
||||
|
||||
/obj/item/storage/daki/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_items = 3
|
||||
STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
|
||||
|
||||
/obj/item/storage/daki/attack_self(mob/living/user)
|
||||
var/body_choice
|
||||
var/custom_name
|
||||
|
||||
if(icon_state == "daki_base")
|
||||
body_choice = input("Pick a body.") in dakimakura_options
|
||||
icon_state = "daki_[body_choice]"
|
||||
custom_name = stripped_input(user, "What's her name?")
|
||||
if(length(custom_name) > MAX_NAME_LEN)
|
||||
to_chat(user,"<span class='danger'>Name is too long!</span>")
|
||||
return FALSE
|
||||
if(custom_name)
|
||||
name = custom_name
|
||||
desc = "A large pillow depicting [custom_name] in a compromising position. Featuring as many dimensions as you."
|
||||
else
|
||||
switch(user.a_intent)
|
||||
if(INTENT_HELP)
|
||||
user.visible_message("<span class='notice'>[user] hugs the [name].</span>")
|
||||
playsound(src, "rustle", 50, 1, -5)
|
||||
if(INTENT_DISARM)
|
||||
user.visible_message("<span class='notice'>[user] kisses the [name].</span>")
|
||||
playsound(src, "rustle", 50, 1, -5)
|
||||
if(INTENT_GRAB)
|
||||
user.visible_message("<span class='warning'>[user] holds the [name]!</span>")
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
if(INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] punches the [name]!</span>")
|
||||
playsound(src, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
////////////////////////////
|
||||
@@ -0,0 +1,353 @@
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
* Heart Shaped Box w/ Chocolates
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
desc = "Mmm. Donuts."
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
for(var/i = 1 to STR.max_items)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon()
|
||||
if(fancy_open)
|
||||
icon_state = "[icon_type]box[contents.len]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(length(contents) == 1)
|
||||
to_chat(user, "There is one [icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[contents.len]"] [icon_type]s left.")
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/fancy/Exited()
|
||||
. = ..()
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/Entered()
|
||||
. = ..()
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/donut_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut))
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
item_state = "eggbox"
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
desc = "A carton for containing eggs."
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
|
||||
/obj/item/storage/fancy/egg_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 12
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg))
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
throwforce = 2
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/candle_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 5
|
||||
|
||||
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter))
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to extract contents.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(W && contents.len > 0)
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, user)
|
||||
user.put_in_hands(W)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/cig_position = 1
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
|
||||
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
|
||||
add_overlay(inserted_overlay)
|
||||
cig_position++
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, M)
|
||||
M.equip_to_slot_if_possible(W, SLOT_WEAR_MASK)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/nicotine
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_xeno
|
||||
name = "\improper Xeno Filtered packet"
|
||||
desc = "Loaded with 100% pure slime. And also nicotine."
|
||||
icon_state = "slime"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/xeno
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_cannabis
|
||||
name = "\improper Freak Brothers' Special packet"
|
||||
desc = "A label on the packaging reads, \"Endorsed by Phineas, Freddy and Franklin.\""
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/cannabis
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_mindbreaker
|
||||
name = "\improper Leary's Delight packet"
|
||||
desc = "Banned in over 36 galaxies."
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/mindbreaker
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of Nanotrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
icon_type = "rolling paper"
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 10
|
||||
STR.can_hold = typecacheof(list(/obj/item/rollingpaper))
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 5
|
||||
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar))
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
|
||||
var/cigar_position = 0 //to keep track of the pixel_x offset of each new overlay.
|
||||
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]")
|
||||
cigar_overlay.pixel_x = 3 * cigar_position
|
||||
add_overlay(cigar_overlay)
|
||||
cigar_position++
|
||||
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper Cohiba Robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
icon_state = "cohibacase"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium Havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
icon_state = "cohibacase"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
/*
|
||||
* Heart Shaped Box w/ Chocolates
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/heart_box
|
||||
name = "heart-shaped box"
|
||||
desc = "A heart-shaped box for holding tiny chocolates."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
item_state = "chocolatebox"
|
||||
icon_state = "chocolatebox"
|
||||
icon_type = "chocolate"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/tinychocolate
|
||||
|
||||
/obj/item/storage/fancy/heart_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 8
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))
|
||||
@@ -0,0 +1,391 @@
|
||||
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/storage/firstaid
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/empty = FALSE
|
||||
|
||||
/obj/item/storage/firstaid/regular
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/storage/firstaid/regular/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins giving [user.p_them()]self aids with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/storage/firstaid/regular/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/ancient
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/storage/firstaid/ancient/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
|
||||
/obj/item/storage/firstaid/fire
|
||||
name = "burn treatment kit"
|
||||
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
|
||||
/obj/item/storage/firstaid/fire/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins rubbing \the [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to start a fire!</span>")
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/storage/firstaid/fire/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
/obj/item/storage/firstaid/fire/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/toxin
|
||||
name = "toxin treatment kit"
|
||||
desc = "Used to treat toxic blood content and radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/storage/firstaid/toxin/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
/obj/item/storage/firstaid/toxin/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/syringe/charcoal(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/radbgone
|
||||
name = "radiation treatment kit"
|
||||
desc = "Used to treat minor toxic blood content and major radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/storage/firstaid/radbgone/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins licking the lead paint off \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/firstaid/radbgone/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
if(prob(50))
|
||||
new /obj/item/reagent_containers/pill/mutarad(src)
|
||||
if(prob(80))
|
||||
new /obj/item/reagent_containers/pill/antirad_plus(src)
|
||||
new /obj/item/reagent_containers/syringe/charcoal(src)
|
||||
new /obj/item/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/reagent_containers/pill/mutadone(src)
|
||||
new /obj/item/reagent_containers/pill/antirad(src)
|
||||
new /obj/item/reagent_containers/food/drinks/bottle/vodka(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
|
||||
/obj/item/storage/firstaid/o2
|
||||
name = "oxygen deprivation treatment kit"
|
||||
desc = "A box full of oxygen goodies."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
|
||||
/obj/item/storage/firstaid/o2/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins hitting [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/storage/firstaid/o2/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A first aid kit for when you get toolboxed."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
|
||||
/obj/item/storage/firstaid/brute/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins beating [user.p_them()]self over the head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/storage/firstaid/brute/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/tactical
|
||||
name = "combat medical kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
|
||||
/obj/item/storage/firstaid/tactical/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/storage/firstaid/tactical/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/syringe/lethal/choral(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
|
||||
/obj/item/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
icon_state = "pill_canister"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/storage/pill_bottle/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_quick_gather = TRUE
|
||||
STR.click_gather = TRUE
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice))
|
||||
|
||||
/obj/item/storage/pill_bottle/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is trying to get the cap off [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/antirad
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter radiation poisoning."
|
||||
|
||||
/obj/item/storage/pill_bottle/anitrad/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/antirad(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine
|
||||
name = "bottle of epinephrine pills"
|
||||
desc = "Contains pills used to stabilize patients."
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/epinephrine(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone
|
||||
name = "bottle of mutadone pills"
|
||||
desc = "Contains pills used to treat genetic abnormalities."
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mutadone(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol
|
||||
name = "bottle of mannitol pills"
|
||||
desc = "Contains pills used to treat brain damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant
|
||||
name = "bottle of stimulant pills"
|
||||
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/stimulant(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mining
|
||||
name = "bottle of patches"
|
||||
desc = "Contains patches used to treat brute and burn damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mining/PopulateContents()
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/zoom
|
||||
name = "suspicious pill bottle"
|
||||
desc = "The label is pretty old and almost unreadable, you recognize some chemical compounds."
|
||||
|
||||
/obj/item/storage/pill_bottle/zoom/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/zoom(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/happy
|
||||
name = "suspicious pill bottle"
|
||||
desc = "There is a smiley on the top."
|
||||
|
||||
/obj/item/storage/pill_bottle/happy/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/happy(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/lsd
|
||||
name = "suspicious pill bottle"
|
||||
desc = "There is a badly drawn thing with the shape of a mushroom."
|
||||
|
||||
/obj/item/storage/pill_bottle/lsd/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/lsd(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/aranesp
|
||||
name = "suspicious pill bottle"
|
||||
desc = "The label says 'gotta go fast'."
|
||||
|
||||
/obj/item/storage/pill_bottle/aranesp/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/aranesp(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/psicodine
|
||||
name = "bottle of psicodine pills"
|
||||
desc = "Contains pills used to treat mental distress and traumas."
|
||||
|
||||
/obj/item/storage/pill_bottle/psicodine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/psicodine(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/happiness
|
||||
name = "happiness pill bottle"
|
||||
desc = "The label is long gone, in its place an 'H' written with a marker."
|
||||
|
||||
/obj/item/storage/pill_bottle/happiness/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/happiness(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/antirad_plus
|
||||
name = "anti radiation deluxe pill bottle"
|
||||
desc = "The label says 'Med-Co branded pills'."
|
||||
|
||||
/obj/item/storage/pill_bottle/antirad_plus/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/antirad_plus(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mutarad
|
||||
name = "radiation treatment deluxe pill bottle"
|
||||
desc = "The label says 'Med-Co branded pills' and below that 'Contains Mutadone in each pill!`."
|
||||
|
||||
/obj/item/storage/pill_bottle/mutarad/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mutarad(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/penis_enlargement
|
||||
name = "penis enlargement pills"
|
||||
desc = "You want penis enlargement pills?"
|
||||
|
||||
/obj/item/storage/pill_bottle/penis_enlargement/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/penis_enlargement(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/breast_enlargement
|
||||
name = "breast enlargement pills"
|
||||
desc = "Made by Fermichem - They have a woman with breasts larger than she is on them. The warming states not to take more than 10u at a time."
|
||||
|
||||
/obj/item/storage/pill_bottle/breast_enlargement/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/breast_enlargement(src)
|
||||
|
||||
/////////////
|
||||
//Organ Box//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/belt/organbox
|
||||
name = "Organ Storge"
|
||||
desc = "A compact box that helps hold massive amounts of implants, organs, and some tools. Has a belt clip for easy carrying"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon = 'icons/obj/mysterybox.dmi'
|
||||
icon_state = "organbox_open"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
|
||||
/obj/item/storage/belt/organbox/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 16
|
||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
||||
STR.max_combined_w_class = 20
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/storage/pill_bottle,
|
||||
/obj/item/reagent_containers/hypospray,
|
||||
/obj/item/healthanalyzer,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/clothing/glasses/hud/health,
|
||||
/obj/item/hemostat,
|
||||
/obj/item/scalpel,
|
||||
/obj/item/retractor,
|
||||
/obj/item/cautery,
|
||||
/obj/item/surgical_drapes,
|
||||
/obj/item/autosurgeon,
|
||||
/obj/item/organ,
|
||||
/obj/item/implant,
|
||||
/obj/item/implantpad,
|
||||
/obj/item/implantcase,
|
||||
/obj/item/implanter,
|
||||
/obj/item/circuitboard/computer/operating,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/organ_storage
|
||||
))
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/obj/item/storage/lockbox
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
/obj/item/storage/lockbox/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 14
|
||||
STR.max_items = 4
|
||||
STR.locked = TRUE
|
||||
|
||||
/obj/item/storage/lockbox/attackby(obj/item/W, mob/user, params)
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(W.GetID())
|
||||
if(broken)
|
||||
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, !locked)
|
||||
locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
to_chat(user, "<span class='danger'>You lock the [src.name]!</span>")
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_HIDE_ALL)
|
||||
return
|
||||
else
|
||||
icon_state = icon_closed
|
||||
to_chat(user, "<span class='danger'>You unlock the [src.name]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access Denied.</span>")
|
||||
return
|
||||
if(!locked)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's locked!</span>")
|
||||
|
||||
/obj/item/storage/lockbox/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(broken)
|
||||
return
|
||||
broken = TRUE
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/lockbox/Entered()
|
||||
. = ..()
|
||||
open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/lockbox/Exited()
|
||||
. = ..()
|
||||
open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/loyalty/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/implantcase/mindshield(src)
|
||||
new /obj/item/implanter/mindshield(src)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang
|
||||
name = "lockbox of clusterbangs"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang/PopulateContents()
|
||||
new /obj/item/grenade/clusterbuster(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal
|
||||
name = "medal box"
|
||||
desc = "A locked box used to store medals of honor."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
|
||||
/obj/item/storage/lockbox/medal/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_items = 10
|
||||
STR.max_combined_w_class = 20
|
||||
STR.can_hold = typecacheof(list(/obj/item/clothing/accessory/medal))
|
||||
|
||||
/obj/item/storage/lockbox/medal/examine(mob/user)
|
||||
..()
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(!locked)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [open ? "close":"open"] it.</span>")
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(!SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/cargo
|
||||
name = "cargo award box"
|
||||
desc = "A locked box used to store awards to be given to members of the cargo department."
|
||||
req_access = list(ACCESS_QM)
|
||||
|
||||
/obj/item/storage/lockbox/medal/cargo/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/ribbon/cargo(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/engineering
|
||||
name = "engineering medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the engineering department."
|
||||
req_access = list(ACCESS_CE)
|
||||
|
||||
/obj/item/storage/lockbox/medal/engineering/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/engineer(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/medical
|
||||
name = "medical medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the medical department."
|
||||
req_access = list(ACCESS_CMO)
|
||||
|
||||
/obj/item/storage/lockbox/medal/medical/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/ribbon/medical_doctor(src)
|
||||
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* Absorbs /obj/item/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
desc = "This shouldn't exist. If it does, create an issue report."
|
||||
|
||||
/obj/item/storage/secure/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is currently <b>[open ? "unscrewed" : "screwed shut"]</b>."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (W.use_tool(src, user, 20))
|
||||
open =! open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
|
||||
return
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
|
||||
if ((istype(W, /obj/item/multitool)) && (!l_hacking))
|
||||
if(open == 1)
|
||||
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
|
||||
l_hacking = 1
|
||||
if (W.use_tool(src, user, 400))
|
||||
to_chat(user, "<span class='danger'>Internal memory reset - lock has been disengaged.</span>")
|
||||
l_set = 0
|
||||
l_hacking = 0
|
||||
else
|
||||
l_hacking = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You must <b>unscrew</b> the service panel before you can pulse the wiring.</span>")
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/attack_self(mob/user)
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((l_set == 0) && (!l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", code)
|
||||
if (!locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=[REF(src)];type=1'>1</A>-<A href='?src=[REF(src)];type=2'>2</A>-<A href='?src=[REF(src)];type=3'>3</A><BR>\n<A href='?src=[REF(src)];type=4'>4</A>-<A href='?src=[REF(src)];type=5'>5</A>-<A href='?src=[REF(src)];type=6'>6</A><BR>\n<A href='?src=[REF(src)];type=7'>7</A>-<A href='?src=[REF(src)];type=8'>8</A>-<A href='?src=[REF(src)];type=9'>9</A><BR>\n<A href='?src=[REF(src)];type=R'>R</A>-<A href='?src=[REF(src)];type=0'>0</A>-<A href='?src=[REF(src)];type=E'>E</A><BR>\n</TT>", message)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR"))
|
||||
l_code = code
|
||||
l_set = 1
|
||||
else if ((code == l_code) && (l_set == 1))
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE)
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
code = null
|
||||
else
|
||||
code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!l_setshort))
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE)
|
||||
cut_overlays()
|
||||
code = null
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_HIDE_FROM, usr)
|
||||
else
|
||||
code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(code) > 5)
|
||||
code = "ERROR"
|
||||
add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, loc))
|
||||
if ((M.client && M.machine == src))
|
||||
attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/briefcase/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 21
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
for(var/i = 0, i < STR.max_items - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
desc = "Excellent for securing things away from grubby hands."
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
|
||||
/obj/item/storage/secure/safe/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.cant_hold = typecacheof(list(/obj/item/storage/secure/briefcase))
|
||||
STR.max_w_class = 8 //??
|
||||
|
||||
/obj/item/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
@@ -0,0 +1,317 @@
|
||||
GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
|
||||
|
||||
/obj/item/storage/toolbox
|
||||
name = "toolbox"
|
||||
desc = "Danger. Very robust."
|
||||
icon_state = "red"
|
||||
item_state = "toolbox_red"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 12
|
||||
throwforce = 12
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_METAL = 500)
|
||||
attack_verb = list("robusted")
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
var/latches = "single_latch"
|
||||
var/has_latches = TRUE
|
||||
var/can_rubberify = TRUE
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE //very protecc too
|
||||
|
||||
/obj/item/storage/toolbox/Initialize(mapload)
|
||||
. = ..()
|
||||
if(has_latches)
|
||||
if(prob(10))
|
||||
latches = "double_latch"
|
||||
if(prob(1))
|
||||
latches = "triple_latch"
|
||||
if(mapload && can_rubberify && prob(5))
|
||||
rubberify()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/toolbox/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
add_blood_overlay()
|
||||
if(has_latches)
|
||||
var/icon/I = icon('icons/obj/storage.dmi', latches)
|
||||
add_overlay(I)
|
||||
|
||||
|
||||
/obj/item/storage/toolbox/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] robusts [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/storage/toolbox/emergency
|
||||
name = "emergency toolbox"
|
||||
|
||||
/obj/item/storage/toolbox/emergency/PopulateContents()
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/weldingtool/mini(src)
|
||||
new /obj/item/extinguisher/mini(src)
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
new /obj/item/flashlight(src)
|
||||
if(2)
|
||||
new /obj/item/flashlight/glowstick(src)
|
||||
if(3)
|
||||
new /obj/item/flashlight/flare(src)
|
||||
new /obj/item/radio/off(src)
|
||||
|
||||
/obj/item/storage/toolbox/emergency/old
|
||||
name = "rusty red toolbox"
|
||||
icon_state = "toolbox_red_old"
|
||||
has_latches = FALSE
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/mechanical
|
||||
name = "mechanical toolbox"
|
||||
icon_state = "blue"
|
||||
item_state = "toolbox_blue"
|
||||
|
||||
/obj/item/storage/toolbox/mechanical/PopulateContents()
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/analyzer(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
|
||||
/obj/item/storage/toolbox/mechanical/old
|
||||
name = "rusty blue toolbox"
|
||||
icon_state = "toolbox_blue_old"
|
||||
has_latches = FALSE
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/mechanical/old/heirloom
|
||||
name = "old, robust toolbox" //this will be named "X family toolbox"
|
||||
desc = "It's seen better days."
|
||||
//Citadel change buffed to base levels
|
||||
total_mass = 2
|
||||
|
||||
/obj/item/storage/toolbox/mechanical/old/heirloom/PopulateContents()
|
||||
return
|
||||
|
||||
/obj/item/storage/toolbox/electrical
|
||||
name = "electrical toolbox"
|
||||
icon_state = "yellow"
|
||||
item_state = "toolbox_yellow"
|
||||
|
||||
/obj/item/storage/toolbox/electrical/PopulateContents()
|
||||
var/pickedcolor = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/t_scanner(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pickedcolor)
|
||||
new /obj/item/stack/cable_coil(src,30,pickedcolor)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
else
|
||||
new /obj/item/stack/cable_coil(src,30,pickedcolor)
|
||||
|
||||
/obj/item/storage/toolbox/syndicate
|
||||
name = "black and red toolbox"
|
||||
icon_state = "syndicate"
|
||||
item_state = "toolbox_syndi"
|
||||
desc = "A toolbox painted black with a red stripe. It looks more heavier than normal toolboxes."
|
||||
force = 15
|
||||
throwforce = 18
|
||||
|
||||
/obj/item/storage/toolbox/syndicate/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.silent = TRUE
|
||||
|
||||
/obj/item/storage/toolbox/syndicate/PopulateContents()
|
||||
new /obj/item/screwdriver/nuke(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/wirecutters(src, "red")
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
|
||||
/obj/item/storage/toolbox/drone
|
||||
name = "mechanical toolbox"
|
||||
icon_state = "blue"
|
||||
item_state = "toolbox_blue"
|
||||
|
||||
/obj/item/storage/toolbox/drone/PopulateContents()
|
||||
var/pickedcolor = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/screwdriver(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/stack/cable_coil(src,30,pickedcolor)
|
||||
new /obj/item/wirecutters(src)
|
||||
new /obj/item/multitool(src)
|
||||
|
||||
/obj/item/storage/toolbox/brass
|
||||
name = "brass box"
|
||||
desc = "A huge brass box with several indentations in its surface."
|
||||
icon_state = "brassbox"
|
||||
item_state = null
|
||||
has_latches = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
attack_verb = list("robusted", "crushed", "smashed")
|
||||
can_rubberify = FALSE
|
||||
var/fabricator_type = /obj/item/clockwork/replica_fabricator/scarab
|
||||
|
||||
/obj/item/storage/toolbox/brass/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_combined_w_class = 28
|
||||
STR.max_items = 28
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/PopulateContents()
|
||||
new fabricator_type(src)
|
||||
new /obj/item/screwdriver/brass(src)
|
||||
new /obj/item/wirecutters/brass(src)
|
||||
new /obj/item/wrench/brass(src)
|
||||
new /obj/item/crowbar/brass(src)
|
||||
new /obj/item/weldingtool/experimental/brass(src)
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/servant
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
fabricator_type = null
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/ratvar
|
||||
var/slab_type = /obj/item/clockwork/slab
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/ratvar/PopulateContents()
|
||||
..()
|
||||
new slab_type(src)
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/ratvar/admin
|
||||
slab_type = /obj/item/clockwork/slab/debug
|
||||
fabricator_type = /obj/item/clockwork/replica_fabricator/scarab/debug
|
||||
|
||||
/obj/item/storage/toolbox/plastitanium
|
||||
name = "plastitanium toolbox"
|
||||
desc = "A toolbox made out of plastitanium. Probably packs a massive punch."
|
||||
total_mass = 5
|
||||
icon_state = "blue"
|
||||
item_state = "toolbox_blue"
|
||||
w_class = WEIGHT_CLASS_HUGE //heyo no bohing this!
|
||||
force = 18 //spear damage
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/plastitanium/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(proximity && isobj(A) && !isitem(A))
|
||||
var/obj/O = A
|
||||
//50 total object damage but split up for stuff like damage deflection.
|
||||
O.take_damage(22)
|
||||
O.take_damage(10)
|
||||
|
||||
/obj/item/storage/toolbox/artistic
|
||||
name = "artistic toolbox"
|
||||
desc = "A toolbox painted bright green. Why anyone would store art supplies in a toolbox is beyond you, but it has plenty of extra space."
|
||||
icon_state = "green"
|
||||
item_state = "toolbox_green"
|
||||
w_class = WEIGHT_CLASS_GIGANTIC //Holds more than a regular toolbox!
|
||||
|
||||
/obj/item/storage/toolbox/artistic/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 20
|
||||
STR.max_items = 10
|
||||
|
||||
/obj/item/storage/toolbox/artistic/PopulateContents()
|
||||
new/obj/item/storage/crayons(src)
|
||||
new/obj/item/crowbar(src)
|
||||
new/obj/item/stack/cable_coil/red(src)
|
||||
new/obj/item/stack/cable_coil/yellow(src)
|
||||
new/obj/item/stack/cable_coil/blue(src)
|
||||
new/obj/item/stack/cable_coil/green(src)
|
||||
new/obj/item/stack/cable_coil/pink(src)
|
||||
new/obj/item/stack/cable_coil/orange(src)
|
||||
new/obj/item/stack/cable_coil/cyan(src)
|
||||
new/obj/item/stack/cable_coil/white(src)
|
||||
|
||||
/obj/item/storage/toolbox/gold_real
|
||||
name = "golden toolbox"
|
||||
desc = "A larger then normal toolbox made of gold plated plastitanium."
|
||||
item_state = "gold"
|
||||
icon_state = "gold"
|
||||
has_latches = FALSE
|
||||
force = 16 // Less then a spear
|
||||
throwforce = 14
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
|
||||
/obj/item/storage/toolbox/gold_real/PopulateContents()
|
||||
new /obj/item/screwdriver/nuke(src)
|
||||
new /obj/item/wrench(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/wirecutters(src, "red")
|
||||
new /obj/item/multitool/ai_detect(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
|
||||
/obj/item/storage/toolbox/gold_real/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_combined_w_class = 40
|
||||
STR.max_items = 12
|
||||
|
||||
/obj/item/storage/toolbox/gold_fake // used in crafting
|
||||
name = "golden toolbox"
|
||||
desc = "A gold plated toolbox, fancy and harmless due to the gold plating being on cardboard!"
|
||||
icon_state = "gold"
|
||||
item_state = "gold"
|
||||
has_latches = FALSE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/proc/rubberify()
|
||||
name = "rubber [name]"
|
||||
desc = replacetext(desc, "Danger", "Bouncy")
|
||||
desc = replacetext(desc, "robust", "safe")
|
||||
desc = replacetext(desc, "heavier", "bouncier")
|
||||
DISABLE_BITFIELD(flags_1, CONDUCT_1)
|
||||
materials = null
|
||||
damtype = STAMINA
|
||||
force += 3 //to compensate the higher stamina K.O. threshold compared to actual health.
|
||||
throwforce += 3
|
||||
attack_verb += "bounced"
|
||||
hitsound = 'sound/effects/clownstep1.ogg'
|
||||
if(!GLOB.rubber_toolbox_icons[icon_state])
|
||||
generate_rubber_toolbox_icon()
|
||||
icon = GLOB.rubber_toolbox_icons[icon_state]
|
||||
AddComponent(/datum/component/bouncy)
|
||||
|
||||
/obj/item/storage/toolbox/proc/generate_rubber_toolbox_icon()
|
||||
var/icon/new_icon = icon(icon, icon_state)
|
||||
var/icon/smooth = icon('icons/obj/storage.dmi', "rubber_toolbox_blend")
|
||||
new_icon.Blend(smooth, ICON_MULTIPLY)
|
||||
new_icon = fcopy_rsc(new_icon)
|
||||
GLOB.rubber_toolbox_icons[icon_state] = new_icon
|
||||
|
||||
/obj/item/storage/toolbox/rubber
|
||||
name = "rubber toolbox"
|
||||
desc = "Bouncy. Very safe."
|
||||
flags_1 = null
|
||||
materials = null
|
||||
damtype = STAMINA
|
||||
force = 17
|
||||
throwforce = 17
|
||||
attack_verb = list("robusted", "bounced")
|
||||
can_rubberify = FALSE //we are already the future.
|
||||
|
||||
/obj/item/storage/toolbox/rubber/Initialize()
|
||||
icon_state = pick("blue", "red", "yellow", "green")
|
||||
item_state = "toolbox_[icon_state]"
|
||||
if(!GLOB.rubber_toolbox_icons[icon_state])
|
||||
generate_rubber_toolbox_icon()
|
||||
icon = GLOB.rubber_toolbox_icons[icon_state]
|
||||
. = ..()
|
||||
AddComponent(/datum/component/bouncy)
|
||||
@@ -0,0 +1,383 @@
|
||||
/obj/item/storage/box/syndicate
|
||||
|
||||
/obj/item/storage/box/syndicate/PopulateContents()
|
||||
switch (pickweight(list("bloodyspai" = 3, "stealth" = 2, "bond" = 2, "screwed" = 2, "sabotage" = 3, "guns" = 2, "murder" = 2, "baseball" = 1, "implant" = 1, "hacker" = 3, "darklord" = 1, "sniper" = 1, "metaops" = 1, "ninja" = 1)))
|
||||
if("bloodyspai") // 30 tc now this is more right
|
||||
new /obj/item/clothing/under/chameleon(src) // 2 tc since it's not the full set
|
||||
new /obj/item/clothing/mask/chameleon(src) // Goes with above
|
||||
new /obj/item/card/id/syndicate(src) // 2 tc
|
||||
new /obj/item/clothing/shoes/chameleon/noslip(src) // 2 tc
|
||||
new /obj/item/camera_bug(src) // 1 tc
|
||||
new /obj/item/multitool/ai_detect(src) // 1 tc
|
||||
new /obj/item/encryptionkey/syndicate(src) // 2 tc
|
||||
new /obj/item/reagent_containers/syringe/mulligan(src) // 4 tc
|
||||
new /obj/item/switchblade(src) //I'll count this as 5 tc
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate (src) // 2 tc this shit heals
|
||||
new /obj/item/flashlight/emp(src) // 2 tc
|
||||
new /obj/item/chameleon(src) // 7 tc
|
||||
|
||||
if("stealth") // 31 tc
|
||||
new /obj/item/gun/energy/kinetic_accelerator/crossbow(src)
|
||||
new /obj/item/pen/sleepy(src)
|
||||
new /obj/item/healthanalyzer/rad_laser(src)
|
||||
new /obj/item/chameleon(src)
|
||||
new /obj/item/soap/syndie(src)
|
||||
new /obj/item/clothing/glasses/thermal/syndi(src)
|
||||
|
||||
if("bond") // 29 tc
|
||||
new /obj/item/gun/ballistic/automatic/pistol/suppressed(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/card/id/syndicate(src)
|
||||
new /obj/item/reagent_containers/syringe/stimulants(src)
|
||||
new /obj/item/clothing/neck/tie/red(src)
|
||||
|
||||
if("screwed") // 29 tc
|
||||
new /obj/item/sbeacondrop/bomb(src)
|
||||
new /obj/item/grenade/syndieminibomb(src)
|
||||
new /obj/item/sbeacondrop/powersink(src)
|
||||
new /obj/item/clothing/suit/space/syndicate/black/red(src)
|
||||
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
|
||||
new /obj/item/encryptionkey/syndicate(src)
|
||||
|
||||
if("guns") // 30 tc now
|
||||
new /obj/item/gun/ballistic/revolver(src)
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
new /obj/item/card/emag(src)
|
||||
new /obj/item/grenade/plastic/c4(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/mask/gas/clown_hat(src)
|
||||
new /obj/item/clothing/under/suit_jacket/really_black(src)
|
||||
new /obj/item/screwdriver/power(src) //2 tc item
|
||||
|
||||
if("murder") // 35 tc
|
||||
new /obj/item/melee/transforming/energy/sword/saber(src)
|
||||
new /obj/item/clothing/glasses/thermal/syndi(src)
|
||||
new /obj/item/card/emag(src)
|
||||
new /obj/item/clothing/shoes/chameleon/noslip(src)
|
||||
new /obj/item/encryptionkey/syndicate(src)
|
||||
new /obj/item/grenade/syndieminibomb(src)
|
||||
new /obj/item/clothing/glasses/phantomthief/syndicate(src)
|
||||
new /obj/item/reagent_containers/syringe/stimulants(src)
|
||||
|
||||
if("baseball") // 42~ tc
|
||||
new /obj/item/melee/baseball_bat/ablative/syndi(src) //Lets say 12 tc, lesser sleeping carp
|
||||
new /obj/item/clothing/glasses/sunglasses/garb(src) //Lets say 2 tc
|
||||
new /obj/item/card/emag(src) //6 tc
|
||||
new /obj/item/clothing/shoes/sneakers/noslip(src) //2tc
|
||||
new /obj/item/encryptionkey/syndicate(src) //1tc
|
||||
new /obj/item/autosurgeon/anti_drop(src) //Lets just say 7~
|
||||
new /obj/item/clothing/under/syndicate/baseball(src) //3tc
|
||||
new /obj/item/clothing/head/soft/baseball(src) //Lets say 4 tc
|
||||
new /obj/item/reagent_containers/hypospray/medipen/stimulants/baseball(src) //lets say 5tc
|
||||
|
||||
if("implant") // 67+ tc holy shit what the fuck this is a lottery disguised as fun boxes isn't it?
|
||||
new /obj/item/implanter/freedom(src)
|
||||
new /obj/item/implanter/uplink/precharged(src)
|
||||
new /obj/item/implanter/emp(src)
|
||||
new /obj/item/implanter/adrenalin(src)
|
||||
new /obj/item/implanter/explosive(src)
|
||||
new /obj/item/implanter/storage(src)
|
||||
new /obj/item/implanter/radio/syndicate(src)
|
||||
new /obj/item/implanter/stealth(src)
|
||||
|
||||
if("hacker") // 30 tc
|
||||
new /obj/item/aiModule/syndicate(src)
|
||||
new /obj/item/card/emag(src)
|
||||
new /obj/item/encryptionkey/binary(src)
|
||||
new /obj/item/aiModule/toyAI(src)
|
||||
new /obj/item/multitool/ai_detect(src)
|
||||
new /obj/item/flashlight/emp(src)
|
||||
new /obj/item/emagrecharge(src)
|
||||
|
||||
if("lordsingulo") // "36" tc aka 23 tc
|
||||
new /obj/item/sbeacondrop(src) // 14 kinda useless
|
||||
new /obj/item/clothing/suit/space/syndicate/black/red(src) //2
|
||||
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src) //2
|
||||
new /obj/item/card/emag(src) //6
|
||||
new /obj/item/emagrecharge(src) //2
|
||||
new /obj/item/storage/toolbox/syndicate(src) //1
|
||||
new /obj/item/card/id/syndicate(src) //2
|
||||
new /obj/item/flashlight/emp(src) //2
|
||||
new /obj/item/jammer(src) //5
|
||||
|
||||
if("sabotage") // ~28 tc now
|
||||
new /obj/item/grenade/plastic/c4 (src)
|
||||
new /obj/item/grenade/plastic/c4 (src)
|
||||
new /obj/item/grenade/plastic/x4 (src)
|
||||
new /obj/item/grenade/plastic/x4 (src)
|
||||
new /obj/item/doorCharge(src)
|
||||
new /obj/item/doorCharge(src)
|
||||
new /obj/item/camera_bug(src)
|
||||
new /obj/item/sbeacondrop/powersink(src)
|
||||
new /obj/item/cartridge/virus/syndicate(src)
|
||||
new /obj/item/storage/toolbox/syndicate(src) //To actually get to those places
|
||||
new /obj/item/pizzabox/bomb
|
||||
|
||||
if("darklord") //20 tc + tk + summon item close enough for now
|
||||
new /obj/item/twohanded/dualsaber(src)
|
||||
new /obj/item/dnainjector/telemut/darkbundle(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/card/id/syndicate(src)
|
||||
new /obj/item/clothing/shoes/chameleon/noslip(src) //because slipping while being a dark lord sucks
|
||||
new /obj/item/book/granter/spell/summonitem(src)
|
||||
|
||||
if("sniper") //This shit is unique so can't really balance it around tc, also no silencer because getting killed without ANY indicator on what killed you sucks
|
||||
new /obj/item/gun/ballistic/automatic/sniper_rifle(src) // 12 tc
|
||||
new /obj/item/ammo_box/magazine/sniper_rounds/penetrator(src)
|
||||
new /obj/item/clothing/glasses/thermal/syndi(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/mask/gas/clown_hat(src)
|
||||
new /obj/item/clothing/under/suit_jacket/really_black(src)
|
||||
|
||||
if("metaops") // 30 tc
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src) // 8 tc
|
||||
new /obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted(src) // 8 tc
|
||||
new /obj/item/implanter/explosive(src) // 2 tc
|
||||
new /obj/item/ammo_box/magazine/m12g(src) // 2 tc
|
||||
new /obj/item/ammo_box/magazine/m12g(src) // 2 tc
|
||||
new /obj/item/grenade/plastic/c4 (src) // 1 tc
|
||||
new /obj/item/grenade/plastic/c4 (src) // 1 tc
|
||||
new /obj/item/card/emag(src) // 6 tc
|
||||
|
||||
if("ninja") // 40~ tc worth
|
||||
new /obj/item/katana(src) // Unique , basicly a better esword. 10 tc?
|
||||
new /obj/item/implanter/adrenalin(src) // 8 tc
|
||||
new /obj/item/throwing_star(src) // ~5 tc for all 6
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/implanter/emp(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/grenade/smokebomb(src)
|
||||
new /obj/item/storage/belt/chameleon(src) // Unique but worth at least 2 tc
|
||||
new /obj/item/card/id/syndicate(src) // 2 tc
|
||||
new /obj/item/chameleon(src) // 7 tc
|
||||
|
||||
/obj/item/storage/box/syndie_kit
|
||||
name = "box"
|
||||
desc = "A sleek, sturdy box."
|
||||
icon_state = "syndiebox"
|
||||
illustration = "writing_syndie"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_freedom
|
||||
name = "boxed freedom implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_freedom/PopulateContents()
|
||||
var/obj/item/implanter/O = new(src)
|
||||
O.imp = new /obj/item/implant/freedom(O)
|
||||
O.update_icon()
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_microbomb
|
||||
name = "Microbomb Implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_microbomb/PopulateContents()
|
||||
var/obj/item/implanter/O = new(src)
|
||||
O.imp = new /obj/item/implant/explosive(O)
|
||||
O.update_icon()
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_macrobomb
|
||||
name = "Macrobomb Implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_macrobomb/PopulateContents()
|
||||
var/obj/item/implanter/O = new(src)
|
||||
O.imp = new /obj/item/implant/explosive/macro(O)
|
||||
O.update_icon()
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_uplink
|
||||
name = "boxed uplink implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_uplink/PopulateContents()
|
||||
..()
|
||||
var/obj/item/implanter/O = new(src)
|
||||
O.imp = new /obj/item/implant/uplink(O)
|
||||
O.update_icon()
|
||||
|
||||
/obj/item/storage/box/syndie_kit/bioterror
|
||||
name = "bioterror syringe box"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/bioterror/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/syringe/bioterror(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_adrenal
|
||||
name = "boxed adrenal implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_adrenal/PopulateContents()
|
||||
var/obj/item/implanter/O = new(src)
|
||||
O.imp = new /obj/item/implant/adrenalin(O)
|
||||
O.update_icon()
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_storage
|
||||
name = "boxed storage implant (with injector)"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_storage/PopulateContents()
|
||||
new /obj/item/implanter/storage(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/space
|
||||
name = "boxed space suit and helmet"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/space/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.can_hold = typecacheof(list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate))
|
||||
|
||||
/obj/item/storage/box/syndie_kit/space/PopulateContents()
|
||||
new /obj/item/clothing/suit/space/syndicate/black/red(src) // Black and red is so in right now
|
||||
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/emp
|
||||
name = "boxed EMP kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/emp/PopulateContents()
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/grenade/empgrenade(src)
|
||||
new /obj/item/implanter/emp(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chemical
|
||||
name = "boxed chemical kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chemical/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 14
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chemical/PopulateContents()
|
||||
new /obj/item/reagent_containers/glass/bottle/polonium(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/venom(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/fentanyl(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/formaldehyde(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/spewium(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/cyanide(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/histamine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/initropidril(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/pancuronium(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/sodium_thiopental(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/coniine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/curare(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/amanitin(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/nuke
|
||||
name = "box"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/nuke/PopulateContents()
|
||||
new /obj/item/screwdriver/nuke(src)
|
||||
new /obj/item/nuke_core_container(src)
|
||||
new /obj/item/paper/guides/antag/nuke_instructions(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/supermatter
|
||||
name = "box"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/supermatter/PopulateContents()
|
||||
new /obj/item/scalpel/supermatter(src)
|
||||
new /obj/item/hemostat/supermatter(src)
|
||||
new /obj/item/nuke_core_container/supermatter(src)
|
||||
new /obj/item/paper/guides/antag/supermatter_sliver(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/tuberculosisgrenade
|
||||
name = "boxed virus grenade kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/tuberculosisgrenade/PopulateContents()
|
||||
new /obj/item/grenade/chem_grenade/tuberculosis(src)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/hypospray/medipen/tuberculosiscure(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/tuberculosiscure(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chameleon
|
||||
name = "chameleon kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chameleon/PopulateContents()
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/suit/chameleon(src)
|
||||
new /obj/item/clothing/gloves/chameleon(src)
|
||||
new /obj/item/clothing/shoes/chameleon(src)
|
||||
new /obj/item/clothing/glasses/chameleon(src)
|
||||
new /obj/item/clothing/head/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/storage/backpack/chameleon(src)
|
||||
new /obj/item/radio/headset/chameleon(src)
|
||||
new /obj/item/stamp/chameleon(src)
|
||||
new /obj/item/pda/chameleon(src)
|
||||
new /obj/item/clothing/neck/cloak/chameleon(src)
|
||||
|
||||
//5*(2*4) = 5*8 = 45, 45 damage if you hit one person with all 5 stars.
|
||||
//Not counting the damage it will do while embedded (2*4 = 8, at 15% chance)
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons/PopulateContents()
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/throwing_star(src)
|
||||
new /obj/item/restraints/legcuffs/bola/tactical(src)
|
||||
new /obj/item/restraints/legcuffs/bola/tactical(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/cutouts/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new/obj/item/cardboard_cutout/adaptive(src)
|
||||
new/obj/item/toy/crayon/rainbow(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/romerol/PopulateContents()
|
||||
new /obj/item/reagent_containers/glass/bottle/romerol(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/ez_clean/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new/obj/item/grenade/chem_grenade/ez_clean(src)
|
||||
|
||||
/obj/item/storage/box/hug/reverse_revolver/PopulateContents()
|
||||
new /obj/item/gun/ballistic/revolver/reverse(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/mimery/PopulateContents()
|
||||
new /obj/item/book/granter/spell/mimery_blockade(src)
|
||||
new /obj/item/book/granter/spell/mimery_guns(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_radio/PopulateContents()
|
||||
new /obj/item/implanter/radio/syndicate(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/centcom_costume/PopulateContents()
|
||||
new /obj/item/clothing/under/rank/centcom_officer(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/radio/headset/headset_cent/empty(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/storage/backpack/satchel(src)
|
||||
new /obj/item/pda/heads(src)
|
||||
new /obj/item/clipboard(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/chameleon/broken/PopulateContents()
|
||||
new /obj/item/clothing/under/chameleon/broken(src)
|
||||
new /obj/item/clothing/suit/chameleon/broken(src)
|
||||
new /obj/item/clothing/gloves/chameleon/broken(src)
|
||||
new /obj/item/clothing/shoes/chameleon/noslip/broken(src)
|
||||
new /obj/item/clothing/glasses/chameleon/broken(src)
|
||||
new /obj/item/clothing/head/chameleon/broken(src)
|
||||
new /obj/item/clothing/mask/chameleon/broken(src)
|
||||
new /obj/item/storage/backpack/chameleon/broken(src)
|
||||
new /obj/item/radio/headset/chameleon/broken(src)
|
||||
new /obj/item/stamp/chameleon/broken(src)
|
||||
new /obj/item/pda/chameleon/broken(src)
|
||||
// No chameleon laser, they can't randomise for //REASONS//
|
||||
|
||||
/obj/item/storage/box/syndie_kit/bee_grenades
|
||||
name = "buzzkill grenade box"
|
||||
desc = "A sleek, sturdy box with a buzzing noise coming from the inside. Uh oh."
|
||||
|
||||
/obj/item/storage/box/syndie_kit/bee_grenades/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/grenade/spawnergrenade/buzzkill(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/kitchen_gun
|
||||
name = "Kitchen Gun (TM) package"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/kitchen_gun/PopulateContents()
|
||||
new /obj/item/gun/ballistic/automatic/pistol/m1911/kitchengun(src)
|
||||
new /obj/item/ammo_box/magazine/m45/kitchengun(src)
|
||||
new /obj/item/ammo_box/magazine/m45/kitchengun(src)
|
||||
@@ -0,0 +1,109 @@
|
||||
/obj/item/storage/wallet
|
||||
name = "wallet"
|
||||
desc = "It can hold a few small and personal things."
|
||||
icon_state = "wallet"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
|
||||
var/obj/item/card/id/front_id = null
|
||||
var/list/combined_access
|
||||
|
||||
/obj/item/storage/wallet/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 4
|
||||
STR.cant_hold = typecacheof(list(/obj/item/screwdriver/power))
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/stack/spacecash,
|
||||
/obj/item/card,
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/flashlight/pen,
|
||||
/obj/item/seeds,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/coin,
|
||||
/obj/item/dice,
|
||||
/obj/item/disk,
|
||||
/obj/item/implanter,
|
||||
/obj/item/lighter,
|
||||
/obj/item/lipstick,
|
||||
/obj/item/match,
|
||||
/obj/item/paper,
|
||||
/obj/item/pen,
|
||||
/obj/item/photo,
|
||||
/obj/item/reagent_containers/dropper,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/valentine,
|
||||
/obj/item/stamp,
|
||||
/obj/item/key))
|
||||
|
||||
/obj/item/storage/wallet/Exited(atom/movable/AM)
|
||||
. = ..()
|
||||
refreshID()
|
||||
|
||||
/obj/item/storage/wallet/proc/refreshID()
|
||||
LAZYCLEARLIST(combined_access)
|
||||
if(!(front_id in src))
|
||||
front_id = null
|
||||
for(var/obj/item/card/id/I in contents)
|
||||
if(!front_id)
|
||||
front_id = I
|
||||
LAZYINITLIST(combined_access)
|
||||
combined_access |= I.access
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/wallet/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
refreshID()
|
||||
|
||||
/obj/item/storage/wallet/update_icon()
|
||||
var/new_state = "wallet"
|
||||
if(front_id)
|
||||
new_state = "wallet_id"
|
||||
if(new_state != icon_state) //avoid so many icon state changes.
|
||||
icon_state = new_state
|
||||
|
||||
/obj/item/storage/wallet/GetID()
|
||||
return front_id
|
||||
|
||||
/obj/item/storage/wallet/RemoveID()
|
||||
if(!front_id)
|
||||
return
|
||||
. = front_id
|
||||
front_id.forceMove(get_turf(src))
|
||||
|
||||
/obj/item/storage/wallet/InsertID(obj/item/inserting_item)
|
||||
var/obj/item/card/inserting_id = inserting_item.RemoveID()
|
||||
if(!inserting_id)
|
||||
return FALSE
|
||||
attackby(inserting_id)
|
||||
if(inserting_id in contents)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/wallet/GetAccess()
|
||||
if(LAZYLEN(combined_access))
|
||||
return combined_access
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/wallet/random
|
||||
icon_state = "random_wallet"
|
||||
|
||||
/obj/item/storage/wallet/random/PopulateContents()
|
||||
var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
||||
var/item2_type
|
||||
if(prob(50))
|
||||
item2_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
||||
var/item3_type = pick( /obj/item/coin/silver, /obj/item/coin/silver, /obj/item/coin/gold, /obj/item/coin/iron, /obj/item/coin/iron, /obj/item/coin/iron )
|
||||
|
||||
spawn(2)
|
||||
if(item1_type)
|
||||
new item1_type(src)
|
||||
if(item2_type)
|
||||
new item2_type(src)
|
||||
if(item3_type)
|
||||
new item3_type(src)
|
||||
update_icon()
|
||||
@@ -0,0 +1,255 @@
|
||||
#define STUNBATON_CHARGE_LENIENCY 0.3
|
||||
#define STUNBATON_DEPLETION_RATE 0.006
|
||||
|
||||
/obj/item/melee/baton
|
||||
name = "stunbaton"
|
||||
desc = "A stun baton for incapacitating people with."
|
||||
icon_state = "stunbaton"
|
||||
item_state = "baton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("beaten")
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
|
||||
var/stunforce = 140
|
||||
var/status = FALSE
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/hitcost = 1000
|
||||
var/throw_hit_chance = 35
|
||||
var/preload_cell_type //if not empty the baton starts with this type of cell
|
||||
|
||||
/obj/item/melee/baton/get_cell()
|
||||
. = cell
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
. = R.get_cell()
|
||||
|
||||
/obj/item/melee/baton/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/melee/baton/Initialize()
|
||||
. = ..()
|
||||
if(preload_cell_type)
|
||||
if(!ispath(preload_cell_type,/obj/item/stock_parts/cell))
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
else
|
||||
cell = new preload_cell_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
//Only mob/living types have stun handling
|
||||
if(status && prob(throw_hit_chance) && iscarbon(hit_atom))
|
||||
baton_stun(hit_atom)
|
||||
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high
|
||||
|
||||
/obj/item/melee/baton/proc/deductcharge(chrgdeductamt, chargecheck = TRUE, explode = TRUE)
|
||||
var/obj/item/stock_parts/cell/copper_top = get_cell()
|
||||
if(!copper_top)
|
||||
switch_status(FALSE, TRUE)
|
||||
return FALSE
|
||||
//Note this value returned is significant, as it will determine
|
||||
//if a stun is applied or not
|
||||
|
||||
copper_top.use(min(chrgdeductamt, copper_top.charge), explode)
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
if(status && (!copper_top || !copper_top.charge || (chargecheck && copper_top.charge < (hitcost * STUNBATON_CHARGE_LENIENCY))))
|
||||
//we're below minimum, turn off
|
||||
switch_status(FALSE)
|
||||
|
||||
/obj/item/melee/baton/proc/switch_status(new_status = FALSE, silent = FALSE)
|
||||
if(status != new_status)
|
||||
status = new_status
|
||||
if(!silent)
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
if(status)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/baton/process()
|
||||
deductcharge(round(hitcost * STUNBATON_DEPLETION_RATE), FALSE, FALSE)
|
||||
|
||||
/obj/item/melee/baton/update_icon()
|
||||
if(status)
|
||||
icon_state = "[initial(name)]_active"
|
||||
else if(!cell)
|
||||
icon_state = "[initial(name)]_nocell"
|
||||
else
|
||||
icon_state = "[initial(name)]"
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
. = ..()
|
||||
var/obj/item/stock_parts/cell/copper_top = get_cell()
|
||||
if(copper_top)
|
||||
to_chat(user, "<span class='notice'>\The [src] is [round(copper_top.percent())]% charged.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] does not have a power source installed.</span>")
|
||||
|
||||
/obj/item/melee/baton/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else
|
||||
if(C.maxcharge < (hitcost * STUNBATON_CHARGE_LENIENCY))
|
||||
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
switch_status(FALSE, TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/attack_self(mob/user)
|
||||
var/obj/item/stock_parts/cell/copper_top = get_cell()
|
||||
if(!copper_top || copper_top.charge < (hitcost * STUNBATON_CHARGE_LENIENCY))
|
||||
switch_status(FALSE, TRUE)
|
||||
if(!copper_top)
|
||||
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
|
||||
else
|
||||
switch_status(!status)
|
||||
to_chat(user, "<span class='notice'>[src] is now [status ? "on" : "off"].</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
|
||||
if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
clowning_around(user)
|
||||
return
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes it impossible to baton in stamina softcrit
|
||||
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
|
||||
return //CIT CHANGE - ditto
|
||||
|
||||
if(iscyborg(M))
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/L = M
|
||||
if(check_martial_counter(L, user))
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(status)
|
||||
if(baton_stun(M, user))
|
||||
user.do_attack_animation(M)
|
||||
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes stunbatonning others cost stamina
|
||||
return
|
||||
else
|
||||
M.visible_message("<span class='warning'>[user] has prodded [M] with [src]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
|
||||
else
|
||||
if(status)
|
||||
baton_stun(M, user)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return FALSE
|
||||
var/stunpwr = stunforce
|
||||
var/obj/item/stock_parts/cell/our_cell = get_cell()
|
||||
if(!our_cell)
|
||||
switch_status(FALSE)
|
||||
return FALSE
|
||||
var/stuncharge = our_cell.charge
|
||||
deductcharge(hitcost, FALSE)
|
||||
if(QDELETED(src) || QDELETED(our_cell)) //it was rigged
|
||||
return FALSE
|
||||
if(stuncharge < hitcost)
|
||||
if(stuncharge < (hitcost * STUNBATON_CHARGE_LENIENCY))
|
||||
L.visible_message("<span class='warning'>[user] has prodded [L] with [src]. Luckily it was out of charge.</span>", \
|
||||
"<span class='warning'>[user] has prodded you with [src]. Luckily it was out of charge.</span>")
|
||||
return FALSE
|
||||
stunpwr *= round(stuncharge/hitcost, 0.1)
|
||||
|
||||
|
||||
L.Knockdown(stunpwr)
|
||||
L.adjustStaminaLoss(stunpwr*0.1)//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
|
||||
L.apply_effect(EFFECT_STUTTER, stunforce)
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(user)
|
||||
L.lastattacker = user.real_name
|
||||
L.lastattackerckey = user.ckey
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
log_combat(user, L, "stunned")
|
||||
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.forcesay(GLOB.hit_appends)
|
||||
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/baton/proc/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
deductcharge(hitcost)
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
switch_status(FALSE)
|
||||
if(!iscyborg(loc))
|
||||
deductcharge(1000 / severity, TRUE, FALSE)
|
||||
|
||||
//Makeshift stun baton. Replacement for stun gloves.
|
||||
/obj/item/melee/baton/cattleprod
|
||||
name = "stunprod"
|
||||
desc = "An improvised stun baton."
|
||||
icon_state = "stunprod_nocell"
|
||||
item_state = "prod"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stunforce = 100
|
||||
hitcost = 2000
|
||||
throw_hit_chance = 10
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
var/obj/item/assembly/igniter/sparkler
|
||||
|
||||
/obj/item/melee/baton/cattleprod/Initialize()
|
||||
. = ..()
|
||||
sparkler = new (src)
|
||||
sparkler.activate_cooldown = 5
|
||||
|
||||
/obj/item/melee/baton/cattleprod/baton_stun()
|
||||
sparkler?.activate()
|
||||
. = ..()
|
||||
|
||||
#undef STUNBATON_CHARGE_LENIENCY
|
||||
#undef STUNBATON_DEPLETION_RATE
|
||||
@@ -0,0 +1,255 @@
|
||||
/obj/item/tank/jetpack
|
||||
name = "jetpack (empty)"
|
||||
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/jetpacks_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/jetpacks_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/gas_type = /datum/gas/oxygen
|
||||
var/on = FALSE
|
||||
var/stabilizers = FALSE
|
||||
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
/obj/item/tank/jetpack/New()
|
||||
..()
|
||||
if(gas_type)
|
||||
air_contents.gases[gas_type] = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/tank/jetpack/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_jetpack))
|
||||
cycle(user)
|
||||
else if(istype(action, /datum/action/item_action/jetpack_stabilization))
|
||||
if(on)
|
||||
stabilizers = !stabilizers
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack stabilization [stabilizers ? "on" : "off"].</span>")
|
||||
else
|
||||
toggle_internals(user)
|
||||
|
||||
/obj/item/tank/jetpack/proc/cycle(mob/user)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
if(!on)
|
||||
turn_on(user)
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack on.</span>")
|
||||
else
|
||||
turn_off(user)
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/tank/jetpack/proc/turn_on(mob/user)
|
||||
on = TRUE
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
ion_trail.start()
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
if(full_speed)
|
||||
user.add_movespeed_modifier(MOVESPEED_ID_JETPACK, priority=100, multiplicative_slowdown=-2, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK)
|
||||
|
||||
/obj/item/tank/jetpack/proc/turn_off(mob/user)
|
||||
on = FALSE
|
||||
stabilizers = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.stop()
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
user.remove_movespeed_modifier(MOVESPEED_ID_JETPACK)
|
||||
|
||||
/obj/item/tank/jetpack/proc/move_react(mob/user)
|
||||
allow_thrust(0.01, user)
|
||||
|
||||
/obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user)
|
||||
if(!on)
|
||||
return
|
||||
if((num < 0.005 || air_contents.total_moles() < num))
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/tank/jetpack/suicide_act(mob/user)
|
||||
if (istype(user, /mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?")
|
||||
H.visible_message("<span class='suicide'>[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!</span>")
|
||||
return (OXYLOSS)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/tank/jetpack/improvised
|
||||
name = "improvised jetpack"
|
||||
desc = "A jetpack made from two air tanks, a fire extinguisher and some atmospherics equipment. It doesn't look like it can hold much."
|
||||
icon_state = "jetpack-improvised"
|
||||
item_state = "jetpack-sec"
|
||||
volume = 30 //normal jetpacks have 70 volume
|
||||
gas_type = null //it starts empty
|
||||
full_speed = FALSE //moves at hardsuit jetpack speeds
|
||||
|
||||
/obj/item/tank/jetpack/improvised/allow_thrust(num, mob/living/user)
|
||||
if(!on)
|
||||
return
|
||||
if((num < 0.005 || air_contents.total_moles() < num))
|
||||
turn_off(user)
|
||||
return
|
||||
if(rand(0,250) == 0)
|
||||
to_chat(user, "<span class='notice'>You feel your jetpack's engines cut out.</span>")
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/tank/jetpack/void
|
||||
name = "void jetpack (oxygen)"
|
||||
desc = "It works well in a void."
|
||||
volume = 60
|
||||
icon_state = "jetpack-void"
|
||||
item_state = "jetpack-void"
|
||||
full_speed = FALSE //Old pre-hardsuit tech
|
||||
|
||||
/obj/item/tank/jetpack/oxygen
|
||||
name = "jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
|
||||
/obj/item/tank/jetpack/oxygen/harness
|
||||
name = "jet harness (oxygen)"
|
||||
desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks."
|
||||
icon_state = "jetpack-mini"
|
||||
item_state = "jetpack-mini"
|
||||
volume = 50
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/tank/jetpack/oxygen/captain
|
||||
name = "\improper Captain's jetpack"
|
||||
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
|
||||
icon_state = "jetpack-captain"
|
||||
item_state = "jetpack-captain"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
volume = 90
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy.
|
||||
|
||||
/obj/item/tank/jetpack/oxygen/security
|
||||
name = "security jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces."
|
||||
icon_state = "jetpack-sec"
|
||||
item_state = "jetpack-sec"
|
||||
full_speed = FALSE
|
||||
|
||||
/obj/item/tank/jetpack/carbondioxide
|
||||
name = "jetpack (carbon dioxide)"
|
||||
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
distribute_pressure = 0
|
||||
gas_type = /datum/gas/carbon_dioxide
|
||||
|
||||
/obj/item/tank/jetpack/carbondioxide/eva
|
||||
name = "surplus jetpack (carbon dioxide)"
|
||||
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals. Rated for less than stellar EVA speeds!"
|
||||
full_speed = FALSE
|
||||
|
||||
/obj/item/tank/jetpack/suit
|
||||
name = "hardsuit jetpack upgrade"
|
||||
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
|
||||
icon_state = "jetpack-mining"
|
||||
item_state = "jetpack-black"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
volume = 1
|
||||
slot_flags = null
|
||||
gas_type = null
|
||||
full_speed = FALSE
|
||||
var/datum/gas_mixture/temp_air_contents
|
||||
var/obj/item/tank/internals/tank = null
|
||||
var/mob/living/carbon/human/cur_user
|
||||
|
||||
/obj/item/tank/jetpack/suit/New()
|
||||
..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
temp_air_contents = air_contents
|
||||
|
||||
/obj/item/tank/jetpack/suit/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/tank/jetpack/suit/cycle(mob/user)
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
|
||||
to_chat(user, "<span class='warning'>\The [src] must be connected to a hardsuit!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!istype(H.s_store, /obj/item/tank/internals))
|
||||
to_chat(user, "<span class='warning'>You need a tank in your suit storage!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/tank/jetpack/suit/turn_on(mob/user)
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc) || loc.loc != user)
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
tank = H.s_store
|
||||
air_contents = tank.air_contents
|
||||
START_PROCESSING(SSobj, src)
|
||||
cur_user = user
|
||||
..()
|
||||
|
||||
/obj/item/tank/jetpack/suit/turn_off(mob/user)
|
||||
tank = null
|
||||
air_contents = temp_air_contents
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
cur_user = null
|
||||
..()
|
||||
|
||||
/obj/item/tank/jetpack/suit/process()
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
|
||||
turn_off(cur_user)
|
||||
return
|
||||
var/mob/living/carbon/human/H = loc.loc
|
||||
if(!tank || tank != H.s_store)
|
||||
turn_off(cur_user)
|
||||
return
|
||||
..()
|
||||
|
||||
//Return a jetpack that the mob can use
|
||||
//Back worn jetpacks, hardsuit internal packs, and so on.
|
||||
//Used in Process_Spacemove() and wherever you want to check for/get a jetpack
|
||||
|
||||
/mob/proc/get_jetpack()
|
||||
return
|
||||
|
||||
/mob/living/carbon/get_jetpack()
|
||||
var/obj/item/tank/jetpack/J = back
|
||||
if(istype(J))
|
||||
return J
|
||||
|
||||
/mob/living/carbon/human/get_jetpack()
|
||||
var/obj/item/tank/jetpack/J = ..()
|
||||
if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
|
||||
@@ -0,0 +1,459 @@
|
||||
//Hydroponics tank and base code
|
||||
/obj/item/watertank
|
||||
name = "backpack water tank"
|
||||
desc = "A S.U.N.S.H.I.N.E. brand watertank backpack with nozzle to water plants."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "waterbackpack"
|
||||
item_state = "waterbackpack"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
slowdown = 1
|
||||
actions_types = list(/datum/action/item_action/toggle_mister)
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
var/obj/item/noz
|
||||
var/volume = 500
|
||||
|
||||
/obj/item/watertank/Initialize()
|
||||
. = ..()
|
||||
create_reagents(volume, OPENCONTAINER)
|
||||
noz = make_noz()
|
||||
|
||||
/obj/item/watertank/ui_action_click(mob/user)
|
||||
toggle_mister(user)
|
||||
|
||||
/obj/item/watertank/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBackSlot())
|
||||
return 1
|
||||
|
||||
/obj/item/watertank/proc/toggle_mister(mob/living/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.get_item_by_slot(user.getBackSlot()) != src)
|
||||
to_chat(user, "<span class='warning'>The watertank must be worn properly to use!</span>")
|
||||
return
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
if(QDELETED(noz))
|
||||
noz = make_noz()
|
||||
if(noz in src)
|
||||
//Detach the nozzle into the user's hands
|
||||
if(!user.put_in_hands(noz))
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the mister!</span>")
|
||||
return
|
||||
else
|
||||
//Remove from their hands and put back "into" the tank
|
||||
remove_noz()
|
||||
|
||||
/obj/item/watertank/verb/toggle_mister_verb()
|
||||
set name = "Toggle Mister"
|
||||
set category = "Object"
|
||||
toggle_mister(usr)
|
||||
|
||||
/obj/item/watertank/proc/make_noz()
|
||||
return new /obj/item/reagent_containers/spray/mister(src)
|
||||
|
||||
/obj/item/watertank/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot != SLOT_BACK)
|
||||
remove_noz()
|
||||
|
||||
/obj/item/watertank/proc/remove_noz()
|
||||
if(!QDELETED(noz))
|
||||
if(ismob(noz.loc))
|
||||
var/mob/M = noz.loc
|
||||
M.temporarilyRemoveItemFromInventory(noz, TRUE)
|
||||
noz.forceMove(src)
|
||||
|
||||
/obj/item/watertank/Destroy()
|
||||
QDEL_NULL(noz)
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/attack_hand(mob/user)
|
||||
if (user.get_item_by_slot(user.getBackSlot()) == src)
|
||||
toggle_mister(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/MouseDrop(obj/over_object)
|
||||
var/mob/M = loc
|
||||
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/attackby(obj/item/W, mob/user, params)
|
||||
if(W == noz)
|
||||
remove_noz()
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/dropped(mob/user)
|
||||
..()
|
||||
remove_noz()
|
||||
|
||||
// This mister item is intended as an extension of the watertank and always attached to it.
|
||||
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
|
||||
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
|
||||
// watertank object will likely lead to weird behaviour or runtimes.
|
||||
/obj/item/reagent_containers/spray/mister
|
||||
name = "water mister"
|
||||
desc = "A mister nozzle attached to a water tank."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "mister"
|
||||
item_state = "mister"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mister_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mister_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(25,50,100)
|
||||
volume = 500
|
||||
item_flags = NOBLUDGEON | ABSTRACT // don't put in storage
|
||||
slot_flags = 0
|
||||
|
||||
var/obj/item/watertank/tank
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/Initialize()
|
||||
. = ..()
|
||||
tank = loc
|
||||
if(!istype(tank))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/doMove(atom/destination)
|
||||
if(destination && (destination != tank.loc || !ismob(destination)))
|
||||
if (loc != tank)
|
||||
to_chat(tank.loc, "<span class='notice'>The mister snaps back onto the watertank.</span>")
|
||||
destination = tank
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
|
||||
if(target.loc == loc) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it
|
||||
return
|
||||
..()
|
||||
|
||||
//Janitor tank
|
||||
/obj/item/watertank/janitor
|
||||
name = "backpack water tank"
|
||||
desc = "A janitorial watertank backpack with nozzle to clean dirt and graffiti."
|
||||
icon_state = "waterbackpackjani"
|
||||
item_state = "waterbackpackjani"
|
||||
|
||||
/obj/item/watertank/janitor/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("cleaner", 500)
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/janitor
|
||||
name = "janitor spray nozzle"
|
||||
desc = "A janitorial spray nozzle attached to a watertank, designed to clean up large messes."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "misterjani"
|
||||
item_state = "misterjani"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mister_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mister_righthand.dmi'
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
|
||||
/obj/item/watertank/janitor/make_noz()
|
||||
return new /obj/item/reagent_containers/spray/mister/janitor(src)
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/janitor/attack_self(var/mob/user)
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
//ATMOS FIRE FIGHTING BACKPACK
|
||||
|
||||
#define EXTINGUISHER 0
|
||||
#define RESIN_LAUNCHER 1
|
||||
#define RESIN_FOAM 2
|
||||
|
||||
/obj/item/watertank/atmos
|
||||
name = "backpack firefighter tank"
|
||||
desc = "A refrigerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, resin launcher and a smaller scale resin foamer."
|
||||
item_state = "waterbackpackatmos"
|
||||
icon_state = "waterbackpackatmos"
|
||||
volume = 200
|
||||
slowdown = 0
|
||||
|
||||
/obj/item/watertank/atmos/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("water", 200)
|
||||
|
||||
/obj/item/watertank/atmos/make_noz()
|
||||
return new /obj/item/extinguisher/mini/nozzle(src)
|
||||
|
||||
/obj/item/watertank/atmos/dropped(mob/user)
|
||||
..()
|
||||
icon_state = "waterbackpackatmos"
|
||||
if(istype(noz, /obj/item/extinguisher/mini/nozzle))
|
||||
var/obj/item/extinguisher/mini/nozzle/N = noz
|
||||
N.nozzle_mode = 0
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle
|
||||
name = "extinguisher nozzle"
|
||||
desc = "A heavy duty nozzle attached to a firefighter's backpack tank."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "atmos_nozzle"
|
||||
item_state = "nozzleatmos"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mister_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mister_righthand.dmi'
|
||||
safety = 0
|
||||
max_water = 200
|
||||
power = 8
|
||||
force = 10
|
||||
precision = 1
|
||||
cooling_power = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
item_flags = ABSTRACT // don't put in storage
|
||||
var/obj/item/watertank/tank
|
||||
var/nozzle_mode = 0
|
||||
var/metal_synthesis_cooldown = 0
|
||||
var/resin_cooldown = 0
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/Initialize()
|
||||
. = ..()
|
||||
tank = loc
|
||||
if (!istype(tank))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
reagents = tank.reagents
|
||||
max_water = tank.volume
|
||||
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/doMove(atom/destination)
|
||||
if(destination && (destination != tank.loc || !ismob(destination)))
|
||||
if(loc != tank)
|
||||
to_chat(tank.loc, "<span class='notice'>The nozzle snaps back onto the tank!</span>")
|
||||
destination = tank
|
||||
..()
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/attack_self(mob/user)
|
||||
switch(nozzle_mode)
|
||||
if(EXTINGUISHER)
|
||||
nozzle_mode = RESIN_LAUNCHER
|
||||
tank.icon_state = "waterbackpackatmos_1"
|
||||
to_chat(user, "Swapped to resin launcher")
|
||||
return
|
||||
if(RESIN_LAUNCHER)
|
||||
nozzle_mode = RESIN_FOAM
|
||||
tank.icon_state = "waterbackpackatmos_2"
|
||||
to_chat(user, "Swapped to resin foamer")
|
||||
return
|
||||
if(RESIN_FOAM)
|
||||
nozzle_mode = EXTINGUISHER
|
||||
tank.icon_state = "waterbackpackatmos_0"
|
||||
to_chat(user, "Swapped to water extinguisher")
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
|
||||
if(nozzle_mode == EXTINGUISHER)
|
||||
..()
|
||||
return
|
||||
var/Adj = user.Adjacent(target)
|
||||
if(Adj)
|
||||
AttemptRefill(target, user)
|
||||
if(nozzle_mode == RESIN_LAUNCHER)
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < 100)
|
||||
to_chat(user, "<span class='warning'>You need at least 100 units of water to use the resin launcher!</span>")
|
||||
return
|
||||
if(resin_cooldown)
|
||||
to_chat(user, "<span class='warning'>Resin launcher is still recharging...</span>")
|
||||
return
|
||||
resin_cooldown = TRUE
|
||||
R.remove_any(100)
|
||||
var/obj/effect/resin_container/A = new (get_turf(src))
|
||||
log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
if(src)
|
||||
resin_cooldown = FALSE
|
||||
return
|
||||
if(nozzle_mode == RESIN_FOAM)
|
||||
if(!Adj|| !isturf(target))
|
||||
return
|
||||
for(var/S in target)
|
||||
if(istype(S, /obj/effect/particle_effect/foam/metal/resin) || istype(S, /obj/structure/foamedmetal/resin))
|
||||
to_chat(user, "<span class='warning'>There's already resin here!</span>")
|
||||
return
|
||||
if(metal_synthesis_cooldown < 5)
|
||||
var/obj/effect/particle_effect/foam/metal/resin/F = new (get_turf(target))
|
||||
F.amount = 0
|
||||
metal_synthesis_cooldown++
|
||||
spawn(100)
|
||||
metal_synthesis_cooldown--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Resin foam mix is still being synthesized...</span>")
|
||||
return
|
||||
|
||||
/obj/effect/resin_container
|
||||
name = "resin container"
|
||||
desc = "A compacted ball of expansive resin, used to repair the atmosphere in a room, or seal off breaches."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "frozen_smoke_capsule"
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
pass_flags = PASSTABLE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/resin_container/proc/Smoke()
|
||||
var/obj/effect/particle_effect/foam/metal/resin/S = new /obj/effect/particle_effect/foam/metal/resin(get_turf(loc))
|
||||
S.amount = 4
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
qdel(src)
|
||||
|
||||
#undef EXTINGUISHER
|
||||
#undef RESIN_LAUNCHER
|
||||
#undef RESIN_FOAM
|
||||
|
||||
/obj/item/reagent_containers/chemtank
|
||||
name = "backpack chemical injector"
|
||||
desc = "A chemical autoinjector that can be carried on your back."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "waterbackpackatmos"
|
||||
item_state = "waterbackpackatmos"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
slowdown = 1
|
||||
actions_types = list(/datum/action/item_action/activate_injector)
|
||||
|
||||
var/on = FALSE
|
||||
volume = 300
|
||||
var/usage_ratio = 5 //5 unit added per 1 removed
|
||||
var/injection_amount = 1
|
||||
amount_per_transfer_from_this = 5
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = FALSE
|
||||
possible_transfer_amounts = list(5,10,15)
|
||||
|
||||
/obj/item/reagent_containers/chemtank/ui_action_click()
|
||||
toggle_injection()
|
||||
|
||||
/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BACK)
|
||||
return 1
|
||||
|
||||
/obj/item/reagent_containers/chemtank/proc/toggle_injection()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!istype(user))
|
||||
return
|
||||
if (user.get_item_by_slot(SLOT_BACK) != src)
|
||||
to_chat(user, "<span class='warning'>The chemtank needs to be on your back before you can activate it!</span>")
|
||||
return
|
||||
if(on)
|
||||
turn_off()
|
||||
else
|
||||
turn_on()
|
||||
|
||||
//Todo : cache these.
|
||||
/obj/item/reagent_containers/chemtank/proc/update_filling()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "backpack-10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 15)
|
||||
filling.icon_state = "backpack-10"
|
||||
if(16 to 60)
|
||||
filling.icon_state = "backpack50"
|
||||
if(61 to INFINITY)
|
||||
filling.icon_state = "backpack100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/chemtank/worn_overlays(var/isinhands = FALSE) //apply chemcolor and level
|
||||
. = list()
|
||||
//inhands + reagent_filling
|
||||
if(!isinhands && reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "backpackmob-10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 15)
|
||||
filling.icon_state = "backpackmob-10"
|
||||
if(16 to 60)
|
||||
filling.icon_state = "backpackmob50"
|
||||
if(61 to INFINITY)
|
||||
filling.icon_state = "backpackmob100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
. += filling
|
||||
|
||||
/obj/item/reagent_containers/chemtank/proc/turn_on()
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='notice'>[src] turns on.</span>")
|
||||
|
||||
/obj/item/reagent_containers/chemtank/proc/turn_off()
|
||||
on = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='notice'>[src] turns off.</span>")
|
||||
|
||||
/obj/item/reagent_containers/chemtank/process()
|
||||
if(!ishuman(loc))
|
||||
turn_off()
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
turn_off()
|
||||
return
|
||||
var/mob/living/carbon/human/user = loc
|
||||
if(user.back != src)
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/used_amount = injection_amount/usage_ratio
|
||||
reagents.reaction(user, INJECT,injection_amount,0)
|
||||
reagents.trans_to(user,used_amount,multiplier=usage_ratio)
|
||||
update_filling()
|
||||
user.update_inv_back() //for overlays update
|
||||
|
||||
//Operator backpack spray
|
||||
/obj/item/watertank/op
|
||||
name = "backpack water tank"
|
||||
desc = "A New Russian backpack spray for systematic cleansing of carbon lifeforms."
|
||||
icon_state = "waterbackpackjani"
|
||||
item_state = "waterbackpackjani"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
volume = 2000
|
||||
slowdown = 0
|
||||
|
||||
/obj/item/watertank/op/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("mutagen",350)
|
||||
reagents.add_reagent("napalm",125)
|
||||
reagents.add_reagent("welding_fuel",125)
|
||||
reagents.add_reagent("clf3",300)
|
||||
reagents.add_reagent("cryptobiolin",350)
|
||||
reagents.add_reagent("plasma",250)
|
||||
reagents.add_reagent("condensedcapsaicin",500)
|
||||
|
||||
/obj/item/reagent_containers/spray/mister/op
|
||||
desc = "A mister nozzle attached to several extended water tanks. It suspiciously has a compressor in the system and is labelled entirely in New Cyrillic."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "misterjani"
|
||||
item_state = "misterjani"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mister_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mister_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
amount_per_transfer_from_this = 100
|
||||
possible_transfer_amounts = list(75,100,150)
|
||||
|
||||
/obj/item/watertank/op/make_noz()
|
||||
return new /obj/item/reagent_containers/spray/mister/op(src)
|
||||
@@ -0,0 +1,240 @@
|
||||
|
||||
#define SOURCE_PORTAL 1
|
||||
#define DESTINATION_PORTAL 2
|
||||
|
||||
/* Teleportation devices.
|
||||
* Contains:
|
||||
* Locator
|
||||
* Hand-tele
|
||||
*/
|
||||
|
||||
/*
|
||||
* Locator
|
||||
*/
|
||||
/obj/item/locator
|
||||
name = "bluespace locator"
|
||||
desc = "Used to track portable teleportation beacons and targets with embedded tracking implants."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "locator"
|
||||
var/temp = null
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=400)
|
||||
|
||||
/obj/item/locator/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (temp)
|
||||
dat = "[temp]<BR><BR><A href='byond://?src=[REF(src)];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = {"
|
||||
<B>Persistent Signal Locator</B><HR>
|
||||
<A href='?src=[REF(src)];refresh=1'>Refresh</A>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/locator/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/turf/current_location = get_turf(usr)//What turf is the user on?
|
||||
if(!current_location || is_centcom_level(current_location.z))//If turf was not found or they're on CentCom
|
||||
to_chat(usr, "[src] is malfunctioning.")
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
|
||||
usr.set_machine(src)
|
||||
if (href_list["refresh"])
|
||||
temp = "<B>Persistent Signal Locator</B><HR>"
|
||||
var/turf/sr = get_turf(src)
|
||||
|
||||
if (sr)
|
||||
temp += "<B>Beacon Signals:</B><BR>"
|
||||
for(var/obj/item/beacon/W in GLOB.teleportbeacons)
|
||||
if (!W.renamed)
|
||||
continue
|
||||
var/turf/tr = get_turf(W)
|
||||
if (tr.z == sr.z && tr)
|
||||
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
|
||||
if (direct < 5)
|
||||
direct = "very strong"
|
||||
else
|
||||
if (direct < 10)
|
||||
direct = "strong"
|
||||
else
|
||||
if (direct < 20)
|
||||
direct = "weak"
|
||||
else
|
||||
direct = "very weak"
|
||||
temp += "[W.name]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
|
||||
|
||||
temp += "<B>Implant Signals:</B><BR>"
|
||||
for (var/obj/item/implant/tracking/W in GLOB.tracked_implants)
|
||||
if (!isliving(W.imp_in))
|
||||
continue
|
||||
var/mob/living/M = W.imp_in
|
||||
if (M.stat == DEAD)
|
||||
if (M.timeofdeath + W.lifespan_postmortem < world.time)
|
||||
continue
|
||||
|
||||
var/turf/tr = get_turf(M)
|
||||
if (tr.z == sr.z && tr)
|
||||
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
|
||||
if (direct < 20)
|
||||
if (direct < 5)
|
||||
direct = "very strong"
|
||||
else
|
||||
if (direct < 10)
|
||||
direct = "strong"
|
||||
else
|
||||
direct = "weak"
|
||||
temp += "[W.imp_in.name]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
|
||||
|
||||
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=[REF(src)];refresh=1'>Refresh</A><BR>"
|
||||
else
|
||||
temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
|
||||
else
|
||||
if (href_list["temp"])
|
||||
temp = null
|
||||
if (ismob(src.loc))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Hand-tele
|
||||
*/
|
||||
/obj/item/hand_tele
|
||||
name = "hand tele"
|
||||
desc = "A portable item using blue-space technology."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hand_tele"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=10000)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/list/active_portal_pairs
|
||||
var/max_portal_pairs = 3
|
||||
var/atmos_link_override
|
||||
|
||||
/obj/item/hand_tele/Initialize()
|
||||
. = ..()
|
||||
active_portal_pairs = list()
|
||||
|
||||
/obj/item/hand_tele/pre_attack(atom/target, mob/user, params)
|
||||
if(try_dispel_portal(target, user))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user)
|
||||
if(is_parent_of_portal(target))
|
||||
qdel(target)
|
||||
to_chat(user, "<span class='notice'>You dispel [target] with \the [src]!</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/hand_tele/afterattack(atom/target, mob/user)
|
||||
try_dispel_portal(target, user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/hand_tele/attack_self(mob/user)
|
||||
var/turf/current_location = get_turf(user)//What turf is the user on?
|
||||
var/area/current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
var/list/L = list( )
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
var/area/A = get_area(com.target)
|
||||
if(!A || A.noteleport)
|
||||
continue
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
L["[get_area(com.target)] (Active)"] = com.target
|
||||
else
|
||||
L["[get_area(com.target)] (Inactive)"] = com.target
|
||||
var/list/turfs = list( )
|
||||
for(var/turf/T in urange(10, orange=1))
|
||||
if(T.x>world.maxx-8 || T.x<8)
|
||||
continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-8 || T.y<8)
|
||||
continue
|
||||
var/area/A = T.loc
|
||||
if(A.noteleport)
|
||||
continue
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
L["None (Dangerous)"] = pick(turfs)
|
||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
|
||||
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
|
||||
return
|
||||
if(active_portal_pairs.len >= max_portal_pairs)
|
||||
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
|
||||
return
|
||||
var/atom/T = L[t1]
|
||||
var/implantcheckmate = FALSE
|
||||
if(isliving(T))
|
||||
var/mob/living/M = T
|
||||
if(!locate(/obj/item/implant/tracking) in M.implants) //The user was too slow and let the target mob's tracking implant expire or get removed.
|
||||
implantcheckmate = TRUE
|
||||
var/area/A = get_area(T)
|
||||
if(A.noteleport || implantcheckmate)
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
current_location = get_turf(user) //Recheck.
|
||||
current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", 2)
|
||||
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1, null, atmos_link_override)
|
||||
if(!(LAZYLEN(created) == 2))
|
||||
return
|
||||
try_move_adjacent(created[1])
|
||||
active_portal_pairs[created[1]] = created[2]
|
||||
var/obj/effect/portal/c1 = created[1]
|
||||
var/obj/effect/portal/c2 = created[2]
|
||||
investigate_log("was used by [key_name(user)] at [AREACOORD(user)] to create a portal pair with destinations [AREACOORD(c1)] and [AREACOORD(c2)].", INVESTIGATE_PORTAL)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/hand_tele/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
active_portal_pairs -= P //If this portal pair is made by us it'll be erased along with the other portal by the portal.
|
||||
|
||||
/obj/item/hand_tele/proc/is_parent_of_portal(obj/effect/portal/P)
|
||||
if(!istype(P))
|
||||
return FALSE
|
||||
if(active_portal_pairs[P])
|
||||
return SOURCE_PORTAL
|
||||
for(var/i in active_portal_pairs)
|
||||
if(active_portal_pairs[i] == P)
|
||||
return DESTINATION_PORTAL
|
||||
return FALSE
|
||||
|
||||
/obj/item/hand_tele/suicide_act(mob/user)
|
||||
if(iscarbon(user))
|
||||
user.visible_message("<span class='suicide'>[user] is creating a weak portal and sticking [user.p_their()] head through! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/mob/living/carbon/itemUser = user
|
||||
var/obj/item/bodypart/head/head = itemUser.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(head)
|
||||
head.drop_limb()
|
||||
var/list/safeLevels = SSmapping.levels_by_any_trait(list(ZTRAIT_SPACE_RUINS, ZTRAIT_LAVA_RUINS, ZTRAIT_STATION, ZTRAIT_MINING))
|
||||
head.forceMove(locate(rand(1, world.maxx), rand(1, world.maxy), pick(safeLevels)))
|
||||
itemUser.visible_message("<span class='suicide'>The portal snaps closed taking [user]'s head with it!</span>")
|
||||
else
|
||||
itemUser.visible_message("<span class='suicide'>[user] looks even further depressed as they realize they do not have a head...and suddenly dies of shame!</span>")
|
||||
return (BRUTELOSS)
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/item/melee/baton/cattleprod/teleprod
|
||||
name = "teleprod"
|
||||
desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
icon_state = "teleprod_nocell"
|
||||
item_state = "teleprod"
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/L, mob/living/carbon/user)//handles making things teleport when hit
|
||||
. = ..()
|
||||
if(!. || L.anchored)
|
||||
return
|
||||
do_teleport(L, get_turf(L), 15, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
|
||||
deductcharge(hitcost)
|
||||
else
|
||||
deductcharge(hitcost * 0.25)
|
||||
|
||||
/obj/item/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
|
||||
if(istype(I, /obj/item/stack/ore/bluespace_crystal))
|
||||
if(!cell)
|
||||
var/obj/item/stack/ore/bluespace_crystal/BSC = I
|
||||
var/obj/item/melee/baton/cattleprod/teleprod/S = new /obj/item/melee/baton/cattleprod/teleprod
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
BSC.use(1)
|
||||
user.put_in_hands(S)
|
||||
to_chat(user, "<span class='notice'>You place the bluespace crystal firmly into the igniter.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>You can't put the crystal onto the stunprod while it has a power cell installed!</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,287 @@
|
||||
//Items for nuke theft, supermatter theft traitor objective
|
||||
|
||||
|
||||
// STEALING THE NUKE
|
||||
|
||||
//the nuke core - objective item
|
||||
/obj/item/nuke_core
|
||||
name = "plutonium core"
|
||||
desc = "Extremely radioactive. Wear goggles."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "plutonium_core"
|
||||
item_state = "plutoniumcore"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/pulse = 0
|
||||
var/cooldown = 0
|
||||
var/pulseicon = "plutonium_core_pulse"
|
||||
|
||||
/obj/item/nuke_core/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/nuke_core/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core/attackby(obj/item/nuke_core_container/container, mob/user)
|
||||
if(istype(container))
|
||||
container.load(src, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core/process()
|
||||
if(cooldown < world.time - 60)
|
||||
cooldown = world.time
|
||||
flick(pulseicon, src)
|
||||
radiation_pulse(src, 400, 2)
|
||||
|
||||
/obj/item/nuke_core/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is rubbing [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
//nuke core box, for carrying the core
|
||||
/obj/item/nuke_core_container
|
||||
name = "nuke core container"
|
||||
desc = "Solid container for radioactive objects."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "core_container_empty"
|
||||
item_state = "tile"
|
||||
lefthand_file = 'icons/mob/inhands/misc/sheets_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/sheets_righthand.dmi'
|
||||
var/obj/item/nuke_core/core
|
||||
var/nt =FALSE //For the lid
|
||||
|
||||
/obj/item/nuke_core_container/nt
|
||||
nt = TRUE
|
||||
|
||||
/obj/item/nuke_core_container/Destroy()
|
||||
QDEL_NULL(core)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/ncore, mob/user)
|
||||
if(core || !istype(ncore))
|
||||
return FALSE
|
||||
ncore.forceMove(src)
|
||||
core = ncore
|
||||
icon_state = "core_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 50)
|
||||
return TRUE
|
||||
|
||||
/obj/item/nuke_core_container/proc/seal()
|
||||
if(istype(core))
|
||||
STOP_PROCESSING(SSobj, core)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 60, 1)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] is permanently sealed, [core]'s radiation is contained.</span>")
|
||||
if(nt != TRUE)
|
||||
icon_state = "core_container_sealed"
|
||||
else
|
||||
icon_state = "core_container_sealed_nt"
|
||||
|
||||
/obj/item/nuke_core_container/attackby(obj/item/nuke_core/core, mob/user)
|
||||
if(istype(core))
|
||||
if(!user.temporarilyRemoveItemFromInventory(core))
|
||||
to_chat(user, "<span class='warning'>The [core] is stuck to your hand!</span>")
|
||||
return
|
||||
else
|
||||
load(core, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
//snowflake screwdriver, works as a key to start nuke theft, traitor only
|
||||
/obj/item/screwdriver/nuke
|
||||
name = "screwdriver"
|
||||
desc = "A screwdriver with an ultra thin tip."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "screwdriver_nuke"
|
||||
item_state = "screwdriver_nuke"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/nuke/nt
|
||||
desc = "A screwdriver with an ultra thin diamon tip."
|
||||
toolspeed = 0.25
|
||||
icon_state = "screwdriver_nt"
|
||||
|
||||
/obj/item/paper/guides/antag/nuke_instructions
|
||||
info = "How to break into a Nanotrasen self-destruct terminal and remove its plutonium core:<br>\
|
||||
<ul>\
|
||||
<li>Use a screwdriver with a very thin tip (provided) to unscrew the terminal's front panel</li>\
|
||||
<li>Dislodge and remove the front panel with a crowbar</li>\
|
||||
<li>Cut the inner metal plate with a welding tool</li>\
|
||||
<li>Pry off the inner plate with a crowbar to expose the radioactive core</li>\
|
||||
<li>Use the core container to remove the plutonium core; the container will take some time to seal</li>\
|
||||
<li>???</li>\
|
||||
</ul>"
|
||||
|
||||
/obj/item/paper/guides/nt/nuke_instructions
|
||||
info = "How to remove its plutonium core:<br>\
|
||||
<ul>\
|
||||
<li>Use a screwdriver with a very thin tip (provided) to unscrew the terminal's front panel</li>\
|
||||
<li>Dislodge and remove the front panel with a crowbar</li>\
|
||||
<li>Cut the inner metal plate with a welding tool</li>\
|
||||
<li>Pry off the inner plate with a crowbar to expose the radioactive core</li>\
|
||||
<li>Use the core container to remove the plutonium core; the container will take some time to seal</li>\
|
||||
<li>Send core back to CC</li>\
|
||||
</ul>"
|
||||
|
||||
|
||||
// STEALING SUPERMATTER
|
||||
|
||||
/obj/item/paper/guides/antag/supermatter_sliver
|
||||
info = "How to safely extract a supermatter sliver:<br>\
|
||||
<ul>\
|
||||
<li>Approach an active supermatter crystal with radiation shielded personal protective equipment. DO NOT MAKE PHYSICAL CONTACT.</li>\
|
||||
<li>Use a supermatter scalpel (provided) to slice off a sliver of the crystal.</li>\
|
||||
<li>Use supermatter extraction tongs (also provided) to safely pick up the sliver you sliced off.</li>\
|
||||
<li>Physical contact of any object with the sliver will dust the object, as well as yourself.</li>\
|
||||
<li>Use the tongs to place the sliver into the provided container, which will take some time to seal.</li>\
|
||||
<li>Get the hell out before the crystal delaminates.</li>\
|
||||
<li>???</li>\
|
||||
</ul>"
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver
|
||||
name = "supermatter sliver"
|
||||
desc = "A tiny, highly volatile sliver of a supermatter crystal. Do not handle without protection!"
|
||||
icon_state = "supermatter_sliver"
|
||||
item_state = "supermattersliver"
|
||||
pulseicon = "supermatter_sliver_pulse"
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/attack_tk() // no TK dusting memes
|
||||
return FALSE
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/can_be_pulled(user) // no drag memes
|
||||
return FALSE
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/hemostat/supermatter))
|
||||
var/obj/item/hemostat/supermatter/tongs = W
|
||||
if (tongs.sliver)
|
||||
to_chat(user, "<span class='notice'>\The [tongs] is already holding a supermatter sliver!</span>")
|
||||
return FALSE
|
||||
forceMove(tongs)
|
||||
tongs.sliver = src
|
||||
tongs.update_icon()
|
||||
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
|
||||
else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>As it touches \the [src], both \the [src] and \the [W] burst into dust!</span>")
|
||||
radiation_pulse(user, 100)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/pickup(mob/living/user)
|
||||
..()
|
||||
if(!iscarbon(user))
|
||||
return FALSE
|
||||
var/mob/ded = user
|
||||
to_chat(user, "<span class='warning'>You reach for the supermatter sliver with your hands. That was dumb.</span>")
|
||||
radiation_pulse(user, 500, 2)
|
||||
playsound(get_turf(user), 'sound/effects/supermatter.ogg', 50, 1)
|
||||
ded.dust()
|
||||
|
||||
/obj/item/nuke_core_container/supermatter
|
||||
name = "supermatter bin"
|
||||
desc = "A tiny receptacle that releases an inert hyper-noblium mix upon sealing, allowing a sliver of a supermatter crystal to be safely stored.."
|
||||
var/obj/item/nuke_core/supermatter_sliver/sliver
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/Destroy()
|
||||
QDEL_NULL(sliver)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/load(obj/item/hemostat/supermatter/T, mob/user)
|
||||
if(!istype(T) || !T.sliver)
|
||||
return FALSE
|
||||
T.sliver.forceMove(src)
|
||||
sliver = T.sliver
|
||||
T.sliver = null
|
||||
T.icon_state = "supermatter_tongs"
|
||||
icon_state = "core_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 50)
|
||||
return TRUE
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/seal()
|
||||
if(istype(sliver))
|
||||
STOP_PROCESSING(SSobj, sliver)
|
||||
icon_state = "core_container_sealed"
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 60, 1)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] is permanently sealed, [sliver] is safely contained.</span>")
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/attackby(obj/item/hemostat/supermatter/tongs, mob/user)
|
||||
if(istype(tongs))
|
||||
//try to load shard into core
|
||||
load(tongs, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/scalpel/supermatter
|
||||
name = "supermatter scalpel"
|
||||
desc = "A scalpel with a tip of condensed hyper-noblium gas, searingly cold to the touch, that can safely shave a sliver off a supermatter crystal."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "supermatter_scalpel"
|
||||
toolspeed = 0.5
|
||||
damtype = "fire"
|
||||
usesound = 'sound/weapons/bladeslice.ogg'
|
||||
var/usesLeft
|
||||
|
||||
/obj/item/scalpel/supermatter/Initialize()
|
||||
. = ..()
|
||||
usesLeft = rand(2, 4)
|
||||
|
||||
/obj/item/hemostat/supermatter
|
||||
name = "supermatter extraction tongs"
|
||||
desc = "A pair of tongs made from condensed hyper-noblium gas, searingly cold to the touch, that can safely grip a supermatter sliver."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "supermatter_tongs"
|
||||
toolspeed = 0.75
|
||||
damtype = "fire"
|
||||
var/obj/item/nuke_core/supermatter_sliver/sliver
|
||||
|
||||
/obj/item/hemostat/supermatter/Destroy()
|
||||
QDEL_NULL(sliver)
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/supermatter/update_icon()
|
||||
if(sliver)
|
||||
icon_state = "supermatter_tongs_loaded"
|
||||
else
|
||||
icon_state = "supermatter_tongs"
|
||||
|
||||
/obj/item/hemostat/supermatter/afterattack(atom/O, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!sliver)
|
||||
return
|
||||
if(proximity && ismovableatom(O) && O != sliver)
|
||||
Consume(O, user)
|
||||
|
||||
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom) // no instakill supermatter javelins
|
||||
if(sliver)
|
||||
sliver.forceMove(loc)
|
||||
to_chat(usr, "<span class='notice'>\The [sliver] falls out of \the [src] as you throw them.</span>")
|
||||
sliver = null
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user)
|
||||
if(ismob(AM))
|
||||
var/mob/victim = AM
|
||||
victim.dust()
|
||||
message_admins("[src] has consumed [key_name_admin(victim)] [ADMIN_JMP(src)].")
|
||||
investigate_log("has consumed [key_name(victim)].", "supermatter")
|
||||
else
|
||||
investigate_log("has consumed [AM].", "supermatter")
|
||||
qdel(AM)
|
||||
if (user)
|
||||
user.visible_message("<span class='danger'>As [user] touches [AM] with \a [src], silence fills the room...</span>",\
|
||||
"<span class='userdanger'>You touch [AM] with [src], and everything suddenly goes silent.</span>\n<span class='notice'>[AM] and [sliver] flash into dust, and soon as you can register this, you do as well.</span>",\
|
||||
"<span class='italics'>Everything suddenly goes silent.</span>")
|
||||
user.dust()
|
||||
radiation_pulse(src, 500, 2)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
QDEL_NULL(sliver)
|
||||
update_icon()
|
||||
@@ -0,0 +1,103 @@
|
||||
/obj/item/crowbar
|
||||
name = "pocket crowbar"
|
||||
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "crowbar"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
tool_behaviour = TOOL_CROWBAR
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/crowbar/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/crowbar/red
|
||||
icon_state = "crowbar_red"
|
||||
force = 8
|
||||
|
||||
/obj/item/crowbar/brass
|
||||
name = "brass crowbar"
|
||||
desc = "A brass crowbar. It feels faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "crowbar_clock"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/bronze
|
||||
name = "bronze plated crowbar"
|
||||
desc = "A bronze plated crowbar."
|
||||
icon_state = "crowbar_brass"
|
||||
toolspeed = 0.95
|
||||
|
||||
/obj/item/crowbar/abductor
|
||||
name = "alien crowbar"
|
||||
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.1
|
||||
|
||||
/obj/item/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL=70)
|
||||
icon_state = "crowbar_large"
|
||||
item_state = "crowbar"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "crowbar_cyborg"
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 10
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
/obj/item/crowbar/advanced
|
||||
name = "advanced crowbar"
|
||||
desc = "A scientist's almost successful reproduction of an abductor's crowbar, it uses the same technology combined with a handle that can't quite hold it."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.2
|
||||
@@ -0,0 +1,158 @@
|
||||
/obj/item/screwdriver
|
||||
name = "screwdriver"
|
||||
desc = "You can be totally screwy with this."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "screwdriver_map"
|
||||
item_state = "screwdriver"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = list('sound/items/screwdriver.ogg', 'sound/items/screwdriver2.ogg')
|
||||
tool_behaviour = TOOL_SCREWDRIVER
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE //if the screwdriver uses random coloring
|
||||
var/static/list/screwdriver_colors = list(
|
||||
"blue" = rgb(24, 97, 213),
|
||||
"red" = rgb(255, 0, 0),
|
||||
"pink" = rgb(213, 24, 141),
|
||||
"brown" = rgb(160, 82, 18),
|
||||
"green" = rgb(14, 127, 27),
|
||||
"cyan" = rgb(24, 162, 213),
|
||||
"yellow" = rgb(255, 165, 0)
|
||||
)
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/screwdriver/Initialize()
|
||||
. = ..()
|
||||
if(random_color) //random colors!
|
||||
icon_state = "screwdriver"
|
||||
var/our_color = pick(screwdriver_colors)
|
||||
add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
if(prob(75))
|
||||
pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/update_icon()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file)
|
||||
. = list()
|
||||
if(isinhands && random_color)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head")
|
||||
M.appearance_flags = RESET_COLOR
|
||||
. += M
|
||||
|
||||
/obj/item/screwdriver/get_belt_overlay()
|
||||
if(random_color)
|
||||
var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver")
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head")
|
||||
body.color = color
|
||||
head.add_overlay(body)
|
||||
return head
|
||||
else
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD)
|
||||
return ..()
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
name = "brass screwdriver"
|
||||
desc = "A screwdriver made of brass. The handle feels freezing cold."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "screwdriver_clock"
|
||||
item_state = "screwdriver_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/bronze
|
||||
name = "bronze screwdriver"
|
||||
desc = "A screwdriver plated with bronze."
|
||||
icon_state = "screwdriver_brass"
|
||||
item_state = "screwdriver_brass"
|
||||
toolspeed = 0.95
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/abductor
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver_a"
|
||||
item_state = "screwdriver_nuke"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/abductor/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_nuke")
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill. It's fitted with a screw bit."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
|
||||
attack_verb = list("drilled", "screwed", "jabbed","whacked")
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/screwdriver/cyborg
|
||||
name = "automated screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "screwdriver_cyborg"
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/advanced
|
||||
name = "advanced screwdriver"
|
||||
desc = "A classy silver screwdriver with an alien alloy tip, it works almost as well as the real thing."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "screwdriver_a"
|
||||
item_state = "screwdriver_nuke"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.2
|
||||
random_color = FALSE
|
||||
@@ -0,0 +1,396 @@
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||
var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/progress_flash_divisor = 10
|
||||
var/burned_fuel_for = 0 //when fuel was last removed
|
||||
heat = 3800
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weldingtool/Initialize()
|
||||
. = ..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent("welding_fuel", max_fuel)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
if(welding)
|
||||
add_overlay("[initial(icon_state)]-on")
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
cut_overlays()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
add_overlay("[initial(icon_state)][ratio]")
|
||||
update_torch()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
++burned_fuel_for
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
use(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
open_flame()
|
||||
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
var/plasmaAmount = reagents.get_reagent_amount("plasma")
|
||||
dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user)
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
if(src.use_tool(H, user, 0, volume=50, amount=1))
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",
|
||||
"<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
item_heal_robotic(H, user, 15, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!status && O.is_refillable())
|
||||
reagents.trans_to(O, reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You empty [src]'s fuel tank into [O].</span>")
|
||||
update_icon()
|
||||
if(isOn())
|
||||
use(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(550, 10, 1)
|
||||
if(get_fuel() <= 0)
|
||||
set_light(0)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(L.IgniteMob())
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(L)] on fire with [src] at [AREACOORD(user)]")
|
||||
log_game("[key_name(user)] set [key_name(L)] on fire with [src] at [AREACOORD(user)]")
|
||||
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
if(src.reagents.has_reagent("plasma"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] activated a rigged welder at [AREACOORD(user)].")
|
||||
explode()
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity, 0.75, LIGHT_COLOR_FIRE)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
// Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("welding_fuel")
|
||||
|
||||
|
||||
// Uses fuel from the welding tool.
|
||||
/obj/item/weldingtool/use(used = 0)
|
||||
if(!isOn() || !check_fuel())
|
||||
return FALSE
|
||||
|
||||
if(used)
|
||||
burned_fuel_for = 0
|
||||
if(get_fuel() >= used)
|
||||
reagents.remove_reagent("welding_fuel", used)
|
||||
check_fuel()
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weldingtool/proc/check_fuel(mob/user)
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands(0)
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
switched_off(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
playsound(loc, deac_sound, 50, 1)
|
||||
switched_off(user)
|
||||
|
||||
//Switches the welder off
|
||||
/obj/item/weldingtool/proc/switched_off(mob/user)
|
||||
welding = 0
|
||||
set_light(0)
|
||||
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].")
|
||||
|
||||
/obj/item/weldingtool/get_temperature()
|
||||
return welding * heat
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
|
||||
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user)
|
||||
user.flash_act(light_intensity)
|
||||
|
||||
// Flash the user during welding progress
|
||||
/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
. = ..()
|
||||
if(. && user)
|
||||
if (progress_flash_divisor == 0)
|
||||
user.flash_act(min(light_intensity,1))
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
else
|
||||
progress_flash_divisor--
|
||||
|
||||
// If welding tool ran out of fuel during a construction task, construction fails.
|
||||
/obj/item/weldingtool/tool_use_check(mob/living/user, amount)
|
||||
if(!isOn() || !check_fuel())
|
||||
to_chat(user, "<span class='warning'>[src] has to be on to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
if(get_fuel() >= amount)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
to_chat(user, "<span class='warning'>Turn it off first!</span>")
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src] and close the fuel tank.</span>")
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached, modified, and refuelled.</span>")
|
||||
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.transferItemToLoc(src, F, TRUE)
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/ignition_effect(atom/A, mob/user)
|
||||
if(use_tool(A, user, 0, amount=1))
|
||||
return "<span class='notice'>[user] casually lights [A] with [src], what a badass.</span>"
|
||||
else
|
||||
return ""
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_GLASS=60)
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "indwelder_cyborg"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "upgraded industrial welding tool"
|
||||
desc = "An upgraded welder based of the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
var/last_gen = 0
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "clockwelder"
|
||||
item_state = "brasswelder"
|
||||
|
||||
/obj/item/weldingtool/bronze
|
||||
name = "bronze plated welding tool"
|
||||
desc = "A bronze plated welder."
|
||||
max_fuel = 21
|
||||
toolspeed = 0.95
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
|
||||
/obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
|
||||
/obj/item/weldingtool/advanced
|
||||
name = "advanced welding tool"
|
||||
desc = "A modern welding tool combined with an alien welding tool, it never runs out of fuel and works almost as fast."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.2
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/advanced/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
..()
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
@@ -0,0 +1,138 @@
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters_map"
|
||||
item_state = "cutters"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE
|
||||
var/static/list/wirecutter_colors = list(
|
||||
"blue" = "#1861d5",
|
||||
"red" = "#951710",
|
||||
"pink" = "#d5188d",
|
||||
"brown" = "#a05212",
|
||||
"green" = "#0e7f1b",
|
||||
"cyan" = "#18a2d5",
|
||||
"yellow" = "#d58c18"
|
||||
)
|
||||
|
||||
|
||||
/obj/item/wirecutters/Initialize()
|
||||
. = ..()
|
||||
if(random_color) //random colors!
|
||||
icon_state = "cutters"
|
||||
var/our_color = pick(wirecutter_colors)
|
||||
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/wirecutters/update_icon()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of eloquent wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "cutters_clock"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/bronze
|
||||
name = "bronze plated wirecutters"
|
||||
desc = "A pair of wirecutters plated with bronze."
|
||||
icon_state = "cutters_brass"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.95 //Wire cutters have 0 time bars though
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "wirecutters_cyborg"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed)
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/advanced
|
||||
name = "advanced wirecutters"
|
||||
desc = "A set of reproduction alien wirecutters, they have a silver handle with an exceedingly sharp blade."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.2
|
||||
random_color = FALSE
|
||||
@@ -0,0 +1,125 @@
|
||||
/obj/item/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "wrench"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
usesound = 'sound/items/ratchet.ogg'
|
||||
materials = list(MAT_METAL=150)
|
||||
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
tool_behaviour = TOOL_WRENCH
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "wrench_cyborg"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/brass
|
||||
name = "brass wrench"
|
||||
desc = "A brass wrench. It's faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "wrench_clock"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/bronze
|
||||
name = "bronze plated wrench"
|
||||
desc = "A bronze plated wrench."
|
||||
icon_state = "wrench_brass"
|
||||
toolspeed = 0.95
|
||||
|
||||
/obj/item/wrench/abductor
|
||||
name = "alien wrench"
|
||||
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.1
|
||||
|
||||
/obj/item/wrench/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill. It's fitted with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
//done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 8
|
||||
attack_verb = list("drilled", "screwed", "jabbed")
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wrench/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
desc = "A medical wrench with common(medical?) uses. Can be found in your hand."
|
||||
icon_state = "wrench_medical"
|
||||
force = 2 //MEDICAL
|
||||
throwforce = 4
|
||||
|
||||
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
|
||||
|
||||
/obj/item/wrench/medical/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
// TODO Make them glow with the power of the M E D I C A L W R E N C H
|
||||
// during their ascension
|
||||
|
||||
// Stun stops them from wandering off
|
||||
user.Stun(100, ignore_canstun = TRUE)
|
||||
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
|
||||
|
||||
// Let the sound effect finish playing
|
||||
sleep(20)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.dropItemToGround(W)
|
||||
|
||||
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
W.desc += " For some reason, it reminds you of [user.name]."
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.dust()
|
||||
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/wrench/advanced
|
||||
name = "advanced wrench"
|
||||
desc = "A wrench that uses the same magnetic technology that abductor tools use, but slightly more ineffeciently."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.2
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,688 @@
|
||||
/obj/item/banhammer
|
||||
desc = "A banhammer."
|
||||
name = "banhammer"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "toyhammer"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
force = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
attack_verb = list("banned")
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/banhammer/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is hitting [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.</span>")
|
||||
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
||||
/*
|
||||
oranges says: This is a meme relating to the english translation of the ss13 russian wiki page on lurkmore.
|
||||
mrdoombringer sez: and remember kids, if you try and PR a fix for this item's grammar, you are admitting that you are, indeed, a newfriend.
|
||||
for further reading, please see: https://github.com/tgstation/tgstation/pull/30173 and https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%2F%2Flurkmore.to%2FSS13&edit-text=&act=url
|
||||
*/
|
||||
/obj/item/banhammer/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
M.visible_message("<span class='danger'>[user] are stroking the head of [M] with a bangammer</span>", "<span class='userdanger'>[user] are stroking the head with a bangammer</span>", "you hear a bangammer stroking a head");
|
||||
else
|
||||
M.visible_message("<span class='danger'>[M] has been banned FOR NO REISIN by [user]</span>", "<span class='userdanger'>You have been banned FOR NO REISIN by [user]</span>", "you hear a banhammer banning someone")
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
return ..(M, user)
|
||||
|
||||
/obj/item/sord
|
||||
name = "\improper SORD"
|
||||
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
|
||||
icon_state = "sord"
|
||||
item_state = "sord"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 2
|
||||
throwforce = 1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/sord/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.</span>", \
|
||||
"<span class='suicide'>You try to impale yourself with [src], but it's USELESS...</span>")
|
||||
return SHAME
|
||||
|
||||
/obj/item/claymore
|
||||
name = "claymore"
|
||||
desc = "What are you standing around staring at this for? Get to killing!"
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
|
||||
force = 40
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
block_chance = 50
|
||||
sharpness = IS_SHARP
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/claymore/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 40, 105)
|
||||
|
||||
/obj/item/claymore/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS
|
||||
desc = "<b><i>THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!</i></b>\nActivate it in your hand to point to the nearest victim."
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = DROPDEL
|
||||
slot_flags = null
|
||||
block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY
|
||||
light_range = 3
|
||||
attack_verb = list("brutalized", "eviscerated", "disemboweled", "hacked", "carved", "cleaved") //ONLY THE MOST VISCERAL ATTACK VERBS
|
||||
var/notches = 0 //HOW MANY PEOPLE HAVE BEEN SLAIN WITH THIS BLADE
|
||||
var/obj/item/disk/nuclear/nuke_disk //OUR STORED NUKE DISK
|
||||
|
||||
/obj/item/claymore/highlander/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HIGHLANDER)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/claymore/highlander/Destroy()
|
||||
if(nuke_disk)
|
||||
nuke_disk.forceMove(get_turf(src))
|
||||
nuke_disk.visible_message("<span class='warning'>The nuke disk is vulnerable!</span>")
|
||||
nuke_disk = null
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/claymore/highlander/process()
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
loc.layer = LARGE_MOB_LAYER //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS)
|
||||
H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS
|
||||
H.adjustStaminaLoss(-50) //CIT CHANGE - AND MAY HE NEVER SUCCUMB TO EXHAUSTION
|
||||
else
|
||||
if(!(flags_1 & ADMIN_SPAWNED_1))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/claymore/highlander/pickup(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>The power of Scotland protects you! You are shielded from all stuns and knockdowns.</span>")
|
||||
user.add_stun_absorption("highlander", INFINITY, 1, " is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!")
|
||||
user.ignore_slowdown(HIGHLANDER)
|
||||
|
||||
/obj/item/claymore/highlander/dropped(mob/living/user)
|
||||
user.unignore_slowdown(HIGHLANDER)
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //If this ever happens, it's because you lost an arm
|
||||
|
||||
/obj/item/claymore/highlander/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It has [!notches ? "nothing" : "[notches] notches"] scratched into the blade.")
|
||||
if(nuke_disk)
|
||||
to_chat(user, "<span class='boldwarning'>It's holding the nuke disk!</span>")
|
||||
|
||||
/obj/item/claymore/highlander/attack(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!QDELETED(target) && iscarbon(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander")
|
||||
user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES
|
||||
add_notch(user)
|
||||
target.visible_message("<span class='warning'>[target] crumbles to dust beneath [user]'s blows!</span>", "<span class='userdanger'>As you fall, your body crumbles to dust!</span>")
|
||||
target.dust()
|
||||
|
||||
/obj/item/claymore/highlander/attack_self(mob/living/user)
|
||||
var/closest_victim
|
||||
var/closest_distance = 255
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list - user)
|
||||
if(H.client && H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
|
||||
closest_victim = H
|
||||
if(!closest_victim)
|
||||
to_chat(user, "<span class='warning'>[src] thrums for a moment and falls dark. Perhaps there's nobody nearby.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='danger'>[src] thrums and points to the [dir2text(get_dir(user, closest_victim))].</span>")
|
||||
|
||||
/obj/item/claymore/highlander/IsReflect()
|
||||
return 1 //YOU THINK YOUR PUNY LASERS CAN STOP ME?
|
||||
|
||||
/obj/item/claymore/highlander/proc/add_notch(mob/living/user) //DYNAMIC CLAYMORE PROGRESSION SYSTEM - THIS IS THE FUTURE
|
||||
notches++
|
||||
force++
|
||||
var/new_name = name
|
||||
switch(notches)
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>Your first kill - hopefully one of many. You scratch a notch into [src]'s blade.</span>")
|
||||
to_chat(user, "<span class='warning'>You feel your fallen foe's soul entering your blade, restoring your wounds!</span>")
|
||||
new_name = "notched claymore"
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>Another falls before you. Another soul fuses with your own. Another notch in the blade.</span>")
|
||||
new_name = "double-notched claymore"
|
||||
add_atom_colour(rgb(255, 235, 235), ADMIN_COLOUR_PRIORITY)
|
||||
if(3)
|
||||
to_chat(user, "<span class='notice'>You're beginning to</span> <span class='danger'><b>relish</b> the <b>thrill</b> of <b>battle.</b></span>")
|
||||
new_name = "triple-notched claymore"
|
||||
add_atom_colour(rgb(255, 215, 215), ADMIN_COLOUR_PRIORITY)
|
||||
if(4)
|
||||
to_chat(user, "<span class='notice'>You've lost count of</span> <span class='boldannounce'>how many you've killed.</span>")
|
||||
new_name = "many-notched claymore"
|
||||
add_atom_colour(rgb(255, 195, 195), ADMIN_COLOUR_PRIORITY)
|
||||
if(5)
|
||||
to_chat(user, "<span class='boldannounce'>Five voices now echo in your mind, cheering the slaughter.</span>")
|
||||
new_name = "battle-tested claymore"
|
||||
add_atom_colour(rgb(255, 175, 175), ADMIN_COLOUR_PRIORITY)
|
||||
if(6)
|
||||
to_chat(user, "<span class='boldannounce'>Is this what the vikings felt like? Visions of glory fill your head as you slay your sixth foe.</span>")
|
||||
new_name = "battle-scarred claymore"
|
||||
add_atom_colour(rgb(255, 155, 155), ADMIN_COLOUR_PRIORITY)
|
||||
if(7)
|
||||
to_chat(user, "<span class='boldannounce'>Kill. Butcher. <i>Conquer.</i></span>")
|
||||
new_name = "vicious claymore"
|
||||
add_atom_colour(rgb(255, 135, 135), ADMIN_COLOUR_PRIORITY)
|
||||
if(8)
|
||||
to_chat(user, "<span class='userdanger'>IT NEVER GETS OLD. THE <i>SCREAMING</i>. THE <i>BLOOD</i> AS IT <i>SPRAYS</i> ACROSS YOUR <i>FACE.</i></span>")
|
||||
new_name = "bloodthirsty claymore"
|
||||
add_atom_colour(rgb(255, 115, 115), ADMIN_COLOUR_PRIORITY)
|
||||
if(9)
|
||||
to_chat(user, "<span class='userdanger'>ANOTHER ONE FALLS TO YOUR BLOWS. ANOTHER WEAKLING UNFIT TO LIVE.</span>")
|
||||
new_name = "gore-stained claymore"
|
||||
add_atom_colour(rgb(255, 95, 95), ADMIN_COLOUR_PRIORITY)
|
||||
if(10)
|
||||
user.visible_message("<span class='warning'>[user]'s eyes light up with a vengeful fire!</span>", \
|
||||
"<span class='userdanger'>YOU FEEL THE POWER OF VALHALLA FLOWING THROUGH YOU! <i>THERE CAN BE ONLY ONE!!!</i></span>")
|
||||
user.update_icons()
|
||||
new_name = "GORE-DRENCHED CLAYMORE OF [pick("THE WHIMSICAL SLAUGHTER", "A THOUSAND SLAUGHTERED CATTLE", "GLORY AND VALHALLA", "ANNIHILATION", "OBLITERATION")]"
|
||||
icon_state = "claymore_valhalla"
|
||||
item_state = "cultblade"
|
||||
remove_atom_colour(ADMIN_COLOUR_PRIORITY)
|
||||
|
||||
name = new_name
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
|
||||
/obj/item/katana
|
||||
name = "katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
|
||||
force = 40
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
block_chance = 50
|
||||
sharpness = IS_SHARP
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
|
||||
resistance_flags = FIRE_PROOF
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/katana/cursed
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/katana/cursed/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT)
|
||||
|
||||
/obj/item/katana/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku!</span>")
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/wirerod
|
||||
name = "wired rod"
|
||||
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
||||
icon_state = "wiredrod"
|
||||
item_state = "rods"
|
||||
flags_1 = CONDUCT_1
|
||||
force = 9
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=1150, MAT_GLASS=75)
|
||||
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
||||
|
||||
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/shard))
|
||||
var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear
|
||||
|
||||
remove_item_from_storage(user)
|
||||
if (!user.transferItemToLoc(I, S))
|
||||
return
|
||||
S.CheckParts(list(I))
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(S)
|
||||
to_chat(user, "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/assembly/igniter) && !HAS_TRAIT(I, TRAIT_NODROP))
|
||||
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
|
||||
|
||||
remove_item_from_storage(user)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>")
|
||||
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(P)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/throwing_star
|
||||
name = "throwing star"
|
||||
desc = "An ancient weapon still used to this day, due to its ease of lodging itself into its victim's body parts."
|
||||
icon_state = "throwingstar"
|
||||
item_state = "eshield0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
force = 2
|
||||
throwforce = 20 //This is never used on mobs since this has a 100% embed chance.
|
||||
throw_speed = 4
|
||||
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 100, "embedded_fall_chance" = 0)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=500)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
|
||||
/obj/item/switchblade
|
||||
name = "switchblade"
|
||||
icon_state = "switchblade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "A sharp, concealable, spring-loaded knife."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 3
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
attack_verb = list("stubbed", "poked")
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/extended = 0
|
||||
|
||||
/obj/item/switchblade/attack_self(mob/user)
|
||||
extended = !extended
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
if(extended)
|
||||
force = 20
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throwforce = 23
|
||||
icon_state = "switchblade_ext"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
else
|
||||
force = 3
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 5
|
||||
icon_state = "switchblade"
|
||||
attack_verb = list("stubbed", "poked")
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
sharpness = IS_BLUNT
|
||||
|
||||
/obj/item/switchblade/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/phone
|
||||
name = "red phone"
|
||||
desc = "Should anything ever go wrong..."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "red_phone"
|
||||
force = 3
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
attack_verb = list("called", "rang")
|
||||
hitsound = 'sound/weapons/ring.ogg'
|
||||
|
||||
/obj/item/phone/suicide_act(mob/user)
|
||||
if(locate(/obj/structure/chair/stool) in user.loc)
|
||||
user.visible_message("<span class='suicide'>[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/cane
|
||||
name = "cane"
|
||||
desc = "A cane used by a true gentleman. Or a clown."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cane"
|
||||
item_state = "stick"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
|
||||
|
||||
/obj/item/staff
|
||||
name = "wizard staff"
|
||||
desc = "Apparently a staff used by the wizard."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armour_penetration = 100
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined")
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/staff/broom
|
||||
name = "broom"
|
||||
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "broom"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/staff/stick
|
||||
name = "stick"
|
||||
desc = "A great tool to drag someone else's drinks across the bar."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cane"
|
||||
item_state = "stick"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/ectoplasm
|
||||
name = "ectoplasm"
|
||||
desc = "Spooky."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "ectoplasm"
|
||||
|
||||
/obj/item/ectoplasm/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/mounted_chainsaw
|
||||
name = "mounted chainsaw"
|
||||
desc = "A chainsaw that has replaced your arm."
|
||||
icon_state = "chainsaw_on"
|
||||
item_state = "mounted_chainsaw"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
item_flags = ABSTRACT | DROPDEL
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 24
|
||||
throwforce = 0
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
sharpness = IS_SHARP
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/mounted_chainsaw/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/mounted_chainsaw/Destroy()
|
||||
var/obj/item/bodypart/part
|
||||
new /obj/item/twohanded/required/chainsaw(get_turf(src))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/holder = loc
|
||||
var/index = holder.get_held_index_of_item(src)
|
||||
if(index)
|
||||
part = holder.hand_bodyparts[index]
|
||||
. = ..()
|
||||
if(part)
|
||||
part.drop_limb()
|
||||
|
||||
/obj/item/statuebust
|
||||
name = "bust"
|
||||
desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it
|
||||
icon = 'icons/obj/statue.dmi'
|
||||
icon_state = "bust"
|
||||
force = 15
|
||||
throwforce = 10
|
||||
throw_speed = 5
|
||||
throw_range = 2
|
||||
attack_verb = list("busted")
|
||||
|
||||
/obj/item/tailclub
|
||||
name = "tail club"
|
||||
desc = "For the beating to death of lizards with their own tails."
|
||||
icon_state = "tailclub"
|
||||
force = 14
|
||||
throwforce = 1 // why are you throwing a club do you even weapon
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
attack_verb = list("clubbed", "bludgeoned")
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip
|
||||
name = "liz o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of lizards."
|
||||
icon_state = "tailwhip"
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip/kitty
|
||||
name = "cat o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of cats."
|
||||
icon_state = "catwhip"
|
||||
|
||||
/obj/item/melee/skateboard
|
||||
name = "skateboard"
|
||||
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
|
||||
icon_state = "skateboard"
|
||||
item_state = "skateboard"
|
||||
force = 12
|
||||
throwforce = 4
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("smacked", "whacked", "slammed", "smashed")
|
||||
|
||||
/obj/item/melee/skateboard/attack_self(mob/user)
|
||||
new /obj/vehicle/ridden/scooter/skateboard(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/melee/baseball_bat
|
||||
name = "baseball bat"
|
||||
desc = "There ain't a skull in the league that can withstand a swatter."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "baseball_bat"
|
||||
item_state = "baseball_bat"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 10
|
||||
throwforce = 12
|
||||
attack_verb = list("beat", "smacked")
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/homerun_ready = 0
|
||||
var/homerun_able = 0
|
||||
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain
|
||||
name = "blessed baseball bat"
|
||||
desc = "There ain't a cult in the league that can withstand a swatter."
|
||||
force = 14
|
||||
throwforce = 14
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
/obj/item/melee/baseball_bat/chaplain/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
|
||||
/obj/item/melee/baseball_bat/homerun
|
||||
name = "home run bat"
|
||||
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
|
||||
homerun_able = 1
|
||||
|
||||
/obj/item/melee/baseball_bat/attack_self(mob/user)
|
||||
if(!homerun_able)
|
||||
..()
|
||||
return
|
||||
if(homerun_ready)
|
||||
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
|
||||
..()
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
|
||||
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
|
||||
if(do_after(user, 90, target = src))
|
||||
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
|
||||
homerun_ready = 1
|
||||
..()
|
||||
|
||||
/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
var/atom/throw_target = get_edge_target_turf(target, user.dir)
|
||||
if(homerun_ready)
|
||||
user.visible_message("<span class='userdanger'>It's a home run!</span>")
|
||||
target.throw_at(throw_target, rand(8,10), 14, user)
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
|
||||
homerun_ready = 0
|
||||
return
|
||||
else if(!target.anchored)
|
||||
target.throw_at(throw_target, rand(1,2), 7, user)
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative
|
||||
name = "metal baseball bat"
|
||||
desc = "This bat is made of highly reflective, highly armored material."
|
||||
icon_state = "baseball_bat_metal"
|
||||
item_state = "baseball_bat_metal"
|
||||
force = 12
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers
|
||||
var/picksound = rand(1,2)
|
||||
var/turf = get_turf(src)
|
||||
if(picksound == 1)
|
||||
playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1)
|
||||
if(picksound == 2)
|
||||
playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/melee/baseball_bat/ablative/syndi
|
||||
name = "syndicate major league bat"
|
||||
desc = "A metal bat made by the syndicate for the major league team."
|
||||
force = 18 //Spear damage...
|
||||
throwforce = 30
|
||||
|
||||
/obj/item/melee/flyswatter
|
||||
name = "flyswatter"
|
||||
desc = "Useful for killing insects of all sizes."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "flyswatter"
|
||||
item_state = "flyswatter"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("swatted", "smacked")
|
||||
hitsound = 'sound/effects/snap.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
|
||||
var/list/strong_against
|
||||
|
||||
/obj/item/melee/flyswatter/Initialize()
|
||||
. = ..()
|
||||
strong_against = typecacheof(list(
|
||||
/mob/living/simple_animal/hostile/poison/bees/,
|
||||
/mob/living/simple_animal/butterfly,
|
||||
/mob/living/simple_animal/cockroach,
|
||||
/obj/item/queen_bee
|
||||
))
|
||||
|
||||
|
||||
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(proximity_flag)
|
||||
if(is_type_in_typecache(target, strong_against))
|
||||
new /obj/effect/decal/cleanable/insectguts(target.drop_location())
|
||||
to_chat(user, "<span class='warning'>You easily splat the [target].</span>")
|
||||
if(istype(target, /mob/living/))
|
||||
var/mob/living/bug = target
|
||||
bug.death(1)
|
||||
else
|
||||
qdel(target)
|
||||
|
||||
/obj/item/circlegame
|
||||
name = "circled hand"
|
||||
desc = "If somebody looks at this while it's below your waist, you get to bop them."
|
||||
icon_state = "madeyoulook"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
item_flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("bopped")
|
||||
|
||||
/obj/item/slapper
|
||||
name = "slapper"
|
||||
desc = "This is how real men fight."
|
||||
icon_state = "latexballon"
|
||||
item_state = "nothing"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
item_flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("slapped")
|
||||
hitsound = 'sound/effects/snap.ogg'
|
||||
|
||||
/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/L = M
|
||||
if(L && L.dna && L.dna.species)
|
||||
L.dna.species.stop_wagging_tail(M)
|
||||
if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD)))
|
||||
user.do_attack_animation(M)
|
||||
playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
|
||||
"<span class='notice'>You slap [M]!</span>",\
|
||||
"You hear a slap.")
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/proc/can_trigger_gun(mob/living/user)
|
||||
if(!user.can_use_guns(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/extendohand
|
||||
name = "extendo-hand"
|
||||
desc = "Futuristic tech has allowed these classic spring-boxing toys to essentially act as a fully functional hand-operated hand prosthetic."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "extendohand"
|
||||
item_state = "extendohand"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
force = 0
|
||||
throwforce = 5
|
||||
reach = 2
|
||||
|
||||
/obj/item/extendohand/acme
|
||||
name = "\improper ACME Extendo-Hand"
|
||||
desc = "A novelty extendo-hand produced by the ACME corporation. Originally designed to knock out roadrunners."
|
||||
|
||||
/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user)
|
||||
var/dist = get_dist(M, user)
|
||||
if(dist < reach)
|
||||
to_chat(user, "<span class='warning'>[M] is too close to use [src] on.</span>")
|
||||
return
|
||||
M.attack_hand(user)
|
||||
Reference in New Issue
Block a user