Merge remote-tracking branch 'upstream/dev' into 151117-MultitoolPower

This commit is contained in:
PsiOmegaDelta
2015-12-04 11:20:39 +01:00
61 changed files with 504 additions and 405 deletions

View File

@@ -187,13 +187,10 @@
return
/obj/effect/beam/i_beam/process()
//world << "i_beam \ref[src] : process"
if((loc.density || !(master)))
// world << "beam hit loc [loc] or no master [master], deleting"
if((loc && loc.density) || !master)
qdel(src)
return
//world << "proccess: [src.left] left"
if(left > 0)
left--

View File

@@ -40,6 +40,9 @@
HasProximity(atom/movable/AM as mob|obj)
if(!istype(AM))
log_debug("DEBUG: HasProximity called with [AM] on [src] ([usr]).")
return
if (istype(AM, /obj/effect/beam)) return
if (AM.move_speed < 12) sense()
return

View File

@@ -6,6 +6,10 @@
var/list/species_restricted = null //Only these species can wear this kit.
var/gunshot_residue //Used by forensics.
var/list/accessories = list()
var/list/valid_accessory_slots
var/list/restricted_accessory_slots
/*
Sprites used when the clothing item is refit. This is done by setting icon_override.
For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary.
@@ -509,7 +513,6 @@ BLIND // can't see anything
2 = Report detailed damages
3 = Report location
*/
var/list/accessories = list()
var/displays_id = 1
var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
sprite_sheets = list(
@@ -520,6 +523,15 @@ BLIND // can't see anything
//convenience var for defining the icon state for the overlay used when the clothing is worn.
//Also used by rolling/unrolling.
var/worn_state = null
valid_accessory_slots = list("utility","armband","decor")
restricted_accessory_slots = list("utility", "armband")
/obj/item/clothing/under/attack_hand(var/mob/user)
if(accessories && accessories.len)
..()
if ((ishuman(usr) || issmall(usr)) && src.loc == user)
return
/obj/item/clothing/under/New()
..()
@@ -563,69 +575,6 @@ BLIND // can't see anything
var/mob/M = src.loc
M.update_inv_w_uniform()
/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
if(istype(A))
.=1
else
return 0
if(accessories.len && (A.slot in list("utility","armband")))
for(var/obj/item/clothing/accessory/AC in accessories)
if (AC.slot == A.slot)
return 0
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = I
if(can_attach_accessory(A))
user.drop_item()
accessories += A
A.on_attached(src, user)
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
return
else
user << "<span class='notice'>You cannot attach more accessories of this type to [src].</span>"
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.attackby(I, user)
return
..()
/obj/item/clothing/under/attack_hand(mob/user as mob)
//only forward to the attached accessory if the clothing is equipped (not in a storage)
if(accessories.len && src.loc == user)
for(var/obj/item/clothing/accessory/A in accessories)
A.attack_hand(user)
return
if ((ishuman(usr) || issmall(usr)) && src.loc == user) //make it harder to accidentally undress yourself
return
..()
/obj/item/clothing/under/MouseDrop(obj/over_object as obj)
if (ishuman(usr) || issmall(usr))
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
if (!(src.loc == usr))
return
if (( usr.restrained() ) || ( usr.stat ))
return
if (!usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.put_in_r_hand(src)
if("l_hand")
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/clothing/under/examine(mob/user)
..(user)
@@ -638,9 +587,6 @@ BLIND // can't see anything
user << "Its vital tracker appears to be enabled."
if(3)
user << "Its vital tracker and tracking beacon appear to be enabled."
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
user << "\A [A] is attached to it."
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
var/mob/M = usr
@@ -713,34 +659,7 @@ BLIND // can't see anything
item_state_slots[slot_w_uniform_str] = "[worn_state]"
update_clothing_icon()
/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
if(!(A in accessories))
return
A.on_removed(user)
accessories -= A
update_clothing_icon()
/obj/item/clothing/under/verb/removetie()
set name = "Remove Accessory"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!accessories.len) return
var/obj/item/clothing/accessory/A
if(accessories.len > 1)
A = input("Select an accessory to remove from [src]") as null|anything in accessories
else
A = accessories[1]
src.remove_accessory(usr,A)
/obj/item/clothing/under/rank/New()
sensor_mode = pick(0,1,2,3)
..()
/obj/item/clothing/under/emp_act(severity)
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.emp_act(severity)
..()

View File

@@ -0,0 +1,100 @@
/obj/item/clothing/proc/can_attach_accessory(obj/item/clothing/accessory/A)
if(valid_accessory_slots && istype(A) && (A.slot in valid_accessory_slots))
.=1
else
return 0
if(accessories.len && restricted_accessory_slots && (A.slot in restricted_accessory_slots))
for(var/obj/item/clothing/accessory/AC in accessories)
if (AC.slot == A.slot)
return 0
/obj/item/clothing/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/clothing/accessory))
if(!valid_accessory_slots || !valid_accessory_slots.len)
usr << "<span class='warning'>You cannot attach accessories of any kind to \the [src].</span>"
return
var/obj/item/clothing/accessory/A = I
if(can_attach_accessory(A))
user.drop_item()
accessories += A
A.on_attached(src, user)
src.verbs |= /obj/item/clothing/proc/removetie_verb
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
return
else
user << "<span class='warning'>You cannot attach more accessories of this type to [src].</span>"
return
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.attackby(I, user)
return
..()
/obj/item/clothing/attack_hand(var/mob/user)
//only forward to the attached accessory if the clothing is equipped (not in a storage)
if(accessories.len && src.loc == user)
for(var/obj/item/clothing/accessory/A in accessories)
A.attack_hand(user)
return
return ..()
/obj/item/clothing/MouseDrop(var/obj/over_object)
if (ishuman(usr) || issmall(usr))
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
if (!(src.loc == usr))
return
if (( usr.restrained() ) || ( usr.stat ))
return
if (!usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.put_in_r_hand(src)
if("l_hand")
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/clothing/examine(var/mob/user)
..(user)
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
user << "\A [A] is attached to it."
/obj/item/clothing/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
if(!(A in accessories))
return
A.on_removed(user)
accessories -= A
update_clothing_icon()
/obj/item/clothing/proc/removetie_verb()
set name = "Remove Accessory"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!accessories.len) return
var/obj/item/clothing/accessory/A
if(accessories.len > 1)
A = input("Select an accessory to remove from [src]") as null|anything in accessories
else
A = accessories[1]
src.remove_accessory(usr,A)
if(!accessories.len)
src.verbs -= /obj/item/clothing/proc/removetie_verb
/obj/item/clothing/emp_act(severity)
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.emp_act(severity)
..()

