Merge pull request #525 from Zuhayr/qol

Porting various QOL from Bay.
This commit is contained in:
Neerti
2015-12-13 21:25:43 -05:00
38 changed files with 330 additions and 56 deletions

View File

@@ -1616,6 +1616,12 @@ var/global/list/gear_datums = list()
sort_category = "misc"
cost = 1
/datum/gear/boot_knife
display_name = "boot knife"
path = /obj/item/weapon/material/kitchen/utensil/knife/boot
sort_category = "misc"
cost = 3
/datum/gear/cane
display_name = "cane"
path = /obj/item/weapon/cane

View File

@@ -419,6 +419,9 @@ BLIND // can't see anything
body_parts_covered = FEET
slot_flags = SLOT_FEET
var/can_hold_knife
var/obj/item/holding
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
force = 2
@@ -429,6 +432,54 @@ BLIND // can't see anything
"Resomi" = 'icons/mob/species/resomi/shoes.dmi',
)
/obj/item/clothing/shoes/proc/draw_knife()
set name = "Draw Boot Knife"
set desc = "Pull out your boot knife."
set category = "IC"
set src in usr
if(usr.stat || usr.restrained() || usr.incapacitated())
return
holding.forceMove(get_turf(usr))
if(usr.put_in_hands(holding))
usr.visible_message("<span class='danger'>\The [usr] pulls a knife out of their boot!</span>")
holding = null
else
usr << "<span class='warning'>Your need an empty, unbroken hand to do that.</span>"
holding.forceMove(src)
if(!holding)
verbs -= /obj/item/clothing/shoes/proc/draw_knife
update_icon()
return
/obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user)
if(can_hold_knife && istype(I, /obj/item/weapon/material/shard) || \
istype(I, /obj/item/weapon/material/butterfly) || \
istype(I, /obj/item/weapon/material/kitchen/utensil) || \
istype(I, /obj/item/weapon/material/hatchet/tacknife))
if(holding)
user << "<span class='warning'>\The [src] is already holding \a [holding].</span>"
return
user.unEquip(I)
I.forceMove(src)
holding = I
user.visible_message("<span class='notice'>\The [user] shoves \the [I] into \the [src].</span>")
verbs |= /obj/item/clothing/shoes/proc/draw_knife
update_icon()
else
return ..()
/obj/item/clothing/shoes/update_icon()
overlays.Cut()
if(holding)
overlays += image(icon, "[icon_state]_knife")
return ..()
/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
return

View File

@@ -183,6 +183,14 @@
item_state = "blindfold"
//vision_flags = BLIND // This flag is only supposed to be used if it causes permanent blindness, not temporary because of glasses
/obj/item/clothing/glasses/sunglasses/blindfold/tape
name = "length of tape"
desc = "It's a robust DIY blindfold!"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "tape_cross"
item_state = null
w_class = 1
/obj/item/clothing/glasses/sunglasses/prescription
name = "prescription sunglasses"
prescription = 1

View File

@@ -8,6 +8,14 @@
gas_transfer_coefficient = 0.90
voicechange = 1
/obj/item/clothing/mask/muzzle/tape
name = "length of tape"
desc = "It's a robust DIY muzzle!"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "tape_cross"
item_state = null
w_class = 1
/obj/item/clothing/mask/muzzle/New()
..()
say_messages = list("Mmfph!", "Mmmf mrrfff!", "Mmmf mnnf!")

View File

@@ -15,6 +15,7 @@
force = 3
armor = list(melee = 30, bullet = 10, laser = 10, energy = 15, bomb = 20, bio = 0, rad = 0)
siemens_coefficient = 0.7
can_hold_knife = 1
/obj/item/clothing/shoes/jackboots/unathi
name = "toe-less jackboots"
@@ -30,3 +31,4 @@
item_state = "workboots"
armor = list(melee = 40, bullet = 0, laser = 0, energy = 15, bomb = 20, bio = 0, rad = 20)
siemens_coefficient = 0.7
can_hold_knife = 1

View File

@@ -20,6 +20,11 @@
holstered.add_fingerprint(user)
w_class = max(w_class, holstered.w_class)
user.visible_message("<span class='notice'>[user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
name = "occupied [initial(name)]"
/obj/item/clothing/accessory/holster/proc/clear_holster()
holstered = null
name = initial(name)
/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob)
if(!holstered)
@@ -40,8 +45,8 @@
)
user.put_in_hands(holstered)
holstered.add_fingerprint(user)
holstered = null
w_class = initial(w_class)
clear_holster()
/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob)
if (has_suit) //if we are part of a suit

