Merge branch 'master' into upstream-merge-30079
This commit is contained in:
@@ -19,11 +19,13 @@
|
||||
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
|
||||
var/current_color_index = 1
|
||||
var/ghetto = FALSE
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
|
||||
if(!loaded)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
|
||||
|
||||
@@ -123,7 +123,6 @@ RSF
|
||||
var/toxin = 0
|
||||
var/cooldown = 0
|
||||
var/cooldowndelay = 10
|
||||
var/emagged = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/cookiesynth/examine(mob/user)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,6 @@
|
||||
build_path = /obj/machinery/computer/cargo
|
||||
origin_tech = "programming=3"
|
||||
var/contraband = FALSE
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
||||
var/scanning = 0
|
||||
var/radiation_count = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/geiger_counter/New()
|
||||
..()
|
||||
|
||||
@@ -1,269 +1,268 @@
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/emagged = FALSE
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
if(istype(I, /obj/item/light))
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
if(emagged)
|
||||
return
|
||||
Emag()
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
siemens_coefficient = 1
|
||||
var/spamcheck = 0
|
||||
var/emagged = FALSE
|
||||
var/list/voicespan = list(SPAN_COMMAND)
|
||||
|
||||
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||
|
||||
@@ -75,14 +75,16 @@ effective or pretty fucking useless.
|
||||
var/intensity = 10 // how much damage the radiation does
|
||||
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
|
||||
var/used = 0 // is it cooling down?
|
||||
var/stealth = FALSE
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
if(!irradiate)
|
||||
return
|
||||
if(!used)
|
||||
add_logs(user, M, "irradiated", src)
|
||||
var/cooldown = round(max(10, (intensity*5 - wavelength/4))) * 10
|
||||
var/cooldown = GetCooldown()
|
||||
used = 1
|
||||
icon_state = "health1"
|
||||
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
|
||||
@@ -103,11 +105,15 @@ effective or pretty fucking useless.
|
||||
/obj/item/device/healthanalyzer/rad_laser/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/proc/GetCooldown()
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
var/cooldown = round(max(10, (intensity*5 - wavelength/4)))
|
||||
var/cooldown = GetCooldown()
|
||||
var/dat = "Irradiation: <A href='?src=\ref[src];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=\ref[src];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
dat += "Scan Mode: <a href='?src=\ref[src];mode=1'>"
|
||||
if(!scanmode)
|
||||
dat += "Scan Health"
|
||||
@@ -141,6 +147,9 @@ effective or pretty fucking useless.
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
else if(href_list["mode"])
|
||||
scanmode += 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,19 +47,8 @@
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = TRUE
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
preprime(user, null, FALSE)
|
||||
|
||||
/obj/item/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
|
||||
@@ -26,15 +26,9 @@
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
@@ -50,26 +44,27 @@
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
|
||||
var/area/A = get_area(T)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed \a [src] for detonation at [ADMIN_COORDJMP(T)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(user)] has primed \a [src] for detonation at [A.name] [COORD(T)].")
|
||||
|
||||
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
log_grenade(user, T)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
if(msg)
|
||||
to_chat(user, "<span class='warning'>You prime \the [src]! [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)
|
||||
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)
|
||||
|
||||
/obj/item/grenade/proc/prime()
|
||||
|
||||
@@ -110,4 +105,4 @@
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && 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 TRUE //It hit the grenade, not them
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
/obj/item/nullrod/claymore/darkblade
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
name = "dark blade"
|
||||
desc = "Spread the glory of the dark gods!"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -278,7 +278,6 @@
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm (rejected hunks)
|
||||
@@ -151,7 +151,7 @@
|
||||
/obj/item/borg/charger
|
||||
name = "power connector"
|
||||
icon_state = "charger_draw"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
var/mode = "draw"
|
||||
var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port))
|
||||
var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy))
|
||||
@@ -21,6 +21,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
@@ -421,4 +425,4 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
/obj/item/stack/sheet/paperframes/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/paperframes/fifty
|
||||
amount = 50
|
||||
amount = 50
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
diff a/code/game/objects/items/stacks/wrap.dm b/code/game/objects/items/stacks/wrap.dm (rejected hunks)
|
||||
@@ -9,7 +9,7 @@
|
||||
desc = "Wrap packages with this festive paper to make gifts."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "wrap_paper"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
@@ -30,7 +30,7 @@
|
||||
desc = "You can use this to wrap items in."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
- flags = NOBLUDGEON
|
||||
+ flags_1 = NOBLUDGEON_1
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
||||
diff a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm (rejected hunks)
|
||||
@@ -732,7 +732,6 @@
|
||||
/obj/item/storage/box/ingredients //This box is for the randomely chosen version the chef spawns with, it shouldn't actually exist.
|
||||
name = "ingredients box"
|
||||
illustration = "donk_kit"
|
||||
- icon_state = null
|
||||
|
||||
/obj/item/storage/box/ingredients/Initialize()
|
||||
..()
|
||||
@@ -1,273 +1,273 @@
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/rollingpaper)
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/dump_content_at(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of Nanotrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/rollingpaper)
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
@@ -1,182 +1,182 @@
|
||||
/obj/item/storage/lockbox
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
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(ACCESS_ARMORY)
|
||||
var/locked = TRUE
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/attackby(obj/item/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/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/storage/lockbox/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
|
||||
return
|
||||
|
||||
/obj/item/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/storage/lockbox/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
/obj/item/storage/lockbox/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/loyalty/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/implantcase/mindshield(src)
|
||||
new /obj/item/implanter/mindshield(src)
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang
|
||||
name = "lockbox of clusterbangs"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang/PopulateContents()
|
||||
new /obj/item/grenade/clusterbuster(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal
|
||||
name = "medal box"
|
||||
desc = "A locked box used to store medals of honor."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick()
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
/obj/item/storage/lockbox
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
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(ACCESS_ARMORY)
|
||||
var/locked = TRUE
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/attackby(obj/item/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/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/storage/lockbox/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
|
||||
return
|
||||
|
||||
/obj/item/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/storage/lockbox/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return null
|
||||
open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
/obj/item/storage/lockbox/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/loyalty/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/implantcase/mindshield(src)
|
||||
new /obj/item/implanter/mindshield(src)
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang
|
||||
name = "lockbox of clusterbangs"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/item/storage/lockbox/clusterbang/PopulateContents()
|
||||
new /obj/item/grenade/clusterbuster(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal
|
||||
name = "medal box"
|
||||
desc = "A locked box used to store medals of honor."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick()
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/item/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
@@ -1,197 +1,197 @@
|
||||
/*
|
||||
* Absorbs /obj/item/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = TRUE
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/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/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = FALSE
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = TRUE
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/storage/secure/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
cant_hold = list(/obj/item/storage/secure/briefcase)
|
||||
|
||||
/obj/item/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
/*
|
||||
* Absorbs /obj/item/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = TRUE
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/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/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = FALSE
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = TRUE
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/storage/secure/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return null
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
cant_hold = list(/obj/item/storage/secure/briefcase)
|
||||
|
||||
/obj/item/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
diff a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm (rejected hunks)
|
||||
@@ -244,8 +244,8 @@
|
||||
// Copied from /obj/item/melee/transforming/energy/sword/attackby
|
||||
/obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/toy/sword))
|
||||
- if((W.flags & NODROP) || (flags & NODROP))
|
||||
- to_chat(user, "<span class='warning'>\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!</span>")
|
||||
+ if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1))
|
||||
+ to_chat(user, "<span class='warning'>\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
|
||||
Reference in New Issue
Block a user