View File

@@ -186,8 +186,11 @@
if(!istype(user,/mob/living)) return
if(istype(W,/obj/item/clothing/accessory) || istype(W, /obj/item/weapon/hand_labeler))
return ..()
if(istype(src.loc,/mob/living))
user << "<span class='danger'>How do you propose to modify a voidsuit while it is being worn?</span>"
user << "<span class='warning'>You cannot modify \the [src] while it is being worn.</span>"
return
if(istype(W,/obj/item/weapon/screwdriver))

View File

@@ -1,6 +1,6 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/device/radio,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
item_flags = THICKMATERIAL
@@ -66,7 +66,7 @@
/obj/item/clothing/suit/armor/laserproof/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam))
var/obj/item/projectile/P = damage_source
var/reflectchance = 40 - round(damage/3)
if(!(def_zone in list("chest", "groin")))
reflectchance /= 2
@@ -146,12 +146,12 @@
if(!turfs.len) turfs += pick(/turf in orange(6))
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(user.loc, "sparks", 50, 1)
user.loc = picked
return PROJECTILE_FORCE_MISS
return 0
@@ -244,102 +244,58 @@
icon_state = "ertarmor_med"
//New Vests
/obj/item/clothing/suit/storage/vest
/obj/item/clothing/suit/armor/vest
name = "armor vest"
desc = "A simple kevlar plate carrier."
desc = "An armor vest made of synthetic fibers."
icon_state = "kvest"
item_state = "kvest"
item_state = "armor"
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
/obj/item/clothing/suit/armor/vest/security
name = "security vest"
desc = "A synthetic armor vest. This one is marked with the crest of NanoTrasen."
icon_state = "secvest"
/obj/item/clothing/suit/armor/vest/detective
name = "detective armor vest"
desc = "An synthetic armor vest colored in a vintage brown."
icon_state = "detvest"
/obj/item/clothing/suit/storage/vest
name = "webbed armor vest"
desc = "A synthetic armor vest. This one has added webbing and ballistic plates."
icon_state = "webvest"
armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/device/radio,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
/obj/item/clothing/suit/storage/vest/officer
name = "officer armor vest"
desc = "A simple kevlar plate carrier. This one has a security holobadge clipped to the chest."
icon_state = "officervest_nobadge"
item_state = "officervest_nobadge"
icon_badge = "officervest_badge"
icon_nobadge = "officervest_nobadge"
name = "security armor vest"
desc = "A synthetic armor vest with SECURITY printed in red lettering on the chest. This one has added webbing and ballistic plates."
icon_state = "officervest"
/obj/item/clothing/suit/storage/vest/warden
name = "warden armor vest"
desc = "A simple kevlar plate carrier. This one has a silver badge clipped to the chest."
icon_state = "wardenvest_nobadge"
item_state = "wardenvest_nobadge"
icon_badge = "wardenvest_badge"
icon_nobadge = "wardenvest_nobadge"
desc = "A synthetic armor vest with WARDEN printed in silver lettering on the chest. This one has added webbing and ballistic plates."
icon_state = "wardenvest"
/obj/item/clothing/suit/storage/vest/hos
name = "commander armor vest"
desc = "A simple kevlar plate carrier. This one has a gold badge clipped to the chest."
icon_state = "hosvest_nobadge"
item_state = "hosvest_nobadge"
icon_badge = "hosvest_badge"
icon_nobadge = "hosvest_nobadge"
desc = "A synthetic armor vest with COMMANDER printed in gold lettering on the chest. This one has added webbing and ballistic plates."
icon_state = "hosvest"
/obj/item/clothing/suit/storage/vest/pcrc
name = "PCRC armor vest"
desc = "A simple kevlar plate carrier belonging to Proxima Centauri Risk Control. This one has a PCRC crest clipped to the chest."
icon_state = "pcrcvest_nobadge"
item_state = "pcrcvest_nobadge"
icon_badge = "pcrcvest_badge"
icon_nobadge = "pcrcvest_nobadge"
/obj/item/clothing/suit/storage/vest/detective
name = "detective armor vest"
desc = "A simple kevlar plate carrier in a vintage brown, it has a badge clipped to the chest that reads, 'Private investigator'."
icon_state = "detectivevest_nobadge"
item_state = "detectivevest_nobadge"
icon_badge = "detectivevest_badge"
icon_nobadge = "detectivevest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy
name = "heavy armor vest"
desc = "A heavy kevlar plate carrier with webbing attached."
icon_state = "webvest"
item_state = "webvest"
armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0)
slowdown = 1
/obj/item/clothing/suit/storage/vest/heavy/officer
name = "officer heavy armor vest"
desc = "A heavy kevlar plate carrier with webbing attached. This one has a security holobadge clipped to the chest."
icon_state = "officerwebvest_nobadge"
item_state = "officerwebvest_nobadge"
icon_badge = "officerwebvest_badge"
icon_nobadge = "officerwebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/warden
name = "warden heavy armor vest"
desc = "A heavy kevlar plate carrier with webbing attached. This one has a silver badge clipped to the chest."
icon_state = "wardenwebvest_nobadge"
item_state = "wardenwebvest_nobadge"
icon_badge = "wardenwebvest_badge"
icon_nobadge = "wardenwebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/hos
name = "commander heavy armor vest"
desc = "A heavy kevlar plate carrier with webbing attached. This one has a gold badge clipped to the chest."
icon_state = "hoswebvest_nobadge"
item_state = "hoswebvest_nobadge"
icon_badge = "hoswebvest_badge"
icon_nobadge = "hoswebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/pcrc
name = "PCRC heavy armor vest"
desc = "A heavy kevlar plate carrier belonging to Proxima Centauri Risk Control with webbing attached. This one has a PCRC crest clipped to the chest."
icon_state = "pcrcwebvest_nobadge"
item_state = "pcrcwebvest_nobadge"
icon_badge = "pcrcwebvest_badge"
icon_nobadge = "pcrcwebvest_nobadge"
desc = "A synthetic armor vest with SECURITY printed in cyan lettering on the chest. This one has added webbing and ballistic plates."
icon_state = "pcrcvest"
//Provides the protection of a merc voidsuit, but only covers the chest/groin, and also takes up a suit slot. In exchange it has no slowdown and provides storage.
/obj/item/clothing/suit/storage/vest/heavy/merc
/obj/item/clothing/suit/storage/vest/merc
name = "heavy armor vest"
desc = "A high-quality heavy kevlar plate carrier in a fetching tan. The vest is surprisingly flexible, and possibly made of an advanced material."
desc = "A high-quality armor vest in a fetching tan. It is surprisingly flexible and light, even with the added webbing and armor plating."
icon_state = "mercwebvest"
item_state = "mercwebvest"
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0)
slowdown = 0
//All of the armor below is mostly unused