View File

@@ -5,6 +5,7 @@
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "blank"
desc = "Nutritious! Probably."
slot_flags = SLOT_HOLSTER
var/plantname
var/datum/seed/seed

View File

@@ -25,10 +25,23 @@
material = "carbon"
/obj/item/weapon/ore/glass
name = "impure silicates"
name = "sand"
icon_state = "ore_glass"
origin_tech = list(TECH_MATERIAL = 1)
material = "sand"
slot_flags = SLOT_HOLSTER
// POCKET SAND!
/obj/item/weapon/ore/glass/throw_impact(atom/hit_atom)
..()
var/mob/living/carbon/human/H = hit_atom
if(istype(H) && H.has_eyes() && prob(85))
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
H.eye_blind += 5
H.eye_blurry += 10
spawn(1)
if(istype(loc, /turf/)) qdel(src)
/obj/item/weapon/ore/phoron
name = "phoron crystals"

View File

@@ -59,7 +59,7 @@ var/global/list/ore_data = list()
/ore/glass
name = "sand"
display_name = "impure silicates"
display_name = "sand"
smelts_to = "glass"
compresses_to = "sandstone"

View File

@@ -5,7 +5,7 @@ var/list/holder_mob_icon_cache = list()
name = "holder"
desc = "You shouldn't ever see this."
icon = 'icons/obj/objects.dmi'
slot_flags = SLOT_HEAD
slot_flags = SLOT_HEAD | SLOT_HOLSTER
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi',
@@ -62,7 +62,7 @@ var/list/holder_mob_icon_cache = list()
//Mob specific holders.
/obj/item/weapon/holder/diona
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5)
slot_flags = SLOT_HEAD | SLOT_OCLOTHING
slot_flags = SLOT_HEAD | SLOT_OCLOTHING | SLOT_HOLSTER
/obj/item/weapon/holder/drone
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 5)

View File

@@ -215,6 +215,7 @@
msg += "<span class='warning'>[T.He] [T.is] on fire!.</span>\n"
msg += "<span class='warning'>"
/*
if(nutrition < 100)
msg += "[T.He] [T.is] severely malnourished.\n"
else if(nutrition >= 500)
@@ -222,6 +223,7 @@
msg += "[T.He] [T.is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
else*/
msg += "[T.He] [T.is] quite chubby.\n"
*/
msg += "</span>"

View File

@@ -1413,3 +1413,13 @@
get_scooped(H)
return
return ..()
/mob/living/carbon/human/verb/pull_punches()
set name = "Pull Punches"
set desc = "Try not to hurt them."
set category = "IC"
if(stat) return
pulling_punches = !pulling_punches
src << "<span class='notice'>You are now [pulling_punches ? "pulling your punches" : "not pulling your punches"].</span>"
return

View File

@@ -1,6 +1,10 @@
/mob/living/carbon/human/proc/get_unarmed_attack(var/mob/living/carbon/human/target, var/hit_zone)
for(var/datum/unarmed_attack/u_attack in species.unarmed_attacks)
if(u_attack.is_usable(src, target, hit_zone))
if(pulling_punches)
var/datum/unarmed_attack/soft_variant = u_attack.get_sparring_variant()
if(soft_variant)
return soft_variant
return u_attack
return null
@@ -221,7 +225,7 @@
attack.apply_effects(H, src, armour, rand_damage, hit_zone)
// Finally, apply damage to target
apply_damage(real_damage, BRUTE, affecting, armour, sharp=attack.sharp, edge=attack.edge)
apply_damage(real_damage, (attack.deal_halloss ? HALLOSS : BRUTE), affecting, armour, sharp=attack.sharp, edge=attack.edge)
if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")

View File

@@ -82,6 +82,7 @@
var/list/flavor_texts = list()
var/gunshot_residue
var/pulling_punches // Are you trying not to hurt your opponent?
mob_bump_flag = HUMAN
mob_push_flags = ~HEAVY

View File

