Merge branch 'master' into Plasmaispogtake2
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
|
||||
/// Integrity defines for clothing (not flags but close enough)
|
||||
#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
|
||||
#define CLOTHING_DAMAGED 1 // There's some damage on the clothing but it still has at least one functioning bodypart and can be equipped
|
||||
#define CLOTHING_SHREDDED 2 // The clothing is useless and cannot be equipped unless repaired first
|
||||
#define CLOTHING_DAMAGED 1 // There's some damage on the clothing but it still has at least one functioning bodypart
|
||||
#define CLOTHING_SHREDDED 2 // The clothing is near useless and has their sensors broken
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
|
||||
+12
-2
@@ -173,8 +173,18 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
|
||||
#define BROKEN_SENSORS -1
|
||||
#define NO_SENSORS 0
|
||||
#define HAS_SENSORS 1
|
||||
#define LOCKED_SENSORS 2
|
||||
#define DAMAGED_SENSORS_LIVING 1
|
||||
#define DAMAGED_SENSORS_VITALS 2
|
||||
#define HAS_SENSORS 3
|
||||
|
||||
//suit sensor flags: sensor_flag defines
|
||||
#define SENSOR_RANDOM (1<<0)
|
||||
#define SENSOR_LOCKED (1<<1)
|
||||
|
||||
//suit sensor integrity percentage threshold defines
|
||||
#define SENSOR_INTEGRITY_COORDS 0.2
|
||||
#define SENSOR_INTEGRITY_VITALS 0.6
|
||||
#define SENSOR_INTEGRITY_BINARY 1
|
||||
|
||||
//Wet floor type flags. Stronger ones should be higher in number.
|
||||
#define TURF_DRY (0)
|
||||
|
||||
@@ -52,7 +52,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "diamond"
|
||||
desc = "Highly pressurized carbon"
|
||||
color = list(48/255, 272/255, 301/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
strength_modifier = 1.1
|
||||
strength_modifier = 1.2
|
||||
alpha = 132
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "0"
|
||||
state = 0
|
||||
|
||||
/obj/structure/frame/computer/attackby(obj/item/P, mob/user, params)
|
||||
/obj/structure/frame/computer/attackby(obj/item/P, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if(0)
|
||||
@@ -11,7 +11,7 @@
|
||||
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
setAnchored(TRUE)
|
||||
set_anchored(TRUE)
|
||||
state = 1
|
||||
return
|
||||
if(P.tool_behaviour == TOOL_WELDER)
|
||||
@@ -19,7 +19,7 @@
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == 0)
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (drop_location(), 5)
|
||||
M.add_fingerprint(user)
|
||||
@@ -28,15 +28,15 @@
|
||||
if(1)
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == 1)
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
setAnchored(FALSE)
|
||||
set_anchored(FALSE)
|
||||
state = 0
|
||||
return
|
||||
if(istype(P, /obj/item/circuitboard/computer) && !circuit)
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You place [P] inside the frame.</span>")
|
||||
icon_state = "1"
|
||||
circuit = P
|
||||
@@ -71,8 +71,10 @@
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
if(state != 2)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, 5, 50, CALLBACK(src, .proc/check_state, 2)))
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
@@ -90,9 +92,11 @@
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
if(!P.tool_start_check(user, amount=2))
|
||||
return
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
if(state != 3)
|
||||
return
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(P.use_tool(src, user, 20, 2, 0, CALLBACK(src, .proc/check_state, 3)))
|
||||
if(P.use_tool(src, user, 20, amount=2))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
@@ -109,14 +113,51 @@
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/obj/B = new circuit.build_path (loc, circuit)
|
||||
B.setDir(dir)
|
||||
transfer_fingerprints_to(B)
|
||||
|
||||
var/obj/machinery/new_machine = new circuit.build_path(loc)
|
||||
new_machine.setDir(dir)
|
||||
transfer_fingerprints_to(new_machine)
|
||||
|
||||
if(istype(new_machine, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/new_computer = new_machine
|
||||
|
||||
// Machines will init with a set of default components.
|
||||
// Triggering handle_atom_del will make the machine realise it has lost a component_parts and then deconstruct.
|
||||
// Move to nullspace so we don't trigger handle_atom_del, then qdel.
|
||||
// Finally, replace new machine's parts with this frame's parts.
|
||||
if(new_computer.circuit)
|
||||
// Move to nullspace and delete.
|
||||
new_computer.circuit.moveToNullspace()
|
||||
QDEL_NULL(new_computer.circuit)
|
||||
for(var/old_part in new_computer.component_parts)
|
||||
var/atom/movable/movable_part = old_part
|
||||
// Move to nullspace and delete.
|
||||
movable_part.moveToNullspace()
|
||||
qdel(movable_part)
|
||||
|
||||
// Set anchor state and move the frame's parts over to the new machine.
|
||||
// Then refresh parts and call on_construction().
|
||||
new_computer.set_anchored(anchored)
|
||||
new_computer.component_parts = list()
|
||||
|
||||
circuit.forceMove(new_computer)
|
||||
new_computer.component_parts += circuit
|
||||
new_computer.circuit = circuit
|
||||
|
||||
for(var/new_part in src)
|
||||
var/atom/movable/movable_part = new_part
|
||||
movable_part.forceMove(new_computer)
|
||||
new_computer.component_parts += movable_part
|
||||
|
||||
new_computer.RefreshParts()
|
||||
new_computer.on_construction()
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(state == 4)
|
||||
@@ -127,13 +168,12 @@
|
||||
..()
|
||||
|
||||
/obj/structure/frame/computer/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE, TRUE, FALSE))
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
to_chat(usr, "<span class='warning'>You must unwrench [src] before rotating it!</span>")
|
||||
return TRUE
|
||||
return
|
||||
|
||||
setDir(turn(dir, -90))
|
||||
return TRUE
|
||||
|
||||
@@ -208,6 +208,8 @@
|
||||
new_machine.component_parts = list()
|
||||
|
||||
circuit.forceMove(new_machine)
|
||||
// TODO: make sleepers not shit out parts PROPERLY THIS TIME.
|
||||
new_machine.circuit.moveToNullspace()
|
||||
new_machine.component_parts += circuit
|
||||
new_machine.circuit = circuit
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
|
||||
new/datum/stack_recipe("Captain Statue", /obj/structure/statue/diamond/captain, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("AI Hologram Statue", /obj/structure/statue/diamond/ai1, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("diamond brick", /obj/item/ingot/diamond, 6, time = 100), \
|
||||
))
|
||||
new/datum/stack_recipe("diamond ingot", /obj/item/ingot/diamond, 6, time = 100), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond/get_main_recipes()
|
||||
. = ..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/effect/proc_holder/changeling/strained_muscles
|
||||
name = "Strained Muscles"
|
||||
desc = "We evolve the ability to reduce the acid buildup in our muscles, allowing us to move much faster."
|
||||
helptext = "The strain will make us tired, and we will rapidly become fatigued. Standard weight restrictions, like hardsuits, still apply. Cannot be used in lesser form."
|
||||
helptext = "The strain will make us tired, and we will rapidly become fatigued. Standard weight restrictions, like hardsuits, still apply. Our chemical generation is drastically slowed while this is active. Cannot be used in lesser form."
|
||||
dna_cost = 1
|
||||
req_human = 1
|
||||
var/stacks = 0 //Increments every 5 seconds; damage increases over time
|
||||
@@ -14,12 +14,15 @@
|
||||
action_background_icon_state = "bg_ling"
|
||||
|
||||
/obj/effect/proc_holder/changeling/strained_muscles/sting_action(mob/living/carbon/user)
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
active = !active
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>Our muscles tense and strengthen.</span>")
|
||||
changeling.chem_recharge_slowdown += 0.8 // stacking this with other abilities will cause you to actively lose chemicals
|
||||
else
|
||||
user.remove_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
to_chat(user, "<span class='notice'>Our muscles relax.</span>")
|
||||
changeling.chem_recharge_slowdown -= 0.8
|
||||
if(stacks >= 10)
|
||||
to_chat(user, "<span class='danger'>We collapse in exhaustion.</span>")
|
||||
user.DefaultCombatKnockdown(60)
|
||||
@@ -30,6 +33,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/effect/proc_holder/changeling/strained_muscles/proc/muscle_loop(mob/living/carbon/user)
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
while(active)
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
if(user.stat != CONSCIOUS || user.staminaloss >= 90)
|
||||
@@ -37,6 +41,7 @@
|
||||
to_chat(user, "<span class='notice'>Our muscles relax without the energy to strengthen them.</span>")
|
||||
user.DefaultCombatKnockdown(40)
|
||||
user.remove_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
changeling.chem_recharge_slowdown -= 0.8
|
||||
break
|
||||
|
||||
stacks++
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
/datum/supply_pack/service/replacementdb
|
||||
name = "Replacement Defensive Bar Shotgun"
|
||||
desc = "Someone stole the Bartender's twin-barreled possession? Give them another one at a significant markup. Comes with one unused double-barrel shotgun, shells not included. Requires bartender access to open."
|
||||
desc = "Someone stole the Bartender's twin-barreled possession? Give them another one at a significant markup. Comes with one unused double-barrel shotgun, additional shells not included. Requires bartender access to open."
|
||||
cost = 2200
|
||||
access = ACCESS_BAR
|
||||
contraband = TRUE
|
||||
|
||||
@@ -277,7 +277,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/under/chameleon)
|
||||
item_state = "bl_suit"
|
||||
desc = "It's a plain jumpsuit. It has a small dial on the wrist."
|
||||
sensor_mode = SENSOR_OFF //Hey who's this guy on the Syndicate Shuttle??
|
||||
random_sensor = FALSE
|
||||
sensor_flags = NONE
|
||||
resistance_flags = NONE
|
||||
can_adjust = FALSE
|
||||
armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
/obj/item/clothing/examine(mob/user)
|
||||
. = ..()
|
||||
if(damaged_clothes == CLOTHING_SHREDDED)
|
||||
. += "<span class='warning'><b>It is completely shredded and requires mending before it can be worn again!</b></span>"
|
||||
. += "<span class='warning'><b>It is completely shredded and requires mending!</b></span>"
|
||||
return
|
||||
for(var/zone in damage_by_parts)
|
||||
var/pct_damage_part = damage_by_parts[zone] / limb_integrity * 100
|
||||
@@ -437,12 +437,10 @@ BLIND // can't see anything
|
||||
damaged_clothes = CLOTHING_SHREDDED
|
||||
body_parts_covered = NONE
|
||||
name = "shredded [initial(name)]"
|
||||
slot_flags = NONE
|
||||
update_clothes_damaged_state()
|
||||
update_clothes_damaged_state(CLOTHING_SHREDDED)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.visible_message("<span class='danger'>[M]'s [src.name] falls off, completely shredded!</span>", "<span class='warning'><b>Your [src.name] falls off, completely shredded!</b></span>", vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
M.dropItemToGround(src)
|
||||
M.visible_message("<span class='danger'>[M]'s [src.name] is completely shredded!</span>", "<span class='userdanger'>Your [src.name] is completely shredded!</span>", vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -7,11 +7,14 @@
|
||||
slot_flags = ITEM_SLOT_ICLOTHING
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0, "wound" = 5)
|
||||
mutantrace_variation = STYLE_DIGITIGRADE|USE_TAUR_CLIP_MASK
|
||||
limb_integrity = 30
|
||||
limb_integrity = 120
|
||||
var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women
|
||||
var/has_sensor = HAS_SENSORS // For the crew computer
|
||||
var/random_sensor = TRUE
|
||||
var/sensor_flags = SENSOR_RANDOM
|
||||
var/sensor_mode = NO_SENSORS
|
||||
var/sensor_mode_intended = NO_SENSORS //if sensors become damaged and are repaired later, it will revert to the user's intended preferences
|
||||
var/sensormaxintegrity = 200 //if this is zero, then our sensors can only be destroyed by shredded clothing
|
||||
var/sensordamage = 0 //how much damage did our sensors take?
|
||||
var/can_adjust = TRUE
|
||||
var/adjusted = NORMAL_STYLE
|
||||
var/alt_covers_chest = FALSE // for adjusted/rolled-down jumpsuits, FALSE = exposes chest and arms, TRUE = exposes arms only
|
||||
@@ -32,29 +35,75 @@
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
|
||||
if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil))
|
||||
if(damaged_clothes)
|
||||
to_chat(user,"<span class='warning'>You should repair the damage done to [src] first.</span>")
|
||||
if(damaged_clothes == CLOTHING_SHREDDED)
|
||||
to_chat(user,"<span class='warning'>[src] is too damaged to have its suit sensors repaired! Repair it first.</span>")
|
||||
return 0
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
I.use_tool(src, user, 0, 1)
|
||||
has_sensor = HAS_SENSORS
|
||||
sensordamage = 0
|
||||
sensor_mode = sensor_mode_intended
|
||||
to_chat(user,"<span class='notice'>You repair the suit sensors on [src] with [C].</span>")
|
||||
return 1
|
||||
|
||||
if(!attach_accessory(I, user))
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/take_damage_zone(def_zone, damage_amount, damage_type, armour_penetration)
|
||||
..()
|
||||
if(sensormaxintegrity == 0 || has_sensor == NO_SENSORS || sensordamage >= sensormaxintegrity) return //sensors are invincible if max integrity is 0
|
||||
var/damage_dealt = take_damage(damage_amount * 0.1, damage_type, armour_penetration, FALSE) * 10 // only deal 10% of the damage to the general integrity damage, then multiply it by 10 so we know how much to deal to limb
|
||||
sensordamage += damage_dealt
|
||||
var/integ = has_sensor
|
||||
var/newinteg = sensorintegrity()
|
||||
if(newinteg != integ)
|
||||
if(newinteg < integ && iscarbon(src.loc)) //the first check is to see if for some inexplicable reason the attack healed our suit sensors
|
||||
var/mob/living/carbon/C = src.loc
|
||||
switch(newinteg)
|
||||
if(DAMAGED_SENSORS_VITALS)
|
||||
to_chat(C,"<span class='warning'>Your tracking beacon on your suit sensors have shorted out!</span>")
|
||||
if(DAMAGED_SENSORS_LIVING)
|
||||
to_chat(C,"<span class='warning'>Your vital tracker on your suit sensors have shorted out!</span>")
|
||||
if(BROKEN_SENSORS)
|
||||
to_chat(C,"<span class='userdanger'>Your suit sensors have shorted out completely!</span>")
|
||||
updatesensorintegrity(newinteg)
|
||||
|
||||
|
||||
/obj/item/clothing/under/proc/sensorintegrity()
|
||||
var/percentage = sensordamage/sensormaxintegrity //calculate the percentage of how much damage taken
|
||||
if(percentage < SENSOR_INTEGRITY_COORDS) return HAS_SENSORS
|
||||
else if(percentage < SENSOR_INTEGRITY_VITALS) return DAMAGED_SENSORS_VITALS
|
||||
else if(percentage < SENSOR_INTEGRITY_BINARY) return DAMAGED_SENSORS_LIVING
|
||||
else return BROKEN_SENSORS
|
||||
|
||||
/obj/item/clothing/under/proc/updatesensorintegrity(integ = HAS_SENSORS)
|
||||
if(sensormaxintegrity == 0 || has_sensor == NO_SENSORS) return //sanity check
|
||||
has_sensor = integ
|
||||
switch(has_sensor)
|
||||
if(HAS_SENSORS)
|
||||
sensor_mode = sensor_mode_intended
|
||||
if(DAMAGED_SENSORS_VITALS)
|
||||
if(sensor_mode > SENSOR_VITALS) sensor_mode = SENSOR_VITALS
|
||||
if(DAMAGED_SENSORS_LIVING)
|
||||
if(sensor_mode > SENSOR_LIVING) sensor_mode = SENSOR_LIVING
|
||||
if(BROKEN_SENSORS)
|
||||
sensor_mode = NO_SENSORS
|
||||
|
||||
|
||||
/obj/item/clothing/under/update_clothes_damaged_state()
|
||||
..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_w_uniform()
|
||||
if(has_sensor > NO_SENSORS)
|
||||
if(has_sensor > NO_SENSORS && damaged_clothes == CLOTHING_SHREDDED)
|
||||
has_sensor = BROKEN_SENSORS
|
||||
sensordamage = sensormaxintegrity
|
||||
|
||||
/obj/item/clothing/under/New()
|
||||
if(random_sensor)
|
||||
if(sensor_flags & SENSOR_RANDOM)
|
||||
//make the sensor mode favor higher levels, except coords.
|
||||
sensor_mode = pick(SENSOR_OFF, SENSOR_LIVING, SENSOR_LIVING, SENSOR_VITALS, SENSOR_VITALS, SENSOR_VITALS, SENSOR_COORDS, SENSOR_COORDS)
|
||||
sensor_mode_intended = sensor_mode
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/equipped(mob/user, slot)
|
||||
@@ -143,9 +192,14 @@
|
||||
. += "Alt-click on [src] to wear it normally."
|
||||
else
|
||||
. += "Alt-click on [src] to wear it casually."
|
||||
if (has_sensor == BROKEN_SENSORS)
|
||||
. += "Its sensors appear to be shorted out."
|
||||
else if(has_sensor > NO_SENSORS)
|
||||
switch(has_sensor)
|
||||
if(BROKEN_SENSORS)
|
||||
. += "<span class='warning'>Its sensors appear to be shorted out completely. It can be repaired using cable.</span>"
|
||||
if(DAMAGED_SENSORS_LIVING)
|
||||
. += "<span class='warning'>Its sensors appear to have its tracking beacon and vital tracker broken. It can be repaired using cable.</span>"
|
||||
if(DAMAGED_SENSORS_VITALS)
|
||||
. += "<span class='warning'>Its sensors appear to have its tracking beacon broken. It can be repaired using cable.</span>"
|
||||
if(has_sensor > NO_SENSORS)
|
||||
switch(sensor_mode)
|
||||
if(SENSOR_OFF)
|
||||
. += "Its sensors appear to be disabled."
|
||||
@@ -167,12 +221,12 @@
|
||||
return
|
||||
if (!can_use(M))
|
||||
return
|
||||
if(src.has_sensor == LOCKED_SENSORS)
|
||||
to_chat(usr, "The controls are locked.")
|
||||
return 0
|
||||
if(src.has_sensor == BROKEN_SENSORS)
|
||||
to_chat(usr, "The sensors have shorted out!")
|
||||
return 0
|
||||
if(src.sensor_flags & SENSOR_LOCKED)
|
||||
to_chat(usr, "The controls are locked.")
|
||||
return 0
|
||||
if(src.has_sensor <= NO_SENSORS)
|
||||
to_chat(usr, "This suit does not have any sensors.")
|
||||
return 0
|
||||
@@ -182,18 +236,34 @@
|
||||
if(get_dist(usr, src) > 1)
|
||||
to_chat(usr, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
sensor_mode = modes.Find(switchMode) - 1
|
||||
sensor_mode_intended = modes.Find(switchMode) - 1
|
||||
|
||||
if (src.loc == usr)
|
||||
switch(sensor_mode)
|
||||
switch(sensor_mode_intended)
|
||||
if(0)
|
||||
to_chat(usr, "<span class='notice'>You disable your suit's remote sensing equipment.</span>")
|
||||
sensor_mode = sensor_mode_intended
|
||||
if(1)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report whether you are alive or dead.</span>")
|
||||
sensor_mode = sensor_mode_intended
|
||||
if(2)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report your exact vital lifesigns.</span>")
|
||||
if(src.has_sensor == DAMAGED_SENSORS_LIVING)
|
||||
to_chat(usr, "<span class='warning'>Your suit's vital tracker is broken, so it will only report whether you are alive or dead.</span>")
|
||||
sensor_mode = SENSOR_LIVING
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report your exact vital lifesigns.</span>")
|
||||
sensor_mode = sensor_mode_intended
|
||||
if(3)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
switch(src.has_sensor)
|
||||
if(DAMAGED_SENSORS_LIVING)
|
||||
to_chat(usr, "<span class='warning'>Your suit's tracking beacon and vital tracker is broken, so it will only report whether you are alive or dead.</span>")
|
||||
sensor_mode = SENSOR_LIVING
|
||||
if(DAMAGED_SENSORS_VITALS)
|
||||
to_chat(usr, "<span class='warning'>Your suit's tracking beacon is broken, so it will only report your vital lifesigns.</span>")
|
||||
sensor_mode = SENSOR_VITALS
|
||||
if(HAS_SENSORS)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
sensor_mode = sensor_mode_intended
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
@@ -210,19 +280,28 @@
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
if(has_sensor == LOCKED_SENSORS)
|
||||
to_chat(user, "The controls are locked.")
|
||||
return
|
||||
if(has_sensor == BROKEN_SENSORS)
|
||||
to_chat(user, "The sensors have shorted out!")
|
||||
return
|
||||
if(src.has_sensor == BROKEN_SENSORS)
|
||||
to_chat(usr, "The sensors have shorted out!")
|
||||
return 0
|
||||
if(src.sensor_flags & SENSOR_LOCKED)
|
||||
to_chat(usr, "The controls are locked.")
|
||||
return 0
|
||||
if(has_sensor <= NO_SENSORS)
|
||||
to_chat(user, "This suit does not have any sensors.")
|
||||
return
|
||||
|
||||
sensor_mode = SENSOR_COORDS
|
||||
sensor_mode_intended = SENSOR_COORDS
|
||||
|
||||
to_chat(user, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
switch(src.has_sensor)
|
||||
if(DAMAGED_SENSORS_LIVING)
|
||||
to_chat(usr, "<span class='warning'>Your suit's tracking beacon and vital tracker is broken, so it will only report whether you are alive or dead.</span>")
|
||||
sensor_mode = SENSOR_LIVING
|
||||
if(DAMAGED_SENSORS_VITALS)
|
||||
to_chat(usr, "<span class='warning'>Your suit's tracking beacon is broken, so it will only report your vital lifesigns.</span>")
|
||||
sensor_mode = SENSOR_VITALS
|
||||
if(HAS_SENSORS)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
sensor_mode = sensor_mode_intended
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
item_state = "captain_envirosuit"
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95, "wound" = 15)
|
||||
sensor_mode = SENSOR_COORDS
|
||||
random_sensor = FALSE
|
||||
sensor_flags = NONE
|
||||
|
||||
/obj/item/clothing/under/plasmaman/mime
|
||||
name = "mime envirosuit"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "security_envirosuit"
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95, "wound" = 10)
|
||||
sensor_mode = SENSOR_COORDS
|
||||
random_sensor = FALSE
|
||||
sensor_flags = NONE
|
||||
|
||||
/obj/item/clothing/under/plasmaman/security/warden
|
||||
name = "warden plasma envirosuit"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "b_suit"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0, "wound" = 15)
|
||||
sensor_mode = SENSOR_COORDS
|
||||
random_sensor = FALSE
|
||||
sensor_flags = NONE
|
||||
|
||||
/obj/item/clothing/under/rank/captain/util
|
||||
name = "command utility uniform"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
strip_delay = 50
|
||||
alt_covers_chest = TRUE
|
||||
sensor_mode = SENSOR_COORDS
|
||||
random_sensor = FALSE
|
||||
sensor_flags = NONE
|
||||
|
||||
/obj/item/clothing/under/rank/security/officer
|
||||
name = "security jumpsuit"
|
||||
|
||||
@@ -23,16 +23,15 @@
|
||||
name = "prison jumpsuit"
|
||||
desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position."
|
||||
icon_state = "prisoner"
|
||||
item_state = "o_suit"
|
||||
has_sensor = LOCKED_SENSORS
|
||||
item_state = "prisoner"
|
||||
sensor_mode = SENSOR_COORDS
|
||||
random_sensor = FALSE
|
||||
sensor_flags = SENSOR_LOCKED
|
||||
|
||||
/obj/item/clothing/under/rank/prisoner/skirt
|
||||
name = "prison jumpskirt"
|
||||
desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position."
|
||||
icon_state = "prisoner_skirt"
|
||||
item_state = "o_suit"
|
||||
item_state = "prisoner_skirt"
|
||||
body_parts_covered = CHEST|GROIN|ARMS
|
||||
can_adjust = FALSE
|
||||
fitted = FEMALE_UNIFORM_TOP
|
||||
@@ -166,6 +165,7 @@
|
||||
/obj/item/clothing/under/misc/gear_harness
|
||||
name = "gear harness"
|
||||
desc = "A simple, inconspicuous harness replacement for a jumpsuit."
|
||||
limb_integrity = 180
|
||||
icon_state = "gear_harness"
|
||||
item_state = "gear_harness"
|
||||
can_adjust = TRUE
|
||||
|
||||
@@ -55,3 +55,9 @@
|
||||
name = "triple-barrel shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/incapacitate
|
||||
max_ammo = 3
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/levergun
|
||||
name = "levergun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/c38 // they're rubber by default, i guess
|
||||
caliber = "38"
|
||||
max_ammo = 7
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/obj/item/ammo_box/magazine/magazine
|
||||
var/casing_ejector = TRUE //whether the gun ejects the chambered casing
|
||||
var/magazine_wording = "magazine"
|
||||
var/sawn_item_state = "gun"
|
||||
|
||||
/obj/item/gun/ballistic/Initialize()
|
||||
. = ..()
|
||||
@@ -198,13 +199,17 @@
|
||||
name = "sawn-off [src.name]"
|
||||
desc = sawn_desc
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
item_state = "gun"
|
||||
item_state = sawn_item_state
|
||||
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
sawn_off = TRUE
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/// is something supposed to happen here?
|
||||
/obj/item/gun/ballistic/proc/on_sawoff(mob/user)
|
||||
return
|
||||
|
||||
// Sawing guns related proc
|
||||
/obj/item/gun/ballistic/proc/blow_up(mob/user)
|
||||
. = 0
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
casing_ejector = FALSE
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
sawn_item_state = "sawedshotgun"
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
@@ -335,3 +336,34 @@
|
||||
//our hook gun!
|
||||
var/obj/item/gun/magic/hook/bounty/hook
|
||||
var/toggled = FALSE
|
||||
|
||||
// hey you kids like
|
||||
// LEVER GUNS?
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/leveraction
|
||||
name = "lever-action rifle"
|
||||
desc = "While lever-actions have been horribly out of date for hundreds of years now, \
|
||||
the reported potential versatility of .38 Special is worth paying attention to."
|
||||
fire_sound = "sound/weapons/revolvershot.ogg"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/levergun
|
||||
icon_state = "levercarabine"
|
||||
item_state = "leveraction"
|
||||
sawn_item_state = "maresleg"
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/leveraction/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/melee/transforming/energy))
|
||||
var/obj/item/melee/transforming/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/leveraction/on_sawoff(mob/user)
|
||||
magazine.max_ammo-- // sawing off drops from 7+1 to 6+1
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/leveraction/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
custom_materials = list(/datum/material/iron=12000)
|
||||
|
||||
/obj/item/ingot/diamond
|
||||
custom_materials = list(/datum/material/diamond=12000) //yeah ok
|
||||
custom_materials = list(/datum/material/diamond=12000)
|
||||
|
||||
/obj/item/ingot/uranium
|
||||
custom_materials = list(/datum/material/uranium=12000)
|
||||
|
||||
Reference in New Issue
Block a user