View File

@@ -52,32 +52,10 @@
update_clothing_icon() //so our overlays update
//New Vest 4 pocket storage and badge toggles, until suit accessories are a thing.
/obj/item/clothing/suit/storage/vest/heavy/New()
/obj/item/clothing/suit/storage/vest/merc/New()
..()
pockets = new/obj/item/weapon/storage/internal(src)
pockets.storage_slots = 4
pockets.max_w_class = 2
pockets.max_storage_space = 8
/obj/item/clothing/suit/storage/vest
var/icon_badge
var/icon_nobadge
verb/toggle()
set name ="Adjust Badge"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(icon_state == icon_badge)
icon_state = icon_nobadge
usr << "You conceal \the [src]'s badge."
else if(icon_state == icon_nobadge)
icon_state = icon_badge
usr << "You reveal \the [src]'s badge."
else
usr << "\The [src] does not have a vest badge."
return
update_clothing_icon()

View File

@@ -7,16 +7,20 @@
slot_flags = SLOT_TIE
w_class = 2.0
var/slot = "decor"
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
var/obj/item/clothing/has_suit = null //the suit the tie may be attached to
var/image/inv_overlay = null //overlay used when attached to clothing.
var/image/mob_overlay = null
var/overlay_state = null
/obj/item/clothing/accessory/Destroy()
on_removed()
return ..()
/obj/item/clothing/accessory/proc/get_inv_overlay()
if(!inv_overlay)
if(!mob_overlay)
get_mob_overlay()
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
if(icon_override)
if("[tmp_icon_state]_tie" in icon_states(icon_override))
@@ -36,23 +40,26 @@
return mob_overlay
//when user attached an accessory to S
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
/obj/item/clothing/accessory/proc/on_attached(var/obj/item/clothing/S, var/mob/user)
if(!istype(S))
return
has_suit = S
loc = has_suit
has_suit.overlays += get_inv_overlay()
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
user << "<span class='notice'>You attach \the [src] to \the [has_suit].</span>"
src.add_fingerprint(user)
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
/obj/item/clothing/accessory/proc/on_removed(var/mob/user)
if(!has_suit)
return
has_suit.overlays -= get_inv_overlay()
has_suit = null
usr.put_in_hands(src)
src.add_fingerprint(user)
if(user)
usr.put_in_hands(src)
src.add_fingerprint(user)
else
src.forceMove(get_turf(src))
//default attackby behaviour
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user)

