done hopefully
This commit is contained in:
@@ -400,12 +400,14 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
return usr.client.Click(src, src_location, src_control, params)
|
||||
var/list/directaccess = usr.DirectAccess() //This, specifically, is what requires the copypaste. If this were after the adjacency check, then it'd be impossible to use items in your inventory, among other things.
|
||||
//If this were before the above checks, then trying to click on items would act a little funky and signal overrides wouldn't work.
|
||||
if((usr.CanReach(src) || (src in directaccess)) && (usr.CanReach(over) || (over in directaccess)))
|
||||
if(!usr.get_active_held_item())
|
||||
usr.UnarmedAttack(src, TRUE)
|
||||
if(usr.get_active_held_item() == src)
|
||||
melee_attack_chain(usr, over)
|
||||
return TRUE //returning TRUE as a "is this overridden?" flag
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.combatmode && ((C.CanReach(src) || (src in directaccess)) && (C.CanReach(over) || (over in directaccess))))
|
||||
if(!C.get_active_held_item())
|
||||
C.UnarmedAttack(src, TRUE)
|
||||
if(C.get_active_held_item() == src)
|
||||
melee_attack_chain(C, over)
|
||||
return TRUE //returning TRUE as a "is this overridden?" flag
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!L)
|
||||
return OXYLOSS
|
||||
|
||||
L.Remove(user)
|
||||
L.Remove()
|
||||
|
||||
// make some colorful reagent, and apply it to the lungs
|
||||
L.create_reagents(10)
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
|
||||
|
||||
/obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0)
|
||||
if(owner)
|
||||
/obj/item/organ/body_egg/Remove(special = FALSE)
|
||||
if(!QDELETED(owner))
|
||||
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/body_egg/on_death()
|
||||
. = ..()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth")
|
||||
for(var/internal_organ in organs)
|
||||
var/obj/item/organ/I = internal_organ
|
||||
I.Remove(M)
|
||||
I.Remove()
|
||||
I.forceMove(T)
|
||||
head.drop_limb()
|
||||
qdel(head)
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
/obj/item/grenade/chem_grenade/prime()
|
||||
if(stage != READY)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/list/datum/reagents/reactants = list()
|
||||
for(var/obj/item/reagent_containers/glass/G in beakers)
|
||||
@@ -192,7 +192,7 @@
|
||||
O.forceMove(drop_location())
|
||||
beakers = list()
|
||||
stage_change(EMPTY)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
if(nadeassembly)
|
||||
var/mob/M = get_mob_by_ckey(assemblyattacher)
|
||||
@@ -205,6 +205,7 @@
|
||||
update_mob()
|
||||
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
//Large chem grenades accept slime cores and use the appropriately.
|
||||
/obj/item/grenade/chem_grenade/large
|
||||
@@ -219,7 +220,7 @@
|
||||
|
||||
/obj/item/grenade/chem_grenade/large/prime()
|
||||
if(stage != READY)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
for(var/obj/item/slime_extract/S in beakers)
|
||||
if(S.Uses)
|
||||
@@ -237,7 +238,7 @@
|
||||
else
|
||||
S.forceMove(get_turf(src))
|
||||
no_splash = TRUE
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//I tried to just put it in the allowed_containers list but
|
||||
//if you do that it must have reagents. If you're going to
|
||||
@@ -288,7 +289,7 @@
|
||||
|
||||
/obj/item/grenade/chem_grenade/adv_release/prime()
|
||||
if(stage != READY)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/total_volume = 0
|
||||
for(var/obj/item/reagent_containers/RC in beakers)
|
||||
@@ -296,7 +297,7 @@
|
||||
if(!total_volume)
|
||||
qdel(src)
|
||||
qdel(nadeassembly)
|
||||
return
|
||||
return FALSE
|
||||
var/fraction = unit_spread/total_volume
|
||||
var/datum/reagents/reactants = new(unit_spread)
|
||||
reactants.my_atom = src
|
||||
@@ -313,6 +314,7 @@
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
log_game("A grenade detonated at [AREACOORD(DT)]")
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
/obj/item/shield
|
||||
name = "shield"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
block_chance = 50
|
||||
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
|
||||
var/transparent = FALSE // makes beam projectiles pass through the shield
|
||||
|
||||
/obj/item/shield/proc/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
|
||||
return TRUE
|
||||
|
||||
/obj/item/shield/riot
|
||||
name = "riot shield"
|
||||
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "riot"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
@@ -19,6 +23,19 @@
|
||||
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
transparent = TRUE
|
||||
max_integrity = 75
|
||||
|
||||
/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(transparent && (hitby.pass_flags & PASSGLASS))
|
||||
return FALSE
|
||||
if(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
final_block_chance = 100
|
||||
. = ..()
|
||||
if(.)
|
||||
on_shield_block(owner, hitby, attack_text, damage, attack_type)
|
||||
|
||||
/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/melee/baton))
|
||||
@@ -26,14 +43,40 @@
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else if(istype(W, /obj/item/stack/sheet/mineral/titanium))
|
||||
if(obj_integrity >= max_integrity)
|
||||
to_chat(user, "<span class='warning'>[src] is already in perfect condition.</span>")
|
||||
else
|
||||
var/obj/item/stack/sheet/mineral/titanium/T = W
|
||||
T.use(1)
|
||||
obj_integrity = max_integrity
|
||||
to_chat(user, "<span class='notice'>You repair [src] with [T].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
final_block_chance = 100
|
||||
/obj/item/shield/riot/examine(mob/user)
|
||||
. = ..()
|
||||
var/healthpercent = round((obj_integrity/max_integrity) * 100, 1)
|
||||
switch(healthpercent)
|
||||
if(50 to 99)
|
||||
. += "<span class='info'>It looks slightly damaged.</span>"
|
||||
if(25 to 50)
|
||||
. += "<span class='info'>It appears heavily damaged.</span>"
|
||||
if(0 to 25)
|
||||
. += "<span class='warning'>It's falling apart!</span>"
|
||||
|
||||
/obj/item/shield/riot/proc/shatter(mob/living/carbon/human/owner)
|
||||
playsound(owner, 'sound/effects/glassbr3.ogg', 100)
|
||||
new /obj/item/shard((get_turf(src)))
|
||||
|
||||
/obj/item/shield/riot/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(obj_integrity <= damage)
|
||||
var/turf/T = get_turf(owner)
|
||||
T.visible_message("<span class='warning'>[hitby] destroys [src]!</span>")
|
||||
shatter(owner)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
take_damage(damage)
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/riot/roman
|
||||
@@ -43,11 +86,18 @@
|
||||
item_state = "roman_shield"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
transparent = FALSE
|
||||
max_integrity = 65
|
||||
|
||||
/obj/item/shield/riot/roman/fake
|
||||
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>. It appears to be a bit flimsy."
|
||||
block_chance = 0
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 30
|
||||
|
||||
/obj/item/shield/riot/roman/shatter(mob/living/carbon/human/owner)
|
||||
playsound(owner, 'sound/effects/grillehit.ogg', 100)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
|
||||
/obj/item/shield/riot/buckler
|
||||
name = "wooden buckler"
|
||||
@@ -59,11 +109,17 @@
|
||||
materials = list()
|
||||
resistance_flags = FLAMMABLE
|
||||
block_chance = 30
|
||||
transparent = FALSE
|
||||
max_integrity = 55
|
||||
|
||||
/obj/item/shield/riot/buckler/shatter(mob/living/carbon/human/owner)
|
||||
playsound(owner, 'sound/effects/bang.ogg', 50)
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
|
||||
|
||||
|
||||
/obj/item/shield/energy
|
||||
name = "energy combat shield"
|
||||
desc = "A shield that reflects almost all energy projectiles, but is useless against physical attacks. It can be retracted, expanded, and stored anywhere."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
@@ -91,7 +147,7 @@
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
to_chat(user, "<span class='userdanger'>You beat yourself in the head with [src]!</span>")
|
||||
user.take_bodypart_damage(5)
|
||||
active = !active
|
||||
icon_state = "[base_icon_state][active]"
|
||||
@@ -101,21 +157,20 @@
|
||||
throwforce = on_throwforce
|
||||
throw_speed = on_throw_speed
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
throw_speed = initial(throw_speed)
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/shield/riot/tele
|
||||
name = "telescopic shield"
|
||||
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "teleriot0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
@@ -135,7 +190,7 @@
|
||||
/obj/item/shield/riot/tele/attack_self(mob/living/user)
|
||||
active = !active
|
||||
icon_state = "teleriot[active]"
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, TRUE)
|
||||
|
||||
if(active)
|
||||
force = 8
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
attack_verb = list("beaten")
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
|
||||
var/stunforce = 140
|
||||
var/stunforce = 70
|
||||
var/status = FALSE
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/hitcost = 1000
|
||||
@@ -188,8 +188,8 @@
|
||||
stunpwr *= round(stuncharge/hitcost, 0.1)
|
||||
|
||||
|
||||
L.Knockdown(stunpwr)
|
||||
L.adjustStaminaLoss(stunpwr*0.1)//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
|
||||
L.Knockdown(stunpwr, override_stamdmg = 0)
|
||||
L.apply_damage(stunpwr*0.55, STAMINA, user.zone_selected)
|
||||
L.apply_effect(EFFECT_STUTTER, stunforce)
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(user)
|
||||
@@ -274,7 +274,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stunforce = 100
|
||||
stunforce = 60
|
||||
hitcost = 2000
|
||||
throw_hit_chance = 10
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
H.update_internals_hud_icon(0)
|
||||
else
|
||||
if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(HAS_TRAIT(H, TRAIT_NO_INTERNALS))
|
||||
to_chat(H, "<span class='warning'>Due to cumbersome equipment or anatomy, you are currently unable to use internals!</span>")
|
||||
return
|
||||
var/obj/item/clothing/check
|
||||
var/internals = FALSE
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/structure/closet/crate/coffin/examine(mob/user)
|
||||
. = ..()
|
||||
if(user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
if(user.mind?.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
. += {"<span class='cult'>This is a coffin which you can use to regenerate your burns and other wounds faster.</span>"}
|
||||
. += {"<span class='cult'>You can also thicken your blood if you survive the day, and hide from the sun safely while inside.</span>"}
|
||||
/* if(user.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
|
||||
Reference in New Issue
Block a user