This commit is contained in:
Ghommie
2020-02-05 04:34:54 +01:00
146 changed files with 1190 additions and 1257 deletions

View File

@@ -785,6 +785,8 @@
log_whisper(log_text)
if(LOG_EMOTE)
log_emote(log_text)
if(LOG_SUBTLER)
log_subtler(log_text)
if(LOG_DSAY)
log_dsay(log_text)
if(LOG_PDA)
@@ -911,4 +913,3 @@ Proc for attack log creation, because really why not
if(!(material_flags & MATERIAL_NO_EFFECTS))
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
custom_materials[custom_material] += materials[x] * multiplier

View File

@@ -203,13 +203,18 @@
clumsy_check = GRENADE_NONCLUMSY_FUMBLE
/obj/item/grenade/chem_grenade/teargas/moustache/prime()
var/myloc = get_turf(src)
var/list/check_later = list()
for(var/mob/living/carbon/C in get_turf(src))
check_later += C
. = ..()
for(var/mob/living/carbon/M in view(6, myloc))
if(!istype(M.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(M.wear_mask, /obj/item/clothing/mask/gas/mime) )
if(!M.wear_mask || M.dropItemToGround(M.wear_mask))
if(!.) //grenade did not properly prime.
return
for(var/M in check_later)
var/mob/living/carbon/C = M
if(!istype(C.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(C.wear_mask, /obj/item/clothing/mask/gas/mime))
if(!C.wear_mask || C.dropItemToGround(C.wear_mask))
var/obj/item/clothing/mask/fakemoustache/sticky/the_stash = new /obj/item/clothing/mask/fakemoustache/sticky()
M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
C.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
/obj/item/clothing/mask/fakemoustache/sticky
var/unstick_time = 2 MINUTES
@@ -217,10 +222,16 @@
/obj/item/clothing/mask/fakemoustache/sticky/Initialize()
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT)
addtimer(CALLBACK(src, .proc/unstick), unstick_time)
addtimer(TRAIT_CALLBACK_REMOVE(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT), unstick_time)
/obj/item/clothing/mask/fakemoustache/sticky/proc/unstick()
ADD_TRAIT(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT)
/obj/item/clothing/mask/fakemoustache/sticky/equipped(mob/user, slot)
. = ..()
if(slot == SLOT_WEAR_MASK)
ADD_TRAIT(user, TRAIT_NO_INTERNALS, STICKY_MOUSTACHE_TRAIT)
/obj/item/clothing/mask/fakemoustache/sticky/dropped(mob/user)
. = ..()
REMOVE_TRAIT(user, TRAIT_NO_INTERNALS, STICKY_MOUSTACHE_TRAIT)
//DARK H.O.N.K. AND CLOWN MECH WEAPONS

View File

@@ -32,7 +32,7 @@
if(bag)
. += "<span class='notice'>It has \a [bag.name] hooked to its <b>input</b> slot. The counter reads: \"Current Capacity: [bag.reagents.total_volume] of [bag.reagents.maximum_volume]\"</span>"
if(outbag)
. += "<span class='notice'>It has \a [bag.name] hooked to its <b>output</b> slot. The counter reads: \"Current Capacity: [outbag.reagents.total_volume] of [outbag.reagents.maximum_volume]\"</span>"
. += "<span class='notice'>It has \a [outbag.name] hooked to its <b>output</b> slot. The counter reads: \"Current Capacity: [outbag.reagents.total_volume] of [outbag.reagents.maximum_volume]\"</span>"
/obj/machinery/bloodbankgen/handle_atom_del(atom/A)

View File

@@ -61,7 +61,7 @@
QDEL_LIST(unattached_flesh)
. = ..()
/obj/machinery/clonepod/RefreshParts()
/obj/machinery/clonepod/RefreshParts()
speed_coeff = 0
efficiency = 0
for(var/obj/item/stock_parts/scanning_module/S in component_parts)
@@ -471,7 +471,7 @@
if(!istype(organ) || (organ.organ_flags & ORGAN_VITAL))
continue
organ.organ_flags |= ORGAN_FROZEN
organ.Remove(H, special=TRUE)
organ.Remove(TRUE)
organ.forceMove(src)
unattached_flesh += organ

View File

@@ -294,10 +294,12 @@
if(viable_occupant)
temp_html += "<div class='dnaBlockNumber'>1</div>"
var/char = ""
var/ui_text = viable_occupant.dna.uni_identity
var/len_byte = length(ui_text)
var/se_text = viable_occupant.dna.struc_enzymes
var/len_byte = length(se_text)
var/char_it = 0
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
char_it++
char = se_text[byte_it]
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[char_it];'>[char]</a>"
if((char_it % max_line_len) == 0)
temp_html += "</div><div class='clearBoth'>"

View File

@@ -16,8 +16,7 @@
/obj/item/melee/baton,
/obj/item/ammo_box/magazine/recharge,
/obj/item/modular_computer,
/obj/item/gun/ballistic/automatic/magrifle_e,
/obj/item/gun/ballistic/automatic/pistol/mag_e))
/obj/item/gun/ballistic/automatic/magrifle))
/obj/machinery/recharger/RefreshParts()
for(var/obj/item/stock_parts/capacitor/C in component_parts)

View File

@@ -397,12 +397,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

View File

@@ -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)

View File

@@ -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()
. = ..()

View File

@@ -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)

View File

@@ -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

View File

@@ -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 @@
custom_materials = list(/datum/material/glass=7500, /datum/material/iron=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 @@
custom_materials = null
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

View File

@@ -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

View File

@@ -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)