View File

@@ -6,8 +6,9 @@
/obj/item/clothing/accessory/badge
name = "detective's badge"
desc = "Security Department detective's badge, made from gold."
desc = "A corporate security badge, made from gold and set on false leather."
icon_state = "badge"
item_state = "marshalbadge"
slot_flags = SLOT_BELT | SLOT_TIE
var/stored_name
@@ -25,7 +26,7 @@
/obj/item/clothing/accessory/badge/attack_self(mob/user as mob)
if(!stored_name)
user << "You polish your old badge fondly, shining up the surface."
user << "You polish your badge fondly, shining up the surface."
set_name(user.real_name)
return
@@ -38,14 +39,13 @@
/obj/item/clothing/accessory/badge/attack(mob/living/carbon/human/M, mob/living/user)
if(isliving(user))
user.visible_message("<span class='danger'>[user] invades [M]'s personal space, thrusting [src] into their face insistently.</span>","<span class='danger'>You invade [M]'s personal space, thrusting [src] into their face insistently.</span>")
user.do_attack_animation(M)
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam
//.Holobadges.
/obj/item/clothing/accessory/badge/holo
name = "holobadge"
desc = "This glowing blue badge marks the holder as THE LAW."
desc = "This glowing blue badge marks the holder as a member of corporate security."
icon_state = "holobadge"
item_state = "holobadge"
var/emagged //Emagging removes Sec check.
/obj/item/clothing/accessory/badge/holo/cord
@@ -98,3 +98,24 @@
new /obj/item/clothing/accessory/badge/holo/cord(src)
..()
return
/obj/item/clothing/accessory/badge/warden
name = "warden's badge"
desc = "A silver corporate security badge. Stamped with the words 'Brig Officer.'"
icon_state = "silverbadge"
slot_flags = SLOT_TIE
/obj/item/clothing/accessory/badge/hos
name = "commander's badge"
desc = "An immaculately polished gold security badge. Labeled 'Commander.'"
icon_state = "goldbadge"
slot_flags = SLOT_TIE
/obj/item/clothing/accessory/badge/marshal
name = "marshal's badge"
desc = "A leather-backed gold badge displaying the crest of the Colonial Marshals."
icon_state = "marshalbadge"
badge_string = "Colonial Marshal Bureau"

