mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Merge branch 'master' into mobpathfix
This commit is contained in:
@@ -51,20 +51,10 @@
|
||||
|
||||
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, forced = FALSE, check_loc = TRUE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
|
||||
if(check_loc && M.loc != loc)
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (buckled_mobs.len >= max_buckled_mobs) || (buckle_require_restraints && !M.restrained()))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
to_chat(M, "<span class='notice'>\The [src] can't buckle anymore people.</span>")
|
||||
if(!can_buckle_check(M, forced))
|
||||
return FALSE
|
||||
|
||||
M.buckled = src
|
||||
@@ -130,6 +120,8 @@
|
||||
if(M in buckled_mobs)
|
||||
to_chat(user, "<span class='warning'>\The [M] is already buckled to \the [src].</span>")
|
||||
return FALSE
|
||||
if(!can_buckle_check(M, forced))
|
||||
return FALSE
|
||||
|
||||
add_fingerprint(user)
|
||||
// unbuckle_mob()
|
||||
@@ -195,3 +187,19 @@
|
||||
else
|
||||
L.set_dir(dir)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (buckled_mobs.len >= max_buckled_mobs) || (buckle_require_restraints && !M.restrained()))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
to_chat(M, "<span class='notice'>\The [src] can't buckle anymore people.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -13,18 +13,24 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
if(istype(M,/mob) && !(istype(M,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/Crossed(AM as mob|obj)
|
||||
if(istype(AM,/mob) && !(istype(AM,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(AM)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user as mob)
|
||||
if(istype(user) && !(istype(user,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(user)
|
||||
return
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
desc = "Used for repairing or building APCs"
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "apc_frame"
|
||||
|
||||
/obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (W.is_wrench())
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
refund_amt = 2
|
||||
|
||||
/obj/item/frame/apc/try_build(turf/on_wall, mob/user as mob)
|
||||
if (get_dist(on_wall, user)>1)
|
||||
|
||||
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(mode in no_auto_update)
|
||||
auto_update = 0
|
||||
@@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
@@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
@@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
P.new_message_from_pda(src, t)
|
||||
GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
else
|
||||
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
|
||||
|
||||
@@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(L)
|
||||
if(reception_message)
|
||||
L << reception_message
|
||||
GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
/obj/item/device/pda/proc/new_news(var/message)
|
||||
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
|
||||
@@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
@@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
@@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
else if(istype(C, /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/O = locate() in src
|
||||
if(O)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
// The value element is the actual data, and can take any form necessary for the template
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -261,7 +261,7 @@
|
||||
notehtml = note
|
||||
|
||||
if(href_list["switch_template"])
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
if(ui)
|
||||
ui.add_template("Body", href_list["switch_template"])
|
||||
|
||||
@@ -276,5 +276,5 @@
|
||||
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
|
||||
cartridge.Topic(href, href_list)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
cartridge.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You slot \the [cartridge] into \the [src].</span>")
|
||||
modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB)
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
// Proc: attack_self()
|
||||
|
||||
@@ -121,7 +121,7 @@ var/global/list/default_medbay_channels = list(
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
@@ -232,7 +232,7 @@ var/global/list/default_medbay_channels = list(
|
||||
return 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
@@ -724,7 +724,7 @@ var/global/list/default_medbay_channels = list(
|
||||
. = 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
if(!on)
|
||||
@@ -753,7 +753,7 @@ var/global/list/default_medbay_channels = list(
|
||||
data["has_subspace"] = 1
|
||||
data["subspace"] = subspace_transmission
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
name = "subspace radio"
|
||||
desc = "A powerful new radio recently gifted to Nanotrasen from KHI, this communications device has the ability to send and recieve transmissions from anywhere."
|
||||
icon = 'icons/vore/custom_items_vr.dmi'
|
||||
icon_override = 'icons/mob/back_vr.dmi'
|
||||
icon_state = "radiopack"
|
||||
item_state = "parachute"
|
||||
item_state = "radiopack"
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
@@ -58,7 +58,7 @@
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
|
||||
next_offer_time = world.time + offer_time
|
||||
update_nano_data()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -110,7 +110,7 @@
|
||||
data += nanoui_data
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui) // No auto-refresh
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
data["menu"] = 0
|
||||
@@ -138,7 +138,7 @@
|
||||
UI.buy(src, usr)
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
|
||||
@@ -9,3 +9,21 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//Robot resizing module
|
||||
|
||||
/obj/item/borg/upgrade/sizeshift
|
||||
name = "robot size alteration module"
|
||||
desc = "Using technology similar to one used in sizeguns, allows cyborgs to adjust their own size as neccesary."
|
||||
icon_state = "cyborg_upgrade2"
|
||||
item_state = "cyborg_upgrade"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/sizeshift/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(/mob/living/proc/set_size in R.verbs)
|
||||
return 0
|
||||
|
||||
R.verbs += /mob/living/proc/set_size
|
||||
return 1
|
||||
@@ -197,6 +197,7 @@
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 3,
|
||||
/obj/item/weapon/reagent_containers/syringe = 3,
|
||||
|
||||
@@ -79,5 +79,28 @@
|
||||
name = T_BOARD_MECHA("Odysseus central control")
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion
|
||||
name = "Alien Circuit"
|
||||
origin_tech = list(TECH_DATA = 5, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "circuit"
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/main
|
||||
desc = "It is marked with a <span class='alien'>strange glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/peripherals
|
||||
desc = "It is marked with a <span class='alien'>pulsing glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/targeting
|
||||
desc = "It is marked with an <span class='alien'>ominous glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/phasing
|
||||
desc = "It is marked with a <span class='alien'>disturbing glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/damaged
|
||||
name = "Damaged Alien Circuit"
|
||||
desc = "It is marked with a <span class='alien'>constantly shifting glyph</span>."
|
||||
origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1, TECH_PRECURSOR = 2)
|
||||
|
||||
//Undef the macro, shouldn't be needed anywhere else
|
||||
#undef T_BOARD_MECHA
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
data["electronic_warfare"] = electronic_warfare
|
||||
data["entries"] = entries
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -185,7 +185,7 @@
|
||||
. = 1
|
||||
|
||||
// Always update the UI, or buttons will spin indefinitely
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/var/global/list/id_card_states
|
||||
/proc/id_card_states()
|
||||
|
||||
@@ -104,10 +104,7 @@
|
||||
var/static/regex/size_mult = new/regex("\\d+")
|
||||
if(size_mult.Find(msg))
|
||||
var/resizing_value = text2num(size_mult.match)
|
||||
if(findtext(msg, "centimeter")) //Because metric system rules
|
||||
H.resize(CLAMP(resizing_value/170 , 0.25, 2)) //170 cm is average crewmember, I think
|
||||
else
|
||||
H.resize(CLAMP(resizing_value , 0.25, 2))
|
||||
H.resize(CLAMP(resizing_value/100 , 0.25, 2))
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +125,7 @@
|
||||
description_info = {"Only accessable by those who implanted the victim. Self-implanting allows everyone to change host size. The following special commands are available:
|
||||
'Shrink' - host size decreases.
|
||||
'Grow' - host size increases.
|
||||
'Resize (NUMBER)' or 'Resize (NUMBER) centimeter(s)' - for accurate size control.
|
||||
'Resize (NUMBER)' - for accurate size control.
|
||||
'Ignore' - keywords in the speech won't have any effect.
|
||||
'Implant-toggle' - toggles implant."}
|
||||
|
||||
|
||||
@@ -105,6 +105,31 @@ Protectiveness | Armor %
|
||||
if(!material) // No point checking for reflection.
|
||||
return ..()
|
||||
|
||||
if(material.negation && prob(material.negation)) // Strange and Alien materials, or just really strong materials.
|
||||
user.visible_message("<span class='danger'>\The [src] completely absorbs [attack_text]!</span>")
|
||||
return TRUE
|
||||
|
||||
if(material.spatial_instability && prob(material.spatial_instability))
|
||||
user.visible_message("<span class='danger'>\The [src] flashes [user] clear of [attack_text]!</span>")
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(round(material.spatial_instability / 10) + 1, user))
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-6 || T.x<6) continue
|
||||
if(T.y>world.maxy-6 || T.y<6) continue
|
||||
turfs += T
|
||||
if(!turfs.len) turfs += pick(/turf in orange(6))
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(user.loc, 'sound/effects/teleport.ogg', 50, 1)
|
||||
|
||||
user.loc = picked
|
||||
return PROJECTILE_FORCE_MISS
|
||||
|
||||
if(material.reflectivity)
|
||||
if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/New()
|
||||
if(random_color)
|
||||
blade_color = pick("red","blue","green","purple")
|
||||
blade_color = pick("red","blue","green","purple","white")
|
||||
lcolor = blade_color
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/green/New()
|
||||
@@ -153,6 +153,10 @@
|
||||
blade_color = "purple"
|
||||
lcolor = "#800080"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/white/New()
|
||||
blade_color = "white"
|
||||
lcolor = "#FFFFFF"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/activate(mob/living/user)
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>\The [src] is now energised.</span>")
|
||||
@@ -161,7 +165,6 @@
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
icon_state = "[active_state][blade_color]"
|
||||
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/deactivate(mob/living/user)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>\The [src] deactivates!</span>")
|
||||
@@ -237,6 +240,80 @@
|
||||
target.taunt(user)
|
||||
target.adjustFireLoss(force * 6) // 30 Burn, for 50 total.
|
||||
|
||||
/*
|
||||
* Charge blade. Uses a cell, and costs energy per strike.
|
||||
*/
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge
|
||||
name = "charge sword"
|
||||
desc = "A small, handheld device which emits a high-energy 'blade'."
|
||||
origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 3, TECH_ILLEGAL = 4)
|
||||
active_force = 25
|
||||
armor_penetration = 25
|
||||
|
||||
var/hitcost = 75
|
||||
var/obj/item/weapon/cell/bcell = null
|
||||
var/cell_type = /obj/item/weapon/cell/device
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/proc/use_charge(var/cost)
|
||||
if(active)
|
||||
if(bcell)
|
||||
if(bcell.checked_use(cost))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(bcell)
|
||||
to_chat(user, "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>")
|
||||
if(!bcell)
|
||||
to_chat(user, "<span class='warning'>The blade does not have a power source installed.</span>")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attack_self(mob/user as mob)
|
||||
if((!bcell || bcell.charge < hitcost) && !active)
|
||||
to_chat(user, "<span class='notice'>\The [src] does not seem to have power.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attack(mob/M, mob/user)
|
||||
if(active)
|
||||
if(!use_charge(hitcost))
|
||||
deactivate(user)
|
||||
visible_message("<span class='notice'>\The [src]'s blade flickers, before retracting.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, cell_type))
|
||||
if(!bcell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
bcell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else if(W.is_screwdriver() && bcell)
|
||||
bcell.update_icon()
|
||||
bcell.forceMove(get_turf(loc))
|
||||
bcell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from \the [src].</span>")
|
||||
deactivate()
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/get_cell()
|
||||
return bcell
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/loaded/New()
|
||||
..()
|
||||
bcell = new/obj/item/weapon/cell/device/weapon(src)
|
||||
|
||||
/*
|
||||
*Energy Blade
|
||||
*/
|
||||
|
||||
@@ -263,7 +263,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
data["maskConnected"] = 1
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -51,6 +51,24 @@
|
||||
toolspeed = 0.1
|
||||
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4)
|
||||
|
||||
/obj/item/weapon/tool/crowbar/hybrid
|
||||
name = "strange crowbar"
|
||||
desc = "A crowbar whose head seems to phase in and out of view."
|
||||
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar)
|
||||
icon_state = "hybcrowbar"
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
toolspeed = 0.4
|
||||
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 3)
|
||||
reach = 2
|
||||
|
||||
/obj/item/weapon/tool/crowbar/hybrid/is_crowbar()
|
||||
if(prob(10))
|
||||
var/turf/T = get_turf(src)
|
||||
radiation_repository.radiate(get_turf(src), 5)
|
||||
T.visible_message("<span class='alien'>\The [src] shudders!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/tool/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
|
||||
|
||||
@@ -92,6 +92,27 @@
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/weapon/tool/screwdriver/hybrid
|
||||
name = "strange screwdriver"
|
||||
desc = "A strange conglomerate of a screwdriver."
|
||||
icon_state = "hybscrewdriver"
|
||||
item_state = "screwdriver_black"
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3)
|
||||
slowdown = 0.1
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
usesound = 'sound/effects/uncloak.ogg'
|
||||
toolspeed = 0.4
|
||||
random_color = FALSE
|
||||
reach = 2
|
||||
|
||||
/obj/item/weapon/tool/screwdriver/hybrid/is_screwdriver()
|
||||
if(prob(10))
|
||||
var/turf/T = get_turf(src)
|
||||
radiation_repository.radiate(get_turf(src), 5)
|
||||
T.visible_message("<span class='alien'>\The [src] shudders!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/tool/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
|
||||
@@ -121,15 +121,14 @@
|
||||
remove_fuel(1)
|
||||
if(get_fuel() < 1)
|
||||
setWelding(0)
|
||||
//I'm not sure what this does. I assume it has to do with starting fires...
|
||||
//...but it doesnt check to see if the welder is on or not.
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /mob/living))
|
||||
var/mob/living/M = location
|
||||
if(M.item_is_in_hands(src))
|
||||
location = get_turf(M)
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 5)
|
||||
else //Only start fires when its on and has enough fuel to actually keep working
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /mob/living))
|
||||
var/mob/living/M = location
|
||||
if(M.item_is_in_hands(src))
|
||||
location = get_turf(M)
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
@@ -437,6 +436,19 @@
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("fuel", 1)
|
||||
|
||||
/obj/item/weapon/weldingtool/experimental/hybrid
|
||||
name = "strange welding tool"
|
||||
desc = "An experimental welder capable of synthesizing its own fuel from spatial waveforms. It's like welding with a star!"
|
||||
icon_state = "hybwelder"
|
||||
max_fuel = 20
|
||||
eye_safety_modifier = -2 // Brighter than the sun. Literally, you can look at the sun with a welding mask of proper grade, this will burn through that.
|
||||
slowdown = 0.1
|
||||
toolspeed = 0.25
|
||||
w_class = ITEMSIZE_LARGE
|
||||
flame_intensity = 5
|
||||
origin_tech = list(TECH_ENGINEERING = 5, TECH_PHORON = 4, TECH_PRECURSOR = 1)
|
||||
reach = 2
|
||||
|
||||
/*
|
||||
* Backpack Welder.
|
||||
*/
|
||||
|
||||
@@ -73,6 +73,26 @@
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weapon/tool/wirecutters/hybrid
|
||||
name = "strange wirecutters"
|
||||
desc = "This cuts wires. With <span class='alien'>Science!</span>"
|
||||
icon_state = "hybcutters"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
slowdown = 0.1
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2)
|
||||
attack_verb = list("pinched", "nipped", "warped", "blasted")
|
||||
usesound = 'sound/effects/stealthoff.ogg'
|
||||
toolspeed = 0.4
|
||||
reach = 2
|
||||
|
||||
/obj/item/weapon/tool/wirecutters/hybrid/is_wirecutter()
|
||||
if(prob(10))
|
||||
var/turf/T = get_turf(src)
|
||||
radiation_repository.radiate(get_turf(src), 5)
|
||||
T.visible_message("<span class='alien'>\The [src] shudders!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/tool/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."
|
||||
|
||||
@@ -25,6 +25,29 @@
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weapon/tool/wrench/hybrid // Slower and bulkier than normal power tools, but it has the power of reach.
|
||||
name = "strange wrench"
|
||||
desc = "A wrench with many common uses. Can be usually found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "hybwrench"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8
|
||||
throwforce = 10
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
slowdown = 0.1
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2)
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked", "warped", "blasted")
|
||||
usesound = 'sound/effects/stealthoff.ogg'
|
||||
toolspeed = 0.5
|
||||
reach = 2
|
||||
|
||||
/obj/item/weapon/tool/wrench/hybrid/is_wrench()
|
||||
if(prob(10))
|
||||
var/turf/T = get_turf(src)
|
||||
radiation_repository.radiate(get_turf(src), 5)
|
||||
T.visible_message("<span class='alien'>\The [src] shudders!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/category_item/catalogue/anomalous/precursor_a/alien_wrench
|
||||
name = "Precursor Alpha Object - Fastener Torque Tool"
|
||||
|
||||
@@ -102,7 +102,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
|
||||
data["signs"] = signs ? "[signs] sign\s" : null
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -114,4 +114,12 @@
|
||||
for(var/i = 1 to rand(1, 4))
|
||||
var/new_tech = pick(techs)
|
||||
techs -= new_tech
|
||||
origin_tech[new_tech] = rand(5, 9)
|
||||
origin_tech[new_tech] = rand(5, 9)
|
||||
|
||||
origin_tech[TECH_PRECURSOR] = rand(0,2)
|
||||
|
||||
/obj/item/prop/alien/phasecoil
|
||||
name = "reverberating device"
|
||||
desc = "A device pulsing with an ominous energy."
|
||||
icon_state = "circuit_phase"
|
||||
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6, TECH_PHORON = 3, TECH_POWER = 5, TECH_MAGNET = 5, TECH_DATA = 5, TECH_PRECURSOR = 2, TECH_ARCANE = 1)
|
||||
|
||||
Reference in New Issue
Block a user