Merge remote-tracking branch 'refs/remotes/origin/master' into custom_roundstart_items

# Conflicts:
#	code/controllers/configuration.dm
#	code/game/objects/items.dm
This commit is contained in:
kevinz000
2017-05-21 18:17:42 -07:00
571 changed files with 74297 additions and 79090 deletions
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -8,8 +8,8 @@
var/on = 0 //Are we currently active??
var/menu_message = ""
/obj/item/radio/integrated/New()
..()
/obj/item/radio/integrated/Initialize()
. = ..()
if (istype(loc.loc, /obj/item/device/pda))
hostpda = loc.loc
+131 -131
View File
@@ -1,64 +1,64 @@
GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016. Alt+click to toggle power."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
origin_tech = "materials=2;magnets=1;bluespace=2"
unique_rename = TRUE
var/gpstag = "COM0"
var/emped = FALSE
var/turf/locked_location
var/tracking = TRUE
GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/device/gps
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016. Alt+click to toggle power."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
origin_tech = "materials=2;magnets=1;bluespace=2"
unique_rename = TRUE
var/gpstag = "COM0"
var/emped = FALSE
var/turf/locked_location
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/device/gps/Initialize()
..()
GLOB.GPS_list += src
name = "global positioning system ([gpstag])"
add_overlay("working")
/obj/item/device/gps/Destroy()
GLOB.GPS_list -= src
return ..()
/obj/item/device/gps/emp_act(severity)
emped = TRUE
cut_overlay("working")
add_overlay("emp")
addtimer(CALLBACK(src, .proc/reboot), 300, TIMER_OVERRIDE) //if a new EMP happens, remove the old timer so it doesn't reactivate early
/obj/item/device/gps/Initialize()
..()
GLOB.GPS_list += src
name = "global positioning system ([gpstag])"
add_overlay("working")
/obj/item/device/gps/Destroy()
GLOB.GPS_list -= src
return ..()
/obj/item/device/gps/emp_act(severity)
emped = TRUE
cut_overlay("working")
add_overlay("emp")
addtimer(CALLBACK(src, .proc/reboot), 300, 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/device/gps/proc/reboot()
emped = FALSE
cut_overlay("emp")
add_overlay("working")
/obj/item/device/gps/AltClick(mob/user)
/obj/item/device/gps/proc/reboot()
emped = FALSE
cut_overlay("emp")
add_overlay("working")
/obj/item/device/gps/AltClick(mob/user)
toggletracking(user)
/obj/item/device/gps/proc/toggletracking(mob/user)
if(!user.canUseTopic(src, be_close=TRUE))
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
if(!user.canUseTopic(src, be_close=TRUE))
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/device/gps/ui_interact(mob/user, ui_key = "gps", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
if(emped)
if(emped)
to_chat(user, "[src] fizzles weakly.")
return
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -131,82 +131,82 @@ GLOBAL_LIST_EMPTY(GPS_list)
if("globalmode")
global_mode = !global_mode
. = TRUE
/obj/item/device/gps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, gpstag) as text
a = copytext(sanitize(a), 1, 20)
if(in_range(src, usr))
gpstag = a
attack_self(usr)
/obj/item/device/gps/science
icon_state = "gps-s"
gpstag = "SCI0"
/obj/item/device/gps/engineering
icon_state = "gps-e"
gpstag = "ENG0"
/obj/item/device/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/device/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."
flags = NODROP
/obj/item/device/gps/internal
icon_state = null
flags = ABSTRACT
gpstag = "Eerie Signal"
desc = "Report to a coder immediately."
invisibility = INVISIBILITY_MAXIMUM
/obj/item/device/gps/mining/internal
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/device/gps/internal/base
gpstag = "NT_AUX"
desc = "A homing signal from Nanotrasen's mining base."
/obj/item/device/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/device/gps/visible_debug/Initialize()
. = ..()
tagged = list()
START_PROCESSING(SSfastprocess, src)
/obj/item/device/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/device/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/device/gps/visible_debug/Destroy()
if(tagged)
clear()
tagged = null
STOP_PROCESSING(SSfastprocess, src)
/obj/item/device/gps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, gpstag) as text
a = copytext(sanitize(a), 1, 20)
if(in_range(src, usr))
gpstag = a
attack_self(usr)
/obj/item/device/gps/science
icon_state = "gps-s"
gpstag = "SCI0"
/obj/item/device/gps/engineering
icon_state = "gps-e"
gpstag = "ENG0"
/obj/item/device/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/device/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."
flags = NODROP
/obj/item/device/gps/internal
icon_state = null
flags = ABSTRACT
gpstag = "Eerie Signal"
desc = "Report to a coder immediately."
invisibility = INVISIBILITY_MAXIMUM
/obj/item/device/gps/mining/internal
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/device/gps/internal/base
gpstag = "NT_AUX"
desc = "A homing signal from Nanotrasen's mining base."
/obj/item/device/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/device/gps/visible_debug/Initialize()
. = ..()
tagged = list()
START_PROCESSING(SSfastprocess, src)
/obj/item/device/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/device/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/device/gps/visible_debug/Destroy()
if(tagged)
clear()
tagged = null
STOP_PROCESSING(SSfastprocess, src)
. = ..()
+143 -143
View File
@@ -1,145 +1,145 @@
// Powersink - used to drain station power
/obj/item/device/powersink
desc = "A nulling power sink which drains energy from electrical systems."
name = "power sink"
icon_state = "powersink0"
item_state = "electronic"
w_class = WEIGHT_CLASS_BULKY
flags = CONDUCT
throwforce = 5
throw_speed = 1
throw_range = 2
materials = list(MAT_METAL=750)
origin_tech = "powerstorage=5;syndicate=5"
var/drain_rate = 1600000 // amount of power to drain per tick
var/power_drained = 0 // has drained this much power
var/max_power = 1e10 // maximum power that can be drained before exploding
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
var/admins_warned = 0 // stop spam, only warn the admins once that we are about to boom
var/const/DISCONNECTED = 0
var/const/CLAMPED_OFF = 1
var/const/OPERATING = 2
var/obj/structure/cable/attached // the attached cable
/obj/item/device/powersink/update_icon()
icon_state = "powersink[mode == OPERATING]"
/obj/item/device/powersink/proc/set_mode(value)
if(value == mode)
return
switch(value)
if(DISCONNECTED)
attached = null
if(mode == OPERATING)
STOP_PROCESSING(SSobj, src)
anchored = 0
if(CLAMPED_OFF)
if(!attached)
return
if(mode == OPERATING)
STOP_PROCESSING(SSobj, src)
anchored = 1
if(OPERATING)
if(!attached)
return
START_PROCESSING(SSobj, src)
anchored = 1
mode = value
update_icon()
set_light(0)
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(mode == DISCONNECTED)
var/turf/T = loc
if(isturf(T) && !T.intact)
attached = locate() in T
if(!attached)
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(CLAMPED_OFF)
user.visible_message( \
"[user] attaches \the [src] to the cable.", \
"<span class='notice'>You attach \the [src] to the cable.</span>",
"<span class='italics'>You hear some wires being connected to something.</span>")
else
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(DISCONNECTED)
user.visible_message( \
"[user] detaches \the [src] from the cable.", \
"<span class='notice'>You detach \the [src] from the cable.</span>",
"<span class='italics'>You hear some wires being disconnected from something.</span>")
else
return ..()
/obj/item/device/powersink/attack_paw()
return
/obj/item/device/powersink/attack_ai()
return
/obj/item/device/powersink/attack_hand(mob/user)
switch(mode)
if(DISCONNECTED)
..()
if(CLAMPED_OFF)
user.visible_message( \
"[user] activates \the [src]!", \
"<span class='notice'>You activate \the [src].</span>",
"<span class='italics'>You hear a click.</span>")
// Powersink - used to drain station power
/obj/item/device/powersink
desc = "A nulling power sink which drains energy from electrical systems."
name = "power sink"
icon_state = "powersink0"
item_state = "electronic"
w_class = WEIGHT_CLASS_BULKY
flags = CONDUCT
throwforce = 5
throw_speed = 1
throw_range = 2
materials = list(MAT_METAL=750)
origin_tech = "powerstorage=5;syndicate=5"
var/drain_rate = 1600000 // amount of power to drain per tick
var/power_drained = 0 // has drained this much power
var/max_power = 1e10 // maximum power that can be drained before exploding
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
var/admins_warned = 0 // stop spam, only warn the admins once that we are about to boom
var/const/DISCONNECTED = 0
var/const/CLAMPED_OFF = 1
var/const/OPERATING = 2
var/obj/structure/cable/attached // the attached cable
/obj/item/device/powersink/update_icon()
icon_state = "powersink[mode == OPERATING]"
/obj/item/device/powersink/proc/set_mode(value)
if(value == mode)
return
switch(value)
if(DISCONNECTED)
attached = null
if(mode == OPERATING)
STOP_PROCESSING(SSobj, src)
anchored = 0
if(CLAMPED_OFF)
if(!attached)
return
if(mode == OPERATING)
STOP_PROCESSING(SSobj, src)
anchored = 1
if(OPERATING)
if(!attached)
return
START_PROCESSING(SSobj, src)
anchored = 1
mode = value
update_icon()
set_light(0)
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(mode == DISCONNECTED)
var/turf/T = loc
if(isturf(T) && !T.intact)
attached = locate() in T
if(!attached)
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(CLAMPED_OFF)
user.visible_message( \
"[user] attaches \the [src] to the cable.", \
"<span class='notice'>You attach \the [src] to the cable.</span>",
"<span class='italics'>You hear some wires being connected to something.</span>")
else
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
else
set_mode(DISCONNECTED)
user.visible_message( \
"[user] detaches \the [src] from the cable.", \
"<span class='notice'>You detach \the [src] from the cable.</span>",
"<span class='italics'>You hear some wires being disconnected from something.</span>")
else
return ..()
/obj/item/device/powersink/attack_paw()
return
/obj/item/device/powersink/attack_ai()
return
/obj/item/device/powersink/attack_hand(mob/user)
switch(mode)
if(DISCONNECTED)
..()
if(CLAMPED_OFF)
user.visible_message( \
"[user] activates \the [src]!", \
"<span class='notice'>You activate \the [src].</span>",
"<span class='italics'>You hear a click.</span>")
message_admins("Power sink activated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(src)]")
log_game("Power sink activated by [key_name(user)] at [COORD(src)]")
set_mode(OPERATING)
if(OPERATING)
user.visible_message( \
"[user] deactivates \the [src]!", \
"<span class='notice'>You deactivate \the [src].</span>",
"<span class='italics'>You hear a click.</span>")
set_mode(CLAMPED_OFF)
/obj/item/device/powersink/process()
if(!attached)
set_mode(DISCONNECTED)
return
var/datum/powernet/PN = attached.powernet
if(PN)
set_light(5)
// found a powernet, so drain up to max power from it
var/drained = min ( drain_rate, PN.avail )
PN.load += drained
power_drained += drained
// if tried to drain more than available on powernet
// now look for APCs and drain their cells
if(drained < drain_rate)
for(var/obj/machinery/power/terminal/T in PN.nodes)
if(istype(T.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = T.master
if(A.operating && A.cell)
A.cell.charge = max(0, A.cell.charge - 50)
power_drained += 50
if(A.charging == 2) // If the cell was full
A.charging = 1 // It's no longer full
if(power_drained > max_power * 0.98)
if (!admins_warned)
admins_warned = 1
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
if(power_drained >= max_power)
STOP_PROCESSING(SSobj, src)
explosion(src.loc, 4,8,16,32)
qdel(src)
set_mode(OPERATING)
if(OPERATING)
user.visible_message( \
"[user] deactivates \the [src]!", \
"<span class='notice'>You deactivate \the [src].</span>",
"<span class='italics'>You hear a click.</span>")
set_mode(CLAMPED_OFF)
/obj/item/device/powersink/process()
if(!attached)
set_mode(DISCONNECTED)
return
var/datum/powernet/PN = attached.powernet
if(PN)
set_light(5)
// found a powernet, so drain up to max power from it
var/drained = min ( drain_rate, PN.avail )
PN.load += drained
power_drained += drained
// if tried to drain more than available on powernet
// now look for APCs and drain their cells
if(drained < drain_rate)
for(var/obj/machinery/power/terminal/T in PN.nodes)
if(istype(T.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = T.master
if(A.operating && A.cell)
A.cell.charge = max(0, A.cell.charge - 50)
power_drained += 50
if(A.charging == 2) // If the cell was full
A.charging = 1 // It's no longer full
if(power_drained > max_power * 0.98)
if (!admins_warned)
admins_warned = 1
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
if(power_drained >= max_power)
STOP_PROCESSING(SSobj, src)
explosion(src.loc, 4,8,16,32)
qdel(src)
@@ -7,8 +7,8 @@
origin_tech = "bluespace=1"
dog_fashion = null
/obj/item/device/radio/beacon/New()
..()
/obj/item/device/radio/beacon/Initialize()
. = ..()
GLOB.teleportbeacons += src
/obj/item/device/radio/beacon/Destroy()
@@ -11,8 +11,8 @@
var/obj/item/device/encryptionkey/keyslot2 = null
dog_fashion = null
/obj/item/device/radio/headset/New()
..()
/obj/item/device/radio/headset/Initialize()
. = ..()
recalculateChannels()
/obj/item/device/radio/headset/Destroy()
@@ -47,21 +47,21 @@
item_state = "syndie_headset"
/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload)
..()
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/syndicate/alt/leader
name = "team leader headset"
command = TRUE
/obj/item/device/radio/headset/syndicate/New()
..()
/obj/item/device/radio/headset/syndicate/Initialize()
. = ..()
make_syndie()
/obj/item/device/radio/headset/binary
origin_tech = "syndicate=3"
/obj/item/device/radio/headset/binary/New()
..()
/obj/item/device/radio/headset/binary/Initialize()
. = ..()
qdel(keyslot)
keyslot = new /obj/item/device/encryptionkey/binary
recalculateChannels()
@@ -79,7 +79,7 @@
item_state = "sec_headset_alt"
/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload)
..()
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/headset_eng
@@ -134,7 +134,7 @@
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload)
..()
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/heads/rd
@@ -156,7 +156,7 @@
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload)
..()
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/heads/ce
@@ -213,7 +213,7 @@
keyslot = null
/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload)
..()
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
/obj/item/device/radio/headset/ai
@@ -11,8 +11,8 @@
var/last_tick //used to delay the powercheck
dog_fashion = null
/obj/item/device/radio/intercom/New()
..()
/obj/item/device/radio/intercom/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/device/radio/intercom/Destroy()
File diff suppressed because it is too large Load Diff
+207 -207
View File
@@ -1,211 +1,211 @@
/obj/item/device/transfer_valve
icon = 'icons/obj/assemblies.dmi'
name = "tank transfer valve"
icon_state = "valve_1"
item_state = "ttv"
desc = "Regulates the transfer of air between two tanks"
var/obj/item/weapon/tank/tank_one
var/obj/item/weapon/tank/tank_two
var/obj/item/device/attached_device
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
origin_tech = "materials=1;engineering=1"
/obj/item/device/transfer_valve/IsAssemblyHolder()
return 1
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/weapon/tank))
if(tank_one && tank_two)
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first!</span>")
return
if(!tank_one)
if(!user.transferItemToLoc(item, src))
return
tank_one = item
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
else if(!tank_two)
if(!user.transferItemToLoc(item, src))
return
tank_two = item
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
update_icon()
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
if(A.secured)
to_chat(user, "<span class='notice'>The device is secured.</span>")
return
if(attached_device)
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first!</span>")
return
if(!user.transferItemToLoc(item, src))
return
attached_device = A
to_chat(user, "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>")
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
GLOB.bombers += "[key_name(user)] attached a [item] to a transfer valve."
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
return
/obj/item/device/transfer_valve/attack_self(mob/user)
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]
<BR> <B> Valve attachment:</B> [attached_device ? "<A href='?src=\ref[src];device=1'>[attached_device]</A>" : "None"] [attached_device ? "<A href='?src=\ref[src];rem_device=1'>Remove</A>" : ""]
<BR> <B> Valve status: </B> [ valve_open ? "<A href='?src=\ref[src];open=1'>Closed</A> <B>Open</B>" : "<B>Closed</B> <A href='?src=\ref[src];open=1'>Open</A>"]"}
var/datum/browser/popup = new(user, "trans_valve", name)
popup.set_content(dat)
popup.open()
return
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
return
if (src.loc == usr)
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
update_icon()
if((!tank_two || tank_two.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
if((!tank_one || tank_one.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
src.attack_self(usr)
src.add_fingerprint(usr)
return
return
/obj/item/device/transfer_valve/proc/process_activation(obj/item/device/D)
if(toggle)
toggle = 0
toggle_valve()
spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever
toggle = 1
/obj/item/device/transfer_valve/update_icon()
cut_overlays()
underlays = null
if(!tank_one && !tank_two && !attached_device)
icon_state = "valve_1"
return
icon_state = "valve"
if(tank_one)
add_overlay("[tank_one.icon_state]")
if(tank_two)
var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
J.Shift(WEST, 13)
underlays += J
if(attached_device)
add_overlay("device")
/obj/item/device/transfer_valve/proc/merge_gases()
tank_two.air_contents.volume += tank_one.air_contents.volume
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
tank_two.air_contents.merge(temp)
/obj/item/device/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
var/datum/gas_mixture/temp
temp = tank_two.air_contents.remove_ratio(ratio1)
tank_one.air_contents.merge(temp)
tank_two.air_contents.volume -= tank_one.air_contents.volume
/*
Exadv1: I know this isn't how it's going to work, but this was just to check
it explodes properly when it gets a signal (and it does).
*/
/obj/item/device/transfer_valve/proc/toggle_valve()
if(!valve_open && tank_one && tank_two)
valve_open = 1
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/attachment = "no device"
if(attached_device)
if(istype(attached_device, /obj/item/device/assembly/signaler))
attachment = "<A HREF='?_src_=holder;secrets=list_signalers'>[attached_device]</A>"
else
attachment = attached_device
var/attacher_name = ""
if(!attacher)
attacher_name = "Unknown"
else
attacher_name = "[key_name_admin(attacher)]"
var/log_str1 = "Bomb valve opened in "
var/log_str2 = "with [attachment] attacher: [attacher_name]"
var/log_attacher = ""
if(attacher)
/obj/item/device/transfer_valve
icon = 'icons/obj/assemblies.dmi'
name = "tank transfer valve"
icon_state = "valve_1"
item_state = "ttv"
desc = "Regulates the transfer of air between two tanks"
var/obj/item/weapon/tank/tank_one
var/obj/item/weapon/tank/tank_two
var/obj/item/device/attached_device
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
origin_tech = "materials=1;engineering=1"
/obj/item/device/transfer_valve/IsAssemblyHolder()
return 1
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/weapon/tank))
if(tank_one && tank_two)
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first!</span>")
return
if(!tank_one)
if(!user.transferItemToLoc(item, src))
return
tank_one = item
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
else if(!tank_two)
if(!user.transferItemToLoc(item, src))
return
tank_two = item
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
if(item.w_class > w_class)
w_class = item.w_class
update_icon()
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
if(A.secured)
to_chat(user, "<span class='notice'>The device is secured.</span>")
return
if(attached_device)
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first!</span>")
return
if(!user.transferItemToLoc(item, src))
return
attached_device = A
to_chat(user, "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>")
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
GLOB.bombers += "[key_name(user)] attached a [item] to a transfer valve."
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
return
/obj/item/device/transfer_valve/attack_self(mob/user)
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]
<BR> <B> Valve attachment:</B> [attached_device ? "<A href='?src=\ref[src];device=1'>[attached_device]</A>" : "None"] [attached_device ? "<A href='?src=\ref[src];rem_device=1'>Remove</A>" : ""]
<BR> <B> Valve status: </B> [ valve_open ? "<A href='?src=\ref[src];open=1'>Closed</A> <B>Open</B>" : "<B>Closed</B> <A href='?src=\ref[src];open=1'>Open</A>"]"}
var/datum/browser/popup = new(user, "trans_valve", name)
popup.set_content(dat)
popup.open()
return
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
return
if (src.loc == usr)
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
update_icon()
if((!tank_two || tank_two.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
if((!tank_one || tank_one.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
w_class = WEIGHT_CLASS_NORMAL
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
src.attack_self(usr)
src.add_fingerprint(usr)
return
return
/obj/item/device/transfer_valve/proc/process_activation(obj/item/device/D)
if(toggle)
toggle = 0
toggle_valve()
spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever
toggle = 1
/obj/item/device/transfer_valve/update_icon()
cut_overlays()
underlays = null
if(!tank_one && !tank_two && !attached_device)
icon_state = "valve_1"
return
icon_state = "valve"
if(tank_one)
add_overlay("[tank_one.icon_state]")
if(tank_two)
var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
J.Shift(WEST, 13)
underlays += J
if(attached_device)
add_overlay("device")
/obj/item/device/transfer_valve/proc/merge_gases()
tank_two.air_contents.volume += tank_one.air_contents.volume
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
tank_two.air_contents.merge(temp)
/obj/item/device/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
var/datum/gas_mixture/temp
temp = tank_two.air_contents.remove_ratio(ratio1)
tank_one.air_contents.merge(temp)
tank_two.air_contents.volume -= tank_one.air_contents.volume
/*
Exadv1: I know this isn't how it's going to work, but this was just to check
it explodes properly when it gets a signal (and it does).
*/
/obj/item/device/transfer_valve/proc/toggle_valve()
if(!valve_open && tank_one && tank_two)
valve_open = 1
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/attachment = "no device"
if(attached_device)
if(istype(attached_device, /obj/item/device/assembly/signaler))
attachment = "<A HREF='?_src_=holder;secrets=list_signalers'>[attached_device]</A>"
else
attachment = attached_device
var/attacher_name = ""
if(!attacher)
attacher_name = "Unknown"
else
attacher_name = "[key_name_admin(attacher)]"
var/log_str1 = "Bomb valve opened in "
var/log_str2 = "with [attachment] attacher: [attacher_name]"
var/log_attacher = ""
if(attacher)
log_attacher = "[ADMIN_QUE(attacher)] [ADMIN_FLW(attacher)]"
var/mob/mob = get_mob_by_key(src.fingerprintslast)
var/last_touch_info = ""
if(mob)
var/mob/mob = get_mob_by_key(src.fingerprintslast)
var/last_touch_info = ""
if(mob)
last_touch_info = "[ADMIN_QUE(mob)] [ADMIN_FLW(mob)]"
var/log_str3 = " Last touched by: [key_name_admin(mob)]"
var/log_str3 = " Last touched by: [key_name_admin(mob)]"
var/bomb_message = "[log_str1] [A.name][ADMIN_JMP(bombturf)] [log_str2][log_attacher] [log_str3][last_touch_info]"
GLOB.bombers += bomb_message
message_admins(bomb_message, 0, 1)
GLOB.bombers += bomb_message
message_admins(bomb_message, 0, 1)
log_game("[log_str1] [A.name][COORD(bombturf)] [log_str2] [log_str3]")
merge_gases()
spawn(20) // In case one tank bursts
for (var/i=0,i<5,i++)
src.update_icon()
sleep(10)
src.update_icon()
else if(valve_open && tank_one && tank_two)
split_gases()
valve_open = 0
src.update_icon()
// this doesn't do anything but the timer etc. expects it to be here
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
/obj/item/device/transfer_valve/proc/c_state()
return
merge_gases()
spawn(20) // In case one tank bursts
for (var/i=0,i<5,i++)
src.update_icon()
sleep(10)
src.update_icon()
else if(valve_open && tank_one && tank_two)
split_gases()
valve_open = 0
src.update_icon()
// this doesn't do anything but the timer etc. expects it to be here
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
/obj/item/device/transfer_valve/proc/c_state()
return
+1
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "eightball"
w_class = WEIGHT_CLASS_TINY
verb_say = "rattles"
@@ -504,6 +504,113 @@
S.change_head_color(color2)
dropped = TRUE
//Peacekeeper Cyborg Projectile Dampenening Field
/obj/item/borg/projectile_dampen
name = "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/current_damage_dampening = 0
var/list/obj/item/projectile/tracked
var/image/projectile_effect
var/field_radius = 3
/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)
/obj/item/borg/projectile_dampen/Destroy()
STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/item/borg/projectile_dampen/attack_self(mob/user)
var/active = FALSE
if(!istype(dampening_field))
activate_field()
active = TRUE
else
deactivate_field()
active = FALSE
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] the [src].</span>")
icon_state = "[initial(icon_state)][active]"
/obj/item/borg/projectile_dampen/proc/activate_field()
if(!istype(dampening_field))
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
/obj/item/borg/projectile_dampen/proc/deactivate_field()
QDEL_NULL(dampening_field)
visible_message("<span class='warning'>The [src] shuts off!</span>")
for(var/obj/item/projectile/P in tracked)
restore_projectile(P)
/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)
if(!tracked[I]) //No damage
continue
usage += projectile_tick_speed_ecost
usage += (current_damage_dampening * projectile_damage_tick_ecost_coefficient)
energy = Clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("<span class='warning'>The [src] blinks \"ENERGY DEPLETED\"</span>")
/obj/item/borg/projectile_dampen/proc/process_recharge()
if(!istype(host))
energy = Clamp(energy + energy_recharge, 0, maxenergy)
return
if((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
current_damage_dampening += 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)
current_damage_dampening -= P.damage
/**********************************************************************
HUD/SIGHT things
***********************************************************************/
+401 -401
View File
@@ -1,403 +1,403 @@
// 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"
origin_tech = "programming=2"
var/locked = 0
var/installed = 0
var/require_module = 0
var/module_type = null
// 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)
if(R.stat == DEAD)
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return 1
if(module_type && !istype(R.module, module_type))
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 1
/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(..())
return
var/oldname = R.real_name
R.custom_name = heldname
R.updatename()
if(oldname == R.real_name)
R.notify_ai(RENAME, oldname, R.real_name)
return 1
/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)
if(R.health < 0)
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
return 0
if(R.mind)
R.mind.grab_ghost()
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
R.revive()
return 1
/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
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R)
if(..())
return
if(R.speed < 0)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
return
R.speed = -2 // Gotta go fast.
return 1
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/security
origin_tech = "engineering=4;powerstorage=4;combat=4"
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
return
T.charge_delay = max(2 , T.charge_delay - 4)
return 1
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
desc = "A energy-operated thruster system for cyborgs."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4"
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R)
if(..())
return
if(R.ionpulse)
to_chat(usr, "<span class='notice'>This unit already has ion thrusters installed!</span>")
return
R.ionpulse = TRUE
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=5"
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/weapon/shovel/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/weapon/pickaxe/drill/cyborg/diamond/DD = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=4;bluespace=4"
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/weapon/storage/bag/ore/holding/H = new /obj/item/weapon/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
return 1
/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
origin_tech = "combat=4;syndicate=1"
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
if(..())
return
if(R.emagged)
return
R.SetEmagged(1)
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=4;plasmatech=4"
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
if(..())
return
R.weather_immunities += "lava"
return 1
/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 = 0
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)
if(..())
return
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
if(U)
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
return 0
cyborg = R
icon_state = "selfrepair_off"
toggle_action = new /datum/action/item_action/toggle(src)
toggle_action.Grant(R)
return 1
/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)
// 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"
origin_tech = "programming=2"
var/locked = 0
var/installed = 0
var/require_module = 0
var/module_type = null
// 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)
if(R.stat == DEAD)
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return 1
if(module_type && !istype(R.module, module_type))
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 1
/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(..())
return
var/oldname = R.real_name
R.custom_name = heldname
R.updatename()
if(oldname == R.real_name)
R.notify_ai(RENAME, oldname, R.real_name)
return 1
/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)
if(R.health < 0)
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
return 0
if(R.mind)
R.mind.grab_ghost()
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
R.revive()
return 1
/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
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R)
if(..())
return
if(R.speed < 0)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
return
R.speed = -2 // Gotta go fast.
return 1
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/security
origin_tech = "engineering=4;powerstorage=4;combat=4"
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
return
T.charge_delay = max(2 , T.charge_delay - 4)
return 1
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
desc = "A energy-operated thruster system for cyborgs."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4"
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R)
if(..())
return
if(R.ionpulse)
to_chat(usr, "<span class='notice'>This unit already has ion thrusters installed!</span>")
return
R.ionpulse = TRUE
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=5"
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/weapon/shovel/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/weapon/pickaxe/drill/cyborg/diamond/DD = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=4;bluespace=4"
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/weapon/storage/bag/ore/holding/H = new /obj/item/weapon/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
return 1
/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
origin_tech = "combat=4;syndicate=1"
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
if(..())
return
if(R.emagged)
return
R.SetEmagged(1)
return 1
/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 = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=4;plasmatech=4"
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
if(..())
return
R.weather_immunities += "lava"
return 1
/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 = 0
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)
if(..())
return
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
if(U)
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
return 0
cyborg = R
icon_state = "selfrepair_off"
toggle_action = new /datum/action/item_action/toggle(src)
toggle_action.Grant(R)
return 1
/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()
/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()
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()
return
if(cyborg.cell.charge < powercost * 2)
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
deactivate()
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()
/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 = /obj/item/weapon/robot_module/medical
origin_tech = null
var/list/additional_reagents = list()
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
return 1
/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")
origin_tech = "programming=5;engineering=4;biotech=5"
/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")
origin_tech = "programming=5;engineering=5;biotech=6"
/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."
origin_tech = "materials=5;engineering=7;combat=3"
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R)
if(..())
return
var/found_hypo = FALSE
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
H.bypass_protection = TRUE
found_hypo = TRUE
if(!found_hypo)
return
return 1
/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
desc = "An upgrade to the Medical module, installing a builtin \
defibrillator, for on the scene revival."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/medical
origin_tech = "programming=4;engineering=6;materials=5;powerstorage=5;biotech=5"
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
return 1
/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"
origin_tech = "engineering=4;magnets=4;programming=4"
/obj/item/borg/upgrade/ai/action(mob/living/silicon/robot/R)
if(..())
return
if(R.shell)
to_chat(usr, "<span class='warning'>This unit is already an AI shell!</span>")
return
if(R.key) //You cannot replace a player unless the key is completely removed.
to_chat(usr, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
return
R.make_shell(src)
cyborg = null
deactivate()
/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()
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()
return
if(cyborg.cell.charge < powercost * 2)
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
deactivate()
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()
/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 = /obj/item/weapon/robot_module/medical
origin_tech = null
var/list/additional_reagents = list()
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
return 1
/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")
origin_tech = "programming=5;engineering=4;biotech=5"
/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")
origin_tech = "programming=5;engineering=5;biotech=6"
/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."
origin_tech = "materials=5;engineering=7;combat=3"
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R)
if(..())
return
var/found_hypo = FALSE
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
H.bypass_protection = TRUE
found_hypo = TRUE
if(!found_hypo)
return
return 1
/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
desc = "An upgrade to the Medical module, installing a builtin \
defibrillator, for on the scene revival."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/medical
origin_tech = "programming=4;engineering=6;materials=5;powerstorage=5;biotech=5"
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
return 1
/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"
origin_tech = "engineering=4;magnets=4;programming=4"
/obj/item/borg/upgrade/ai/action(mob/living/silicon/robot/R)
if(..())
return
if(R.shell)
to_chat(usr, "<span class='warning'>This unit is already an AI shell!</span>")
return
if(R.key) //You cannot replace a player unless the key is completely removed.
to_chat(usr, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
return
R.make_shell(src)
return TRUE
@@ -118,6 +118,9 @@ GLOBAL_LIST_INIT(xeno_recipes, list ( \
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."
@@ -125,6 +128,24 @@ GLOBAL_LIST_INIT(xeno_recipes, list ( \
icon_state = "sheet-leather"
origin_tech = "materials=2"
GLOBAL_LIST_INIT(leather_recipes, list ( \
new/datum/stack_recipe("wallet", /obj/item/weapon/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/weapon/storage/belt/utility, 4), \
new/datum/stack_recipe("leather satchel", /obj/item/weapon/storage/backpack/satchel, 5), \
new/datum/stack_recipe("bandolier", /obj/item/weapon/storage/belt/bandolier, 5), \
new/datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7), \
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'
@@ -136,11 +157,12 @@ GLOBAL_LIST_INIT(xeno_recipes, list ( \
GLOBAL_LIST_INIT(sinew_recipes, list ( \
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
))
))
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.sinew_recipes
return ..()
/*
* Plates
*/
@@ -207,4 +229,4 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
var/obj/item/stack/sheet/leather/HS = new(src.loc)
HS.amount = 1
wetness = initial(wetness)
src.use(1)
src.use(1)
@@ -158,12 +158,12 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
var/turf/T = get_turf(src)
message_admins("Plasma sheets ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_COORDJMP(T)]",0,1)
log_game("Plasma sheets ignited by [key_name(user)] in [COORD(T)]")
fire_act()
fire_act(W.is_hot())
else
return ..()
/obj/item/stack/sheet/mineral/plasma/fire_act(exposed_temperature, exposed_volume)
atmos_spawn_air("plasma=[amount*10];TEMP=1000")
atmos_spawn_air("plasma=[amount*10];TEMP=[exposed_temperature]")
qdel(src)
/*
@@ -307,7 +307,6 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
force = 1
throwforce = 2
origin_tech = "materials=1"
sheettype = "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), \
@@ -337,7 +336,7 @@ GLOBAL_LIST_INIT(snow_recipes, list ( \
* Adamantine
*/
GLOBAL_LIST_INIT(adamantine_recipes, list(
new /datum/stack_recipe("artificial golem shell", /obj/item/golem_shell/artificial, req_amount=1, res_amount=1),
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
@@ -385,4 +384,4 @@ GLOBAL_LIST_INIT(abductor_recipes, list ( \
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.abductor_recipes
..()
..()
@@ -71,9 +71,8 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
qdel(src)
/obj/item/stack/sheet/metal/narsie_act()
if(prob(20))
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/sheet/metal/fifty
amount = 50
@@ -286,13 +285,16 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
return
..()
/obj/item/stack/sheet/runed_metal/fifty
amount = 50
/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/five
amount = 5
/*
* Brass
*/
@@ -322,9 +324,8 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \
turf_type = /turf/open/floor/clockwork
/obj/item/stack/tile/brass/narsie_act()
if(prob(20))
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/tile/brass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.brass_recipes
@@ -364,7 +365,10 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \
origin_tech = "materials=2;biotech=2"
GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40)))
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
new /datum/stack_recipe("water bottle", /obj/item/weapon/reagent_containers/glass/beaker/waterbottle/empty), \
new /datum/stack_recipe("large water bottle", /obj/item/weapon/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
new /datum/stack_recipe("wet floor sign", /obj/item/weapon/caution, 2)))
/obj/item/stack/sheet/plastic
name = "plastic"
+23 -1
View File
@@ -279,6 +279,28 @@
resistance_flags = FLAMMABLE
/obj/item/toy/windupToolbox
name = "windup toolbox"
desc = "A replica toolbox that rumbles when you turn the key"
icon_state = "his_grace"
item_state = "artistic_toolbox"
var/active = FALSE
icon = 'icons/obj/weapons.dmi'
attack_verb = list("robusted")
/obj/item/toy/windupToolbox/attack_self(mob/user)
if(!active)
icon_state = "his_grace_awakened"
to_chat(user, "<span class='warning'>You wind up [src], it begins to rumble.</span>")
active = TRUE
addtimer(CALLBACK(src, .proc/stopRumble), 600)
else
to_chat(user, "[src] is already active.")
/obj/item/toy/windupToolbox/proc/stopRumble()
icon_state = initial(icon_state)
active = FALSE
/*
* Subtype of Double-Bladed Energy Swords
*/
@@ -529,7 +551,7 @@
"<span class='notice'>You hear a soft click.</span>")
/obj/item/toy/talking/codex_gigas/generate_messages()
var/datum/devilinfo/devil = randomDevilInfo()
var/datum/fakeDevil/devil = new
var/list/messages = list()
messages += "Some fun facts about: [devil.truename]"
messages += "[GLOB.lawlorify[LORE][devil.bane]]"
@@ -472,8 +472,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
flags = CONDUCT
slot_flags = SLOT_BELT
var/lit = 0
var/fancy = TRUE
heat = 1500
resistance_flags = FIRE_PROOF
light_color = LIGHT_COLOR_FIRE
/obj/item/weapon/lighter/update_icon()
if(lit)
@@ -484,37 +486,28 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/ignition_effect(atom/A, mob/user)
. = "<span class='rose'>With a single flick of their wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.</span>"
/obj/item/weapon/lighter/greyscale
name = "cheap lighter"
desc = "A cheap-as-free lighter."
icon_state = "lighter"
/obj/item/weapon/lighter/greyscale/Initialize()
. = ..()
add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY)
update_icon()
/obj/item/weapon/lighter/greyscale/update_icon()
cut_overlays()
var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base")
base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color
/obj/item/weapon/lighter/proc/set_lit(new_lit)
lit = new_lit
if(lit)
base_overlay.icon_state = "[initial(icon_state)]_on"
add_overlay(base_overlay)
/obj/item/weapon/lighter/greyscale/ignition_effect(atom/A, mob/user)
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
force = 5
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
attack_verb = list("burnt", "singed")
set_light(1)
START_PROCESSING(SSobj, src)
else
hitsound = "swing_hit"
force = 0
attack_verb = null //human_defense.dm takes care of it
set_light(0)
STOP_PROCESSING(SSobj, src)
update_icon()
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.is_holding(src))
if(!lit)
lit = 1
update_icon()
force = 5
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
attack_verb = list("burnt", "singed")
if(!istype(src, /obj/item/weapon/lighter/greyscale))
set_lit(TRUE)
if(fancy)
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "<span class='notice'>Without even breaking stride, you flip open and lights [src] in one smooth movement.</span>")
else
var/prot = FALSE
@@ -534,20 +527,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
set_light(1)
START_PROCESSING(SSobj, src)
else
lit = 0
update_icon()
hitsound = "swing_hit"
force = 0
attack_verb = null //human_defense.dm takes care of it
if(!istype(src, /obj/item/weapon/lighter/greyscale))
set_lit(FALSE)
if(fancy)
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
else
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
set_light(0)
STOP_PROCESSING(SSobj, src)
else
. = ..()
@@ -562,7 +547,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(M == user)
cig.attackby(src, user)
else
if(!istype(src, /obj/item/weapon/lighter/greyscale))
if(fancy)
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame they light \the [cig] with.</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
@@ -575,6 +560,30 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/is_hot()
return lit * heat
/obj/item/weapon/lighter/greyscale
name = "cheap lighter"
desc = "A cheap-as-free lighter."
icon_state = "lighter"
fancy = FALSE
/obj/item/weapon/lighter/greyscale/Initialize()
. = ..()
add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY)
update_icon()
/obj/item/weapon/lighter/greyscale/update_icon()
cut_overlays()
var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base")
base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color
if(lit)
base_overlay.icon_state = "[initial(icon_state)]_on"
add_overlay(base_overlay)
/obj/item/weapon/lighter/greyscale/ignition_effect(atom/A, mob/user)
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
///////////
//ROLLING//
///////////
@@ -50,9 +50,7 @@
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
M.updateappearance(mutations_overlay_update=1)
log_attack(log_msg)
else
to_chat(user, "<span class='notice'>It appears that [M] does not have compatible DNA.</span>")
return
return TRUE
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
if(!user.IsAdvancedToolUser())
@@ -79,7 +77,9 @@
add_logs(user, target, "injected", src)
inject(target, user) //Now we actually do the heavy lifting.
if(!inject(target, user)) //Now we actually do the heavy lifting.
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
used = 1
icon_state = "dnainjector0"
desc += " This one is used up."
@@ -1,115 +0,0 @@
//In this file: C4
/obj/item/weapon/c4
name = "C-4"
desc = "Used to put holes in specific areas without too much extra hole."
gender = PLURAL
icon = 'icons/obj/grenade.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = NOBLUDGEON
w_class = WEIGHT_CLASS_SMALL
origin_tech = "syndicate=1"
var/timer = 10
var/open_panel = 0
parent_type = /obj/item/weapon/grenade/plastic/c4
/obj/item/weapon/c4/New()
wires = new /datum/wires/explosive/c4(src)
plastic_overlay = mutable_appearance(icon, "plastic-explosive2")
..()
/obj/item/weapon/c4/Destroy()
qdel(wires)
wires = null
target = null
return ..()
/obj/item/weapon/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>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
target = user
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_COORDJMP(src)]",0,1)
message_admins("[key_name(user)] suicided with [name] at ([x],[y],[z])")
sleep(10)
explode(get_turf(user))
user.gib(1, 1)
/obj/item/weapon/c4/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/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/weapon/c4/attack_self(mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_held_item() == src)
newtime = Clamp(newtime, 10, 60000)
timer = newtime
to_chat(user, "Timer set for [timer] seconds.")
/obj/item/weapon/c4/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (ismob(AM))
return
if(loc == AM)
return
if((istype(AM, /obj/item/weapon/storage/)) && !((istype(AM, /obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))) //If its storage but not secure storage OR a lockbox, then place it inside.
return
if((istype(AM,/obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))
var/obj/item/weapon/storage/secure/S = AM
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
return
to_chat(user, "<span class='notice'>You start planting the bomb...</span>")
if(do_after(user, 50, target = AM))
if(!user.temporarilyRemoveItemFromInventory(src))
return
src.target = AM
forceMove(null)
var/message = "[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [timer] second fuse"
GLOB.bombers += message
message_admins(message,0,1)
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(target)] with [timer] second fuse")
target.add_overlay(plastic_overlay, 1)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>")
addtimer(CALLBACK(src, .proc/explode), timer * 10)
/obj/item/weapon/c4/proc/explode()
if(QDELETED(src))
return
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.cut_overlay(plastic_overlay, TRUE)
else
location = get_turf(src)
if(location)
location.ex_act(2, target)
explosion(location,0,0,3)
qdel(src)
/obj/item/weapon/c4/attack(mob/M, mob/user, def_zone)
return
@@ -48,23 +48,27 @@
/obj/item/weapon/grenade/attack_self(mob/user)
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
GLOB.bombers += message
message_admins(message)
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
preprime(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
prime()
/obj/item/weapon/grenade/proc/preprime(mob/user)
if(user)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = TRUE
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
if(user)
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
GLOB.bombers += message
message_admins(message)
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
addtimer(CALLBACK(src, .proc/prime), det_time)
/obj/item/weapon/grenade/proc/prime()
@@ -104,4 +108,4 @@
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
prime()
return 1 //It hit the grenade, not them
return 1 //It hit the grenade, not them
@@ -18,6 +18,10 @@
plastic_overlay = mutable_appearance(icon, "[item_state]2")
..()
/obj/item/weapon/grenade/plastic/Initialize(mapload)
. = ..()
SET_SECONDARY_FLAG(src, NO_EMP_WIRES)
/obj/item/weapon/grenade/plastic/Destroy()
qdel(nadeassembly)
nadeassembly = null
@@ -154,6 +158,115 @@
/obj/item/weapon/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
gender = PLURAL
icon = 'icons/obj/grenade.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = NOBLUDGEON
w_class = WEIGHT_CLASS_SMALL
origin_tech = "syndicate=1"
var/timer = 10
var/open_panel = 0
/obj/item/weapon/grenade/plastic/c4/New()
wires = new /datum/wires/explosive/c4(src)
plastic_overlay = mutable_appearance(icon, "plastic-explosive2")
..()
/obj/item/weapon/grenade/plastic/c4/Destroy()
qdel(wires)
wires = null
target = null
return ..()
/obj/item/weapon/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>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
target = user
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_COORDJMP(src)]",0,1)
message_admins("[key_name(user)] suicided with [name] at ([x],[y],[z])")
sleep(10)
explode(get_turf(user))
user.gib(1, 1)
/obj/item/weapon/grenade/plastic/c4/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/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/weapon/grenade/plastic/c4/attack_self(mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_held_item() == src)
newtime = Clamp(newtime, 10, 60000)
timer = newtime
to_chat(user, "Timer set for [timer] seconds.")
/obj/item/weapon/grenade/plastic/c4/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (ismob(AM))
return
if(loc == AM)
return
if((istype(AM, /obj/item/weapon/storage/)) && !((istype(AM, /obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))) //If its storage but not secure storage OR a lockbox, then place it inside.
return
if((istype(AM,/obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))
var/obj/item/weapon/storage/secure/S = AM
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
return
to_chat(user, "<span class='notice'>You start planting the bomb...</span>")
if(do_after(user, 50, target = AM))
if(!user.temporarilyRemoveItemFromInventory(src))
return
src.target = AM
forceMove(null)
var/message = "[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [timer] second fuse"
GLOB.bombers += message
message_admins(message,0,1)
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(target)] with [timer] second fuse")
target.add_overlay(plastic_overlay, 1)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>")
addtimer(CALLBACK(src, .proc/explode), timer * 10)
/obj/item/weapon/grenade/plastic/c4/proc/explode()
if(QDELETED(src))
return
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.cut_overlay(plastic_overlay, TRUE)
else
location = get_turf(src)
if(location)
location.ex_act(2, target)
explosion(location,0,0,3)
qdel(src)
/obj/item/weapon/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.
@@ -1,39 +1,39 @@
/obj/item/weapon/grenade/spawnergrenade
/obj/item/weapon/grenade/spawnergrenade
desc = "It will unleash an unspecified anomaly into the vicinity."
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
/obj/item/weapon/grenade/spawnergrenade/prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
update_mob()
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_act()
// Spawn some hostile syndicate critters and spread them out
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=admin_spawned)
qdel(src)
/obj/item/weapon/grenade/spawnergrenade/manhacks
name = "viscerator delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 10
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/syndiesoap
name = "Mister Scrubby"
spawner_type = /obj/item/weapon/soap/syndie
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
/obj/item/weapon/grenade/spawnergrenade/prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
update_mob()
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_act()
// Spawn some hostile syndicate critters and spread them out
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=admin_spawned)
qdel(src)
/obj/item/weapon/grenade/spawnergrenade/manhacks
name = "viscerator delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 10
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/syndiesoap
name = "Mister Scrubby"
spawner_type = /obj/item/weapon/soap/syndie
@@ -214,7 +214,7 @@
possessed = TRUE
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
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)
var/mob/dead/observer/theghost = null
if(LAZYLEN(candidates))
@@ -1,189 +1,189 @@
/obj/machinery/implantchair
name = "mindshield implanter"
desc = "Used to implant occupants with mindshield implants."
icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
density = 1
opacity = 0
anchored = TRUE
var/ready = TRUE
var/replenishing = FALSE
var/ready_implants = 5
var/max_implants = 5
var/injection_cooldown = 600
var/replenish_cooldown = 6000
var/implant_type = /obj/item/weapon/implant/mindshield
var/auto_inject = FALSE
var/auto_replenish = TRUE
var/special = FALSE
var/special_name = "special function"
/obj/machinery/implantchair/New()
..()
open_machine()
update_icon()
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
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, "implantchair", name, 375, 280, master_ui, state)
ui.open()
/obj/machinery/implantchair/ui_data()
var/list/data = list()
data["occupied"] = occupant ? 1 : 0
data["open"] = state_open
data["occupant"] = list()
/obj/machinery/implantchair
name = "mindshield implanter"
desc = "Used to implant occupants with mindshield implants."
icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
density = 1
opacity = 0
anchored = TRUE
var/ready = TRUE
var/replenishing = FALSE
var/ready_implants = 5
var/max_implants = 5
var/injection_cooldown = 600
var/replenish_cooldown = 6000
var/implant_type = /obj/item/weapon/implant/mindshield
var/auto_inject = FALSE
var/auto_replenish = TRUE
var/special = FALSE
var/special_name = "special function"
/obj/machinery/implantchair/New()
..()
open_machine()
update_icon()
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
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, "implantchair", name, 375, 280, master_ui, state)
ui.open()
/obj/machinery/implantchair/ui_data()
var/list/data = list()
data["occupied"] = occupant ? 1 : 0
data["open"] = state_open
data["occupant"] = list()
if(occupant)
var/mob/living/mob_occupant = occupant
data["occupant"]["name"] = mob_occupant.name
data["occupant"]["stat"] = mob_occupant.stat
data["special_name"] = special ? special_name : null
data["ready_implants"] = ready_implants
data["ready"] = ready
data["replenishing"] = replenishing
return data
/obj/machinery/implantchair/ui_act(action, params)
if(..())
return
switch(action)
if("door")
if(state_open)
close_machine()
else
open_machine()
. = TRUE
if("implant")
implant(occupant,usr)
. = TRUE
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
if (!istype(M))
return
if(!ready_implants || !ready)
return
if(implant_action(M,user))
ready_implants--
if(!replenishing && auto_replenish)
replenishing = TRUE
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
if(injection_cooldown > 0)
ready = FALSE
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
else
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
update_icon()
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
var/obj/item/weapon/implant/I = new implant_type
if(I.implant(M))
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
return 1
/obj/machinery/implantchair/update_icon()
icon_state = initial(icon_state)
if(state_open)
icon_state += "_open"
if(occupant)
icon_state += "_occupied"
if(ready)
add_overlay("ready")
else
cut_overlays()
/obj/machinery/implantchair/proc/replenish()
if(ready_implants < max_implants)
ready_implants++
if(ready_implants < max_implants)
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
else
replenishing = FALSE
/obj/machinery/implantchair/proc/set_ready()
ready = TRUE
update_icon()
/obj/machinery/implantchair/container_resist(mob/living/user)
if(state_open)
return
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>")
audible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>",hearing_distance = 2)
if(do_after(user, 600, target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
return
visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>")
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
open_machine()
/obj/machinery/implantchair/relaymove(mob/user)
container_resist(user)
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
return
close_machine(target)
/obj/machinery/implantchair/close_machine(mob/living/user)
if((isnull(user) || istype(user)) && state_open)
..(user)
if(auto_inject && ready && ready_implants > 0)
implant(user,null)
/obj/machinery/implantchair/genepurge
name = "Genetic purifier"
desc = "Used to purge human genome of foreign influences"
special = TRUE
special_name = "Purge genome"
injection_cooldown = 0
replenish_cooldown = 300
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
if(!istype(H))
return 0
H.set_species(/datum/species/human, 1)//lizards go home
purrbation_remove(H)//remove cats
H.dna.remove_all_mutations()//hulks out
return 1
/obj/machinery/implantchair/brainwash
name = "Neural Imprinter"
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
special_name = "Imprint"
injection_cooldown = 3000
auto_inject = FALSE
auto_replenish = FALSE
special = TRUE
var/objective = "Obey the law. Praise Nanotrasen."
var/custom = FALSE
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
return 0
if(custom)
if(!user || !user.Adjacent(src))
return 0
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
var/datum/objective/custom_objective = new/datum/objective(objective)
custom_objective.owner = C.mind
C.mind.objectives += custom_objective
C.mind.announce_objectives()
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
return 1
data["special_name"] = special ? special_name : null
data["ready_implants"] = ready_implants
data["ready"] = ready
data["replenishing"] = replenishing
return data
/obj/machinery/implantchair/ui_act(action, params)
if(..())
return
switch(action)
if("door")
if(state_open)
close_machine()
else
open_machine()
. = TRUE
if("implant")
implant(occupant,usr)
. = TRUE
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
if (!istype(M))
return
if(!ready_implants || !ready)
return
if(implant_action(M,user))
ready_implants--
if(!replenishing && auto_replenish)
replenishing = TRUE
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
if(injection_cooldown > 0)
ready = FALSE
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
else
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
update_icon()
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
var/obj/item/weapon/implant/I = new implant_type
if(I.implant(M))
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
return 1
/obj/machinery/implantchair/update_icon()
icon_state = initial(icon_state)
if(state_open)
icon_state += "_open"
if(occupant)
icon_state += "_occupied"
if(ready)
add_overlay("ready")
else
cut_overlays()
/obj/machinery/implantchair/proc/replenish()
if(ready_implants < max_implants)
ready_implants++
if(ready_implants < max_implants)
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
else
replenishing = FALSE
/obj/machinery/implantchair/proc/set_ready()
ready = TRUE
update_icon()
/obj/machinery/implantchair/container_resist(mob/living/user)
if(state_open)
return
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>")
audible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>",hearing_distance = 2)
if(do_after(user, 600, target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
return
visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>")
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
open_machine()
/obj/machinery/implantchair/relaymove(mob/user)
container_resist(user)
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
return
close_machine(target)
/obj/machinery/implantchair/close_machine(mob/living/user)
if((isnull(user) || istype(user)) && state_open)
..(user)
if(auto_inject && ready && ready_implants > 0)
implant(user,null)
/obj/machinery/implantchair/genepurge
name = "Genetic purifier"
desc = "Used to purge human genome of foreign influences"
special = TRUE
special_name = "Purge genome"
injection_cooldown = 0
replenish_cooldown = 300
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
if(!istype(H))
return 0
H.set_species(/datum/species/human, 1)//lizards go home
purrbation_remove(H)//remove cats
H.dna.remove_all_mutations()//hulks out
return 1
/obj/machinery/implantchair/brainwash
name = "Neural Imprinter"
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
special_name = "Imprint"
injection_cooldown = 3000
auto_inject = FALSE
auto_replenish = FALSE
special = TRUE
var/objective = "Obey the law. Praise Nanotrasen."
var/custom = FALSE
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
return 0
if(custom)
if(!user || !user.Adjacent(src))
return 0
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
var/datum/objective/custom_objective = new/datum/objective(objective)
custom_objective.owner = C.mind
C.mind.objectives += custom_objective
C.mind.announce_objectives()
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
return 1
+251 -251
View File
@@ -1,259 +1,259 @@
/obj/item/weapon/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/list/possible_colors
w_class = WEIGHT_CLASS_SMALL
sharpness = IS_SHARP
var/w_class_on = WEIGHT_CLASS_BULKY
heat = 3500
obj_integrity = 200
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
/obj/item/weapon/melee/energy/Initialize()
/obj/item/weapon/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/list/possible_colors
w_class = WEIGHT_CLASS_SMALL
sharpness = IS_SHARP
var/w_class_on = WEIGHT_CLASS_BULKY
heat = 3500
obj_integrity = 200
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
/obj/item/weapon/melee/energy/Initialize()
. = ..()
if(LAZYLEN(possible_colors))
item_color = pick(possible_colors)
switch(item_color)//Only run this check if the color was picked randomly, so that colors can be manually set for non-random colored energy weapons.
if("red")
light_color = LIGHT_COLOR_RED
if("green")
light_color = LIGHT_COLOR_GREEN
if("blue")
light_color = LIGHT_COLOR_LIGHT_CYAN
if("purple")
light_color = LIGHT_COLOR_LAVENDER
if(active)
set_light(brightness_on)
/obj/item/weapon/melee/energy/suicide_act(mob/user)
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/weapon/melee/energy/add_blood(list/blood_dna)
return 0
/obj/item/weapon/melee/energy/is_sharp()
return active * sharpness
/obj/item/weapon/melee/energy/axe
name = "energy axe"
desc = "An energized battle axe."
icon_state = "axe0"
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 = CONDUCT
armour_penetration = 100
origin_tech = "combat=4;magnets=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
light_color = "#40ceff"
/obj/item/weapon/melee/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/weapon/melee/energy/sword
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3
throwforce = 5
hitsound = "swing_hit" //it starts deactivated
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
possible_colors = list("red", "blue", "green", "purple")
var/hacked = 0
/obj/item/weapon/melee/energy/sword/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/weapon/melee/energy/sword/process()
if(active)
if(hacked)
light_color = pick(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
open_flame()
else
STOP_PROCESSING(SSobj, src)
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & 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)
active = !active
if (active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
else
icon_state = "sword[item_color]"
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(user, "<span class='notice'>[src] is now active.</span>")
START_PROCESSING(SSobj, src)
set_light(brightness_on)
else
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
throw_speed = initial(throw_speed)
if(attack_verb_on.len)
attack_verb = list()
icon_state = initial(icon_state)
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
STOP_PROCESSING(SSobj, src)
set_light(0)
add_fingerprint(user)
/obj/item/weapon/melee/energy/is_hot()
return active * heat
/obj/item/weapon/melee/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 == src)
in_mouth = ", barely missing their nose"
. = "<span class='warning'>[user] swings their \
[src][in_mouth]. They light [A] in the process.</span>"
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
add_fingerprint(user)
/obj/item/weapon/melee/energy/sword/cyborg
var/hitcost = 50
/obj/item/weapon/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/weapon/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/weapon/melee/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."
icon_state = "esaw"
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"
hitcost = 75 //Costs more than a standard cyborg esword
item_color = null
w_class = WEIGHT_CLASS_NORMAL
sharpness = IS_SHARP
light_color = "#40ceff"
possible_colors = null
if(LAZYLEN(possible_colors))
item_color = pick(possible_colors)
switch(item_color)//Only run this check if the color was picked randomly, so that colors can be manually set for non-random colored energy weapons.
if("red")
light_color = LIGHT_COLOR_RED
if("green")
light_color = LIGHT_COLOR_GREEN
if("blue")
light_color = LIGHT_COLOR_LIGHT_CYAN
if("purple")
light_color = LIGHT_COLOR_LAVENDER
if(active)
set_light(brightness_on)
/obj/item/weapon/melee/energy/suicide_act(mob/user)
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/weapon/melee/energy/add_blood(list/blood_dna)
return 0
/obj/item/weapon/melee/energy/is_sharp()
return active * sharpness
/obj/item/weapon/melee/energy/axe
name = "energy axe"
desc = "An energized battle axe."
icon_state = "axe0"
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 = CONDUCT
armour_penetration = 100
origin_tech = "combat=4;magnets=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
light_color = "#40ceff"
/obj/item/weapon/melee/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/weapon/melee/energy/sword
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3
throwforce = 5
hitsound = "swing_hit" //it starts deactivated
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
possible_colors = list("red", "blue", "green", "purple")
var/hacked = 0
/obj/item/weapon/melee/energy/sword/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/weapon/melee/energy/sword/process()
if(active)
if(hacked)
light_color = pick(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
open_flame()
else
STOP_PROCESSING(SSobj, src)
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & 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)
active = !active
if (active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
else
icon_state = "sword[item_color]"
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(user, "<span class='notice'>[src] is now active.</span>")
START_PROCESSING(SSobj, src)
set_light(brightness_on)
else
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
throw_speed = initial(throw_speed)
if(attack_verb_on.len)
attack_verb = list()
icon_state = initial(icon_state)
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
STOP_PROCESSING(SSobj, src)
set_light(0)
add_fingerprint(user)
/obj/item/weapon/melee/energy/is_hot()
return active * heat
/obj/item/weapon/melee/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 == src)
in_mouth = ", barely missing their nose"
. = "<span class='warning'>[user] swings their \
[src][in_mouth]. They light [A] in the process.</span>"
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
add_fingerprint(user)
/obj/item/weapon/melee/energy/sword/cyborg
var/hitcost = 50
/obj/item/weapon/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/weapon/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/weapon/melee/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."
icon_state = "esaw"
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"
hitcost = 75 //Costs more than a standard cyborg esword
item_color = null
w_class = WEIGHT_CLASS_NORMAL
sharpness = IS_SHARP
light_color = "#40ceff"
possible_colors = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/Initialize()
. = ..()
icon_state = "esaw_0"
item_color = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
return 0
/obj/item/weapon/melee/energy/sword/saber
/obj/item/weapon/melee/energy/sword/saber/blue
possible_colors = list("blue")
/obj/item/weapon/melee/energy/sword/saber/purple
possible_colors = list("purple")
/obj/item/weapon/melee/energy/sword/saber/green
possible_colors = list("green")
/obj/item/weapon/melee/energy/sword/saber/red
possible_colors = list("red")
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
icon_state = "esaw_0"
item_color = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
return 0
/obj/item/weapon/melee/energy/sword/saber
/obj/item/weapon/melee/energy/sword/saber/blue
possible_colors = list("blue")
/obj/item/weapon/melee/energy/sword/saber/purple
possible_colors = list("purple")
/obj/item/weapon/melee/energy/sword/saber/green
possible_colors = list("green")
/obj/item/weapon/melee/energy/sword/saber/red
possible_colors = list("red")
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
if(istype(W, /obj/item/device/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/weapon/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
light_color = "#ff0000"
/obj/item/weapon/melee/energy/blade
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
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
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/weapon/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
light_color = "#ff0000"
/obj/item/weapon/melee/energy/blade
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
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/weapon/melee/energy/blade/Initialize()
. = ..()
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
/obj/item/weapon/melee/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"
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
/obj/item/weapon/melee/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"
@@ -244,7 +244,7 @@
range_multiplier = 3
fire_mode = PCANNON_FIFO
throw_amount = 1
maxWeightClass = 100 //50 pies. :^)
maxWeightClass = 150 //50 pies. :^)
clumsyCheck = FALSE
/obj/item/weapon/pneumatic_cannon/pie/can_load_item(obj/item/I, mob/user)
@@ -252,3 +252,22 @@
return ..()
to_chat(user, "<span class='warning'>[src] only accepts pies!</span>")
return FALSE
/obj/item/weapon/pneumatic_cannon/pie/selfcharge
automatic = TRUE
var/charge_amount = 1
var/charge_ticks = 1
var/charge_tick = 0
maxWeightClass = 60 //20 pies.
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/process()
if(++charge_tick >= charge_ticks)
fill_with_type(/obj/item/weapon/reagent_containers/food/snacks/pie, charge_amount)
@@ -296,7 +296,7 @@
/obj/item/weapon/lighter,
/obj/item/device/multitool,
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov,
/obj/item/weapon/c4,
/obj/item/weapon/grenade/plastic/c4,
)
/obj/item/weapon/storage/belt/grenade/full/PopulateContents()
new /obj/item/weapon/grenade/flashbang(src)
@@ -85,8 +85,8 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
playsound(src.loc, "punch", 25, 1, -1)
return 1
/obj/item/weapon/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user)
/obj/item/weapon/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
@@ -105,7 +105,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
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)
@@ -156,3 +159,38 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
/obj/item/weapon/storage/book/bible/booze/PopulateContents()
new /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src)
/obj/item/weapon/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/weapon/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("l_arm", "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/weapon/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(list/blood_dna)
return FALSE
@@ -502,7 +502,7 @@
/obj/item/weapon/storage/Initialize(mapload)
..()
. = ..()
can_hold = typecacheof(can_hold)
cant_hold = typecacheof(cant_hold)
@@ -21,8 +21,8 @@
if(has_latches)
if(prob(10))
latches = "double_latch"
else if(prob(1))
latches = "triple_latch"
if(prob(1))
latches = "triple_latch"
update_icon()
/obj/item/weapon/storage/toolbox/update_icon()
@@ -140,6 +140,8 @@
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
volume = 3
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
..()
+10 -11
View File
@@ -602,20 +602,19 @@
user.visible_message("<span class='suicide'>[user] impales [user.p_them()]self in [user.p_their()] abdomen with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/weapon/twohanded/pitchfork/demonic/pickup(mob/user)
if(isliving(user))
/obj/item/weapon/twohanded/pitchfork/demonic/pickup(mob/living/user)
if(isliving(user) && user.mind && user.owns_soul() && !is_devil(user))
var/mob/living/U = user
if(U.mind && !U.mind.devilinfo && (U.mind.soulOwner == U.mind)) //Burn hands unless they are a devil or have sold their soul
U.visible_message("<span class='warning'>As [U] picks [src] up, [U]'s arms briefly catch fire.</span>", \
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
if(ishuman(U))
var/mob/living/carbon/human/H = U
H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
else
U.adjustFireLoss(rand(force/2,force))
U.visible_message("<span class='warning'>As [U] picks [src] up, [U]'s arms briefly catch fire.</span>", \
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
if(ishuman(U))
var/mob/living/carbon/human/H = U
H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
else
U.adjustFireLoss(rand(force/2,force))
/obj/item/weapon/twohanded/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
if(user.mind && !user.mind.devilinfo && (user.mind.soulOwner != user.mind))
if(user.mind && user.owns_soul() && !is_devil(user))
to_chat(user, "<span class ='warning'>[src] burns in your hands.</span>")
user.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
..()
@@ -1,76 +1,76 @@
/obj/item/weapon/vending_refill
name = "resupply canister"
var/machine_name = "Generic"
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_snack"
item_state = "restock_unit"
flags = CONDUCT
force = 7
throwforce = 10
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
var/init_charges = list(0, 0, 0)
/obj/item/weapon/vending_refill/New(amt = -1)
..()
name = "\improper [machine_name] restocking unit"
if(isnum(amt) && amt > -1)
charges[1] = amt
/obj/item/weapon/vending_refill/examine(mob/user)
..()
if(charges[1] > 0)
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
else
to_chat(user, "It's empty!")
//NOTE I decided to go for about 1/3 of a machine's capacity
/obj/item/weapon/vending_refill/boozeomat
machine_name = "Booze-O-Mat"
icon_state = "refill_booze"
charges = list(54, 4, 0)//of 159 standard, 12 contraband
init_charges = list(54, 4, 0)
/obj/item/weapon/vending_refill/coffee
machine_name = "Solar's Best Hot Drinks"
icon_state = "refill_joe"
charges = list(25, 4, 0)//of 75 standard, 12 contraband
init_charges = list(25, 4, 0)
/obj/item/weapon/vending_refill/snack
machine_name = "Getmore Chocolate Corp"
charges = list(12, 2, 0)//of 36 standard, 6 contraband
init_charges = list(12, 2, 0)
/obj/item/weapon/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
init_charges = list(30, 4, 1)
/obj/item/weapon/vending_refill/cigarette
machine_name = "ShadyCigs Deluxe"
icon_state = "refill_smoke"
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
init_charges = list(12, 3, 2)
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = list(31, 2, 3)// of 94 standard, 6 contraband, 9 premium
init_charges = list(27, 2, 3)
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"
icon_state = "refill_clothes"
charges = list(31, 4, 4)// of 101 standard, 12 contraband, 10 premium(?)
init_charges = list(31, 4, 4)
/obj/item/weapon/vending_refill
name = "resupply canister"
var/machine_name = "Generic"
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_snack"
item_state = "restock_unit"
flags = CONDUCT
force = 7
throwforce = 10
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
var/init_charges = list(0, 0, 0)
/obj/item/weapon/vending_refill/New(amt = -1)
..()
name = "\improper [machine_name] restocking unit"
if(isnum(amt) && amt > -1)
charges[1] = amt
/obj/item/weapon/vending_refill/examine(mob/user)
..()
if(charges[1] > 0)
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
else
to_chat(user, "It's empty!")
//NOTE I decided to go for about 1/3 of a machine's capacity
/obj/item/weapon/vending_refill/boozeomat
machine_name = "Booze-O-Mat"
icon_state = "refill_booze"
charges = list(54, 4, 0)//of 159 standard, 12 contraband
init_charges = list(54, 4, 0)
/obj/item/weapon/vending_refill/coffee
machine_name = "Solar's Best Hot Drinks"
icon_state = "refill_joe"
charges = list(25, 4, 0)//of 75 standard, 12 contraband
init_charges = list(25, 4, 0)
/obj/item/weapon/vending_refill/snack
machine_name = "Getmore Chocolate Corp"
charges = list(12, 2, 0)//of 36 standard, 6 contraband
init_charges = list(12, 2, 0)
/obj/item/weapon/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
init_charges = list(30, 4, 1)
/obj/item/weapon/vending_refill/cigarette
machine_name = "ShadyCigs Deluxe"
icon_state = "refill_smoke"
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
init_charges = list(12, 3, 2)
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = list(31, 2, 3)// of 94 standard, 6 contraband, 9 premium
init_charges = list(27, 2, 3)
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"
icon_state = "refill_clothes"
charges = list(31, 4, 4)// of 101 standard, 12 contraband, 10 premium(?)
init_charges = list(31, 4, 4)
/obj/item/weapon/vending_refill/medical
machine_name = "NanoMed"
File diff suppressed because it is too large Load Diff