View File

@@ -40,6 +40,17 @@ var/list/holder_mob_icon_cache = list()
qdel(src)
/obj/item/weapon/holder/GetID()
for(var/mob/M in contents)
var/obj/item/I = M.GetIdCard()
if(I)
return I
return null
/obj/item/weapon/holder/GetAccess()
var/obj/item/I = GetID()
return I ? I.GetAccess() : ..()
/obj/item/weapon/holder/proc/sync(var/mob/living/M)
dir = 2
overlays.Cut()

View File

@@ -8,6 +8,10 @@
death_msg = "expires with a pitiful chirrup..."
universal_understand = 1
universal_speak = 0 // Dionaea do not need to speak to people other than other dionaea.
can_pull_size = 2
can_pull_mobs = MOB_PULL_SMALLER
holder_type = /obj/item/weapon/holder/diona
possession_candidate = 1
var/obj/item/hat
@@ -18,19 +22,6 @@
species = all_species["Diona"]
verbs += /mob/living/carbon/alien/diona/proc/merge
/mob/living/carbon/alien/diona/start_pulling(var/atom/movable/AM)
//TODO: Collapse these checks into one proc (see pai and drone)
if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > 2)
src << "<span class='warning'>You are too small to pull that.</span>"
return
else
..()
else
src << "<span class='warning'>You are too small to pull that.</span>"
return
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1

View File

@@ -770,6 +770,12 @@ var/global/list/damage_icon_parts = list()
bloodsies.color = wear_suit.blood_color
standing.overlays += bloodsies
// Accessories - copied from uniform, BOILERPLATE because fuck this system.
var/obj/item/clothing/suit/suit = wear_suit
if(istype(suit) && suit.accessories.len)
for(var/obj/item/clothing/accessory/A in suit.accessories)
standing.overlays |= A.get_mob_overlay()
overlays_standing[SUIT_LAYER] = standing
update_tail_showing(0)

View File

@@ -29,8 +29,8 @@
/mob/living/carbon/proc/escape_handcuffs()
//if(!(last_special <= world.time)) return
//These two lines represent a significant buff to grabs...
if(!canClick()) return
//This line represent a significant buff to grabs...
// We don't have to check the click cooldown because /mob/living/verb/resist() has done it for us, we can simply set the delay
setClickCooldown(100)
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
@@ -53,7 +53,7 @@
displaytime /= 2
visible_message(
"<span class='danger'>[src] attempts to remove \the [HC]!</span>",
"<span class='danger'>\The [src] attempts to remove \the [HC]!</span>",
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
)
@@ -61,7 +61,7 @@
if(!handcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to remove \the [handcuffed]!</span>",
"<span class='danger'>\The [src] manages to remove \the [handcuffed]!</span>",
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
)
drop_from_inventory(handcuffed)

View File

@@ -393,18 +393,6 @@
resting = 0
icon_state = "[chassis]"
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class == 1)
..()
else
src << "<span class='warning'>You are too small to pull that.</span>"
else
src << "<span class='warning'>You are too small to pull that.</span>"
return
// No binary for pAIs.
/mob/living/silicon/pai/binarycheck()
return 0

View File