@@ -1,3 +1,5 @@
var/global/list/sparring_attack_cache = list()
//Species unarmed attacks
/datum/unarmed_attack
var/attack_verb = list("attack") // Empty hand hurt intent verb.
@@ -8,10 +10,19 @@
var/shredding = 0 // Calls the old attack_alien() behavior on objects/mobs when on harm intent.
var/sharp = 0
var/edge = 0
var/deal_halloss
var/sparring_variant_type = /datum/unarmed_attack/light_strike
var/eye_attack_text
var/eye_attack_text_victim
/datum/unarmed_attack/proc/get_sparring_variant()
if(sparring_variant_type)
if(!sparring_attack_cache[sparring_variant_type])
sparring_attack_cache[sparring_variant_type] = new sparring_variant_type()
return sparring_attack_cache[sparring_variant_type]
/datum/unarmed_attack/proc/is_usable(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone)
if(user.restrained())
return 0
@@ -84,7 +95,7 @@
/datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
eyes.take_damage(rand(3,4), 1)
user.visible_message("<span class='danger'>[user] presses \his [eye_attack_text] into [target]'s [eyes.name]!</span>")
target << "<span class='danger'>You experience[(target.species.flags & NO_PAIN)? "" : " immense pain as you feel" ] [eye_attack_text_victim] being pressed into your [eyes.name][(target.species.flags & NO_PAIN)? "." : "!"]</span>"
@@ -233,4 +244,14 @@
switch(attack_damage)
if(1 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
/datum/unarmed_attack/light_strike
deal_halloss = 3
attack_noun = list("tap","light strike")
attack_verb = list("tapped", "lightly struck")
damage = 2
shredding = 0
damage = 0
sharp = 0
edge = 0

View File

@@ -20,7 +20,7 @@
return
..()
if(handcuffed)
spawn() escape_handcuffs()
else if(legcuffed)
@@ -47,6 +47,11 @@
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
var/mob/living/carbon/human/H = src
if(istype(H) && H.gloves && istype(H.gloves,/obj/item/clothing/gloves/rig))
breakouttime /= 2
displaytime /= 2
visible_message(
"<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>"

View File

@@ -604,18 +604,24 @@ default behaviour is:
if(istype(M))
M.drop_from_inventory(H)
M << "<span class='warning'>[H] wriggles out of your grip!</span>"
src << "<span class='warning'>You wriggle out of [M]'s grip!</span>"
else if(istype(H.loc,/obj/item))
src << "<span class='warning'>You struggle free of [H.loc].</span>"
H.forceMove(get_turf(H))
M << "<span class='warning'>\The [H] wriggles out of your grip!</span>"
src << "<span class='warning'>You wriggle out of \the [M]'s grip!</span>"
if(istype(M))
// Update whether or not this mob needs to pass emotes to contents.
for(var/atom/A in M.contents)
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
return
M.status_flags &= ~PASSEMOTES
M.status_flags &= ~PASSEMOTES
else if(istype(H.loc,/obj/item/clothing/accessory/holster))
var/obj/item/clothing/accessory/holster/holster = H.loc
if(holster.holstered == H)
holster.clear_holster()
src << "<span class='warning'>You extricate yourself from \the [holster].</span>"
H.forceMove(get_turf(H))
else if(istype(H.loc,/obj/item))
src << "<span class='warning'>You struggle free of \the [H.loc].</span>"
H.forceMove(get_turf(H))
/mob/living/proc/escape_buckle()
if(buckled)

View File

@@ -665,7 +665,7 @@ var/global/list/robot_modules = list(
no_slip = 1
networks = list(NETWORK_ENGINEERING)
/obj/item/weapon/robot_module/drone/New()
/obj/item/weapon/robot_module/drone/New(var/mob/living/silicon/robot/robot)
src.modules += new /obj/item/weapon/weldingtool(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -675,6 +675,11 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/device/lightreplacer(src)
src.modules += new /obj/item/weapon/gripper(src)
src.modules += new /obj/item/weapon/soap(src)
src.modules += new /obj/item/weapon/extinguisher(src)
robot.internals = new/obj/item/weapon/tank/jetpack/carbondioxide(src)
src.modules += robot.internals
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag.name = "Plasma Cutter"

View File

@@ -914,7 +914,7 @@
/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
src.visible_message("\red [src.name] splats.","\red You hear a splat.")
src.visible_message("<span class='danger'>\The [src.name] splats.</span>","<span class='danger'>You hear a splat.</span>")
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis

View File

@@ -221,20 +221,31 @@
flags = OPENCONTAINER
unacidable = 0
attackby(var/obj/D, mob/user as mob)
if(isprox(D))
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob)
update_icon()
overlays.Cut()
if(isprox(D))
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
qdel(src)
return
else if(istype(D, /obj/item/weapon/mop))
if(reagents.total_volume < 1)
user << "<span class='warning'>\The [src] is empty!</span>"
else
reagents.trans_to_obj(D, 5)
user << "<span class='notice'>You wet \the [D] in \the [src].</span>"
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return
else
return ..()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/obj/item/weapon/reagent_containers/glass/bucket/update_icon()
overlays.Cut()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/*
/obj/item/weapon/reagent_containers/glass/blender_jug