mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 02:12:14 +00:00
quadruple wew
This commit is contained in:
@@ -35,10 +35,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
pressure_resistance = 4
|
pressure_resistance = 4
|
||||||
var/obj/item/master = null
|
var/obj/item/master = null
|
||||||
|
|
||||||
var/heat_protection = 0 //flags_1 which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||||
var/cold_protection = 0 //flags_1 which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags_1
|
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags_1
|
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||||
|
|
||||||
var/list/actions //list of /datum/action's that this item has.
|
var/list/actions //list of /datum/action's that this item has.
|
||||||
var/list/actions_types //list of paths of action datums to give to the item on New().
|
var/list/actions_types //list of paths of action datums to give to the item on New().
|
||||||
@@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
|
|
||||||
var/item_color = null //this needs deprecating, soonish
|
var/item_color = null //this needs deprecating, soonish
|
||||||
|
|
||||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags_1
|
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||||
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||||
@@ -64,6 +64,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
var/list/materials
|
var/list/materials
|
||||||
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||||
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
|
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
|
||||||
|
var/emagged = FALSE
|
||||||
|
|
||||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||||
@@ -86,7 +87,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||||
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
||||||
|
|
||||||
var/flags_cover = 0 //for flags_1 such as GLASSESCOVERSEYES
|
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||||
var/heat = 0
|
var/heat = 0
|
||||||
var/sharpness = IS_BLUNT
|
var/sharpness = IS_BLUNT
|
||||||
var/toolspeed = 1
|
var/toolspeed = 1
|
||||||
@@ -128,6 +129,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
if(force_string)
|
if(force_string)
|
||||||
force_string_override = TRUE
|
force_string_override = TRUE
|
||||||
|
|
||||||
|
if(!hitsound)
|
||||||
|
if(damtype == "fire")
|
||||||
|
hitsound = 'sound/items/welder.ogg'
|
||||||
|
if(damtype == "brute")
|
||||||
|
hitsound = "swing_hit"
|
||||||
|
|
||||||
/obj/item/Destroy()
|
/obj/item/Destroy()
|
||||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ RSF
|
|||||||
var/toxin = 0
|
var/toxin = 0
|
||||||
var/cooldown = 0
|
var/cooldown = 0
|
||||||
var/cooldowndelay = 10
|
var/cooldowndelay = 10
|
||||||
var/emagged = FALSE
|
|
||||||
w_class = WEIGHT_CLASS_NORMAL
|
w_class = WEIGHT_CLASS_NORMAL
|
||||||
|
|
||||||
/obj/item/cookiesynth/examine(mob/user)
|
/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
|
build_path = /obj/machinery/computer/cargo
|
||||||
origin_tech = "programming=3"
|
origin_tech = "programming=3"
|
||||||
var/contraband = FALSE
|
var/contraband = FALSE
|
||||||
var/emagged = FALSE
|
|
||||||
|
|
||||||
/obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
/obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
||||||
if(istype(I, /obj/item/device/multitool))
|
if(istype(I, /obj/item/device/multitool))
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
||||||
var/scanning = 0
|
var/scanning = 0
|
||||||
var/radiation_count = 0
|
var/radiation_count = 0
|
||||||
var/emagged = FALSE
|
|
||||||
|
|
||||||
/obj/item/device/geiger_counter/New()
|
/obj/item/device/geiger_counter/New()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -1,269 +1,268 @@
|
|||||||
|
|
||||||
// Light Replacer (LR)
|
// Light Replacer (LR)
|
||||||
//
|
//
|
||||||
// ABOUT THE DEVICE
|
// ABOUT THE DEVICE
|
||||||
//
|
//
|
||||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
// 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
|
// 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.
|
// they don't have hands or a way to replace lightbulbs.
|
||||||
//
|
//
|
||||||
// HOW IT WORKS
|
// HOW IT WORKS
|
||||||
//
|
//
|
||||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
// 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
|
// 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.
|
// 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
|
// HOW TO REFILL THE DEVICE
|
||||||
//
|
//
|
||||||
// It will need to be manually refilled with lights.
|
// 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.
|
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||||
//
|
//
|
||||||
// EMAGGED FEATURES
|
// 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.
|
// 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.
|
// 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.
|
// 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
|
// 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.
|
// 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
|
// 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.
|
// access to them, and only one of them can emag their device.
|
||||||
//
|
//
|
||||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||||
|
|
||||||
#define LIGHT_OK 0
|
#define LIGHT_OK 0
|
||||||
#define LIGHT_EMPTY 1
|
#define LIGHT_EMPTY 1
|
||||||
#define LIGHT_BROKEN 2
|
#define LIGHT_BROKEN 2
|
||||||
#define LIGHT_BURNED 3
|
#define LIGHT_BURNED 3
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/lightreplacer
|
/obj/item/device/lightreplacer
|
||||||
|
|
||||||
name = "light replacer"
|
name = "light replacer"
|
||||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||||
|
|
||||||
icon = 'icons/obj/janitor.dmi'
|
icon = 'icons/obj/janitor.dmi'
|
||||||
icon_state = "lightreplacer0"
|
icon_state = "lightreplacer0"
|
||||||
item_state = "electronic"
|
item_state = "electronic"
|
||||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||||
|
|
||||||
flags_1 = CONDUCT_1
|
flags_1 = CONDUCT_1
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
origin_tech = "magnets=3;engineering=4"
|
origin_tech = "magnets=3;engineering=4"
|
||||||
|
|
||||||
var/max_uses = 20
|
var/max_uses = 20
|
||||||
var/uses = 0
|
var/uses = 0
|
||||||
var/emagged = FALSE
|
var/failmsg = ""
|
||||||
var/failmsg = ""
|
// How much to increase per each glass?
|
||||||
// How much to increase per each glass?
|
var/increment = 5
|
||||||
var/increment = 5
|
// How much to take from the glass?
|
||||||
// How much to take from the glass?
|
var/decrement = 1
|
||||||
var/decrement = 1
|
var/charge = 1
|
||||||
var/charge = 1
|
|
||||||
|
// Eating used bulbs gives us bulb shards
|
||||||
// Eating used bulbs gives us bulb shards
|
var/bulb_shards = 0
|
||||||
var/bulb_shards = 0
|
// when we get this many shards, we get a free bulb.
|
||||||
// when we get this many shards, we get a free bulb.
|
var/shards_required = 4
|
||||||
var/shards_required = 4
|
|
||||||
|
/obj/item/device/lightreplacer/New()
|
||||||
/obj/item/device/lightreplacer/New()
|
uses = max_uses / 2
|
||||||
uses = max_uses / 2
|
failmsg = "The [name]'s refill light blinks red."
|
||||||
failmsg = "The [name]'s refill light blinks red."
|
..()
|
||||||
..()
|
|
||||||
|
/obj/item/device/lightreplacer/examine(mob/user)
|
||||||
/obj/item/device/lightreplacer/examine(mob/user)
|
..()
|
||||||
..()
|
to_chat(user, status_string())
|
||||||
to_chat(user, status_string())
|
|
||||||
|
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
|
||||||
|
if(istype(W, /obj/item/stack/sheet/glass))
|
||||||
if(istype(W, /obj/item/stack/sheet/glass))
|
var/obj/item/stack/sheet/glass/G = W
|
||||||
var/obj/item/stack/sheet/glass/G = W
|
if(uses >= max_uses)
|
||||||
if(uses >= max_uses)
|
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
return
|
||||||
return
|
else if(G.use(decrement))
|
||||||
else if(G.use(decrement))
|
AddUses(increment)
|
||||||
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>")
|
||||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
return
|
||||||
return
|
else
|
||||||
else
|
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
|
||||||
|
if(istype(W, /obj/item/shard))
|
||||||
if(istype(W, /obj/item/shard))
|
if(uses >= max_uses)
|
||||||
if(uses >= max_uses)
|
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
return
|
||||||
return
|
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
return
|
||||||
return
|
AddUses(round(increment*0.75))
|
||||||
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>")
|
||||||
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)
|
||||||
qdel(W)
|
return
|
||||||
return
|
|
||||||
|
if(istype(W, /obj/item/light))
|
||||||
if(istype(W, /obj/item/light))
|
var/obj/item/light/L = W
|
||||||
var/obj/item/light/L = W
|
if(L.status == 0) // LIGHT OKAY
|
||||||
if(L.status == 0) // LIGHT OKAY
|
if(uses < max_uses)
|
||||||
if(uses < max_uses)
|
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
return
|
||||||
return
|
AddUses(1)
|
||||||
AddUses(1)
|
qdel(L)
|
||||||
qdel(L)
|
else
|
||||||
else
|
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
return
|
||||||
return
|
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
AddShards(1, user)
|
||||||
AddShards(1, user)
|
qdel(L)
|
||||||
qdel(L)
|
return
|
||||||
return
|
|
||||||
|
if(istype(W, /obj/item/storage))
|
||||||
if(istype(W, /obj/item/storage))
|
var/obj/item/storage/S = W
|
||||||
var/obj/item/storage/S = W
|
var/found_lightbulbs = FALSE
|
||||||
var/found_lightbulbs = FALSE
|
var/replaced_something = TRUE
|
||||||
var/replaced_something = TRUE
|
|
||||||
|
for(var/obj/item/I in S.contents)
|
||||||
for(var/obj/item/I in S.contents)
|
|
||||||
if(istype(I, /obj/item/light))
|
if(istype(I, /obj/item/light))
|
||||||
var/obj/item/light/L = I
|
var/obj/item/light/L = I
|
||||||
found_lightbulbs = TRUE
|
found_lightbulbs = TRUE
|
||||||
if(src.uses >= max_uses)
|
if(src.uses >= max_uses)
|
||||||
break
|
break
|
||||||
if(L.status == LIGHT_OK)
|
if(L.status == LIGHT_OK)
|
||||||
replaced_something = TRUE
|
replaced_something = TRUE
|
||||||
AddUses(1)
|
AddUses(1)
|
||||||
qdel(L)
|
qdel(L)
|
||||||
|
|
||||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||||
replaced_something = TRUE
|
replaced_something = TRUE
|
||||||
AddShards(1, user)
|
AddShards(1, user)
|
||||||
qdel(L)
|
qdel(L)
|
||||||
|
|
||||||
if(!found_lightbulbs)
|
if(!found_lightbulbs)
|
||||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!replaced_something && src.uses == max_uses)
|
if(!replaced_something && src.uses == max_uses)
|
||||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/emag_act()
|
/obj/item/device/lightreplacer/emag_act()
|
||||||
if(emagged)
|
if(emagged)
|
||||||
return
|
return
|
||||||
Emag()
|
Emag()
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||||
to_chat(user, status_string())
|
to_chat(user, status_string())
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/update_icon()
|
/obj/item/device/lightreplacer/update_icon()
|
||||||
icon_state = "lightreplacer[emagged]"
|
icon_state = "lightreplacer[emagged]"
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/status_string()
|
/obj/item/device/lightreplacer/proc/status_string()
|
||||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
AddUses(-1)
|
AddUses(-1)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
// Negative numbers will subtract
|
// Negative numbers will subtract
|
||||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||||
uses = Clamp(uses + amount, 0, max_uses)
|
uses = Clamp(uses + amount, 0, max_uses)
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||||
bulb_shards += amount
|
bulb_shards += amount
|
||||||
var/new_bulbs = round(bulb_shards / shards_required)
|
var/new_bulbs = round(bulb_shards / shards_required)
|
||||||
if(new_bulbs > 0)
|
if(new_bulbs > 0)
|
||||||
AddUses(new_bulbs)
|
AddUses(new_bulbs)
|
||||||
bulb_shards = bulb_shards % shards_required
|
bulb_shards = bulb_shards % shards_required
|
||||||
if(new_bulbs != 0)
|
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>")
|
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)
|
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||||
return new_bulbs
|
return new_bulbs
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||||
charge += 1
|
charge += 1
|
||||||
if(charge > 3)
|
if(charge > 3)
|
||||||
AddUses(1)
|
AddUses(1)
|
||||||
charge = 1
|
charge = 1
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||||
|
|
||||||
if(target.status != LIGHT_OK)
|
if(target.status != LIGHT_OK)
|
||||||
if(CanUse(U))
|
if(CanUse(U))
|
||||||
if(!Use(U)) return
|
if(!Use(U)) return
|
||||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||||
|
|
||||||
if(target.status != LIGHT_EMPTY)
|
if(target.status != LIGHT_EMPTY)
|
||||||
AddShards(1, U)
|
AddShards(1, U)
|
||||||
target.status = LIGHT_EMPTY
|
target.status = LIGHT_EMPTY
|
||||||
target.update()
|
target.update()
|
||||||
|
|
||||||
var/obj/item/light/L2 = new target.light_type()
|
var/obj/item/light/L2 = new target.light_type()
|
||||||
|
|
||||||
target.status = L2.status
|
target.status = L2.status
|
||||||
target.switchcount = L2.switchcount
|
target.switchcount = L2.switchcount
|
||||||
target.rigged = emagged
|
target.rigged = emagged
|
||||||
target.brightness = L2.brightness
|
target.brightness = L2.brightness
|
||||||
target.on = target.has_power()
|
target.on = target.has_power()
|
||||||
target.update()
|
target.update()
|
||||||
qdel(L2)
|
qdel(L2)
|
||||||
|
|
||||||
if(target.on && target.rigged)
|
if(target.on && target.rigged)
|
||||||
target.explode()
|
target.explode()
|
||||||
return
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
to_chat(U, failmsg)
|
to_chat(U, failmsg)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/Emag()
|
/obj/item/device/lightreplacer/proc/Emag()
|
||||||
emagged = !emagged
|
emagged = !emagged
|
||||||
playsound(src.loc, "sparks", 100, 1)
|
playsound(src.loc, "sparks", 100, 1)
|
||||||
if(emagged)
|
if(emagged)
|
||||||
name = "shortcircuited [initial(name)]"
|
name = "shortcircuited [initial(name)]"
|
||||||
else
|
else
|
||||||
name = initial(name)
|
name = initial(name)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if(uses > 0)
|
if(uses > 0)
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||||
if(!proximity)
|
if(!proximity)
|
||||||
return
|
return
|
||||||
if(!isturf(T))
|
if(!isturf(T))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/used = FALSE
|
var/used = FALSE
|
||||||
for(var/atom/A in T)
|
for(var/atom/A in T)
|
||||||
if(!CanUse(U))
|
if(!CanUse(U))
|
||||||
break
|
break
|
||||||
used = TRUE
|
used = TRUE
|
||||||
if(istype(A, /obj/machinery/light))
|
if(istype(A, /obj/machinery/light))
|
||||||
ReplaceLight(A, U)
|
ReplaceLight(A, U)
|
||||||
|
|
||||||
if(!used)
|
if(!used)
|
||||||
to_chat(U, failmsg)
|
to_chat(U, failmsg)
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||||
J.put_in_cart(src, user)
|
J.put_in_cart(src, user)
|
||||||
J.myreplacer = src
|
J.myreplacer = src
|
||||||
J.update_icon()
|
J.update_icon()
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||||
return
|
return
|
||||||
|
|
||||||
#undef LIGHT_OK
|
#undef LIGHT_OK
|
||||||
#undef LIGHT_EMPTY
|
#undef LIGHT_EMPTY
|
||||||
#undef LIGHT_BROKEN
|
#undef LIGHT_BROKEN
|
||||||
#undef LIGHT_BURNED
|
#undef LIGHT_BURNED
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
w_class = WEIGHT_CLASS_SMALL
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
siemens_coefficient = 1
|
siemens_coefficient = 1
|
||||||
var/spamcheck = 0
|
var/spamcheck = 0
|
||||||
var/emagged = FALSE
|
|
||||||
var/list/voicespan = list(SPAN_COMMAND)
|
var/list/voicespan = list(SPAN_COMMAND)
|
||||||
|
|
||||||
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||||
|
|||||||
@@ -278,7 +278,6 @@
|
|||||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
||||||
icon_state = "megaphone"
|
icon_state = "megaphone"
|
||||||
var/cooldown = 0
|
var/cooldown = 0
|
||||||
var/emagged = FALSE
|
|
||||||
|
|
||||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||||
emagged = !emagged
|
emagged = !emagged
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
|
var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
|
||||||
var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect
|
var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect
|
||||||
var/up = 0 //but separated to allow items to protect but not impair vision, like space helmets
|
var/up = 0 //but separated to allow items to protect but not impair vision, like space helmets
|
||||||
var/visor_flags = 0 //flags_1 that are added/removed when an item is adjusted up/down
|
var/visor_flags = 0 //flags that are added/removed when an item is adjusted up/down
|
||||||
var/visor_flags_inv = 0 //same as visor_flags, but for flags_inv
|
var/visor_flags_inv = 0 //same as visor_flags, but for flags_inv
|
||||||
var/visor_flags_cover = 0 //same as above, but for flags_cover
|
var/visor_flags_cover = 0 //same as above, but for flags_cover
|
||||||
//what to toggle when toggled with weldingvisortoggle()
|
//what to toggle when toggled with weldingvisortoggle()
|
||||||
@@ -193,7 +193,6 @@
|
|||||||
var/invis_view = SEE_INVISIBLE_LIVING
|
var/invis_view = SEE_INVISIBLE_LIVING
|
||||||
var/invis_override = 0 //Override to allow glasses to set higher than normal see_invis
|
var/invis_override = 0 //Override to allow glasses to set higher than normal see_invis
|
||||||
var/lighting_alpha
|
var/lighting_alpha
|
||||||
var/emagged = FALSE
|
|
||||||
var/list/icon/current = list() //the current hud icons
|
var/list/icon/current = list() //the current hud icons
|
||||||
var/vision_correction = 0 //does wearing these glasses correct some of our vision defects?
|
var/vision_correction = 0 //does wearing these glasses correct some of our vision defects?
|
||||||
strip_delay = 20
|
strip_delay = 20
|
||||||
@@ -475,6 +474,8 @@ BLIND // can't see anything
|
|||||||
permeability_coefficient = 0.01
|
permeability_coefficient = 0.01
|
||||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50, fire = 80, acid = 70)
|
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50, fire = 80, acid = 70)
|
||||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||||
|
dynamic_hair_suffix = ""
|
||||||
|
dynamic_fhair_suffix = ""
|
||||||
cold_protection = HEAD
|
cold_protection = HEAD
|
||||||
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
||||||
heat_protection = HEAD
|
heat_protection = HEAD
|
||||||
@@ -783,7 +784,7 @@ BLIND // can't see anything
|
|||||||
A.UpdateButtonIcon()
|
A.UpdateButtonIcon()
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags_1
|
/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags
|
||||||
up = !up
|
up = !up
|
||||||
flags_1 ^= visor_flags
|
flags_1 ^= visor_flags
|
||||||
flags_inv ^= visor_flags_inv
|
flags_inv ^= visor_flags_inv
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
var/last_battery_percent = 0 // Used for deciding if battery percentage has chandged
|
var/last_battery_percent = 0 // Used for deciding if battery percentage has chandged
|
||||||
var/last_world_time = "00:00"
|
var/last_world_time = "00:00"
|
||||||
var/list/last_header_icons
|
var/list/last_header_icons
|
||||||
var/emagged = FALSE // Whether the computer is emagged.
|
|
||||||
|
|
||||||
var/base_active_power_usage = 50 // Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too.
|
var/base_active_power_usage = 50 // Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too.
|
||||||
var/base_idle_power_usage = 5 // Power usage when the computer is idle and screen is off (currently only applies to laptops)
|
var/base_idle_power_usage = 5 // Power usage when the computer is idle and screen is off (currently only applies to laptops)
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
flags_1 = CONDUCT_1
|
flags_1 = CONDUCT_1
|
||||||
w_class = WEIGHT_CLASS_TINY
|
w_class = WEIGHT_CLASS_TINY
|
||||||
attack_verb = list("poked")
|
attack_verb = list("poked")
|
||||||
var/emagged = FALSE
|
|
||||||
var/fail_message = "<span class='warning'>INVALID USER.</span>"
|
var/fail_message = "<span class='warning'>INVALID USER.</span>"
|
||||||
var/selfdestruct = 0 // Explode when user check is failed.
|
var/selfdestruct = 0 // Explode when user check is failed.
|
||||||
var/force_replace = 0 // Can forcefully replace other pins.
|
var/force_replace = 0 // Can forcefully replace other pins.
|
||||||
|
|||||||
Reference in New Issue
Block a user