@@ -38,6 +38,9 @@ var/list/mob_hat_cache = list()
local_transmit = 1
possession_candidate = 1
can_pull_size = 3
can_pull_mobs = MOB_PULL_SMALLER
mob_bump_flag = SIMPLE_ANIMAL
mob_swap_flags = SIMPLE_ANIMAL
mob_push_flags = SIMPLE_ANIMAL
@@ -50,8 +53,6 @@ var/list/mob_hat_cache = list()
var/obj/machinery/drone_fabricator/master_fabricator
var/law_type = /datum/ai_laws/drone
var/module_type = /obj/item/weapon/robot_module/drone
var/can_pull_size = 2
var/can_pull_mobs
var/obj/item/hat
var/hat_x_offset = 0
var/hat_y_offset = -13
@@ -92,10 +93,10 @@ var/list/mob_hat_cache = list()
icon_state = "constructiondrone"
law_type = /datum/ai_laws/construction_drone
module_type = /obj/item/weapon/robot_module/drone/construction
can_pull_size = 5
can_pull_mobs = 1
hat_x_offset = 1
hat_y_offset = -12
can_pull_size = 5
can_pull_mobs = MOB_PULL_SAME
/mob/living/silicon/robot/drone/New()
@@ -341,20 +342,6 @@ var/list/mob_hat_cache = list()
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
src << "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows."
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
if(!(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)))
if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > can_pull_size)
src << "<span class='warning'>You are too small to pull that.</span>"
return
else
if(!can_pull_mobs)
src << "<span class='warning'>You are too small to pull that.</span>"
return
..()
/mob/living/silicon/robot/drone/add_robot_verbs()
src.verbs |= silicon_subsystems

View File

@@ -31,6 +31,9 @@
mob_size = MOB_MINISCULE
possession_candidate = 1
can_pull_size = 1
can_pull_mobs = MOB_PULL_NONE
/mob/living/simple_animal/mouse/Life()
..()
if(!stat && prob(speak_chance))
@@ -90,10 +93,6 @@
return
..()
/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
src << "<span class='warning'>You are too small to pull anything.</span>"
return
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if( ishuman(AM) )
if(!stat)

View File

@@ -85,8 +85,7 @@
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
/mob/visible_message(var/message, var/self_message, var/blind_message)
var/list/see = get_mobs_or_objects_in_view(world.view,src) | viewers(get_turf(src), null)
var/list/see = get_mobs_or_objects_in_view(world.view,src) | viewers(world.view,src)
for(var/I in see)
if(isobj(I))
@@ -152,8 +151,33 @@
//handle_typing_indicator() //You said the typing indicator would be fine. The test determined that was a lie.
return
/mob/proc/incapacitated()
return (stat || paralysis || stunned || weakened || restrained())
#define UNBUCKLED 0
#define PARTIALLY_BUCKLED 1
#define FULLY_BUCKLED 2
/mob/proc/buckled()
// Preliminary work for a future buckle rewrite,
// where one might be fully restrained (like an elecrical chair), or merely secured (shuttle chair, keeping you safe but not otherwise restrained from acting)
return buckled ? FULLY_BUCKLED : UNBUCKLED
/mob/proc/incapacitated(var/incapacitation_flags = INCAPACITATION_DEFAULT)
if (stat || paralysis || stunned || weakened || resting || sleeping || (status_flags & FAKEDEATH))
return 1
if((incapacitation_flags & INCAPACITATION_RESTRAINED) && restrained())
return 1
if((incapacitation_flags & (INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY)))
var/buckling = buckled()
if(buckling >= PARTIALLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_PARTIALLY))
return 1
if(buckling == FULLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_FULLY))
return 1
return 0
#undef UNBUCKLED
#undef PARTIALLY_BUCKLED
#undef FULLY_BUCKLED
/mob/proc/restrained()
return
@@ -561,20 +585,44 @@
pullin.icon_state = "pull0"
/mob/proc/start_pulling(var/atom/movable/AM)
if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort!
return
if (AM.anchored)
usr << "<span class='notice'>It won't budge!</span>"
src << "<span class='warning'>It won't budge!</span>"
return
var/mob/M = AM
if(ismob(AM))
if(!can_pull_mobs || !can_pull_size)
src << "<span class='warning'>It won't budge!</span>"
return
if((mob_size < M.mob_size) && (can_pull_mobs != MOB_PULL_LARGER))
src << "<span class='warning'>It won't budge!</span>"
return
if((mob_size == M.mob_size) && (can_pull_mobs == MOB_PULL_SMALLER))
src << "<span class='warning'>It won't budge!</span>"
return
// If your size is larger than theirs and you have some
// kind of mob pull value AT ALL, you will be able to pull
// them, so don't bother checking that explicitly.
if(!iscarbon(src))
M.LAssailant = null
else
M.LAssailant = usr
else if(isobj(AM))
var/obj/I = AM
if(!can_pull_size || can_pull_size < I.w_class)
src << "<span class='warning'>It won't budge!</span>"
return
if(pulling)
var/pulling_old = pulling
stop_pulling()
@@ -675,7 +723,7 @@
return 0
/mob/proc/cannot_stand()
return incapacitated() || restrained() || resting || sleeping || (status_flags & FAKEDEATH)
return incapacitated(INCAPACITATION_DEFAULT & (~INCAPACITATION_RESTRAINED))
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/proc/update_canmove()

