Merge branch 'master' into upstream-merge-26965

This commit is contained in:
LetterJay
2017-06-19 15:39:01 -05:00
committed by GitHub
423 changed files with 304918 additions and 166801 deletions
+18 -80
View File
@@ -227,12 +227,8 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
if(cartridge)
dat += cartridge.message_header()
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
@@ -244,12 +240,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if (P == src)
continue
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><img src=pda_honk.png>*Send Virus*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
if(cartridge)
dat += cartridge.message_special(P)
dat += "</li>"
count++
dat += "</ul>"
@@ -424,16 +416,15 @@ GLOBAL_LIST_EMPTY(PDAs)
tnote = null
if("Ringtone")
var/t = input(U, "Please enter new ringtone", name, ttone) as text
if(in_range(src, U) && loc == U)
if(t)
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
hidden_uplink.interact(U)
to_chat(U, "The PDA softly beeps.")
U << browse(null, "window=pda")
src.mode = 0
else
t = copytext(sanitize(t), 1, 20)
ttone = t
if(in_range(src, U) && loc == U && t)
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
hidden_uplink.interact(U)
to_chat(U, "The PDA softly beeps.")
U << browse(null, "window=pda")
src.mode = 0
else
t = copytext(sanitize(t), 1, 20)
ttone = t
else
U << browse(null, "window=pda")
return
@@ -444,30 +435,9 @@ GLOBAL_LIST_EMPTY(PDAs)
if("MessageAll")
src.send_to_all(U)
if("Send Honk")//Honk virus
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
if(!isnull(P))
if (!P.toff && cartridge:honk_charges > 0)
cartridge:honk_charges--
U.show_message("<span class='notice'>Virus sent!</span>", 1)
P.honkamt = (rand(15,20))
else
to_chat(U, "PDA not found.")
else
U << browse(null, "window=pda")
return
if("Send Silence")//Silent virus
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge:mime_charges > 0)
cartridge:mime_charges--
U.show_message("<span class='notice'>Virus sent!</span>", 1)
P.silent = 1
P.ttone = "silence"
else
to_chat(U, "PDA not found.")
if("cart")
if(cartridge)
cartridge.special(U, href_list)
else
U << browse(null, "window=pda")
return
@@ -483,38 +453,6 @@ GLOBAL_LIST_EMPTY(PDAs)
else
M.close()
if("Detonate")//Detonate PDA
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge:shock_charges > 0)
cartridge:shock_charges--
var/difficulty = 0
if(P.cartridge)
difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
difficulty += P.cartridge.access_manifest * 2
else
difficulty += 2
if(prob(difficulty * 15) || (P.hidden_uplink))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else
U.show_message("<span class='notice'>Success!</span>", 1)
P.explode()
else
to_chat(U, "PDA not found.")
else
U.unset_machine()
U << browse(null, "window=pda")
return
//pAI FUNCTIONS===================================
if("pai")
switch(href_list["option"])
@@ -896,7 +834,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if(T)
T.hotspot_expose(700,125)
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
if(istype(cartridge, /obj/item/weapon/cartridge/virus/syndicate))
explosion(T, -1, 1, 3, 4)
else
explosion(T, -1, -1, 2, 3)
@@ -1002,4 +941,3 @@ GLOBAL_LIST_EMPTY(PDAs)
for(var/obj/item/device/pda/P in GLOB.PDAs)
if(!P.owner || P.toff || P.hidden) continue
. += P
return .
@@ -1,7 +1,7 @@
//Clown PDA is slippery.
/obj/item/device/pda/clown
name = "clown PDA"
default_cartridge = /obj/item/weapon/cartridge/clown
default_cartridge = /obj/item/weapon/cartridge/virus/clown
icon_state = "pda-clown"
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
ttone = "honk"
@@ -11,10 +11,10 @@
var/mob/living/carbon/M = AM
if(M.slip(0, 6, src, NO_SLIP_WHEN_WALKING))
if (ishuman(M) && (M.real_name != src.owner))
if (istype(src.cartridge, /obj/item/weapon/cartridge/clown))
var/obj/item/weapon/cartridge/clown/cart = src.cartridge
if(cart.honk_charges < 5)
cart.honk_charges++
if (istype(src.cartridge, /obj/item/weapon/cartridge/virus/clown))
var/obj/item/weapon/cartridge/virus/cart = src.cartridge
if(cart.charges < 5)
cart.charges++
// Special AI/pAI PDAs that cannot explode.
@@ -79,7 +79,7 @@
/obj/item/device/pda/mime
name = "mime PDA"
default_cartridge = /obj/item/weapon/cartridge/mime
default_cartridge = /obj/item/weapon/cartridge/virus/mime
icon_state = "pda-mime"
silent = 1
ttone = "silence"
@@ -134,7 +134,7 @@
icon_state = "pda-miner"
/obj/item/device/pda/syndicate
default_cartridge = /obj/item/weapon/cartridge/syndicate
default_cartridge = /obj/item/weapon/cartridge/virus/syndicate
icon_state = "pda-syndi"
name = "military PDA"
owner = "John Doe"
+11 -19
View File
@@ -96,18 +96,6 @@
access_security = 1
spam_enabled = 1
/obj/item/weapon/cartridge/clown
name = "\improper Honkworks 5.0 cartridge"
icon_state = "cart-clown"
access_clown = 1
var/honk_charges = 5
/obj/item/weapon/cartridge/mime
name = "\improper Gestur-O 1000 cartridge"
icon_state = "cart-mi"
access_mime = 1
var/mime_charges = 5
/obj/item/weapon/cartridge/curator
name = "\improper Lib-Tweet cartridge"
icon_state = "cart-s"
@@ -232,13 +220,6 @@
..()
radio = new /obj/item/radio/integrated/signal(src)
/obj/item/weapon/cartridge/syndicate
name = "\improper Detomatix cartridge"
icon_state = "cart"
access_remote_door = 1
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
var/shock_charges = 4
/obj/item/weapon/cartridge/proc/unlock()
if (!istype(loc, /obj/item/device/pda))
return
@@ -785,3 +766,14 @@ Code:
return
return menu
//If the cartridge adds a special line to the top of the messaging app
/obj/item/weapon/cartridge/proc/message_header()
return ""
//If the cartridge adds something to each potetial messaging target
/obj/item/weapon/cartridge/proc/message_special(obj/item/device/pda/target)
return ""
//This is called for special abilities of cartridges
/obj/item/weapon/cartridge/proc/special(mov/living/user, list/params)
@@ -0,0 +1,108 @@
/obj/item/weapon/cartridge/virus
name = "Generic Virus PDA cart"
var/charges = 5
/obj/item/weapon/cartridge/virus/proc/send_virus(obj/item/device/pda/target, mob/living/U)
return
/obj/item/weapon/cartridge/virus/message_header()
return "<b>[charges] viral files left.</b><HR>"
/obj/item/weapon/cartridge/virus/message_special(obj/item/device/pda/target)
if (!istype(loc, /obj/item/device/pda))
return "" //Sanity check, this shouldn't be possible.
return " (<a href='byond://?src=\ref[loc];choice=cart;special=virus;target=\ref[target]'>*Send Virus*</a>)"
/obj/item/weapon/cartridge/virus/special(mob/living/user, list/params)
var/obj/item/device/pda/P = locate(params["target"])//Leaving it alone in case it may do something useful, I guess.
send_virus(P,user)
/obj/item/weapon/cartridge/virus/clown
name = "\improper Honkworks 5.0 cartridge"
icon_state = "cart-clown"
desc = "A data cartridge for portable microcomputers. It smells vaguely of banannas"
access_clown = 1
/obj/item/weapon/cartridge/virus/clown/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
to_chat(U, "<span class='notice'>Out of charges.</span>")
return
if(!isnull(target) && !target.toff)
charges--
to_chat(U, "<span class='notice'>Virus Sent!</span>")
target.honkamt = (rand(15,20))
else
to_chat(U, "PDA not found.")
/obj/item/weapon/cartridge/virus/mime
name = "\improper Gestur-O 1000 cartridge"
icon_state = "cart-mi"
access_mime = 1
/obj/item/weapon/cartridge/virus/mime/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
to_chat(U, "<span class='notice'>Out of charges.</span>")
return
if(!isnull(target) && !target.toff)
charges--
to_chat(U, "<span class='notice'>Virus Sent!</span>")
target.silent = 1
target.ttone = "silence"
else
to_chat(U, "PDA not found.")
/obj/item/weapon/cartridge/virus/syndicate
name = "\improper Detomatix cartridge"
icon_state = "cart"
access_remote_door = 1
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
charges = 4
/obj/item/weapon/cartridge/virus/syndicate/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
to_chat(U, "<span class='notice'>Out of charges.</span>")
return
if(!isnull(target) && !target.toff)
charges--
var/difficulty = 0
if(target.cartridge)
difficulty += target.cartridge.access_medical
difficulty += target.cartridge.access_security
difficulty += target.cartridge.access_engine
difficulty += target.cartridge.access_clown
difficulty += target.cartridge.access_janitor
difficulty += target.cartridge.access_manifest * 2
else
difficulty += 2
if(prob(difficulty * 15) || (target.hidden_uplink))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else
U.show_message("<span class='notice'>Success!</span>", 1)
target.explode()
else
to_chat(U, "PDA not found.")
/obj/item/weapon/cartridge/virus/frame
name = "\improper F.R.A.M.E. cartridge"
icon_state = "cart"
var/telecrystals = 0
/obj/item/weapon/cartridge/virus/frame/send_virus(obj/item/device/pda/target, mob/living/U)
if(charges <= 0)
to_chat(U, "<span class='notice'>Out of charges.</span>")
return
if(!isnull(target) && !target.toff)
charges--
var/lock_code = "[rand(100,999)] [pick("Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu")]"
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
if(!target.hidden_uplink)
var/obj/item/device/uplink/uplink = new(target)
target.hidden_uplink = uplink
target.lock_code = lock_code
else
target.hidden_uplink.hidden_crystals += target.hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
target.hidden_uplink.telecrystals = telecrystals
telecrystals = 0
target.hidden_uplink.active = TRUE
else
to_chat(U, "PDA not found.")
@@ -36,6 +36,11 @@
A.UpdateButtonIcon()
return 1
/obj/item/device/flashlight/suicide_act(mob/living/carbon/human/user)
user.visible_message("<span class='suicide'>[user] is putting [src] close to [user.p_their()] eyes and turning it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
/obj/item/device/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user)
add_fingerprint(user)
@@ -52,6 +57,10 @@
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
return
if(flashlight_power < 1)
to_chat(user, "<span class='warning'>\The [src] isn't bright enough to see anything!</span> ")
return
switch(user.zone_selected)
if("eyes")
if((M.head && M.head.flags_cover & HEADCOVERSEYES) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) || (M.glasses && M.glasses.flags_cover & GLASSESCOVERSEYES))
@@ -578,6 +578,10 @@
. = ..()
host = loc
/obj/item/borg/projectile_dampen/on_mob_death()
deactivate_field()
. = ..()
/obj/item/borg/projectile_dampen/process()
process_recharge()
process_usage()
+3 -1
View File
@@ -269,13 +269,15 @@
return
if(!in_range(src, user))
return
if(is_cyborg)
return
else
if(zero_amount())
return
//get amount from user
var/min = 0
var/max = src.get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max]") as num)
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as num)
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= src.get_amount())
return
else
+12 -5
View File
@@ -20,11 +20,18 @@
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
if(!proximity)
return
if(istype(I, /obj/item))
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.telecrystals += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
if(istype(I, /obj/item) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.telecrystals += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
else if(istype(I, /obj/item/weapon/cartridge/virus/frame))
var/obj/item/weapon/cartridge/virus/frame/cart = I
if(!cart.charges)
to_chat(user, "<span class='notice'>The [cart] is out of charges, it's refusing to accept the [src]</span>")
return
cart.telecrystals += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into the [cart]. The next time it's used, it will also give telecrystals</span>")
/obj/item/stack/telecrystal/five
amount = 5
@@ -112,6 +112,9 @@
icon_state = "tile-carpet-black"
turf_type = /turf/open/floor/carpet/black
/obj/item/stack/tile/carpet/black/fifty
amount = 50
/obj/item/stack/tile/fakespace
name = "astral carpet"
+6 -1
View File
@@ -125,8 +125,8 @@ obj/item/weapon/construction
var/canRturf = 0
var/ranged = FALSE
var/airlock_type = /obj/machinery/door/airlock
var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use
var/window_type = /obj/structure/window/fulltile
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
@@ -266,8 +266,10 @@ obj/item/weapon/construction
airlock_type = /obj/machinery/door/airlock/external
if("High Security")
airlock_type = /obj/machinery/door/airlock/highsecurity
airlock_glass = FALSE
else
airlock_type = /obj/machinery/door/airlock
airlock_glass = FALSE
if("Glass")
if(advanced_airlock_setting == 1)
@@ -289,10 +291,13 @@ obj/item/weapon/construction
airlock_type = /obj/machinery/door/airlock/glass_research
if("Mining")
airlock_type = /obj/machinery/door/airlock/glass_mining
airlock_glass = TRUE
else
airlock_type = /obj/machinery/door/airlock/glass
airlock_glass = TRUE
else
airlock_type = /obj/machinery/door/airlock
airlock_glass = FALSE
/obj/item/weapon/construction/rcd/proc/rcd_create(atom/A, mob/user)
@@ -1,6 +1,6 @@
#define STATION_RENAME_TIME_LIMIT 3000
/obj/item/station_charter
/obj/item/weapon/station_charter
name = "station charter"
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll2"
@@ -16,7 +16,7 @@
var/static/regex/standard_station_regex
/obj/item/station_charter/New()
/obj/item/weapon/station_charter/New()
. = ..()
if(!standard_station_regex)
var/prefixes = jointext(GLOB.station_prefixes, "|")
@@ -26,13 +26,13 @@
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
standard_station_regex = new(regexstr)
/obj/item/station_charter/Destroy()
/obj/item/weapon/station_charter/Destroy()
if(response_timer_id)
deltimer(response_timer_id)
response_timer_id = null
. = ..()
/obj/item/station_charter/attack_self(mob/living/user)
/obj/item/weapon/station_charter/attack_self(mob/living/user)
if(used)
to_chat(user, "The [name_type] has already been named.")
return
@@ -63,7 +63,7 @@
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;reject_custom_name=\ref[src]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
/obj/item/station_charter/proc/reject_proposed(user)
/obj/item/weapon/station_charter/proc/reject_proposed(user)
if(!user)
return
if(!response_timer_id)
@@ -79,7 +79,7 @@
deltimer(response_timer_id)
response_timer_id = null
/obj/item/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
/obj/item/weapon/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
set_station_name(designation)
minor_announce("[ureal_name] has designated your station as [station_name()]", "Captain's Charter", 0)
log_game("[ukey] has renamed the station as [station_name()].")
@@ -91,7 +91,7 @@
if(!unlimited_uses)
used = TRUE
/obj/item/station_charter/admin
/obj/item/weapon/station_charter/admin
unlimited_uses = TRUE
ignores_timeout = TRUE
@@ -99,14 +99,14 @@
/obj/item/weapon/station_charter/flag
name = "nanotrasen banner"
icon = 'icons/obj/items.dmi'
var/name_type = "planet"
name_type = "planet"
icon_state = "banner"
item_state = "banner"
desc = "A cunning device used to claim ownership of planets."
w_class = 5
force = 15
/obj/item/station_charter/flag/rename_station(designation, uname, ureal_name, ukey)
/obj/item/weapon/station_charter/flag/rename_station(designation, uname, ureal_name, ukey)
set_station_name(designation)
minor_announce("[ureal_name] has designated the planet as [station_name()]", "Captain's Banner", 0)
log_game("[ukey] has renamed the planet as [station_name()].")
@@ -116,6 +116,4 @@
if(!unlimited_uses)
used = TRUE
#undef STATION_RENAME_TIME_LIMIT
@@ -484,7 +484,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "[initial(icon_state)]"
/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>"
if(is_hot())
. = "<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/proc/set_lit(new_lit)
lit = new_lit
@@ -581,7 +582,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
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>"
if(is_hot())
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
///////////
+25 -23
View File
@@ -19,7 +19,7 @@
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/weapon/twohanded/shockpaddles/paddles
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/obj/item/weapon/stock_parts/cell/high/cell
var/combat = 0 //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
@@ -29,10 +29,13 @@
update_icon()
return
/obj/item/weapon/defibrillator/get_cell()
return cell
/obj/item/weapon/defibrillator/loaded/Initialize() //starts with hicap
. = ..()
paddles = make_paddles()
bcell = new(src)
cell = new(src)
update_icon()
return
@@ -42,8 +45,8 @@
update_charge()
/obj/item/weapon/defibrillator/proc/update_power()
if(bcell)
if(bcell.charge < paddles.revivecost)
if(cell)
if(cell.charge < paddles.revivecost)
powered = 0
else
powered = 1
@@ -56,21 +59,21 @@
add_overlay("[initial(icon_state)]-paddles")
if(powered)
add_overlay("[initial(icon_state)]-powered")
if(!bcell)
if(!cell)
add_overlay("[initial(icon_state)]-nocell")
if(!safety)
add_overlay("[initial(icon_state)]-emagged")
/obj/item/weapon/defibrillator/proc/update_charge()
if(powered) //so it doesn't show charge if it's unpowered
if(bcell)
var/ratio = bcell.charge / bcell.maxcharge
if(cell)
var/ratio = cell.charge / cell.maxcharge
ratio = Ceiling(ratio*4) * 25
add_overlay("[initial(icon_state)]-charge[ratio]")
/obj/item/weapon/defibrillator/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
cell = locate(/obj/item/weapon/stock_parts/cell) in contents
update_icon()
/obj/item/weapon/defibrillator/ui_action_click()
@@ -105,7 +108,7 @@
toggle_paddles()
else if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
if(cell)
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else
if(C.maxcharge < paddles.revivecost)
@@ -113,15 +116,15 @@
return
if(!user.transferItemToLoc(W, src))
return
bcell = W
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
if(cell)
cell.update_icon()
cell.loc = get_turf(src.loc)
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
update_icon()
else
@@ -136,7 +139,7 @@
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.")
/obj/item/weapon/defibrillator/emp_act(severity)
if(bcell)
if(cell)
deductcharge(1000 / severity)
if(safety)
safety = 0
@@ -200,11 +203,11 @@
update_icon()
/obj/item/weapon/defibrillator/proc/deductcharge(chrgdeductamt)
if(bcell)
if(bcell.charge < (paddles.revivecost+chrgdeductamt))
if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = 0
update_icon()
if(bcell.use(chrgdeductamt))
if(cell.use(chrgdeductamt))
update_icon()
return 1
else
@@ -213,8 +216,8 @@
/obj/item/weapon/defibrillator/proc/cooldowncheck(mob/user)
spawn(50)
if(bcell)
if(bcell.charge >= paddles.revivecost)
if(cell)
if(cell.charge >= paddles.revivecost)
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 50, 0)
else
@@ -240,7 +243,7 @@
/obj/item/weapon/defibrillator/compact/loaded/Initialize()
. = ..()
paddles = make_paddles()
bcell = new(src)
cell = new(src)
update_icon()
/obj/item/weapon/defibrillator/compact/combat
@@ -252,7 +255,7 @@
/obj/item/weapon/defibrillator/compact/combat/loaded/Initialize()
. = ..()
paddles = make_paddles()
bcell = new /obj/item/weapon/stock_parts/cell/infinite(src)
cell = new /obj/item/weapon/stock_parts/cell/infinite(src)
update_icon()
/obj/item/weapon/defibrillator/compact/combat/loaded/attackby(obj/item/weapon/W, mob/user, params)
@@ -273,7 +276,6 @@
force = 0
throwforce = 6
w_class = WEIGHT_CLASS_BULKY
flags = NODROP
var/revivecost = 1000
var/cooldown = 0
+3 -3
View File
@@ -23,7 +23,7 @@
//variables for prebuilt flamethrowers
var/create_full = FALSE
var/create_with_tank = FALSE
var/igniter_type = /obj/item/device/assembly/igniter
var/igniter_type = /obj/item/device/assembly/igniter
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
@@ -145,7 +145,7 @@
if(!status)
to_chat(user, "<span class='notice'>Secure the igniter first!</span>")
return
to_chat(user, "<span class='notice'>You ignite [src]!</span>")
to_chat(user, "<span class='notice'>You [lit ? "extinguish" : "ignite"] [src]!</span>")
lit = !lit
if(lit)
START_PROCESSING(SSobj, src)
@@ -238,4 +238,4 @@
return
/obj/item/device/assembly/igniter/proc/ignite_turf(obj/item/weapon/flamethrower/F,turf/open/location,release_amount = 0.05)
F.default_ignite(location,release_amount)
F.default_ignite(location,release_amount)
@@ -15,10 +15,10 @@
det_time = 50
display_timer = 0
var/range = 3
var/times = list()
var/list/times
/obj/item/weapon/grenade/iedcasing/New(loc)
..()
/obj/item/weapon/grenade/iedcasing/Initialize()
. = ..()
add_overlay("improvised_grenade_filled")
add_overlay("improvised_grenade_wired")
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
@@ -33,6 +33,8 @@
..()
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
if(can)
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
can.pixel_y = 0
var/mutable_appearance/can_underlay = new(can)
can_underlay.layer = FLOAT_LAYER
can_underlay.plane = FLOAT_PLANE
@@ -43,7 +45,7 @@
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You light the [name]!</span>")
active = 1
active = TRUE
cut_overlay("improvised_grenade_filled")
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
@@ -33,3 +33,9 @@
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
circuitry. As a result neurotoxins can cause massive damage."}
return dat
/obj/item/weapon/implantcase/track
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
imp_type = /obj/item/weapon/implant/tracking
+184
View File
@@ -0,0 +1,184 @@
/obj/item/weapon/inducer
name = "inducer"
desc = "A tool for inductively charging internal power cells."
icon = 'icons/obj/tools.dmi'
icon_state = "inducer-engi"
item_state = "inducer-engi"
origin_tech = "engineering=4;magnets=4;powerstorage=4"
force = 7
var/powertransfer = 1000
var/opened = FALSE
var/cell_type = /obj/item/weapon/stock_parts/cell/high
var/obj/item/weapon/stock_parts/cell/cell
var/recharging = FALSE
/obj/item/weapon/inducer/Initialize()
. = ..()
if(!cell && cell_type)
cell = new cell_type
/obj/item/weapon/inducer/proc/induce(obj/item/weapon/stock_parts/cell/target, coefficient)
var/totransfer = min(cell.charge,(powertransfer * coefficient))
var/transferred = target.give(totransfer)
cell.use(transferred)
cell.update_icon()
target.update_icon()
/obj/item/weapon/inducer/get_cell()
return cell
/obj/item/weapon/inducer/emp_act(severity)
..()
if(cell)
cell.emp_act()
/obj/item/weapon/inducer/attack_obj(obj/O, mob/living/carbon/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(cantbeused(user))
return
if(recharge(O, user))
return
return ..()
/obj/item/weapon/inducer/proc/cantbeused(mob/user)
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to use \the [src]!</span>")
return TRUE
if(!cell)
to_chat(user, "<span class='warning'>\The [src] doesn't have a power cell installed!</span>")
return TRUE
if(!cell.charge)
to_chat(user, "<span class='warning'>\The [src]'s battery is dead!</span>")
return TRUE
return FALSE
/obj/item/weapon/inducer/attackby(obj/item/weapon/W, mob/user)
if(istype(W,/obj/item/weapon/screwdriver))
playsound(src, W.usesound, 50, 1)
if(!opened)
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
opened = TRUE
update_icon()
return
else
to_chat(user, "<span class='notice'>You close the battery compartment.</span>")
opened = FALSE
update_icon()
return
if(istype(W,/obj/item/weapon/stock_parts/cell))
if(opened)
if(!cell)
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
cell = W
update_icon()
return
else
to_chat(user, "<span class='notice'>\The [src] already has \a [cell] installed!</span>")
return
if(cantbeused(user))
return
if(recharge(W, user))
return
return ..()
/obj/item/weapon/inducer/proc/recharge(atom/movable/A, mob/user)
if(recharging)
return TRUE
else
recharging = TRUE
var/obj/item/weapon/stock_parts/cell/C = A.get_cell()
var/obj/item/weapon/gun/energy/E
var/obj/O
var/coefficient = 1
if(istype(A, /obj/item/weapon/gun/energy))
coefficient = 0.075 // 14 loops to recharge an egun from 0-1000
E = A
if(istype(A, /obj))
O = A
if(C)
if(C.charge >= C.maxcharge)
to_chat(user, "<span class='notice'>\The [A] is fully charged!</span>")
recharging = FALSE
return TRUE
user.visible_message("[user] starts recharging \the [A] with \the [src]","<span class='notice'>You start recharging [A] with \the [src]</span>")
while(C.charge < C.maxcharge)
if(E)
E.chambered = null // Prevents someone from firing continuously while recharging the gun.
if(do_after(user, 10, target = user) && cell.charge)
induce(C, coefficient)
do_sparks(1, FALSE, A)
if(O)
O.update_icon()
else
break
if(E)
E.recharge_newshot() //We're done charging, so we'll let someone fire it now.
user.visible_message("[user] recharged \the [A]!","<span class='notice'>You recharged \the [A]!</span>")
recharging = FALSE
return TRUE
recharging = FALSE
/obj/item/weapon/inducer/attack(mob/M, mob/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(cantbeused(user))
return
if(recharge(M, user))
return
return ..()
/obj/item/weapon/inducer/attack_self(mob/user)
if(opened && cell)
user.visible_message("[user] removes \the [cell] from \the [src]!","<span class='notice'>You remove \the [cell].</span>")
cell.update_icon()
user.put_in_hands(cell)
cell = null
update_icon()
/obj/item/weapon/inducer/examine(mob/living/M)
..()
if(cell)
to_chat(M, "<span class='notice'>It's display shows: [cell.charge]W</span>")
else
to_chat(M,"<span class='notice'>It's display is dark.</span>")
if(opened)
to_chat(M,"<span class='notice'>It's battery compartment is open.</span>")
/obj/item/weapon/inducer/update_icon()
cut_overlays()
if(opened)
if(!cell)
add_overlay("inducer-nobat")
else
add_overlay("inducer-bat")
/obj/item/weapon/inducer/sci
icon_state = "inducer-sci"
item_state = "inducer-sci"
desc = "A tool for inductively charging internal power cells. This one has a science color scheme, and is less potent than it's engineering counterpart."
cell_type = null
powertransfer = 500
opened = TRUE
/obj/item/weapon/inducer/sci/Initialize()
. = ..()
update_icon()
@@ -317,42 +317,42 @@
revealed = 1
/obj/item/weapon/storage/backpack/dufflebag
name = "dufflebag"
desc = "A large dufflebag for holding extra things."
name = "dufflebag"
desc = "A large dufflebag for holding extra things."
icon_state = "duffle"
item_state = "duffle"
slowdown = 1
max_combined_w_class = 30
/obj/item/weapon/storage/backpack/dufflebag/captain
name = "captain's dufflebag"
desc = "A large dufflebag for holding extra captainly goods."
name = "captain's dufflebag"
desc = "A large dufflebag for holding extra captainly goods."
icon_state = "duffle-captain"
item_state = "duffle-captain"
resistance_flags = 0
/obj/item/weapon/storage/backpack/dufflebag/med
name = "medical dufflebag"
desc = "A large dufflebag for holding extra medical supplies."
name = "medical dufflebag"
desc = "A large dufflebag for holding extra medical supplies."
icon_state = "duffle-med"
item_state = "duffle-med"
/obj/item/weapon/storage/backpack/dufflebag/sec
name = "security dufflebag"
desc = "A large dufflebag for holding extra security supplies and ammunition."
name = "security dufflebag"
desc = "A large dufflebag for holding extra security supplies and ammunition."
icon_state = "duffle-sec"
item_state = "duffle-sec"
/obj/item/weapon/storage/backpack/dufflebag/engineering
name = "industrial dufflebag"
desc = "A large dufflebag for holding extra tools and supplies."
name = "industrial dufflebag"
desc = "A large dufflebag for holding extra tools and supplies."
icon_state = "duffle-eng"
item_state = "duffle-eng"
resistance_flags = 0
/obj/item/weapon/storage/backpack/dufflebag/drone
name = "drone dufflebag"
desc = "A large dufflebag for holding tools and hats."
name = "drone dufflebag"
desc = "A large dufflebag for holding tools and hats."
icon_state = "duffle-drone"
item_state = "duffle-drone"
resistance_flags = FIRE_PROOF
@@ -367,8 +367,8 @@
new /obj/item/device/multitool(src)
/obj/item/weapon/storage/backpack/dufflebag/clown
name = "clown's dufflebag"
desc = "A large dufflebag for holding lots of funny gags!"
name = "clown's dufflebag"
desc = "A large dufflebag for holding lots of funny gags!"
icon_state = "duffle-clown"
item_state = "duffle-clown"
@@ -377,8 +377,8 @@
new /obj/item/weapon/reagent_containers/food/snacks/pie/cream(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie
name = "suspicious looking dufflebag"
desc = "A large dufflebag for holding extra tactical supplies."
name = "suspicious looking dufflebag"
desc = "A large dufflebag for holding extra tactical supplies."
icon_state = "duffle-syndie"
item_state = "duffle-syndie"
origin_tech = "syndicate=1"
@@ -386,14 +386,14 @@
slowdown = 0
/obj/item/weapon/storage/backpack/dufflebag/syndie/med
name = "medical dufflebag"
desc = "A large dufflebag for holding extra tactical medical supplies."
name = "medical dufflebag"
desc = "A large dufflebag for holding extra tactical medical supplies."
icon_state = "duffle-syndiemed"
item_state = "duffle-syndiemed"
/obj/item/weapon/storage/backpack/dufflebag/syndie/surgery
name = "surgery dufflebag"
desc = "A suspicious looking dufflebag for holding surgery tools."
name = "surgery dufflebag"
desc = "A suspicious looking dufflebag for holding surgery tools."
icon_state = "duffle-syndiemed"
item_state = "duffle-syndiemed"
@@ -410,13 +410,13 @@
new /obj/item/device/mmi/syndie(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo
name = "ammunition dufflebag"
desc = "A large dufflebag for holding extra weapons ammunition and supplies."
name = "ammunition dufflebag"
desc = "A large dufflebag for holding extra weapons ammunition and supplies."
icon_state = "duffle-syndieammo"
item_state = "duffle-syndieammo"
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/shotgun
desc = "A large dufflebag, packed to the brim with Bulldog shotgun ammo."
desc = "A large dufflebag, packed to the brim with Bulldog shotgun ammo."
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/shotgun/PopulateContents()
for(var/i in 1 to 6)
@@ -426,14 +426,14 @@
new /obj/item/ammo_box/magazine/m12g/dragon(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/smg
desc = "A large dufflebag, packed to the brim with C20r magazines."
desc = "A large dufflebag, packed to the brim with C20r magazines."
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/smg/PopulateContents()
for(var/i in 1 to 9)
new /obj/item/ammo_box/magazine/smgm45(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/c20rbundle
desc = "A large dufflebag containing a C20r, some magazines, and a cheap looking suppressor."
desc = "A large dufflebag containing a C20r, some magazines, and a cheap looking suppressor."
/obj/item/weapon/storage/backpack/dufflebag/syndie/c20rbundle/PopulateContents()
new /obj/item/ammo_box/magazine/smgm45(src)
@@ -442,7 +442,7 @@
new /obj/item/weapon/suppressor/specialoffer(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/bulldogbundle
desc = "A large dufflebag containing a Bulldog, several drums, and a collapsed hardsuit."
desc = "A large dufflebag containing a Bulldog, several drums, and a collapsed hardsuit."
/obj/item/weapon/storage/backpack/dufflebag/syndie/bulldogbundle/PopulateContents()
new /obj/item/ammo_box/magazine/m12g(src)
@@ -451,7 +451,7 @@
new /obj/item/clothing/glasses/thermal/syndi(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle/PopulateContents()
new /obj/item/clothing/shoes/magboots/syndie(src)
@@ -460,7 +460,7 @@
new /obj/item/ammo_box/foambox/riot(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle/PopulateContents()
new /obj/item/clothing/shoes/magboots/syndie(src)
@@ -469,7 +469,7 @@
new /obj/item/ammo_box/foambox/riot(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/bioterrorbundle
desc = "A large dufflebag containing a deadly chemicals, a chemical spray, chemical grenade, a Donksoft assault rifle, riot grade darts, a minature syringe gun, and a box of syringes"
desc = "A large dufflebag containing a deadly chemicals, a chemical spray, chemical grenade, a Donksoft assault rifle, riot grade darts, a minature syringe gun, and a box of syringes"
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/bioterrorbundle/PopulateContents()
new /obj/item/weapon/reagent_containers/spray/chemsprayer/bioterror(src)
@@ -489,7 +489,7 @@
new /obj/item/weapon/grenade/plastic/x4(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/firestarter
desc = "A large dufflebag containing New Russian pyro backpack sprayer, a pistol, a pipebomb, fireproof hardsuit, ammo, and other equipment."
desc = "A large dufflebag containing New Russian pyro backpack sprayer, a pistol, a pipebomb, fireproof hardsuit, ammo, and other equipment."
/obj/item/weapon/storage/backpack/dufflebag/syndie/firestarter/PopulateContents()
new /obj/item/clothing/under/syndicate/soviet(src)
@@ -568,7 +568,7 @@
/obj/item/weapon/storage/box/deputy/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/clothing/tie/armband/deputy(src)
new /obj/item/clothing/accessory/armband/deputy(src)
/obj/item/weapon/storage/box/metalfoam
name = "box of metal foam grenades"
+157 -116
View File
@@ -1,116 +1,157 @@
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(GLOB.access_armory)
var/locked = 1
var/broken = 0
var/icon_locked = "lockbox+l"
var/icon_closed = "lockbox"
var/icon_broken = "lockbox+b"
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID())
if(broken)
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
return
if(allowed(user))
locked = !locked
if(locked)
icon_state = icon_locked
to_chat(user, "<span class='danger'>You lock the [src.name]!</span>")
close_all()
return
else
icon_state = icon_closed
to_chat(user, "<span class='danger'>You unlock the [src.name]!</span>")
return
else
to_chat(user, "<span class='danger'>Access Denied.</span>")
return
if(!locked)
return ..()
else
to_chat(user, "<span class='danger'>It's locked!</span>")
/obj/item/weapon/storage/lockbox/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
to_chat(usr, "<span class='warning'>It's locked!</span>")
return 0
..()
/obj/item/weapon/storage/lockbox/emag_act(mob/user)
if(!broken)
broken = 1
locked = 0
desc += "It appears to be broken."
icon_state = src.icon_broken
if(user)
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
return
/obj/item/weapon/storage/lockbox/show_to(mob/user)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
//Check the destination item type for contentto.
/obj/item/weapon/storage/lockbox/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
return 0
return ..()
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
return ..()
/obj/item/weapon/storage/lockbox/loyalty
name = "lockbox of mindshield implants"
req_access = list(GLOB.access_security)
/obj/item/weapon/storage/lockbox/loyalty/PopulateContents()
for(var/i in 1 to 3)
new /obj/item/weapon/implantcase/mindshield(src)
new /obj/item/weapon/implanter/mindshield(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox of clusterbangs"
desc = "You have a bad feeling about opening this."
req_access = list(GLOB.access_security)
/obj/item/weapon/storage/lockbox/clusterbang/PopulateContents()
new /obj/item/weapon/grenade/clusterbuster(src)
/obj/item/weapon/storage/lockbox/medal
name = "medal box"
desc = "A locked box used to store medals of honor."
icon_state = "medalbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
storage_slots = 10
req_access = list(GLOB.access_captain)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
/obj/item/weapon/storage/lockbox/medal/PopulateContents()
new /obj/item/clothing/tie/medal/silver/valor(src)
new /obj/item/clothing/tie/medal/bronze_heart(src)
for(var/i in 1 to 3)
new /obj/item/clothing/tie/medal/conduct(src)
new /obj/item/clothing/tie/medal/gold/captain(src)
new /obj/item/clothing/tie/medal/silver/security(src)
new /obj/item/clothing/tie/medal/nobel_science(src)
new /obj/item/clothing/tie/medal/gold/heroism(src)
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(GLOB.access_armory)
var/locked = 1
var/broken = 0
var/icon_locked = "lockbox+l"
var/icon_closed = "lockbox"
var/icon_broken = "lockbox+b"
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID())
if(broken)
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
return
if(allowed(user))
locked = !locked
if(locked)
icon_state = icon_locked
to_chat(user, "<span class='danger'>You lock the [src.name]!</span>")
close_all()
return
else
icon_state = icon_closed
to_chat(user, "<span class='danger'>You unlock the [src.name]!</span>")
return
else
to_chat(user, "<span class='danger'>Access Denied.</span>")
return
if(!locked)
return ..()
else
to_chat(user, "<span class='danger'>It's locked!</span>")
/obj/item/weapon/storage/lockbox/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
to_chat(usr, "<span class='warning'>It's locked!</span>")
return 0
..()
/obj/item/weapon/storage/lockbox/emag_act(mob/user)
if(!broken)
broken = 1
locked = 0
desc += "It appears to be broken."
icon_state = src.icon_broken
if(user)
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
return
/obj/item/weapon/storage/lockbox/show_to(mob/user)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
//Check the destination item type for contentto.
/obj/item/weapon/storage/lockbox/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
return 0
return ..()
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
return ..()
/obj/item/weapon/storage/lockbox/loyalty
name = "lockbox of mindshield implants"
req_access = list(GLOB.access_security)
/obj/item/weapon/storage/lockbox/loyalty/PopulateContents()
for(var/i in 1 to 3)
new /obj/item/weapon/implantcase/mindshield(src)
new /obj/item/weapon/implanter/mindshield(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox of clusterbangs"
desc = "You have a bad feeling about opening this."
req_access = list(GLOB.access_security)
/obj/item/weapon/storage/lockbox/clusterbang/PopulateContents()
new /obj/item/weapon/grenade/clusterbuster(src)
/obj/item/weapon/storage/lockbox/medal
name = "medal box"
desc = "A locked box used to store medals of honor."
icon_state = "medalbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
storage_slots = 10
max_combined_w_class = 20
req_access = list(GLOB.access_captain)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
can_hold = list(/obj/item/clothing/accessory/medal)
/obj/item/weapon/storage/lockbox/medal/PopulateContents()
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/bronze_heart(src)
for(var/i in 1 to 3)
new /obj/item/clothing/accessory/medal/conduct(src)
new /obj/item/clothing/accessory/medal/gold/captain(src)
new /obj/item/clothing/accessory/medal/silver/security(src)
new /obj/item/clothing/accessory/medal/plasma(src)
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
new /obj/item/clothing/accessory/medal/gold/heroism(src)
/obj/item/weapon/storage/lockbox/secmedal
name = "security medal box"
desc = "A locked box used to store medals to be given to members of the security department."
icon_state = "medalbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
storage_slots = 10
max_combined_w_class = 20
req_access = list(GLOB.access_hos)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
can_hold = list(/obj/item/clothing/accessory/medal)
/obj/item/weapon/storage/lockbox/secmedal/PopulateContents()
for(var/i in 1 to 3)
new /obj/item/clothing/accessory/medal/silver/security(src)
/obj/item/weapon/storage/lockbox/scimedal
name = "science medal box"
desc = "A locked box used to store medals to be given to members of the science department."
icon_state = "medalbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
storage_slots = 10
max_combined_w_class = 20
req_access = list(GLOB.access_rd)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
can_hold = list(/obj/item/clothing/accessory/medal)
/obj/item/weapon/storage/lockbox/scimedal/PopulateContents()
for(var/i in 1 to 3)
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
@@ -21,15 +21,15 @@
if(has_latches)
if(prob(10))
latches = "double_latch"
if(prob(1))
latches = "triple_latch"
if(prob(1))
latches = "triple_latch"
update_icon()
/obj/item/weapon/storage/toolbox/update_icon()
..()
cut_overlays()
if(has_latches)
add_overlay(latches)
add_overlay(latches)
/obj/item/weapon/storage/toolbox/suicide_act(mob/user)
@@ -140,10 +140,10 @@
max_combined_w_class = 28
storage_slots = 28
attack_verb = list("robusted", "crushed", "smashed")
var/proselytizer_type = /obj/item/clockwork/clockwork_proselytizer/scarab
var/fabricator_type = /obj/item/clockwork/replica_fabricator/scarab
/obj/item/weapon/storage/toolbox/brass/prefilled/PopulateContents()
new proselytizer_type(src)
new fabricator_type(src)
new /obj/item/weapon/screwdriver/brass(src)
new /obj/item/weapon/wirecutters/brass(src)
new /obj/item/weapon/wrench/brass(src)
@@ -151,7 +151,7 @@
new /obj/item/weapon/weldingtool/experimental/brass(src)
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar
var/slab_type = /obj/item/clockwork/slab/scarab
var/slab_type = /obj/item/clockwork/slab
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar/PopulateContents()
..()
@@ -159,7 +159,7 @@
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar/admin
slab_type = /obj/item/clockwork/slab/debug
proselytizer_type = /obj/item/clockwork/clockwork_proselytizer/scarab/debug
fabricator_type = /obj/item/clockwork/replica_fabricator/scarab/debug
/obj/item/weapon/storage/toolbox/artistic
@@ -87,7 +87,7 @@
new /obj/item/device/doorCharge(src)
new /obj/item/device/camera_bug(src)
new /obj/item/device/sbeacondrop/powersink(src)
new /obj/item/weapon/cartridge/syndicate(src)
new /obj/item/weapon/cartridge/virus/syndicate(src)
new /obj/item/weapon/storage/toolbox/syndicate(src) //To actually get to those places
new /obj/item/pizzabox/bomb
+23 -23
View File
@@ -13,7 +13,7 @@
var/stunforce = 7
var/status = 0
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/obj/item/weapon/stock_parts/cell/high/cell = null
var/hitcost = 1000
var/throw_hit_chance = 35
@@ -21,8 +21,8 @@
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
/obj/item/weapon/melee/baton/Initialize()
. = ..()
/obj/item/weapon/melee/baton/Initialize()
. = ..()
update_icon()
/obj/item/weapon/melee/baton/throw_impact(atom/hit_atom)
@@ -31,16 +31,16 @@
if(status && prob(throw_hit_chance) && iscarbon(hit_atom))
baton_stun(hit_atom)
/obj/item/weapon/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed.
bcell = new(src)
. = ..()
/obj/item/weapon/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed.
cell = new(src)
. = ..()
/obj/item/weapon/melee/baton/proc/deductcharge(chrgdeductamt)
if(bcell)
if(cell)
//Note this value returned is significant, as it will determine
//if a stun is applied or not
. = bcell.use(chrgdeductamt)
if(status && bcell.charge < hitcost)
. = cell.use(chrgdeductamt)
if(status && cell.charge < hitcost)
//we're below minimum, turn off
status = 0
update_icon()
@@ -50,22 +50,22 @@
/obj/item/weapon/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
else if(!bcell)
else if(!cell)
icon_state = "[initial(name)]_nocell"
else
icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine(mob/user)
..()
if(bcell)
to_chat(user, "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>")
if(cell)
to_chat(user, "<span class='notice'>The baton is [round(cell.percent())]% charged.</span>")
else
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
if(cell)
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else
if(C.maxcharge < hitcost)
@@ -73,15 +73,15 @@
return
if(!user.transferItemToLoc(W, src))
return
bcell = W
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
status = 0
update_icon()
@@ -89,13 +89,13 @@
return ..()
/obj/item/weapon/melee/baton/attack_self(mob/user)
if(bcell && bcell.charge > hitcost)
if(cell && cell.charge > hitcost)
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "on" : "off"].</span>")
playsound(loc, "sparks", 75, 1, -1)
else
status = 0
if(!bcell)
if(!cell)
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
else
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
@@ -186,8 +186,8 @@
slot_flags = SLOT_BACK
var/obj/item/device/assembly/igniter/sparkler = 0
/obj/item/weapon/melee/baton/cattleprod/Initialize()
. = ..()
/obj/item/weapon/melee/baton/cattleprod/Initialize()
. = ..()
sparkler = new (src)
/obj/item/weapon/melee/baton/cattleprod/baton_stun()
+1 -1
View File
@@ -28,7 +28,7 @@
/obj/item/weapon/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
if(istype(I, /obj/item/weapon/ore/bluespace_crystal))
if(!bcell)
if(!cell)
var/obj/item/weapon/melee/baton/cattleprod/teleprod/S = new /obj/item/weapon/melee/baton/cattleprod/teleprod
remove_item_from_storage(user)
qdel(src)
+10 -8
View File
@@ -58,14 +58,15 @@
origin_tech = "materials=5;engineering=5;abductor=3"
/obj/item/weapon/wrench/power
name = "Hand Drill"
desc ="A simple powered drill with a bolt bit"
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
w_class = WEIGHT_CLASS_SMALL
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
@@ -181,13 +182,14 @@
toolspeed = 0.1
/obj/item/weapon/screwdriver/power
name = "Hand Drill"
desc = "A simple hand drill with a screwdriver bit attached."
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a screw bit."
icon_state = "drill_screw"
item_state = "drill"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
w_class = WEIGHT_CLASS_SMALL
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
@@ -281,8 +283,8 @@
toolspeed = 0.5
/obj/item/weapon/wirecutters/power
name = "Jaws of Life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = "materials=2;engineering=2"
@@ -712,8 +714,8 @@
toolspeed = 0.5
/obj/item/weapon/crowbar/power
name = "Jaws of Life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head"
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)