View File

@@ -149,6 +149,8 @@
var/const/deafness = 2//Carbon
var/const/muteness = 4//Carbon
var/can_pull_size = 10 // Maximum w_class the mob can pull.
var/can_pull_mobs = MOB_PULL_LARGER // Whether or not the mob can pull other mobs.
var/datum/dna/dna = null//Carbon
var/radiation = 0.0//Carbon

View File

@@ -9,7 +9,7 @@
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/colt/detective
magazine_type = /obj/item/ammo_magazine/c45m/rubber
magazine_type = /obj/item/ammo_magazine/c45m/flash
/obj/item/weapon/gun/projectile/colt/detective/verb/rename_gun()
set name = "Name Gun"
@@ -33,7 +33,7 @@
name = ".45 pistol"
desc = "The NT Mk58 is a cheap, ubiquitous sidearm, produced by a NanoTrasen subsidiary. Found pretty much everywhere humans are. Uses .45 rounds."
icon_state = "secguncomp"
magazine_type = /obj/item/ammo_magazine/c45m/rubber
magazine_type = /obj/item/ammo_magazine/c45m/flash
caliber = ".45"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
@@ -41,7 +41,6 @@
/obj/item/weapon/gun/projectile/sec/flash
name = ".45 signal pistol"
magazine_type = /obj/item/ammo_magazine/c45m/flash
/obj/item/weapon/gun/projectile/sec/wood
desc = "The NT Mk58 is a cheap, ubiquitous sidearm, produced by a NanoTrasen subsidiary. This one has a sweet wooden grip. Uses .45 rounds."

View File

@@ -86,17 +86,17 @@
var/total_pellets = get_pellets(distance)
var/spread = max(base_spread - (spread_step*distance), 0)
//shrapnel explosions miss prone mobs with a chance that increases with distance
var/prone_chance = 0
if(!base_spread)
prone_chance = max(spread_step*(distance - 2), 0)
var/hits = 0
for (var/i in 1 to total_pellets)
if(target_mob.lying && target_mob != original && prob(prone_chance))
continue
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
var/old_zone = def_zone
@@ -115,7 +115,7 @@
/obj/item/projectile/bullet/pellet/Move()
. = ..()
//If this is a shrapnel explosion, allow mobs that are prone to get hit, too
if(. && !base_spread && isturf(loc))
for(var/mob/living/M in loc)
@@ -137,8 +137,8 @@
/obj/item/projectile/bullet/pistol/rubber //"rubber" bullets
name = "rubber bullet"
check_armour = "melee"
damage = 10
agony = 40
damage = 5
agony = 25
embed = 0
sharp = 0
@@ -236,4 +236,4 @@
/obj/item/projectile/bullet/pistol/cap/process()
loc = null
qdel(src)
qdel(src)

View File

@@ -11,6 +11,7 @@
name = "chemical shell"
icon_state = "bullet"
damage = 5
agony = 10
kill_count = 15 //if the shell hasn't hit anything after travelling this far it just explodes.
var/flash_range = 0
var/brightness = 7

View File

@@ -115,10 +115,10 @@ var/global/list/datum/supply_drop_loot/supply_drop
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/bulletproof)