Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/modules/mob/living/carbon/carbon.dm
	code/modules/organs/organ_internal.dm
	code/modules/organs/organ_objects.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/syringes.dm
This commit is contained in:
Kelenius
2015-03-31 17:44:42 +03:00
273 changed files with 8890 additions and 6038 deletions
+1
View File
@@ -802,6 +802,7 @@ var/list/admin_verbs_mentor = list(
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
M.update_eyes()
var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
if(new_skin)
+6 -28
View File
@@ -968,11 +968,7 @@
//strip their stuff and stick it in the crate
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = locker
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I, locker)
M.update_icons()
//so they black out before warping
@@ -1005,11 +1001,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
M.Paralyse(5)
sleep(5)
@@ -1034,11 +1026,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
M.Paralyse(5)
sleep(5)
@@ -1085,11 +1073,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.drop_from_inventory(I)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/observer = M
@@ -1835,16 +1819,10 @@
if(!security)
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in H)
if(istype(W, /datum/organ/external))
if(istype(W, /obj/item/organ/external))
continue
//don't strip organs
H.u_equip(W)
if (H.client)
H.client.screen -= W
if (W)
W.loc = H.loc
W.dropped(H)
W.layer = initial(W.layer)
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
+2 -2
View File
@@ -1,7 +1,7 @@
/proc/getbrokeninhands()
var/icon/IL = new('icons/mob/items_lefthand.dmi')
var/icon/IL = new('icons/mob/items/lefthand.dmi')
var/list/Lstates = IL.IconStates()
var/icon/IR = new('icons/mob/items_righthand.dmi')
var/icon/IR = new('icons/mob/items/righthand.dmi')
var/list/Rstates = IR.IconStates()
+26 -26
View File
@@ -735,19 +735,19 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
commandos.equip(M)
if("nanotrasen representative")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Representative"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/clipboard(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_belt)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -757,23 +757,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.assignment = "NanoTrasen Navy Representative"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen officer")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Officer"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -781,24 +781,24 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Officer"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen captain")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Captain"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, slot_r_store)
M.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
@@ -806,7 +806,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Captain"
W.registered_name = M.real_name
M.equip_if_possible(W, slot_wear_id)
M.equip_to_slot_or_del(W, slot_wear_id)
if("emergency response team")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
+1 -1
View File
@@ -23,7 +23,7 @@
proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
return
var/datum/organ/external/affecting = null
var/obj/item/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
+33 -8
View File
@@ -111,6 +111,7 @@ datum/preferences
// maps each organ to either null(intact), "cyborg" or "amputated"
// will probably not be able to do this for head and torso ;)
var/list/organ_data = list()
var/list/rlimb_data = list()
var/list/player_alt_titles = new() // the default name of a job like "Medical Doctor"
var/list/flavor_texts = list()
@@ -344,7 +345,12 @@ datum/preferences
++ind
if(ind > 1)
dat += ", "
dat += "\tMechanical [organ_name] prothesis"
var/datum/robolimb/R
if(rlimb_data[name] && all_robolimbs[rlimb_data[name]])
R = all_robolimbs[rlimb_data[name]]
else
R = basic_robolimb
dat += "\t[R.company] [organ_name] prothesis"
else if(status == "amputated")
++ind
if(ind > 1)
@@ -629,6 +635,8 @@ datum/preferences
dat += "</br><b>Has a plantlike physiology.</b>"
if(current_species.flags & IS_SYNTHETIC)
dat += "</br><b>Is machine-based.</b>"
if(current_species.flags & REGENERATES_LIMBS)
dat += "</br><b>Has a plantlike physiology.</b>"
dat += "</small></td>"
dat += "</tr>"
dat += "</table><center><hr/>"
@@ -1421,15 +1429,25 @@ datum/preferences
switch(new_state)
if("Normal")
organ_data[limb] = null
rlimb_data[limb] = null
if(third_limb)
organ_data[third_limb] = null
rlimb_data[third_limb] = null
if("Amputated")
organ_data[limb] = "amputated"
rlimb_data[limb] = null
if(second_limb)
organ_data[second_limb] = "amputated"
rlimb_data[second_limb] = null
if("Prothesis")
var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in chargen_robolimbs
if(!choice)
return
rlimb_data[limb] = choice
organ_data[limb] = "cyborg"
if(second_limb)
organ_data[second_limb] = choice
organ_data[second_limb] = "cyborg"
if(third_limb && organ_data[third_limb] == "amputated")
organ_data[third_limb] = null
@@ -1662,21 +1680,28 @@ datum/preferences
for(var/name in organ_data)
var/status = organ_data[name]
var/datum/organ/external/O = character.organs_by_name[name]
var/obj/item/organ/external/O = character.organs_by_name[name]
if(O)
if(status == "amputated")
O.amputated = 1
O.status |= ORGAN_DESTROYED
O.destspawn = 1
character.organs_by_name[O.limb_name] = null
character.organs -= O
if(O.children) // This might need to become recursive.
for(var/obj/item/organ/external/child in O.children)
character.organs_by_name[child.limb_name] = null
character.organs -= child
else if(status == "cyborg")
O.status |= ORGAN_ROBOT
if(rlimb_data[name])
O.robotize(rlimb_data[name])
else
O.robotize()
else
var/datum/organ/internal/I = character.internal_organs_by_name[name]
var/obj/item/organ/I = character.internal_organs_by_name[name]
if(I)
if(status == "assisted")
I.mechassist()
else if(status == "mechanical")
I.mechanize()
I.robotize()
character.underwear = underwear
@@ -170,6 +170,7 @@
S["skills"] >> skills
S["skill_specialization"] >> skill_specialization
S["organ_data"] >> organ_data
S["rlimb_data"] >> rlimb_data
S["gear"] >> gear
S["home_system"] >> home_system
S["citizenship"] >> citizenship
@@ -240,6 +241,7 @@
if(isnull(disabilities)) disabilities = 0
if(!player_alt_titles) player_alt_titles = new()
if(!organ_data) src.organ_data = list()
if(!rlimb_data) src.rlimb_data = list()
if(!gear) src.gear = list()
//if(!skin_style) skin_style = "Default"
@@ -324,6 +326,7 @@
S["skills"] << skills
S["skill_specialization"] << skill_specialization
S["organ_data"] << organ_data
S["rlimb_data"] << rlimb_data
S["gear"] << gear
S["home_system"] << home_system
S["citizenship"] << citizenship
+1 -1
View File
@@ -182,7 +182,7 @@
icons.Add(usr.zone_sel)
for(var/obj/screen/I in icons)
if(I.name in list("help", "harm", "disarm", "grab")) continue
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
I.icon = ui_style2icon(UI_style_new)
I.color = UI_style_color_new
I.alpha = UI_style_alpha_new
+7 -20
View File
@@ -45,21 +45,15 @@
siemens_coefficient = 0.6
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
species_restricted = list("Vox", "Vox Armalis")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/suit.dmi',
"Vox Armalis" = 'icons/mob/species/armalis/suit.dmi',
)
species_restricted = list("Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
/obj/item/clothing/head/helmet/space/vox
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
siemens_coefficient = 0.6
flags = HEADCOVERSEYES|STOPPRESSUREDAMAGE
species_restricted = list("Vox","Vox Armalis")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi',
"Vox Armalis" = 'icons/mob/species/armalis/head.dmi',
)
species_restricted = list("Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
/obj/item/clothing/head/helmet/space/vox/pressure
name = "alien helmet"
@@ -137,22 +131,15 @@
siemens_coefficient = 0
permeability_coefficient = 0.05
item_color = "gloves-vox"
species_restricted = list("Vox","Vox Armalis")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/gloves.dmi',
"Vox Armalis" = 'icons/mob/species/armalis/gloves.dmi',
)
species_restricted = list("Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
/obj/item/clothing/shoes/magboots/vox
desc = "A pair of heavy, jagged armoured foot pieces, seemingly suitable for a velociraptor."
name = "vox magclaws"
item_state = "boots-vox"
icon_state = "boots-vox"
species_restricted = list("Vox","Vox Armalis")
sprite_sheets = list(
"Vox Armalis" = 'icons/mob/species/armalis/feet.dmi'
)
species_restricted = list("Vox")
action_button_name = "Toggle the magclaws"
@@ -85,7 +85,7 @@
desc = "A shoulder-mounted battery-powered laser cannon mount."
selectable = 1
usable = 1
use_power_cost = 10
module_cooldown = 0
engage_string = "Configure"
@@ -76,7 +76,7 @@
// Some space suits are equipped with reactive membranes that support
// broken limbs - at the time of writing, only the ninja suit, but
// I can see it being useful for other suits as we expand them. ~ Z
// The actual splinting occurs in /datum/organ/external/proc/fracture()
// The actual splinting occurs in /obj/item/organ/external/proc/fracture()
/obj/item/clothing/suit/space/proc/check_limb_support(var/mob/living/carbon/human/user)
// If this isn't set, then we don't need to care.
@@ -87,7 +87,7 @@
return
// Otherwise, remove the splints.
for(var/datum/organ/external/E in supporting_limbs)
for(var/obj/item/organ/external/E in supporting_limbs)
E.status &= ~ ORGAN_SPLINTED
user << "The suit stops supporting your [E.display_name]."
user << "The suit stops supporting your [E.name]."
supporting_limbs = list()
@@ -68,7 +68,7 @@
/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && isliving(user))
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
var/body_part = parse_zone(user.zone_sel.selecting)
if(body_part)
var/their = "their"
@@ -29,7 +29,7 @@
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
user << "<span class='warning'>You need an empty hand to draw \the [holstered]!</span>"
else
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
usr.visible_message(
"\red [user] draws \the [holstered], ready to shoot!</span>",
"<span class='warning'>You draw \the [holstered], ready to shoot!</span>"
+4 -4
View File
@@ -60,7 +60,7 @@
//replace old ID
del(C)
ok = M.equip_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
ok = M.equip_to_slot_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
break
else if(istype(Item,/obj/item/weapon/storage/belt))
if(M.ckey == "jakksergal" && M.real_name == "Nashi Ra'hal" && M.mind.role_alt_title && M.mind.role_alt_title != "Nurse" && M.mind.role_alt_title != "Chemist")
@@ -72,13 +72,13 @@
for(var/obj/item/weapon/storage/belt/B in M)
del(B)
M.belt=null
ok = M.equip_if_possible(I, slot_belt, 0)
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
break
if(istype(M.belt,/obj/item/device/pda))
for(var/obj/item/device/pda/Pda in M)
M.belt=null
M.equip_if_possible(Pda, slot_l_store, 0)
ok = M.equip_if_possible(I, slot_belt, 0)
M.equip_to_slot_if_possible(Pda, slot_l_store, 0)
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
else if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back
Item.loc = M.back
ok = 1
+2 -2
View File
@@ -26,7 +26,7 @@
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("dexalin"))
for(var/organ_name in list("chest","l_arm","r_arm","r_leg","l_leg","head","groin"))
var/datum/organ/external/E = H.get_organ(organ_name)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(0, 5, 0)
/datum/genetics/side_effect/bone_snap
@@ -42,7 +42,7 @@
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("bicaridine"))
var/organ_name = pick("chest","l_arm","r_arm","r_leg","l_leg","head","groin")
var/datum/organ/external/E = H.get_organ(organ_name)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(20, 0, 0)
E.fracture()
+2 -2
View File
@@ -251,7 +251,7 @@ var/global/list/holodeck_programs = list(
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.u_equip(obj)
M.remove_from_mob(obj)
M.update_icons() //so their overlays update
if(!silent)
@@ -384,4 +384,4 @@ var/global/list/holodeck_programs = list(
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
use_power = 1
use_power = 1
+2 -2
View File
@@ -406,13 +406,13 @@
faction = "neutral"
melee_damage_lower = 0
melee_damage_upper = 0
wall_smash = 0
environment_smash = 0
destroy_surroundings = 0
else
faction = "carp"
melee_damage_lower = initial(melee_damage_lower)
melee_damage_upper = initial(melee_damage_upper)
wall_smash = initial(wall_smash)
environment_smash = initial(environment_smash)
destroy_surroundings = initial(destroy_surroundings)
/mob/living/simple_animal/hostile/carp/holodeck/gib()
+2 -2
View File
@@ -226,7 +226,7 @@
if(user == M)
return ..()
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
// This is being copypasted here because reagent_containers (WHY DOES FOOD DESCEND FROM THAT) overrides it completely.
// TODO: refactor all food paths to be less horrible and difficult to work with in this respect. ~Z
@@ -291,7 +291,7 @@
if(istype(user.loc,/turf/space))
return
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
user.visible_message("<span class='danger'>\The [user] squashes \the [src]!</span>")
seed.thrown_at(src,user)
sleep(-1)
+3 -3
View File
@@ -110,19 +110,19 @@
if(!target_limb) target_limb = pick("l_foot","r_foot","l_leg","r_leg","l_hand","r_hand","l_arm", "r_arm","head","chest","groin")
var/datum/organ/external/affecting = target.get_organ(target_limb)
var/obj/item/organ/external/affecting = target.get_organ(target_limb)
var/damage = 0
if(get_trait(TRAIT_CARNIVOROUS))
if(get_trait(TRAIT_CARNIVOROUS) == 2)
if(affecting)
target << "<span class='danger'>\The [fruit]'s thorns pierce your [affecting.display_name] greedily!</span>"
target << "<span class='danger'>\The [fruit]'s thorns pierce your [affecting.name] greedily!</span>"
else
target << "<span class='danger'>\The [fruit]'s thorns pierce your flesh greedily!</span>"
damage = get_trait(TRAIT_POTENCY)/2
else
if(affecting)
target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your [affecting.display_name]!</span>"
target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your [affecting.name]!</span>"
else
target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your flesh!</span>"
damage = get_trait(TRAIT_POTENCY)/5
+2 -2
View File
@@ -88,7 +88,7 @@
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
user << "That seed is not compatible with our genetics technology."
else
user.drop_item(W)
user.remove_from_mob(W)
W.loc = src
seed = W
user << "You load [W] into [src]."
@@ -120,7 +120,7 @@
user << "That disk does not have any gene data loaded."
return
user.drop_item(W)
user.remove_from_mob(W)
W.loc = src
loaded_disk = W
user << "You load [W] into [src]."
+2 -2
View File
@@ -453,7 +453,7 @@
if(!seed)
var/obj/item/seeds/S = O
user.drop_item(O)
user.remove_from_mob(O)
if(!S.seed)
user << "The packet seems to be empty. You throw it away."
@@ -497,7 +497,7 @@
else if ( istype(O, /obj/item/weapon/plantspray) )
var/obj/item/weapon/plantspray/spray = O
user.drop_item(O)
user.remove_from_mob(O)
toxins += spray.toxicity
pestlevel -= spray.pest_kill_str
weedlevel -= spray.weed_kill_str
+1 -1
View File
@@ -226,7 +226,7 @@
icon_state = "hatchet"
flags = CONDUCT
force = 12.0
w_class = 2.0
w_class = 3.0
throwforce = 15.0
throw_speed = 4
throw_range = 4
+2
View File
@@ -118,6 +118,8 @@
origin_tech = "materials=4;phorontech=3;engineering=3"
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
drill_verb = "cutting"
sharp = 1
edge = 1
/obj/item/weapon/pickaxe/diamond
name = "diamond pickaxe"
+1 -1
View File
@@ -12,7 +12,7 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore))
user.u_equip(W)
user.remove_from_mob(W)
src.contents += W
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
+97 -191
View File
@@ -1,15 +1,81 @@
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(slot)
var/obj/item/W = get_active_hand()
if(istype(W))
equip_to_slot_if_possible(W, slot)
/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
return 1
else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning, redraw_mob))
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
if(!istype(W)) return 0
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
del(W)
else
if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
return 1
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
//In most cases you will want to use equip_to_slot_if_possible()
/mob/proc/equip_to_slot(obj/item/W as obj, slot)
return
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \
slot_back,\
slot_wear_id,\
slot_w_uniform,\
slot_wear_suit,\
slot_wear_mask,\
slot_head,\
slot_shoes,\
slot_gloves,\
slot_l_ear,\
slot_r_ear,\
slot_glasses,\
slot_belt,\
slot_s_store,\
slot_tie,\
slot_l_store,\
slot_r_store\
)
//puts the item "W" into an appropriate slot in a human's inventory
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)
if(!istype(W)) return 0
for(var/slot in slot_equipment_priority)
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
return 1
return 0
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.
//Returns the thing in our active hand
/mob/proc/get_active_hand()
if(issilicon(src))
if(isrobot(src))
if(src:module_active)
return src:module_active
else
if(hand) return l_hand
else return r_hand
if(hand) return l_hand
else return r_hand
//Returns the thing in our inactive hand
/mob/proc/get_inactive_hand()
@@ -77,96 +143,45 @@
W.dropped()
return 0
/mob/proc/drop_item_v() //this is dumb.
if(stat == CONSCIOUS && isturf(loc))
return drop_item()
return 0
// Removes an item from inventory and places it in the target atom
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W)
if(!Target)
Target = loc
if(client) client.screen -= W
u_equip(W)
remove_from_mob(W)
if(!W) return 1 // self destroying objects (tk, grabs)
W.layer = initial(W.layer)
W.loc = Target
var/turf/T = get_turf(Target)
if(isturf(T))
T.Entered(W)
W.dropped(src)
W.forceMove(Target)
update_icons()
return 1
return 0
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
if(l_hand)
if(client) client.screen -= l_hand
l_hand.layer = initial(l_hand.layer)
if(Target) l_hand.loc = Target.loc
else l_hand.loc = loc
var/turf/T = get_turf(loc)
if(isturf(T))
T.Entered(l_hand)
l_hand.dropped(src)
l_hand = null
update_inv_l_hand()
return 1
return 0
return drop_from_inventory(l_hand, Target)
//Drops the item in our right hand
/mob/proc/drop_r_hand(var/atom/Target)
if(r_hand)
if(client) client.screen -= r_hand
r_hand.layer = initial(r_hand.layer)
if(Target) r_hand.loc = Target.loc
else r_hand.loc = loc
var/turf/T = get_turf(Target)
if(istype(T))
T.Entered(r_hand)
r_hand.dropped(src)
r_hand = null
update_inv_r_hand()
return 1
return 0
return drop_from_inventory(r_hand, Target)
//Drops the item in our active hand.
/mob/proc/drop_item(var/atom/Target)
if(hand) return drop_l_hand(Target)
else return drop_r_hand(Target)
//TODO: phase out this proc
/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this?
W.loc = null
W.layer = initial(W.layer)
u_equip(W)
update_icons()
return
/mob/proc/u_equip(W as obj)
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
Does nothing else.
DO NOT CALL THIS PROC DIRECTLY. It is meant to be called only by other inventory procs.
It's probably okay to use it if you are transferring the item between slots on the same mob,
but chances are you're safer calling remove_from_mob() or drop_from_inventory() anyways.
As far as I can tell the proc exists so that mobs with different inventory slots can override
the search through all the slots, without having to duplicate the rest of the item dropping.
*/
/mob/proc/u_equip(obj/W as obj)
if (W == r_hand)
r_hand = null
update_inv_r_hand(0)
@@ -181,40 +196,27 @@
update_inv_wear_mask(0)
return
//This differs from remove_from_mob() in that it checks canremove first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
if(!I) //If there's nothing to drop, the drop is automatically successful. If(unEquip) should generally be used to check for NODROP.
if(!I) //If there's nothing to drop, the drop is automatically successful.
return 1
/*if((I.flags & NODROP) && !force)
return 0*/
if(!I.canremove && !force)
return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand()
else if(I == l_hand)
l_hand = null
update_inv_l_hand()
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
remove_from_mob(I)
return 1
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
//It does call u_equip() though. So it can drop items to the floor but only if src is human.
/mob/proc/remove_from_mob(var/obj/O)
src.u_equip(O)
if (src.client)
src.client.screen -= O
O.layer = initial(O.layer)
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.dropped()
return 1
@@ -240,99 +242,3 @@
//if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand
return items
/** BS12's proc to get the item in the active hand. Couldn't find the /tg/ equivalent. **/
/mob/proc/equipped()
return get_active_hand() //TODO: get rid of this proc
/mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/
//warning: icky code
var/equipped = 0
switch(slot)
if(slot_back)
if(!src.back)
src.back = W
equipped = 1
if(slot_wear_mask)
if(!src.wear_mask)
src.wear_mask = W
equipped = 1
if(slot_handcuffed)
if(!src.handcuffed)
src.handcuffed = W
equipped = 1
if(slot_l_hand)
if(!src.l_hand)
src.l_hand = W
equipped = 1
if(slot_r_hand)
if(!src.r_hand)
src.r_hand = W
equipped = 1
if(slot_belt)
if(!src.belt && src.w_uniform)
src.belt = W
equipped = 1
if(slot_wear_id)
if(!src.wear_id && src.w_uniform)
src.wear_id = W
equipped = 1
if(slot_l_ear)
if(!src.l_ear)
src.l_ear = W
equipped = 1
if(slot_r_ear)
if(!src.r_ear)
src.r_ear = W
equipped = 1
if(slot_glasses)
if(!src.glasses)
src.glasses = W
equipped = 1
if(slot_gloves)
if(!src.gloves)
src.gloves = W
equipped = 1
if(slot_head)
if(!src.head)
src.head = W
equipped = 1
if(slot_shoes)
if(!src.shoes)
src.shoes = W
equipped = 1
if(slot_wear_suit)
if(!src.wear_suit)
src.wear_suit = W
equipped = 1
if(slot_w_uniform)
if(!src.w_uniform)
src.w_uniform = W
equipped = 1
if(slot_l_store)
if(!src.l_store && src.w_uniform)
src.l_store = W
equipped = 1
if(slot_r_store)
if(!src.r_store && src.w_uniform)
src.r_store = W
equipped = 1
if(slot_s_store)
if(!src.s_store && src.wear_suit)
src.s_store = W
equipped = 1
if(slot_in_backpack)
if (src.back && istype(src.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = src.back
if(B.contents.len < B.storage_slots && W.w_class <= B.max_w_class)
W.loc = B
equipped = 1
if(equipped)
W.layer = 20
if(src.back && W.loc != src.back)
W.loc = src
else
if (del_on_fail)
del(W)
return equipped
+29 -1
View File
@@ -24,7 +24,7 @@
var/mob/living/carbon/M = other
if(!istype(M))
return 1
if(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
return 1
return 0
@@ -82,3 +82,31 @@
/datum/language/vox/get_random_name()
return ..(FEMALE,1,6)
/datum/language/cultcommon
name = "Cult"
desc = "The chants of the occult, the incomprehensible."
speech_verb = "intones"
ask_verb = "intones"
exclaim_verb = "chants"
colour = "cult"
key = "n"
flags = RESTRICTED
space_chance = 100
syllables = list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri", \
"orkan", "allaq", "sas'so", "c'arta", "forbici", "tarem", "n'ath", "reth", "sh'yro", "eth", "d'raggathnor", \
"mah'weyh", "pleggh", "at", "e'ntrath", "tok-lyr", "rqa'nap", "g'lt-ulotf", "ta'gh", "fara'qha", "fel", "d'amar det", \
"yu'gular", "faras", "desdae", "havas", "mithum", "javara", "umathar", "uf'kal", "thenar", "rash'tla", \
"sektath", "mal'zua", "zasan", "therium", "viortia", "kla'atu", "barada", "nikt'o", "fwe'sh", "mah", "erl", "nyag", "r'ya", \
"gal'h'rfikk", "harfrandid", "mud'gib", "fuu", "ma'jin", "dedo", "ol'btoh", "n'ath", "reth", "sh'yro", "eth", \
"d'rekkathnor", "khari'd", "gual'te", "nikka", "nikt'o", "barada", "kla'atu", "barhah", "hra" ,"zar'garis")
/datum/language/cult
name = "Occult"
desc = "The initiated can share their thoughts by means defying all reason."
speech_verb = "intones"
ask_verb = "intones"
exclaim_verb = "chants"
colour = "cult"
key = "m"
flags = RESTRICTED | HIVEMIND
@@ -20,10 +20,10 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
@@ -2,7 +2,7 @@
if(istype(M))
//Let people pick the little buggers up.
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
if(M.species && M.species.name == "Diona")
M << "You feel your being twine with that of [src] as it merges with your biomass."
src << "You feel your being twine with that of [M] as you merge with its biomass."
@@ -11,4 +11,4 @@
/mob/living/carbon/alien/larva/New()
..()
add_language("Xenomorph") //Bonus language.
internal_organs += new /datum/organ/internal/xenos/hivenode(src)
internal_organs |= new /obj/item/organ/xenos/hivenode(src)
@@ -10,11 +10,6 @@
throw_range = 5
origin_tech = "biotech=3"
attack_verb = list("attacked", "slapped", "whacked")
prosthetic_name = "cyberbrain"
prosthetic_icon = "brain-prosthetic"
organ_tag = "brain"
organ_type = /datum/organ/internal/brain
var/mob/living/carbon/brain/brainmob = null
/obj/item/organ/brain/xeno
@@ -49,19 +44,18 @@
else
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)
/obj/item/organ/brain/removed(var/mob/living/user)
..()
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
if(borer)
borer.detatch() //Should remove borer if the brain is removed - RR
var/mob/living/carbon/human/H = target
var/obj/item/organ/brain/B = src
if(istype(B) && istype(H))
B.transfer_identity(target)
if(istype(B) && istype(owner))
B.transfer_identity(owner)
/obj/item/organ/brain/replaced(var/mob/living/target)
@@ -78,8 +72,6 @@
/obj/item/organ/brain/slime
name = "slime core"
desc = "A complex, organic knot of jelly and crystalline particles."
prosthetic_name = null
prosthetic_icon = null
robotic = 2
icon = 'icons/mob/slimes.dmi'
icon_state = "green slime extract"
@@ -87,8 +79,6 @@
/obj/item/organ/brain/golem
name = "chem"
desc = "A tightly furled roll of paper, covered with indecipherable runes."
prosthetic_name = null
prosthetic_icon = null
robotic = 2
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
+24 -115
View File
@@ -42,8 +42,8 @@
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/organ = H.get_organ("chest")
if (istype(organ, /datum/organ/external))
var/datum/organ/external/temp = organ
if (istype(organ, /obj/item/organ/external))
var/obj/item/organ/external/temp = organ
if(temp.take_damage(d, 0))
H.UpdateDamageIcon()
H.updatehealth()
@@ -70,12 +70,13 @@
/mob/living/carbon/attack_hand(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return
if (hasorgans(M))
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
if (M.hand)
temp = M:organs_by_name["l_hand"]
if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
M << "\red You can't use your [temp.display_name]"
H << "\red You can't use your [temp.name]"
return
for(var/datum/disease/D in viruses)
@@ -165,7 +166,7 @@
"\blue You check yourself for injuries." \
)
for(var/datum/organ/external/org in H.organs)
for(var/obj/item/organ/external/org in H.organs)
var/status = ""
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
@@ -196,7 +197,7 @@
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if (on_fire)
@@ -337,16 +338,9 @@
if(!item) return //Grab processing has a chance of returning null
item.layer = initial(item.layer)
u_equip(item)
update_icons()
if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
item.loc = src.loc
if(src.client)
src.client.screen -= item
if(istype(item, /obj/item))
item:dropped(src) // let it know it's been dropped
src.remove_from_mob(item)
item.loc = src.loc
//actually throw it!
if (item)
@@ -452,102 +446,12 @@
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
usr.sleeping = 20 //Short nap
/mob/living/carbon/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if( istype(tmob, /mob/living/carbon) && prob(10) )
src.spread_disease_to(AM, "Contact")
if(istype(tmob, /mob/living/carbon/human))
if(HULK in tmob.mutations)
if(prob(70))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
for(var/mob/M in range(tmob, 1))
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "\red [tmob] is restrained, you cannot push past"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "\red [tmob] is restraining [M], you cannot push past"
now_pushing = 0
return
//Leaping mobs just land on the tile, no pushing, no anything.
if(status_flags & LEAPING)
loc = tmob.loc
status_flags &= ~LEAPING
now_pushing = 0
return
// Step over drones.
// I have no idea why the hell this isn't already happening. How do mice do it?
if(istype(tmob,/mob/living/silicon/robot/drone))
loc = tmob.loc
now_pushing = 0
return
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
slime.UpdateFeed()
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
/mob/living/carbon/Bump(var/atom/movable/AM, yes)
if(now_pushing || !yes)
return
return
..()
if(istype(AM, /mob/living/carbon) && prob(10))
src.spread_disease_to(AM, "Contact")
/mob/living/carbon/can_use_vents()
return
@@ -561,9 +465,14 @@
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
if(effect in chem_effects)
chem_effects[effect] += magnitude
else
chem_effects[effect] = magnitude
/mob/living/carbon/get_default_language()
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
@@ -83,6 +83,7 @@
g_eyes = green
b_eyes = blue
update_eyes()
update_body()
return 1
+9 -14
View File
@@ -1,19 +1,14 @@
/mob/living/carbon/human/gib()
for(var/datum/organ/internal/I in internal_organs)
var/obj/item/organ/current_organ = I.remove()
if(current_organ)
if(istype(loc,/turf))
current_organ.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
current_organ.removed(src)
for(var/obj/item/organ/I in internal_organs)
I.removed()
if(istype(loc,/turf))
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
for(var/datum/organ/external/E in src.organs)
if(istype(E, /datum/organ/external/chest))
continue
// Only make the limb drop if it's not too damaged
if(prob(100 - E.get_damage()))
// Override the current limb status and don't cause an explosion
E.droplimb(1,1)
for(var/obj/item/organ/external/E in src.organs)
E.droplimb(0,DROPLIMB_EDGE,1)
sleep(1)
..(species.gibbed_anim)
gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color)
@@ -38,7 +33,7 @@
if(species) species.handle_death(src)
//Handle brain slugs.
var/datum/organ/external/head = get_organ("head")
var/obj/item/organ/external/head = get_organ("head")
var/mob/living/simple_animal/borer/B
for(var/I in head.implants)
+32 -21
View File
@@ -198,9 +198,9 @@
//splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = get_organ(organ)
var/obj/item/organ/external/o = get_organ(organ)
if(o && o.status & ORGAN_SPLINTED)
msg += "<span class='warning'>[t_He] [t_has] a splint on [t_his] [o.display_name]!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] a splint on [t_his] [o.name]!</span>\n"
if(suiciding)
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
@@ -251,33 +251,44 @@
var/list/wound_flavor_text = list()
var/list/is_destroyed = list()
var/list/is_bleeding = list()
for(var/datum/organ/external/temp in organs)
for(var/organ_tag in species.has_limbs)
var/list/organ_data = species.has_limbs[organ_tag]
var/organ_descriptor = organ_data["descriptor"]
is_destroyed["[organ_data["descriptor"]]"] = 1
var/obj/item/organ/external/E = organs_by_name[organ_tag]
if(!E)
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] is missing [t_his] [organ_descriptor].</b></span>\n"
else if(E.is_stump())
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
else
continue
for(var/obj/item/organ/external/temp in organs)
if(temp)
if(temp.status & ORGAN_DESTROYED)
is_destroyed["[temp.display_name]"] = 1
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
continue
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
if(!species.flags & IS_SYNTHETIC)
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
continue
else
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]. It has"
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20)
wound_flavor_text["[temp.display_name]"] += " some dents"
wound_flavor_text["[temp.name]"] += " some dents"
if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting")
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.display_name]"] += " and"
wound_flavor_text["[temp.name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20)
wound_flavor_text["[temp.display_name]"] += " some burns"
wound_flavor_text["[temp.name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.display_name]"])
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.name]"])
wound_flavor_text["[temp.name]"] += "!</span>\n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
@@ -325,14 +336,14 @@
else if(flavor_text.len > 1 && text > 1)
flavor_text_string += ","
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.display_name].</span><br>"
wound_flavor_text["[temp.display_name]"] = flavor_text_string
flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.name]"] = flavor_text_string
else
wound_flavor_text["[temp.display_name]"] = ""
wound_flavor_text["[temp.name]"] = ""
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.display_name]"] = 1
is_bleeding["[temp.name]"] = 1
else
wound_flavor_text["[temp.display_name]"] = ""
wound_flavor_text["[temp.name]"] = ""
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
+82 -25
View File
@@ -61,7 +61,7 @@
stat("Tank Pressure", internal.air_contents.return_pressure())
stat("Distribution Pressure", internal.distribute_pressure)
var/datum/organ/internal/xenos/plasmavessel/P = internal_organs_by_name["plasma vessel"]
var/obj/item/organ/xenos/plasmavessel/P = internal_organs_by_name["plasma vessel"]
if(P)
stat(null, "Phoron Stored: [P.stored_plasma]/[P.max_plasma]")
@@ -125,7 +125,7 @@
var/update = 0
// focus most of the blast on one organ
var/datum/organ/external/take_blast = pick(organs)
var/obj/item/organ/external/take_blast = pick(organs)
update |= take_blast.take_damage(b_loss * 0.9, f_loss * 0.9, used_weapon = "Explosive blast")
// distribute the remaining 10% on all limbs equally
@@ -134,7 +134,7 @@
var/weapon_message = "Explosive Blast"
for(var/datum/organ/external/temp in organs)
for(var/obj/item/organ/external/temp in organs)
switch(temp.name)
if("head")
update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2, used_weapon = weapon_message)
@@ -163,7 +163,7 @@
if(stat == 2) return
show_message("\red The blob attacks you!")
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee"))
return
@@ -172,7 +172,7 @@
if ((M.client && !( M.blinded )))
M.show_message("\red [src] has been hit by [O]", 1)
if (health > 0)
var/datum/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
if(!affecting) return
if (istype(O, /obj/effect/immovablerod))
if(affecting.take_damage(101, 0))
@@ -189,7 +189,7 @@
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
L.imp_in = M
L.implanted = 1
var/datum/organ/external/affected = M.organs_by_name["head"]
var/obj/item/organ/external/affected = M.organs_by_name["head"]
affected.implants += L
L.part = affected
L.implanted(src)
@@ -197,7 +197,7 @@
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
for(var/L in M.contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/datum/organ/external/O in M.organs)
for(var/obj/item/organ/external/O in M.organs)
if(L in O.implants)
return 1
return 0
@@ -322,7 +322,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
var/obj/item/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -353,7 +353,7 @@
if (!def_zone)
def_zone = pick("l_hand", "r_hand")
var/datum/organ/external/affected_organ = get_organ(check_zone(def_zone))
var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone))
var/siemens_coeff = base_siemens_coeff * get_siemens_coefficient_organ(affected_organ)
return ..(shock_damage, source, siemens_coeff, def_zone)
@@ -673,7 +673,7 @@
return 2
if(internal_organs_by_name["eyes"]) // Eyes are fucked, not a 'weak point'.
var/datum/organ/internal/I = internal_organs_by_name["eyes"]
var/obj/item/organ/I = internal_organs_by_name["eyes"]
if(I.status & ORGAN_CUT_AWAY)
return 2
else
@@ -791,6 +791,7 @@
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
b_eyes = hex2num(copytext(new_eyes, 6, 8))
update_eyes()
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", "[35-s_tone]") as text
@@ -918,19 +919,16 @@
germ_level += n
/mob/living/carbon/human/revive()
for (var/datum/organ/external/O in organs)
for (var/obj/item/organ/external/O in organs)
O.status &= ~ORGAN_BROKEN
O.status &= ~ORGAN_BLEEDING
O.status &= ~ORGAN_SPLINTED
O.status &= ~ORGAN_CUT_AWAY
O.status &= ~ORGAN_ATTACHABLE
if (!O.amputated)
O.status &= ~ORGAN_DESTROYED
O.destspawn = 0
O.wounds.Cut()
O.heal_damage(1000,1000,1,1)
var/datum/organ/external/head/h = organs_by_name["head"]
var/obj/item/organ/external/head/h = organs_by_name["head"]
h.disfigured = 0
if(species && !(species.flags & NO_BLOOD))
@@ -949,7 +947,7 @@
H.brainmob.mind.transfer_to(src)
del(H)
for(var/datum/organ/internal/I in internal_organs)
for(var/obj/item/organ/I in internal_organs)
I.damage = 0
for (var/datum/disease/virus in viruses)
@@ -964,11 +962,11 @@
..()
/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
return L && L.is_bruised()
/mob/living/carbon/human/proc/rupture_lung()
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
if(L && !L.is_bruised())
src.custom_pain("You feel a stabbing pain in your chest!", 1)
@@ -1029,7 +1027,7 @@
/mob/living/carbon/human/get_visible_implants(var/class = 0)
var/list/visible_implants = list()
for(var/datum/organ/external/organ in src.organs)
for(var/obj/item/organ/external/organ in src.organs)
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel))
visible_implants += O
@@ -1038,7 +1036,7 @@
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/datum/organ/external/organ in src.organs)
for(var/obj/item/organ/external/organ in src.organs)
if(organ.status & ORGAN_SPLINTED) //Splints prevent movement.
continue
for(var/obj/item/weapon/O in organ.implants)
@@ -1047,11 +1045,11 @@
var/msg = null
switch(rand(1,3))
if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ.display_name] as you bump [O] inside.</span>"
msg ="<span class='warning'>A spike of pain jolts your [organ.name] as you bump [O] inside.</span>"
if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ.display_name] painfully.</span>"
msg ="<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>"
if(3)
msg ="<span class='warning'>[O] in your [organ.display_name] twists painfully as you move.</span>"
msg ="<span class='warning'>[O] in your [organ.name] twists painfully as you move.</span>"
src << msg
organ.take_damage(rand(1,3), 0, 0)
@@ -1156,6 +1154,10 @@
else
return 0
mob_bump_flag = species.bump_flag
mob_swap_flags = species.swap_flags
mob_push_flags = species.push_flags
/mob/living/carbon/human/proc/bloody_doodle()
set category = "IC"
set name = "Write in blood"
@@ -1284,14 +1286,14 @@
/mob/living/carbon/human/has_brain()
if(internal_organs_by_name["brain"])
var/datum/organ/internal/brain = internal_organs_by_name["brain"]
var/obj/item/organ/brain = internal_organs_by_name["brain"]
if(brain && istype(brain))
return 1
return 0
/mob/living/carbon/human/has_eyes()
if(internal_organs_by_name["eyes"])
var/datum/organ/internal/eyes = internal_organs_by_name["eyes"]
var/obj/item/organ/eyes = internal_organs_by_name["eyes"]
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
return 1
return 0
@@ -1300,3 +1302,58 @@
if((species.flags & NO_SLIP) || (shoes && (shoes.flags & NOSLIP)))
return 0
..(slipped_on,stun_duration)
/mob/living/carbon/human/proc/undislocate()
set category = "Object"
set name = "Undislocate Joint"
set desc = "Pop a joint back into place. Extremely painful."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
if(usr.stat > 0)
usr << "You are unconcious and cannot do that!"
return
if(usr.restrained())
usr << "You are restrained and cannot do that!"
return
var/mob/S = src
var/mob/U = usr
var/self = null
if(S == U)
self = 1 // Removing object from yourself.
var/list/limbs = list()
for(var/limb in organs_by_name)
var/obj/item/organ/external/current_limb = organs_by_name[limb]
if(current_limb && current_limb.dislocated == 2)
limbs |= limb
var/choice = input(src,"Which joint do you wish to relocate?") as null|anything in limbs
if(!choice)
return
var/obj/item/organ/external/current_limb = organs_by_name[choice]
if(self)
src << "<span class='warning'>You brace yourself to relocate your [current_limb.joint]...</span>"
else
U << "<span class='warning'>You begin to relocate [S]'s [current_limb.joint]...</span>"
if(!do_after(U, 30))
return
if(!choice || !current_limb || !S || !U)
return
if(self)
src << "<span class='danger'>You pop your [current_limb.joint] back in!</span>"
else
U << "<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>"
S << "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>"
current_limb.undislocate()
@@ -2,11 +2,11 @@
var/mob/living/carbon/human/H = M
if(istype(H))
var/datum/organ/external/temp = H.organs_by_name["r_hand"]
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if(H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
H << "\red You can't use your [temp.display_name]."
if(!temp || !temp.is_usable())
H << "\red You can't use your hand."
return
..()
@@ -24,7 +24,7 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[H] has attempted to punch [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
var/obj/item/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(HULK in H.mutations)
@@ -45,7 +45,7 @@
M.spread_disease_to(src, "Contact")
switch(M.a_intent)
if("help")
if(I_HELP)
if(istype(H) && health < config.health_threshold_crit)
@@ -69,7 +69,7 @@
help_shake_act(M)
return 1
if("grab")
if(I_GRAB)
if(M == src || anchored)
return 0
if(w_uniform)
@@ -88,7 +88,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
return 1
if("hurt")
if(I_HURT)
if(!istype(H))
attack_generic(H,rand(1,3),"punched")
@@ -98,14 +98,18 @@
var/block = 0
var/accurate = 0
var/hit_zone = H.zone_sel.selecting
var/datum/organ/external/affecting = get_organ(hit_zone)
var/obj/item/organ/external/affecting = get_organ(hit_zone)
if(!affecting || affecting.status & ORGAN_DESTROYED)
M << "<span class='danger'>They are missing that limb!</span>"
return
switch(src.a_intent)
if("help")
if(I_HELP)
// We didn't see this coming, so we get the full blow
rand_damage = 5
accurate = 1
if("hurt", "grab")
if(I_HURT, I_GRAB)
// We're in a fighting stance, there's a chance we block
if(src.canmove && src!=H && prob(20))
block = 1
@@ -157,7 +161,7 @@
miss_type = 1
if(!miss_type && block)
attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!"
attack_message = "[H] went for [src]'s [affecting.name] but was blocked!"
miss_type = 2
// See what attack they use
@@ -200,7 +204,7 @@
// Finally, apply damage to target
apply_damage(real_damage, BRUTE, affecting, armour, sharp=attack.sharp, edge=attack.edge)
if("disarm")
if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
@@ -208,7 +212,7 @@
if(w_uniform)
w_uniform.add_fingerprint(M)
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
if(istype(r_hand,/obj/item/weapon/gun) || istype(l_hand,/obj/item/weapon/gun))
var/obj/item/weapon/gun/W = null
@@ -291,8 +295,23 @@
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
updatehealth()
return 1
/mob/living/carbon/human/proc/attack_joint(var/obj/item/W, var/mob/living/user, var/def_zone)
var/target_zone = def_zone? check_zone(def_zone) : get_zone_with_miss_chance(user.zone_sel.selecting, src)
if(user == src) // Attacking yourself can't miss
target_zone = user.zone_sel.selecting
if(!target_zone)
return null
var/obj/item/organ/external/organ = get_organ(check_zone(target_zone))
if(!organ || organ.is_dislocated() || organ.dislocated == -1)
return null
var/dislocation_str
if(prob(W.force))
dislocation_str = "[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")] with a grisly crunch!"
organ.dislocate()
return dislocation_str
@@ -5,11 +5,11 @@
health = maxHealth
stat = CONSCIOUS
return
var/total_burn = 0
var/total_brute = 0
for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit
total_brute += O.brute_dam
total_burn += O.burn_dam
var/total_burn = 0
var/total_brute = 0
for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit
total_brute += O.brute_dam
total_burn += O.burn_dam
var/oxy_l = ((species.flags & NO_BREATHE) ? 0 : getOxyLoss())
var/tox_l = ((species.flags & NO_POISON) ? 0 : getToxLoss())
@@ -27,7 +27,7 @@
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.take_damage(amount)
sponge.damage = min(max(brainloss, 0),(maxHealth*2))
@@ -42,7 +42,7 @@
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.damage = min(max(amount, 0),(maxHealth*2))
brainloss = sponge.damage
@@ -56,7 +56,7 @@
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
brainloss = min(sponge.damage,maxHealth*2)
else
@@ -68,13 +68,13 @@
//These procs fetch a cumulative total damage from all organs
/mob/living/carbon/human/getBruteLoss()
var/amount = 0
for(var/datum/organ/external/O in organs)
for(var/obj/item/organ/external/O in organs)
amount += O.brute_dam
return amount
/mob/living/carbon/human/getFireLoss()
var/amount = 0
for(var/datum/organ/external/O in organs)
for(var/obj/item/organ/external/O in organs)
amount += O.burn_dam
return amount
@@ -104,7 +104,7 @@
amount = amount*species.brute_mod
if (organ_name in organs_by_name)
var/datum/organ/external/O = get_organ(organ_name)
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
@@ -119,7 +119,7 @@
amount = amount*species.burn_mod
if (organ_name in organs_by_name)
var/datum/organ/external/O = get_organ(organ_name)
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
@@ -163,28 +163,28 @@
var/mut_prob = min(80, getCloneLoss()+10)
if (amount > 0)
if (prob(mut_prob))
var/list/datum/organ/external/candidates = list()
for (var/datum/organ/external/O in organs)
var/list/obj/item/organ/external/candidates = list()
for (var/obj/item/organ/external/O in organs)
if(!(O.status & ORGAN_MUTATED))
candidates |= O
if (candidates.len)
var/datum/organ/external/O = pick(candidates)
var/obj/item/organ/external/O = pick(candidates)
O.mutate()
src << "<span class = 'notice'>Something is not right with your [O.display_name]...</span>"
src << "<span class = 'notice'>Something is not right with your [O.name]...</span>"
return
else
if (prob(heal_prob))
for (var/datum/organ/external/O in organs)
for (var/obj/item/organ/external/O in organs)
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
return
if (getCloneLoss() < 1)
for (var/datum/organ/external/O in organs)
for (var/obj/item/organ/external/O in organs)
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
BITSET(hud_updateflag, HEALTH_HUD)
// Defined here solely to take species flags into account without having to recast at mob/living level.
@@ -226,16 +226,16 @@
//Returns a list of damaged organs
/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn)
var/list/datum/organ/external/parts = list()
for(var/datum/organ/external/O in organs)
var/list/obj/item/organ/external/parts = list()
for(var/obj/item/organ/external/O in organs)
if((brute && O.brute_dam) || (burn && O.burn_dam))
parts += O
return parts
//Returns a list of damageable organs
/mob/living/carbon/human/proc/get_damageable_organs()
var/list/datum/organ/external/parts = list()
for(var/datum/organ/external/O in organs)
var/list/obj/item/organ/external/parts = list()
for(var/obj/item/organ/external/O in organs)
if(O.brute_dam + O.burn_dam < O.max_damage)
parts += O
return parts
@@ -244,9 +244,9 @@
//It automatically updates damage overlays if necesary
//It automatically updates health status
/mob/living/carbon/human/heal_organ_damage(var/brute, var/burn)
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
if(!parts.len) return
var/datum/organ/external/picked = pick(parts)
var/obj/item/organ/external/picked = pick(parts)
if(picked.heal_damage(brute,burn))
UpdateDamageIcon()
BITSET(hud_updateflag, HEALTH_HUD)
@@ -260,9 +260,9 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
//It automatically updates damage overlays if necesary
//It automatically updates health status
/mob/living/carbon/human/take_organ_damage(var/brute, var/burn, var/sharp = 0, var/edge = 0)
var/list/datum/organ/external/parts = get_damageable_organs()
var/list/obj/item/organ/external/parts = get_damageable_organs()
if(!parts.len) return
var/datum/organ/external/picked = pick(parts)
var/obj/item/organ/external/picked = pick(parts)
if(picked.take_damage(brute,burn,sharp,edge))
UpdateDamageIcon()
BITSET(hud_updateflag, HEALTH_HUD)
@@ -272,11 +272,11 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
//Heal MANY external organs, in random order
/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn)
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
var/update = 0
while(parts.len && (brute>0 || burn>0) )
var/datum/organ/external/picked = pick(parts)
var/obj/item/organ/external/picked = pick(parts)
var/brute_was = picked.brute_dam
var/burn_was = picked.burn_dam
@@ -295,10 +295,10 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
// damage MANY external organs, in random order
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn, var/sharp = 0, var/edge = 0, var/used_weapon = null)
if(status_flags & GODMODE) return //godmode
var/list/datum/organ/external/parts = get_damageable_organs()
var/list/obj/item/organ/external/parts = get_damageable_organs()
var/update = 0
while(parts.len && (brute>0 || burn>0) )
var/datum/organ/external/picked = pick(parts)
var/obj/item/organ/external/picked = pick(parts)
var/brute_was = picked.brute_dam
var/burn_was = picked.burn_dam
@@ -328,12 +328,12 @@ This function restores the subjects blood to max.
This function restores all organs.
*/
/mob/living/carbon/human/restore_all_organs()
for(var/datum/organ/external/current_organ in organs)
for(var/obj/item/organ/external/current_organ in organs)
current_organ.rejuvenate()
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
var/datum/organ/external/E = get_organ(zone)
if(istype(E, /datum/organ/external))
var/obj/item/organ/external/E = get_organ(zone)
if(istype(E, /obj/item/organ/external))
if (E.heal_damage(brute, burn))
UpdateDamageIcon()
BITSET(hud_updateflag, HEALTH_HUD)
@@ -366,7 +366,7 @@ This function restores all organs.
if(blocked >= 2) return 0
var/datum/organ/external/organ = null
var/obj/item/organ/external/organ = null
if(isorgan(def_zone))
organ = def_zone
else
@@ -10,7 +10,9 @@ emp_act
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
var/datum/organ/external/organ = get_organ(check_zone(def_zone))
var/obj/item/organ/external/organ = get_organ(check_zone(def_zone))
if(!organ)
return
//Shields
if(check_shields(P.damage, "the [P.name]"))
@@ -50,7 +52,7 @@ emp_act
return (..(P , def_zone))
/mob/living/carbon/human/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone)
var/datum/organ/external/affected = get_organ(check_zone(def_zone))
var/obj/item/organ/external/affected = get_organ(check_zone(def_zone))
var/siemens_coeff = get_siemens_coefficient_organ(affected)
stun_amount *= siemens_coeff
agony_amount *= siemens_coeff
@@ -68,12 +70,12 @@ emp_act
if(c_hand && (stun_amount || agony_amount > 10))
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect")
u_equip(c_hand)
drop_from_inventory(c_hand)
if (affected.status & ORGAN_ROBOT)
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!")
emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!")
else
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.display_name]!")
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.name]!")
..(stun_amount, agony_amount, def_zone)
@@ -84,21 +86,23 @@ emp_act
if(def_zone)
if(isorgan(def_zone))
return getarmor_organ(def_zone, type)
var/datum/organ/external/affecting = get_organ(def_zone)
return getarmor_organ(affecting, type)
var/obj/item/organ/external/affecting = get_organ(def_zone)
if(affecting)
return getarmor_organ(affecting, type)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
for(var/organ_name in organs_by_name)
if (organ_name in organ_rel_size)
var/datum/organ/external/organ = organs_by_name[organ_name]
var/weight = organ_rel_size[organ_name]
armorval += getarmor_organ(organ, type) * weight
total += weight
var/obj/item/organ/external/organ = organs_by_name[organ_name]
if(organ)
var/weight = organ_rel_size[organ_name]
armorval += getarmor_organ(organ, type) * weight
total += weight
return (armorval/max(total, 1))
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/datum/organ/external/def_zone)
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/obj/item/organ/external/def_zone)
if (!def_zone)
return 1.0
@@ -112,14 +116,14 @@ emp_act
return siemens_coefficient
//this proc returns the armour value for a particular external organ.
/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type)
if(!type) return 0
/mob/living/carbon/human/proc/getarmor_organ(var/obj/item/organ/external/def_zone, var/type)
if(!type || !def_zone) return 0
var/protection = 0
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes)
for(var/gear in protective_gear)
if(gear && istype(gear ,/obj/item/clothing))
var/obj/item/clothing/C = gear
if(C.body_parts_covered & def_zone.body_part)
if(istype(C) && C.body_parts_covered & def_zone.body_part)
protection += C.armor[type]
return protection
@@ -167,10 +171,10 @@ emp_act
for(var/obj/O in src)
if(!O) continue
O.emp_act(severity)
for(var/datum/organ/external/O in organs)
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_DESTROYED) continue
O.emp_act(severity)
for(var/datum/organ/internal/I in O.internal_organs)
for(var/obj/item/organ/I in O.internal_organs)
if(I.robotic == 0) continue
I.emp_act(severity)
..()
@@ -186,17 +190,19 @@ emp_act
target_zone = user.zone_sel.selecting
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
return 0
return 1
var/datum/organ/external/affecting = get_organ(target_zone)
if (!affecting)
return 0
if(affecting.status & ORGAN_DESTROYED)
user << "What [affecting.display_name]?"
return 0
var/hit_area = affecting.display_name
var/obj/item/organ/external/affecting = get_organ(target_zone)
if((user != src) && check_shields(I.force, "the [I.name]"))
if (!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump())
user << "<span class='danger'>They are missing that limb!</span>"
return
var/effective_force = I.force
if(user.a_intent == "disarm") effective_force = round(I.force/2)
var/hit_area = affecting.name
if((user != src) && check_shields(effective_force, "the [I.name]"))
return 0
if(istype(I,/obj/item/weapon/card/emag))
@@ -204,9 +210,9 @@ emp_act
user << "\red That limb isn't robotic."
return
if(affecting.sabotaged)
user << "\red [src]'s [affecting.display_name] is already sabotaged!"
user << "\red [src]'s [affecting.name] is already sabotaged!"
else
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.name] and short out the safeties."
var/obj/item/weapon/card/emag/emag = I
emag.uses--
affecting.sabotaged = 1
@@ -224,14 +230,14 @@ emp_act
weapon_sharp = 0
weapon_edge = 0
if(armor >= 2) return 0
if(!I.force) return 0
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
if(armor >= 2) return 0
if(!effective_force) return 0
var/Iforce = effective_force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
apply_damage(I.force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
apply_damage(effective_force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
var/bloody = 0
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (effective_force * 2)))
I.add_blood(src) //Make the weapon bloody, not the person.
// if(user.hand) user.update_inv_l_hand() //updates the attacker's overlay for the (now bloodied) weapon
// else user.update_inv_r_hand() //removed because weapons don't have on-mob blood overlays
@@ -246,36 +252,37 @@ emp_act
H.bloody_body(src)
H.bloody_hands(src)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(prob(I.force))
apply_effect(20, PARALYZE, armor)
visible_message("\red <B>[src] has been knocked unconscious!</B>")
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if(!stat)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, armor)
visible_message("\red <B>[src] has been knocked unconscious!</B>")
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")//Easier to score a stun but lasts less time
if(prob((I.force + 10)))
apply_effect(6, WEAKEN, armor)
visible_message("\red <B>[src] has been knocked down!</B>")
if("chest")//Easier to score a stun but lasts less time
if(prob((effective_force + 10)))
apply_effect(6, WEAKEN, armor)
visible_message("\red <B>[src] has been knocked down!</B>")
if(bloody)
bloody_body(src)
if(bloody)
bloody_body(src)
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already
//Melee weapon embedded object code.
if (I && I.damtype == BRUTE && !I.anchored && !I.is_robot_module())
var/damage = I.force
var/damage = effective_force
if (armor)
damage /= armor+1
@@ -327,8 +334,8 @@ emp_act
if ((O.thrower != src) && check_shields(throw_damage, "[O]"))
return
var/datum/organ/external/affecting = get_organ(zone)
var/hit_area = affecting.display_name
var/obj/item/organ/external/affecting = get_organ(zone)
var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
@@ -390,7 +397,7 @@ emp_act
/mob/living/carbon/human/embed(var/obj/O, var/def_zone=null)
if(!def_zone) ..()
var/datum/organ/external/affecting = get_organ(def_zone)
var/obj/item/organ/external/affecting = get_organ(def_zone)
if(affecting)
affecting.embed(O)
@@ -82,3 +82,7 @@
var/hand_blood_color
var/list/flavor_texts = list()
mob_bump_flag = HUMAN
mob_push_flags = ALLMOBS
mob_swap_flags = ALLMOBS
@@ -27,7 +27,7 @@
if(istype(buckled, /obj/structure/bed/chair/wheelchair))
for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm"))
var/datum/organ/external/E = get_organ(organ_name)
var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || (E.status & ORGAN_DESTROYED))
tally += 4
if(E.status & ORGAN_SPLINTED)
@@ -39,7 +39,7 @@
tally += shoes.slowdown
for(var/organ_name in list("l_foot","r_foot","l_leg","r_leg"))
var/datum/organ/external/E = get_organ(organ_name)
var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || (E.status & ORGAN_DESTROYED))
tally += 4
if(E.status & ORGAN_SPLINTED)
@@ -0,0 +1,135 @@
/mob/living/carbon/human/proc/update_eyes()
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
eyes.eye_colour = list(r_eyes,g_eyes,b_eyes)
regenerate_icons()
/mob/living/carbon/var/list/internal_organs = list()
/mob/living/carbon/human/var/list/organs = list()
/mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs
/mob/living/carbon/human/var/list/internal_organs_by_name = list() // so internal organs have less ickiness too
// Takes care of organ related updates, such as broken and missing limbs
/mob/living/carbon/human/proc/handle_organs()
number_wounds = 0
var/force_process = 0
var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
if(damage_this_tick > last_dam)
force_process = 1
last_dam = damage_this_tick
if(force_process)
bad_external_organs.Cut()
for(var/obj/item/organ/external/Ex in organs)
bad_external_organs |= Ex
//processing internal organs is pretty cheap, do that first.
for(var/obj/item/organ/I in internal_organs)
I.process()
handle_stance()
handle_grasp()
if(!force_process && !bad_external_organs.len)
return
for(var/obj/item/organ/external/E in bad_external_organs)
if(!E)
continue
if(!E.need_process())
bad_external_organs -= E
continue
else
E.process()
number_wounds += E.number_wounds
if (!lying && world.time - l_move_time < 15)
//Moving around with fractured ribs won't do you any good
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
var/obj/item/organ/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5))
//Moving makes open wounds get infected much faster
if (E.wounds.len)
for(var/datum/wound/W in E.wounds)
if (W.infection_check())
W.germ_level += 1
/mob/living/carbon/human/proc/handle_stance()
// Don't need to process any of this if they aren't standing anyways
// unless their stance is damaged, and we want to check if they should stay down
if (!stance_damage && (lying || resting) && (life_tick % 4) == 0)
return
stance_damage = 0
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
if (istype(buckled, /obj/structure/bed))
return
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = organs_by_name[limb_tag]
if(!E)
stance_damage += 2
else if (E.status & ORGAN_DESTROYED)
stance_damage += 2 // let it fail even if just foot&leg
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
stance_damage += 1
// Canes and crutches help you stand (if the latter is ever added)
// One cane mitigates a broken leg+foot, or a missing foot.
// Two canes are needed for a lost leg. If you are missing both legs, canes aren't gonna help you.
if (l_hand && istype(l_hand, /obj/item/weapon/cane))
stance_damage -= 2
if (r_hand && istype(r_hand, /obj/item/weapon/cane))
stance_damage -= 2
// standing is poor
if(stance_damage >= 4 || (stance_damage >= 2 && prob(5)))
if(!(lying || resting))
if(species && !(species.flags & NO_PAIN))
emote("scream")
custom_emote(1, "collapses!")
Weaken(5) //can't emote while weakened, apparently.
/mob/living/carbon/human/proc/handle_grasp()
if(!l_hand && !r_hand)
return
for (var/obj/item/organ/external/E in organs)
if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED))
continue
if(E.is_broken())
if(E.body_part == HAND_LEFT)
drop_from_inventory(l_hand)
else
drop_from_inventory(r_hand)
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
emote("me", 1, "[(species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
else if(E.is_malfunctioning())
if(E.body_part == HAND_LEFT)
drop_from_inventory(l_hand)
else
drop_from_inventory(r_hand)
emote("me", 1, "drops what they were holding, their [E.name] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
spark_system.start()
spawn(10)
del(spark_system)
//Handles chem traces
/mob/living/carbon/human/proc/handle_trace_chems()
//New are added for reagents to random organs.
for(var/datum/reagent/A in reagents.reagent_list)
var/obj/item/organ/O = pick(organs)
O.trace_chemicals[A.name] = 100
@@ -18,10 +18,6 @@
h_style = "Short Vox Quills"
..(new_loc, "Vox")
/mob/living/carbon/human/voxarmalis/New(var/new_loc)
h_style = "Bald"
..(new_loc, "Vox Armalis")
/mob/living/carbon/human/diona/New(var/new_loc)
..(new_loc, "Diona")
@@ -39,7 +39,7 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/proc/has_organ(name)
var/datum/organ/external/O = organs_by_name[name]
var/obj/item/organ/external/O = organs_by_name[name]
return (O && !(O.status & ORGAN_DESTROYED) )
@@ -69,11 +69,11 @@ This saves us from having to call add_fingerprint() any time something is put in
if(slot_glasses)
return has_organ("head")
if(slot_gloves)
return has_organ("l_hand") && has_organ("r_hand")
return has_organ("l_hand") || has_organ("r_hand")
if(slot_head)
return has_organ("head")
if(slot_shoes)
return has_organ("r_foot") && has_organ("l_foot")
return has_organ("r_foot") || has_organ("l_foot")
if(slot_wear_suit)
return has_organ("chest")
if(slot_w_uniform)
@@ -89,19 +89,13 @@ This saves us from having to call add_fingerprint() any time something is put in
if(slot_tie)
return 1
/mob/living/carbon/human/u_equip(obj/item/W as obj)
/mob/living/carbon/human/u_equip(obj/W as obj)
if(!W) return 0
var/success
if (W == wear_suit)
if(s_store)
drop_from_inventory(s_store)
if(W)
success = 1
wear_suit = null
if(W.flags_inv & HIDESHOES)
update_inv_shoes(0)
update_inv_wear_suit()
else if (W == w_uniform)
if (r_store)
@@ -113,43 +107,43 @@ This saves us from having to call add_fingerprint() any time something is put in
if (belt)
drop_from_inventory(belt)
w_uniform = null
success = 1
update_inv_w_uniform()
else if (W == gloves)
gloves = null
success = 1
update_inv_gloves()
else if (W == glasses)
glasses = null
success = 1
update_inv_glasses()
else if (W == head)
head = null
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)|| (W.flags_inv & HIDEMASK))
var/update_hair = 0
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair = 1
else if(istype(W, /obj/item))
var/obj/item/I = W
if(I.flags_inv & HIDEMASK)
update_hair = 1
if(update_hair)
update_hair(0) //rebuild hair
update_inv_ears(0)
update_inv_wear_mask(0)
success = 1
update_inv_head()
else if (W == l_ear)
l_ear = null
success = 1
update_inv_ears()
else if (W == r_ear)
r_ear = null
success = 1
update_inv_ears()
else if (W == shoes)
shoes = null
success = 1
update_inv_shoes()
else if (W == belt)
belt = null
success = 1
update_inv_belt()
else if (W == wear_mask)
wear_mask = null
success = 1
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair(0) //rebuild hair
update_inv_ears(0)
@@ -160,53 +154,36 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_wear_mask()
else if (W == wear_id)
wear_id = null
success = 1
update_inv_wear_id()
else if (W == r_store)
r_store = null
success = 1
update_inv_pockets()
else if (W == l_store)
l_store = null
success = 1
update_inv_pockets()
else if (W == s_store)
s_store = null
success = 1
update_inv_s_store()
else if (W == back)
back = null
success = 1
update_inv_back()
else if (W == handcuffed)
handcuffed = null
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
success = 1
buckled.unbuckle_mob()
update_inv_handcuffed()
else if (W == legcuffed)
legcuffed = null
success = 1
update_inv_legcuffed()
else if (W == r_hand)
r_hand = null
success = 1
update_inv_r_hand()
else if (W == l_hand)
l_hand = null
success = 1
update_inv_l_hand()
else
return 0
if(success)
if (W)
if (client)
client.screen -= W
W.loc = loc
W.dropped(src)
//if(W)
//W.layer = initial(W.layer)
update_action_buttons()
return 1
@@ -319,7 +296,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_s_store(redraw_mob)
if(slot_in_backpack)
if(src.get_active_hand() == W)
src.u_equip(W)
src.remove_from_mob(W)
W.loc = src.back
if(slot_tie)
var/obj/item/clothing/under/uniform = src.w_uniform
@@ -339,6 +316,10 @@ This saves us from having to call add_fingerprint() any time something is put in
return
/*
MouseDrop human inventory menu
*/
/obj/effect/equip_e
name = "equip e"
var/mob/source = null
@@ -407,7 +388,7 @@ This saves us from having to call add_fingerprint() any time something is put in
if("splints")
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs_by_name[organ]
var/obj/item/organ/external/o = target.organs_by_name[organ]
if(o.status & ORGAN_SPLINTED)
count = 1
break
@@ -695,7 +676,7 @@ It can still be worn/put on as normal.
if(can_reach_splints)
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.get_organ(organ)
var/obj/item/organ/external/o = target.get_organ(organ)
if (o && o.status & ORGAN_SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint(amount=1)
o.status &= ~ORGAN_SPLINTED
@@ -771,15 +752,12 @@ It can still be worn/put on as normal.
W.add_fingerprint(source)
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
if(target.r_store)
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
target.remove_from_mob(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
else
if(item && target.has_organ_for_slot(slot_to_process)) //Placing an item on the mob
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
source.remove_from_mob(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
item.dropped(source)
source.update_icons()
target.update_icons()
if(source && target)
if(source.machine == target)
+6 -6
View File
@@ -237,7 +237,7 @@
src << "\red It becomes hard to see for some reason."
eye_blurry = 10
if(getBrainLoss() >= 35)
if(7 <= rn && rn <= 9) if(hand && equipped())
if(7 <= rn && rn <= 9) if(get_active_hand())
src << "\red Your hand won't respond properly, you drop what you're holding."
drop_item()
if(getBrainLoss() >= 50)
@@ -276,7 +276,7 @@
radiation = Clamp(radiation,0,100)
if (radiation)
var/datum/organ/internal/diona/nutrients/rad_organ = locate() in internal_organs
var/obj/item/organ/diona/nutrients/rad_organ = locate() in internal_organs
if(rad_organ && !rad_organ.is_broken())
var/rads = radiation/25
radiation -= rads
@@ -323,7 +323,7 @@
adjustToxLoss(damage * RADIATION_SPEED_COEFFICIENT)
updatehealth()
if(organs.len)
var/datum/organ/external/O = pick(organs)
var/obj/item/organ/external/O = pick(organs)
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
/** breathing **/
@@ -388,7 +388,7 @@
// Lung damage increases the minimum safe pressure.
if(species.has_organ["lungs"])
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
if(!L)
safe_pressure_min = INFINITY //No lungs, how are you breathing?
else if(L.is_broken())
@@ -877,7 +877,7 @@
if(status_flags & GODMODE) return 0 //godmode
var/datum/organ/internal/diona/node/light_organ = locate() in internal_organs
var/obj/item/organ/diona/node/light_organ = locate() in internal_organs
if(light_organ && !light_organ.is_broken())
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(loc)) //else, there's considered to be no light
@@ -1506,7 +1506,7 @@
if(pulse == PULSE_NONE || !species.has_organ["heart"])
return
var/datum/organ/internal/heart/H = internal_organs_by_name["heart"]
var/obj/item/organ/heart/H = internal_organs_by_name["heart"]
if(!H || H.robotic >=2 )
return
+75 -165
View File
@@ -1,156 +1,14 @@
/mob/living/carbon/human/say(var/message)
var/verb = "says"
var/alt_name = ""
var/message_range = world.view
var/italics = 0
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
message = sanitize(message)
if(stat)
if(stat == 2)
return say_dead(message)
return
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_mode = parse_message_mode(message, "headset")
switch(copytext(message,1,2))
if("*") return emote(copytext(message,2))
if("^") return custom_emote(1, copytext(message,2))
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
//parse the radio code and consume it
if (message_mode)
if (message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
message = trim_left(message)
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else if(species.default_language)
speaking = all_languages[species.default_language]
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
else
if(ending=="!")
verb=pick("exclaims","shouts","yells")
if(ending=="?")
verb="asks"
message = trim(message)
if(speech_problem_flag)
if(!speaking || !(speaking.flags & NO_STUTTER))
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
speech_problem_flag = handle_r[3]
if(!message || message == "")
return
var/list/obj/item/used_radios = new
switch (message_mode)
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = r_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += r_ear
if("right ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(r_ear && istype(r_ear,/obj/item/device/radio))
R = r_ear
has_radio = 1
if(r_hand && istype(r_hand, /obj/item/device/radio))
R = r_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("left ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(l_ear && istype(l_ear,/obj/item/device/radio))
R = l_ear
has_radio = 1
if(l_hand && istype(l_hand,/obj/item/device/radio))
R = l_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
if("whisper")
whisper_say(message, speaking, alt_name)
return
else
if(message_mode)
if(l_ear && istype(l_ear,/obj/item/device/radio))
l_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
r_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += r_ear
var/sound/speech_sound
var/sound_vol
if(species.speech_sounds && prob(species.speech_chance))
speech_sound = sound(pick(species.speech_sounds))
sound_vol = 50
//speaking into radios
if(used_radios.len)
italics = 1
message_range = 1
if(speaking)
message_range = speaking.get_talkinto_msg_range(message)
var/msg
if(!speaking || !(speaking.flags & NO_TALK_MSG))
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
for(var/mob/living/M in hearers(5, src))
if((M != src) && msg)
M.show_message(msg)
if (speech_sound)
sound_vol *= 0.5
..(message, speaking, verb, alt_name, italics, message_range, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
message = sanitize(message)
..(message, alt_name = alt_name) //ohgod we should really be passing a datum here.
/mob/living/carbon/human/proc/forcesay(list/append)
if(stat == CONSCIOUS)
@@ -271,39 +129,33 @@
return verb
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb)
if(!speech_problem_flag)
return ..()
var/list/returns[3]
var/verb = "says"
var/handled = 0
speech_problem_flag = 0
if(silent || (sdisabilities & MUTE))
message = ""
handled = 1
speech_problem_flag = 1
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
if(hoers.voicechange)
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
verb = pick("whinnies","neighs", "says")
handled = 1
speech_problem_flag = 1
if(message != "")
if((HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(message)]!!!"
verb = pick("yells","roars","hollers")
handled = 1
if(slurring)
message = slur(message)
verb = pick("slobbers","slurs")
handled = 1
if(stuttering)
message = stutter(message)
verb = pick("stammers","stutters")
handled = 1
var/list/parent = ..()
message = parent[1]
verb = parent[2]
if(parent[3])
speech_problem_flag = 1
var/braindam = getBrainLoss()
if(braindam >= 60)
handled = 1
speech_problem_flag = 1
if(prob(braindam/4))
message = stutter(message)
verb = pick("stammers", "stutters")
@@ -313,5 +165,63 @@
returns[1] = message
returns[2] = verb
returns[3] = handled
returns[3] = speech_problem_flag
return returns
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = r_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += r_ear
if("right ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(r_ear && istype(r_ear,/obj/item/device/radio))
R = r_ear
has_radio = 1
if(r_hand && istype(r_hand, /obj/item/device/radio))
R = r_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("left ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(l_ear && istype(l_ear,/obj/item/device/radio))
R = l_ear
has_radio = 1
if(l_hand && istype(l_hand,/obj/item/device/radio))
R = l_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("whisper")
whisper_say(message, speaking, alt_name)
return 1
else
if(message_mode)
if(l_ear && istype(l_ear,/obj/item/device/radio))
l_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
r_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += r_ear
/mob/living/carbon/human/handle_speech_sound()
if(species.speech_sounds && prob(species.speech_chance))
var/list/returns[2]
returns[1] = sound(pick(species.speech_sounds))
returns[2] = 50
return ..()
@@ -42,56 +42,15 @@
)
has_organ = list(
"heart" = /datum/organ/internal/heart,
"lungs" = /datum/organ/internal/lungs,
"liver" = /datum/organ/internal/liver,
"kidneys" = /datum/organ/internal/kidney,
"brain" = /datum/organ/internal/brain,
"eyes" = /datum/organ/internal/eyes,
"stack" = /datum/organ/internal/stack/vox
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"brain" = /obj/item/organ/brain,
"eyes" = /obj/item/organ/eyes,
"stack" = /obj/item/organ/stack/vox
)
/datum/species/vox/get_random_name(var/gender)
var/datum/language/species_language = all_languages[default_language]
return species_language.get_random_name(gender)
/datum/species/vox/armalis
name = "Vox Armalis"
name_plural = "Vox"
icobase = 'icons/mob/human_races/r_armalis.dmi'
deform = 'icons/mob/human_races/r_armalis.dmi'
rarity_value = 10
warning_low_pressure = 50
hazard_low_pressure = 0
cold_level_1 = 80
cold_level_2 = 50
cold_level_3 = 0
heat_level_1 = 2000
heat_level_2 = 3000
heat_level_3 = 4000
brute_mod = 0.2
burn_mod = 0.2
eyes = "blank_eyes"
breath_type = "nitrogen"
poison_type = "oxygen"
flags = IS_RESTRICTED | NO_SCAN | NO_BLOOD | NO_PAIN | HAS_EYE_COLOR
blood_color = "#2299FC"
flesh_color = "#808D11"
tail = "armalis_tail"
icon_template = 'icons/mob/human_races/r_armalis.dmi'
reagent_tag = IS_VOX
inherent_verbs = list(
/mob/living/carbon/human/proc/leap,
/mob/living/carbon/human/proc/gut,
/mob/living/carbon/human/proc/commune
)
@@ -50,6 +50,7 @@
// Death vars.
var/meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
var/gibber_type = /obj/effect/gibspawner/human
var/single_gib_type = /obj/effect/decal/cleanable/blood/gibs
var/remains_type = /obj/effect/decal/remains/xeno
var/gibbed_anim = "gibbed-h"
var/dusted_anim = "dust-h"
@@ -106,15 +107,34 @@
var/rarity_value = 1 // Relative rarity/collector value for this species.
// Determines the organs that the species spawns with and
var/list/has_organ = list( // which required-organ checks are conducted.
"heart" = /datum/organ/internal/heart,
"lungs" = /datum/organ/internal/lungs,
"liver" = /datum/organ/internal/liver,
"kidneys" = /datum/organ/internal/kidney,
"brain" = /datum/organ/internal/brain,
"appendix" = /datum/organ/internal/appendix,
"eyes" = /datum/organ/internal/eyes
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"brain" = /obj/item/organ/brain,
"appendix" = /obj/item/organ/appendix,
"eyes" = /obj/item/organ/eyes
)
var/list/has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest),
"groin" = list("path" = /obj/item/organ/external/groin),
"head" = list("path" = /obj/item/organ/external/head),
"l_arm" = list("path" = /obj/item/organ/external/arm),
"r_arm" = list("path" = /obj/item/organ/external/arm/right),
"l_leg" = list("path" = /obj/item/organ/external/leg),
"r_leg" = list("path" = /obj/item/organ/external/leg/right),
"l_hand" = list("path" = /obj/item/organ/external/hand),
"r_hand" = list("path" = /obj/item/organ/external/hand/right),
"l_foot" = list("path" = /obj/item/organ/external/foot),
"r_foot" = list("path" = /obj/item/organ/external/foot/right)
)
// Bump vars
var/bump_flag = HUMAN // What are we considered to be when bumped?
var/push_flags = ALLMOBS // What can we push?
var/swap_flags = ALLMOBS // What can we swap place with?
/datum/species/New()
if(hud_type)
hud = new hud_type()
@@ -152,7 +172,10 @@
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
//Trying to work out why species changes aren't fixing organs properly.
for(var/obj/item/organ/organ in H.contents)
if((organ in H.organs) || (organ in H.internal_organs))
del(organ)
if(H.organs) H.organs.Cut()
if(H.internal_organs) H.internal_organs.Cut()
if(H.organs_by_name) H.organs_by_name.Cut()
@@ -163,35 +186,28 @@
H.organs_by_name = list()
H.internal_organs_by_name = list()
//This is a basic humanoid limb setup.
H.organs_by_name["chest"] = new/datum/organ/external/chest()
H.organs_by_name["groin"] = new/datum/organ/external/groin(H.organs_by_name["chest"])
H.organs_by_name["head"] = new/datum/organ/external/head(H.organs_by_name["chest"])
H.organs_by_name["l_arm"] = new/datum/organ/external/l_arm(H.organs_by_name["chest"])
H.organs_by_name["r_arm"] = new/datum/organ/external/r_arm(H.organs_by_name["chest"])
H.organs_by_name["r_leg"] = new/datum/organ/external/r_leg(H.organs_by_name["groin"])
H.organs_by_name["l_leg"] = new/datum/organ/external/l_leg(H.organs_by_name["groin"])
H.organs_by_name["l_hand"] = new/datum/organ/external/l_hand(H.organs_by_name["l_arm"])
H.organs_by_name["r_hand"] = new/datum/organ/external/r_hand(H.organs_by_name["r_arm"])
H.organs_by_name["l_foot"] = new/datum/organ/external/l_foot(H.organs_by_name["l_leg"])
H.organs_by_name["r_foot"] = new/datum/organ/external/r_foot(H.organs_by_name["r_leg"])
for(var/limb_type in has_limbs)
var/list/organ_data = has_limbs[limb_type]
var/limb_path = organ_data["path"]
var/obj/item/organ/O = new limb_path(H)
organ_data["descriptor"] = O.name
for(var/organ in has_organ)
var/organ_type = has_organ[organ]
H.internal_organs_by_name[organ] = new organ_type(H)
H.internal_organs_by_name[organ] = new organ_type(H,1)
for(var/name in H.organs_by_name)
H.organs += H.organs_by_name[name]
H.organs |= H.organs_by_name[name]
for(var/datum/organ/external/O in H.organs)
for(var/obj/item/organ/external/O in H.organs)
O.owner = H
if(flags & IS_SYNTHETIC)
for(var/datum/organ/external/E in H.organs)
for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
E.status |= ORGAN_ROBOT
for(var/datum/organ/internal/I in H.internal_organs)
I.mechanize()
E.robotize()
for(var/obj/item/organ/I in H.internal_organs)
I.robotize()
/datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target)
@@ -250,7 +266,7 @@
// Called when using the shredding behavior.
/datum/species/proc/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
if(!ignore_intent && H.a_intent != "hurt")
if(!ignore_intent && H.a_intent != I_HURT)
return 0
for(var/datum/unarmed_attack/attack in unarmed_attacks)
@@ -263,4 +279,4 @@
// Called in life() when the mob has no client.
/datum/species/proc/handle_npc(var/mob/living/carbon/human/H)
return
return
@@ -22,13 +22,13 @@
/datum/unarmed_attack/claws/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/skill = user.skills["combat"]
var/datum/organ/external/affecting = target.get_organ(zone)
var/obj/item/organ/external/affecting = target.get_organ(zone)
if(!skill) skill = 1
attack_damage = Clamp(attack_damage, 1, 5)
if(target == user)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.display_name]!</span>")
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.name]!</span>")
return 0
switch(zone)
@@ -47,9 +47,9 @@
else
// ----- BODY ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>")
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.name]!</span>")
/datum/unarmed_attack/claws/strong
attack_verb = list("slashed")
@@ -17,7 +17,7 @@
flesh_color = "#137E8F"
has_organ = list(
"brain" = /datum/organ/internal/brain/golem
"brain" = /obj/item/organ/brain/golem
)
death_message = "becomes completely motionless..."
@@ -33,6 +33,10 @@
flags = IS_RESTRICTED
bump_flag = MONKEY
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
@@ -44,6 +48,7 @@
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
H.real_name = "[lowertext(name)] ([rand(100,999)])"
H.name = H.real_name
..()
/datum/species/monkey/tajaran
@@ -19,13 +19,17 @@
death_message = "rapidly loses cohesion, splattering across the ground..."
has_organ = list(
"brain" = /datum/organ/internal/brain/slime
"brain" = /obj/item/organ/brain/slime
)
breath_type = null
poison_type = null
bump_flag = SLIME
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
spawn(1)
if(H)
H.gib()
H.gib()
@@ -135,6 +135,7 @@
rarity_value = 3
hud_type = /datum/hud_data/diona
siemens_coefficient = 0.3
eyes = "blank_eyes"
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \
@@ -145,12 +146,26 @@
water and other radiation."
has_organ = list(
"nutrient channel" = /datum/organ/internal/diona/nutrients,
"neural strata" = /datum/organ/internal/diona/strata,
"response node" = /datum/organ/internal/diona/node,
"gas bladder" = /datum/organ/internal/diona/bladder,
"polyp segment" = /datum/organ/internal/diona/polyp,
"anchoring ligament" = /datum/organ/internal/diona/ligament
"nutrient channel" = /obj/item/organ/diona/nutrients,
"neural strata" = /obj/item/organ/diona/strata,
"response node" = /obj/item/organ/diona/node,
"gas bladder" = /obj/item/organ/diona/bladder,
"polyp segment" = /obj/item/organ/diona/polyp,
"anchoring ligament" = /obj/item/organ/diona/ligament
)
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/diona/chest),
"groin" = list("path" = /obj/item/organ/external/diona/groin),
"head" = list("path" = /obj/item/organ/external/diona/head),
"l_arm" = list("path" = /obj/item/organ/external/diona/arm),
"r_arm" = list("path" = /obj/item/organ/external/diona/arm/right),
"l_leg" = list("path" = /obj/item/organ/external/diona/leg),
"r_leg" = list("path" = /obj/item/organ/external/diona/leg/right),
"l_hand" = list("path" = /obj/item/organ/external/diona/hand),
"r_hand" = list("path" = /obj/item/organ/external/diona/hand/right),
"l_foot" = list("path" = /obj/item/organ/external/diona/foot),
"r_foot" = list("path" = /obj/item/organ/external/diona/foot/right)
)
warning_low_pressure = 50
@@ -166,7 +181,7 @@
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP | HAS_EYE_COLOR
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP | REGENERATES_LIMBS
blood_color = "#004400"
flesh_color = "#907E4A"
@@ -108,7 +108,7 @@ Des: Removes all infection images from aliens and places an infection image on a
for(var/mob/living/carbon/alien in player_list)
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs)
continue
if(alien.client)
@@ -130,7 +130,7 @@ Des: Checks if the passed mob (C) is infected with the alien egg, then gives eac
for(var/mob/living/carbon/alien in player_list)
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs)
continue
if(alien.client)
@@ -149,7 +149,7 @@ Des: Removes the alien infection image from all aliens in the world located in p
for(var/mob/living/carbon/alien in player_list)
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs)
continue
if(alien.client)
@@ -108,7 +108,7 @@ var/const/MAX_ACTIVE_TIME = 400
return
var/mob/living/carbon/C = M
if(istype(C) && locate(/datum/organ/internal/xenos/hivenode) in C.internal_organs)
if(istype(C) && locate(/obj/item/organ/xenos/hivenode) in C.internal_organs)
return
@@ -228,7 +228,7 @@ var/const/MAX_ACTIVE_TIME = 400
return 0
var/mob/living/carbon/C = M
if(istype(C) && locate(/datum/organ/internal/xenos/hivenode) in C.internal_organs)
if(istype(C) && locate(/obj/item/organ/xenos/hivenode) in C.internal_organs)
return 0
if(ishuman(C))
@@ -11,7 +11,7 @@
/mob/living/carbon/human/proc/gain_plasma(var/amount)
var/datum/organ/internal/xenos/plasmavessel/I = internal_organs_by_name["plasma vessel"]
var/obj/item/organ/xenos/plasmavessel/I = internal_organs_by_name["plasma vessel"]
if(!istype(I)) return
if(amount)
@@ -20,13 +20,13 @@
/mob/living/carbon/human/proc/check_alien_ability(var/cost,var/needs_foundation,var/needs_organ)
var/datum/organ/internal/xenos/plasmavessel/P = internal_organs_by_name["plasma vessel"]
var/obj/item/organ/xenos/plasmavessel/P = internal_organs_by_name["plasma vessel"]
if(!istype(P))
src << "<span class='danger'>Your plasma vessel has been removed!</span>"
return
if(needs_organ)
var/datum/organ/internal/I = internal_organs_by_name[needs_organ]
var/obj/item/organ/I = internal_organs_by_name[needs_organ]
if(!I)
src << "<span class='danger'>Your [needs_organ] has been removed!</span>"
return
@@ -62,7 +62,7 @@
src << "<span class='alium'>You need to be closer.</span>"
return
var/datum/organ/internal/xenos/plasmavessel/I = M.internal_organs_by_name["plasma vessel"]
var/obj/item/organ/xenos/plasmavessel/I = M.internal_organs_by_name["plasma vessel"]
if(!istype(I))
src << "<span class='alium'>Their plasma vessel is missing.</span>"
return
@@ -45,13 +45,17 @@
vision_flags = SEE_MOBS
has_organ = list(
"heart" = /datum/organ/internal/heart,
"brain" = /datum/organ/internal/brain/xeno,
"plasma vessel" = /datum/organ/internal/xenos/plasmavessel,
"hive node" = /datum/organ/internal/xenos/hivenode,
"nutrient vessel" = /datum/organ/internal/diona/nutrients
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain/xeno,
"plasma vessel" = /obj/item/organ/xenos/plasmavessel,
"hive node" = /obj/item/organ/xenos/hivenode,
"nutrient vessel" = /obj/item/organ/diona/nutrients
)
bump_flag = ALIEN
swap_flags = ALLMOBS
push_flags = ALLMOBS ^ ROBOT
var/alien_number = 0
var/caste_name = "creature" // Used to update alien name.
var/weeds_heal_rate = 1 // Health regen on weeds.
@@ -89,7 +93,7 @@
if(environment.gas["phoron"] > 0 || locate(/obj/effect/alien/weeds) in T)
if(!regenerate(H))
var/datum/organ/internal/xenos/plasmavessel/P = H.internal_organs_by_name["plasma vessel"]
var/obj/item/organ/xenos/plasmavessel/P = H.internal_organs_by_name["plasma vessel"]
P.stored_plasma += weeds_plasma_rate
P.stored_plasma = min(max(P.stored_plasma,0),P.max_plasma)
..()
@@ -112,7 +116,7 @@
return 1
//next internal organs
for(var/datum/organ/internal/I in H.internal_organs)
for(var/obj/item/organ/I in H.internal_organs)
if(I.damage > 0)
I.damage = max(I.damage - heal_rate, 0)
if (prob(5))
@@ -120,11 +124,11 @@
return 1
//next mend broken bones, approx 10 ticks each
for(var/datum/organ/external/E in H.bad_external_organs)
for(var/obj/item/organ/external/E in H.bad_external_organs)
if (E.status & ORGAN_BROKEN)
if (prob(mend_prob))
if (E.mend_fracture())
H << "<span class='alium'>You feel something mend itself inside your [E.display_name].</span>"
H << "<span class='alium'>You feel something mend itself inside your [E.name].</span>"
return 1
return 0
@@ -149,13 +153,13 @@
deform = 'icons/mob/human_races/xenos/r_xenos_drone.dmi'
has_organ = list(
"heart" = /datum/organ/internal/heart,
"brain" = /datum/organ/internal/brain/xeno,
"plasma vessel" = /datum/organ/internal/xenos/plasmavessel/queen,
"acid gland" = /datum/organ/internal/xenos/acidgland,
"hive node" = /datum/organ/internal/xenos/hivenode,
"resin spinner" = /datum/organ/internal/xenos/resinspinner,
"nutrient vessel" = /datum/organ/internal/diona/nutrients
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain/xeno,
"plasma vessel" = /obj/item/organ/xenos/plasmavessel/queen,
"acid gland" = /obj/item/organ/xenos/acidgland,
"hive node" = /obj/item/organ/xenos/hivenode,
"resin spinner" = /obj/item/organ/xenos/resinspinner,
"nutrient vessel" = /obj/item/organ/diona/nutrients
)
inherent_verbs = list(
@@ -188,11 +192,11 @@
deform = 'icons/mob/human_races/xenos/r_xenos_hunter.dmi'
has_organ = list(
"heart" = /datum/organ/internal/heart,
"brain" = /datum/organ/internal/brain/xeno,
"plasma vessel" = /datum/organ/internal/xenos/plasmavessel/hunter,
"hive node" = /datum/organ/internal/xenos/hivenode,
"nutrient vessel" = /datum/organ/internal/diona/nutrients
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain/xeno,
"plasma vessel" = /obj/item/organ/xenos/plasmavessel/hunter,
"hive node" = /obj/item/organ/xenos/hivenode,
"nutrient vessel" = /obj/item/organ/diona/nutrients
)
inherent_verbs = list(
@@ -216,12 +220,12 @@
deform = 'icons/mob/human_races/xenos/r_xenos_sentinel.dmi'
has_organ = list(
"heart" = /datum/organ/internal/heart,
"brain" = /datum/organ/internal/brain/xeno,
"plasma vessel" = /datum/organ/internal/xenos/plasmavessel/sentinel,
"acid gland" = /datum/organ/internal/xenos/acidgland,
"hive node" = /datum/organ/internal/xenos/hivenode,
"nutrient vessel" = /datum/organ/internal/diona/nutrients
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain/xeno,
"plasma vessel" = /obj/item/organ/xenos/plasmavessel/sentinel,
"acid gland" = /obj/item/organ/xenos/acidgland,
"hive node" = /obj/item/organ/xenos/hivenode,
"nutrient vessel" = /obj/item/organ/diona/nutrients
)
inherent_verbs = list(
@@ -248,14 +252,14 @@
deform = 'icons/mob/human_races/xenos/r_xenos_queen.dmi'
has_organ = list(
"heart" = /datum/organ/internal/heart,
"brain" = /datum/organ/internal/brain/xeno,
"egg sac" = /datum/organ/internal/xenos/eggsac,
"plasma vessel" = /datum/organ/internal/xenos/plasmavessel/queen,
"acid gland" = /datum/organ/internal/xenos/acidgland,
"hive node" = /datum/organ/internal/xenos/hivenode,
"resin spinner" = /datum/organ/internal/xenos/resinspinner,
"nutrient vessel" = /datum/organ/internal/diona/nutrients
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain/xeno,
"egg sac" = /obj/item/organ/xenos/eggsac,
"plasma vessel" = /obj/item/organ/xenos/plasmavessel/queen,
"acid gland" = /obj/item/organ/xenos/acidgland,
"hive node" = /obj/item/organ/xenos/hivenode,
"resin spinner" = /obj/item/organ/xenos/resinspinner,
"nutrient vessel" = /obj/item/organ/diona/nutrients
)
inherent_verbs = list(
@@ -14,7 +14,7 @@
return 0
// Check if they have a functioning hand.
var/datum/organ/external/E = user.organs_by_name["l_hand"]
var/obj/item/organ/external/E = user.organs_by_name["l_hand"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
@@ -74,8 +74,8 @@
target.apply_effect(3, WEAKEN, armour)
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/datum/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.display_name]!</span>")
var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.name]!</span>")
playsound(user.loc, attack_sound, 25, 1, -1)
/datum/unarmed_attack/bite
@@ -100,8 +100,8 @@
damage = 0
/datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/datum/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name
var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.name
attack_damage = Clamp(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case.
@@ -154,7 +154,7 @@
if(!(zone in list("l_leg", "r_leg", "l_foot", "r_foot", "groin")))
return 0
var/datum/organ/external/E = user.organs_by_name["l_foot"]
var/obj/item/organ/external/E = user.organs_by_name["l_foot"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
@@ -171,8 +171,8 @@
return damage + (shoes ? shoes.force : 0)
/datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/datum/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name
var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.name
attack_damage = Clamp(attack_damage, 1, 5)
@@ -198,7 +198,7 @@
if (!user.lying && (target.lying || (zone in list("l_foot", "r_foot"))))
if(target.grabbed_by == user && target.lying)
return 0
var/datum/organ/external/E = user.organs_by_name["l_foot"]
var/obj/item/organ/external/E = user.organs_by_name["l_foot"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
@@ -213,8 +213,8 @@
return damage + (shoes ? shoes.force : 0)
/datum/unarmed_attack/stomp/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/datum/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name
var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.name
var/obj/item/clothing/shoes = user.shoes
attack_damage = Clamp(attack_damage, 1, 5)
@@ -182,7 +182,9 @@ var/global/list/damage_icon_parts = list()
// first check whether something actually changed about damage appearance
var/damage_appearance = ""
for(var/datum/organ/external/O in organs)
for(var/obj/item/organ/external/O in organs)
if(O.is_stump())
continue
if(O.status & ORGAN_DESTROYED) damage_appearance += "d"
else
damage_appearance += O.damage_state
@@ -198,7 +200,9 @@ var/global/list/damage_icon_parts = list()
var/image/standing_image = new /image("icon" = standing)
// blend the individual damage states with our icons
for(var/datum/organ/external/O in organs)
for(var/obj/item/organ/external/O in organs)
if(O.is_stump())
continue
if(!(O.status & ORGAN_DESTROYED))
O.update_icon()
if(O.damage_state == "00") continue
@@ -223,7 +227,6 @@ var/global/list/damage_icon_parts = list()
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
var/necrosis_color_mod = rgb(10,50,0)
var/husk = (HUSK in src.mutations)
var/fat = (FAT in src.mutations)
@@ -231,7 +234,6 @@ var/global/list/damage_icon_parts = list()
var/skeleton = (SKELETON in src.mutations)
var/g = (gender == FEMALE ? "f" : "m")
var/has_head = 0
//CACHING: Generate an index key from visible bodyparts.
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
@@ -239,19 +241,14 @@ var/global/list/damage_icon_parts = list()
//Create a new, blank icon for our mob to use.
if(stand_icon)
del(stand_icon)
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
var/icon_key = "[species.race_key][g][s_tone]"
for(var/datum/organ/external/part in organs)
if(istype(part,/datum/organ/external/head) && !(part.status & ORGAN_DESTROYED))
has_head = 1
if(part.status & ORGAN_DESTROYED)
for(var/obj/item/organ/external/part in organs)
if(part.is_stump() || (part.status & ORGAN_DESTROYED))
icon_key = "[icon_key]0"
else if(part.status & ORGAN_ROBOT)
icon_key = "[icon_key]2"
icon_key = "[icon_key]2[part.model ? "-[part.model]": ""]"
else if(part.status & ORGAN_DEAD)
icon_key = "[icon_key]3"
else
@@ -261,69 +258,31 @@ var/global/list/damage_icon_parts = list()
var/icon/base_icon
if(human_icon_cache[icon_key])
//Icon is cached, use existing icon.
base_icon = human_icon_cache[icon_key]
//log_debug("Retrieved cached mob icon ([icon_key] \icon[human_icon_cache[icon_key]]) for [src].")
else
//BEGIN CACHED ICON GENERATION.
var/obj/item/organ/external/chest = get_organ("chest")
base_icon = chest.get_icon()
//BEGIN CACHED ICON GENERATION.
var/race_icon = (skeleton ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
var/deform_icon = (skeleton ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
//Robotic limbs are handled in get_icon() so all we worry about are missing or dead limbs.
//No icon stored, so we need to start with a basic one.
var/datum/organ/external/chest = get_organ("chest")
base_icon = chest.get_icon(race_icon,deform_icon,g)
if(chest.status & ORGAN_DEAD)
base_icon.ColorTone(necrosis_color_mod)
base_icon.SetIntensity(0.7)
for(var/datum/organ/external/part in organs)
var/icon/temp //Hold the bodypart icon for processing.
if(part.status & ORGAN_DESTROYED)
continue
if (istype(part, /datum/organ/external/groin) || istype(part, /datum/organ/external/head))
temp = part.get_icon(race_icon,deform_icon,g)
else
temp = part.get_icon(race_icon,deform_icon)
if(part.status & ORGAN_DEAD)
temp.ColorTone(necrosis_color_mod)
temp.SetIntensity(0.7)
for(var/obj/item/organ/external/part in organs)
var/icon/temp = part.get_icon(skeleton)
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
if(part.icon_position&(LEFT|RIGHT))
var/icon/temp2 = new('icons/mob/human.dmi',"blank")
temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH)
temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH)
if(!(part.icon_position & LEFT))
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(!(part.icon_position & RIGHT))
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_OVERLAY)
if(part.icon_position & LEFT)
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(part.icon_position & RIGHT)
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_UNDERLAY)
else
base_icon.Blend(temp, ICON_OVERLAY)
if(!skeleton)
@@ -334,46 +293,18 @@ var/global/list/damage_icon_parts = list()
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
//Handle husk overlay.
if(husk && ("overlay_husk" in icon_states(race_icon)))
if(husk && ("overlay_husk" in icon_states(species.icobase)))
var/icon/mask = new(base_icon)
var/icon/husk_over = new(race_icon,"overlay_husk")
var/icon/husk_over = new(species.icobase,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
husk_over.Blend(mask, ICON_ADD)
base_icon.Blend(husk_over, ICON_OVERLAY)
//Skin tone.
if(!husk && !hulk)
if(species.flags & HAS_SKIN_TONE)
if(s_tone >= 0)
base_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
base_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
human_icon_cache[icon_key] = base_icon
//log_debug("Generated new cached mob icon ([icon_key] \icon[human_icon_cache[icon_key]]) for [src]. [human_icon_cache.len] cached mob icons.")
//END CACHED ICON GENERATION.
stand_icon.Blend(base_icon,ICON_OVERLAY)
//Skin colour. Not in cache because highly variable (and relatively benign).
if (species.flags & HAS_SKIN_COLOR)
stand_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(has_head)
//Eyes
if(!skeleton)
var/icon/eyes = new/icon('icons/mob/human_face.dmi', species.eyes)
if (species.flags & HAS_EYE_COLOR)
eyes.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
stand_icon.Blend(eyes, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style && (species && species.flags & HAS_LIPS)) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
//Underwear
if(underwear && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', underwear), ICON_OVERLAY)
@@ -392,7 +323,7 @@ var/global/list/damage_icon_parts = list()
//Reset our hair
overlays_standing[HAIR_LAYER] = null
var/datum/organ/external/head/head_organ = get_organ("head")
var/obj/item/organ/external/head/head_organ = get_organ("head")
if( !head_organ || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
@@ -763,13 +694,12 @@ var/global/list/damage_icon_parts = list()
standing.overlays += bloodsies
overlays_standing[SUIT_LAYER] = standing
update_tail_showing(0)
else
overlays_standing[SUIT_LAYER] = null
update_tail_showing(0)
update_inv_shoes(0)
update_collar(0)
@@ -854,37 +784,47 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
if(r_hand)
r_hand.screen_loc = ui_rhand //TODO
var/t_icon = INV_R_HAND_DEF_ICON
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
t_icon = r_hand.item_icons[icon_r_hand]
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
if(!t_state) t_state = r_hand.icon_state
if(r_hand.icon_override)
t_state = "[t_state]_r"
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
else
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
overlays_standing[R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]")
if (handcuffed) drop_r_hand()
else
overlays_standing[R_HAND_LAYER] = null
if(update_icons) update_icons()
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
if(l_hand)
l_hand.screen_loc = ui_lhand //TODO
var/t_icon = INV_L_HAND_DEF_ICON
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
t_icon = l_hand.item_icons[icon_l_hand]
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
if(!t_state) t_state = l_hand.icon_state
if(l_hand.icon_override)
t_state = "[t_state]_l"
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
else
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
overlays_standing[L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]")
if (handcuffed) drop_l_hand()
else
overlays_standing[L_HAND_LAYER] = null
if(update_icons) update_icons()
if(update_icons) update_icons()
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
overlays_standing[TAIL_LAYER] = null
@@ -925,48 +865,13 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/update_surgery(var/update_icons=1)
overlays_standing[SURGERY_LEVEL] = null
var/image/total = new
for(var/datum/organ/external/E in organs)
for(var/obj/item/organ/external/E in organs)
if(E.open)
var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.name][round(E.open)]", "layer"=-SURGERY_LEVEL)
total.overlays += I
overlays_standing[SURGERY_LEVEL] = total
if(update_icons) update_icons()
// Used mostly for creating head items
/mob/living/carbon/human/proc/generate_head_icon()
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
// var/g = "m"
// if (gender == FEMALE) g = "f"
//base icons
var/icon/face_lying = new /icon('icons/mob/human_face.dmi',"bald_l")
if(f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
face_lying.Blend(facial_l, ICON_OVERLAY)
if(h_style)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
face_lying.Blend(hair_l, ICON_OVERLAY)
//Eyes
// Note: These used to be in update_face(), and the fact they're here will make it difficult to create a disembodied head
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
face_lying.Blend(eyes_l, ICON_OVERLAY)
if(lip_style)
face_lying.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
var/image/face_lying_image = new /image(icon = face_lying)
return face_lying_image
//Human Overlays Indexes/////////
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER
@@ -314,7 +314,7 @@
if(Target.Adjacent(src))
if(istype(Target, /mob/living/silicon)) // Glomp the silicons
if(!Atkcool)
a_intent = "hurt"
a_intent = I_HURT
UnarmedAttack(Target)
Atkcool = 1
spawn(45)
@@ -328,12 +328,12 @@
spawn(45)
Atkcool = 0
a_intent = "disarm"
a_intent = I_DISARM
UnarmedAttack(Target)
else
if(!Atkcool)
a_intent = "grab"
a_intent = I_GRAB
UnarmedAttack(Target)
else if(Target in view(7, src))
@@ -351,9 +351,9 @@
frenemy = S
if (frenemy && prob(1))
if (frenemy.colour == colour)
a_intent = "help"
a_intent = I_HELP
else
a_intent = "hurt"
a_intent = I_HURT
UnarmedAttack(frenemy)
var/sleeptime = movement_delay()
@@ -365,10 +365,10 @@
/mob/living/carbon/slime/proc/handle_speech_and_mood()
//Mood starts here
var/newmood = ""
a_intent = "help"
a_intent = I_HELP
if (rabid || attacked)
newmood = "angry"
a_intent = "hurt"
a_intent = I_HURT
else if (Target) newmood = "mischevous"
if (!newmood)
@@ -283,10 +283,10 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
@@ -0,0 +1,141 @@
//Monkey Overlays Indexes////////
#define M_MASK_LAYER 1
#define M_BACK_LAYER 2
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define TARGETED_LAYER 6
#define M_FIRE_LAYER 6
#define M_TOTAL_LAYERS 7
/////////////////////////////////
/mob/living/carbon/monkey
var/list/overlays_lying[M_TOTAL_LAYERS]
var/list/overlays_standing[M_TOTAL_LAYERS]
/mob/living/carbon/monkey/regenerate_icons()
..()
update_inv_wear_mask(0)
update_inv_back(0)
update_inv_r_hand(0)
update_inv_l_hand(0)
update_inv_handcuffed(0)
update_fire(0)
update_icons()
//Hud Stuff
update_hud()
return
/mob/living/carbon/monkey/update_icons()
update_hud()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
overlays.Cut()
for(var/image/I in overlays_standing)
overlays += I
if(lying)
var/matrix/M = matrix()
M.Turn(90)
M.Translate(1,-6)
src.transform = M
else
var/matrix/M = matrix()
src.transform = M
////////
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
wear_mask.screen_loc = ui_monkey_mask
else
overlays_standing[M_MASK_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
if(r_hand)
var/t_icon = INV_R_HAND_DEF_ICON
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
t_icon = r_hand.item_icons[icon_r_hand]
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
overlays_standing[M_R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
r_hand.screen_loc = ui_rhand
if (handcuffed) drop_r_hand()
else
overlays_standing[M_R_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
if(l_hand)
var/t_icon = INV_L_HAND_DEF_ICON
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
t_icon = l_hand.item_icons[icon_l_hand]
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
overlays_standing[M_L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
l_hand.screen_loc = ui_lhand
if (handcuffed) drop_l_hand()
else
overlays_standing[M_L_HAND_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
if(back)
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
back.screen_loc = ui_monkey_back
else
overlays_standing[M_BACK_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
if(handcuffed)
drop_r_hand()
drop_l_hand()
stop_pulling()
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
else
overlays_standing[M_HANDCUFF_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_hud()
if (client)
client.screen |= contents
//Call when target overlay should be added/removed
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
if (targeted_by && target_locked)
overlays_standing[TARGETED_LAYER] = target_locked
else if (!targeted_by && target_locked)
del(target_locked)
if (!targeted_by)
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
if(on_fire)
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
else
overlays_standing[M_FIRE_LAYER] = null
if(update_icons) update_icons()
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
#undef M_HANDCUFF_LAYER
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef TARGETED_LAYER
#undef M_FIRE_LAYER
#undef M_TOTAL_LAYERS
+1 -3
View File
@@ -22,11 +22,9 @@
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/M = src
for(var/datum/organ/external/organ in M.organs)
for(var/obj/item/organ/external/organ in M.organs)
if (!organ)
continue
if((organ.status & ORGAN_DESTROYED) && !organ.amputated)
src.traumatic_shock += 60
else if(organ.status & ORGAN_BROKEN || organ.open)
src.traumatic_shock += 30
if(organ.status & ORGAN_SPLINTED)
+120 -4
View File
@@ -20,6 +20,122 @@
usr.visible_message("<b>[src]</b> points to [A]")
return 1
/*one proc, four uses
swapping: if it's 1, the mobs are trying to switch, if 0, non-passive is pushing passive
default behaviour is:
- non-passive mob passes the passive version
- passive mob checks to see if its mob_bump_flag is in the non-passive's mob_bump_flags
- if si, the proc returns
*/
/mob/living/proc/can_move_mob(var/mob/living/swapped, swapping = 0, passive = 0)
if(!swapped)
return 1
if(!passive)
return swapped.can_move_mob(src, swapping, 1)
else
var/context_flags = 0
if(swapping)
context_flags = swapped.mob_swap_flags
else
context_flags = swapped.mob_push_flags
if(!mob_bump_flag) //nothing defined, go wild
return 1
if(mob_bump_flag & context_flags)
return 1
return 0
/mob/living/Bump(atom/movable/AM, yes)
spawn(0)
if ((!( yes ) || now_pushing) || !loc)
return
now_pushing = 1
if (istype(AM, /mob/living))
var/mob/living/tmob = AM
for(var/mob/living/M in range(tmob, 1))
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "<span class='warning'>[tmob] is restrained, you cannot push past</span>"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "<span class='warning'>[tmob] is restraining [M], you cannot push past</span>"
now_pushing = 0
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
var/dense = 0
if(loc.density)
dense = 1
for(var/atom/movable/A in loc)
if(A == src)
continue
if(A.density)
if(A.flags&ON_BORDER)
dense = !A.CanPass(src, src.loc)
else
dense = 1
if(dense) break
//Leaping mobs just land on the tile, no pushing, no anything.
if(status_flags & LEAPING)
loc = tmob.loc
status_flags &= ~LEAPING
now_pushing = 0
return
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
slime.UpdateFeed()
return
if(!can_move_mob(tmob, 0, 0))
now_pushing = 0
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "<span class='danger'>You fail to push [tmob]'s fat ass out of the way.</span>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
spawn(0)
..()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
return
return
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
@@ -53,7 +169,7 @@
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
for(var/datum/organ/external/affecting in H.organs)
for(var/obj/item/organ/external/affecting in H.organs)
if(!affecting) continue
if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn
H.UpdateDamageIcon()
@@ -223,7 +339,7 @@
var/t = shooter:zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
t = "head"
var/datum/organ/external/def_zone = ran_zone(t)
var/obj/item/organ/external/def_zone = ran_zone(t)
return def_zone
@@ -412,11 +528,11 @@
//pull damage with injured people
if(prob(25))
M.adjustBruteLoss(1)
visible_message("\red \The [M]'s wounds open more from being dragged!")
visible_message("<span class='danger'>\The [M]'s [M.isSynthetic() ? "state worsens": "wounds open more"] from being dragged!</span>")
if(M.pull_damage())
if(prob(25))
M.adjustBruteLoss(2)
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
visible_message("<span class='danger'>\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!</span>")
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
+2 -2
View File
@@ -49,8 +49,8 @@
Stun(2)
//Being hit while using a deadman switch
if(istype(equipped(),/obj/item/device/assembly/signaler))
var/obj/item/device/assembly/signaler/signaler = equipped()
if(istype(get_active_hand(),/obj/item/device/assembly/signaler))
var/obj/item/device/assembly/signaler/signaler = get_active_hand()
if(signaler.deadman && prob(80))
src.visible_message("\red [src] triggers their deadman's switch!")
signaler.signal()
+4 -1
View File
@@ -20,7 +20,6 @@
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
@@ -32,6 +31,10 @@
var/t_n2 = null
var/now_pushing = null
var/mob_bump_flag = 0
var/mob_swap_flags = 0
var/mob_push_flags = 0
var/mob_always_swap = 0
var/mob/living/cameraFollow = null
+126 -1
View File
@@ -79,7 +79,132 @@ proc/get_radio_key_from_channel(var/channel)
if(!istype(dongle)) return
if(dongle.translate_binary) return 1
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/sound/speech_sound, var/sound_vol)
/mob/living/proc/get_default_language()
return null
/mob/living/proc/handle_speech_problems(var/message, var/verb)
var/list/returns[3]
var/speech_problem_flag = 0
if((HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(message)]!!!"
verb = pick("yells","roars","hollers")
speech_problem_flag = 1
if(slurring)
message = slur(message)
verb = pick("slobbers","slurs")
speech_problem_flag = 1
if(stuttering)
message = stutter(message)
verb = pick("stammers","stutters")
speech_problem_flag = 1
returns[1] = message
returns[2] = verb
returns[3] = speech_problem_flag
return returns
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
if(message_mode == "intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
return 0
/mob/living/proc/handle_speech_sound()
var/list/returns[2]
returns[1] = null
returns[2] = null
return returns
/mob/living/proc/get_speech_ending(verb, var/ending)
if(ending=="!")
return pick("exclaims","shouts","yells")
if(ending=="?")
return "asks"
return verb
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="")
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
if(stat)
if(stat == 2)
return say_dead(message)
return
var/message_mode = parse_message_mode(message, "headset")
switch(copytext(message,1,2))
if("*") return emote(copytext(message,2))
if("^") return custom_emote(1, copytext(message,2))
//parse the radio code and consume it
if (message_mode)
if (message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
message = trim_left(message)
//parse the language code and consume it
if(!speaking)
speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else
speaking = get_default_language()
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
else
verb = get_speech_ending(verb, ending)
message = trim_left(message)
if(!(speaking && (speaking.flags & NO_STUTTER)))
var/list/handle_s = handle_speech_problems(message, verb)
message = handle_s[1]
verb = handle_s[2]
if(!message || message == "")
return
var/list/obj/item/used_radios = new
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name))
return
var/list/handle_v = handle_speech_sound()
var/sound/speech_sound = handle_v[1]
var/sound_vol = handle_v[2]
var/italics = 0
var/message_range = world.view
//speaking into radios
if(used_radios.len)
italics = 1
message_range = 1
if(speaking)
message_range = speaking.get_talkinto_msg_range(message)
var/msg
if(!speaking || !(speaking.flags & NO_TALK_MSG))
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
for(var/mob/living/M in hearers(5, src))
if((M != src) && msg)
M.show_message(msg)
if (speech_sound)
sound_vol *= 0.5
var/turf/T = get_turf(src)
-7
View File
@@ -311,13 +311,6 @@ var/list/ai_verbs_default = list(
//usr <<"You can only change your display once!"
//return
/mob/living/silicon/ai/proc/is_malf()
if(ticker.mode.name == "AI malfunction")
for (var/datum/mind/malfai in malf.current_antagonists)
if (mind == malfai)
return malf
return 0
// displays the malf_ai information if the AI is the malf
/mob/living/silicon/ai/show_malf_ai()
if(malf && malf.hacked_apcs.len >= 3)
+1 -2
View File
@@ -16,8 +16,7 @@
src.laws.show_laws(who)
/mob/living/silicon/ai/add_ion_law(var/law)
src.laws_sanity_check()
src.laws.add_ion_law(law)
..()
for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == src))
R.show_laws()
+26 -10
View File
@@ -12,6 +12,7 @@
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg)
laws_sanity_check()
laws.set_zeroth_law(law, law_borg)
log_and_message_admins("has given [src] the zeroth laws: [law]/[law_borg ? law_borg : "N/A"]")
/mob/living/silicon/robot/set_zeroth_law(var/law, var/law_borg)
..()
@@ -21,28 +22,39 @@
/mob/living/silicon/proc/add_ion_law(var/law)
laws_sanity_check()
laws.add_ion_law(law)
log_and_message_admins("has given [src] the ion law: [law]")
/mob/living/silicon/proc/add_inherent_law(var/law, var/state_law = 1)
/mob/living/silicon/proc/add_inherent_law(var/law)
laws_sanity_check()
laws.add_inherent_law(law, state_law)
laws.add_inherent_law(law)
log_and_message_admins("has given [src] the inherent law: [law]")
/mob/living/silicon/proc/add_supplied_law(var/number, var/law)
laws_sanity_check()
laws.add_supplied_law(number, law)
log_and_message_admins("has given [src] the supplied law: [law]")
/mob/living/silicon/proc/delete_law(var/datum/ai_law/law)
laws_sanity_check()
laws.delete_law(law)
log_and_message_admins("has deleted a law belonging to [src]: [law.law]")
/mob/living/silicon/proc/clear_inherent_laws()
laws_sanity_check()
laws.clear_inherent_laws()
log_and_message_admins("cleared the inherent laws of [src]")
/mob/living/silicon/proc/clear_ion_laws()
laws_sanity_check()
laws.clear_ion_laws()
/mob/living/silicon/proc/add_supplied_law(var/number, var/law, var/state_law = 1)
laws_sanity_check()
laws.add_supplied_law(number, law, state_law)
log_and_message_admins("cleared the ion laws of [src]")
/mob/living/silicon/proc/clear_supplied_laws()
laws_sanity_check()
laws.clear_supplied_laws()
log_and_message_admins("cleared the supplied laws of [src]")
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws, var/use_statement_order = 1) // -- TLE
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws)
var/prefix = ""
switch(lawchannel)
if(MAIN_CHANNEL) prefix = ";"
@@ -50,9 +62,9 @@
else
prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " "
dostatelaws(lawchannel, prefix, laws, use_statement_order)
dostatelaws(lawchannel, prefix, laws)
/mob/living/silicon/proc/dostatelaws(var/method, var/prefix, var/datum/ai_laws/laws, var/use_statement_order)
/mob/living/silicon/proc/dostatelaws(var/method, var/prefix, var/datum/ai_laws/laws)
if(stating_laws[prefix])
src << "<span class='notice'>[method]: Already stating laws using this communication method.</span>"
return
@@ -62,7 +74,7 @@
var/can_state = statelaw("[prefix]Current Active Laws:")
for(var/datum/ai_law/law in laws.laws_to_state())
can_state = statelaw("[prefix][law.get_index(use_statement_order)]. [law.law]")
can_state = statelaw("[prefix][law.get_index()]. [law.law]")
if(!can_state)
src << "<span class='danger'>[method]: Unable to state laws. Communication method unavailable.</span>"
@@ -81,3 +93,7 @@
channels += common_radio.channels
channels += additional_law_channels
return channels
/mob/living/silicon/proc/lawsync()
laws_sanity_check()
laws.sort_laws()
@@ -65,9 +65,9 @@
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Electronics:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [] - []", \
capitalize(org.display_name), \
capitalize(org.name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
else
@@ -17,6 +17,11 @@
integrated_light_power = 2
local_transmit = 1
mob_bump_flag = SIMPLE_ANIMAL
mob_swap_flags = SIMPLE_ANIMAL
mob_push_flags = SIMPLE_ANIMAL
mob_always_swap = 1
//Used for self-mailing.
var/mail_destination = ""
@@ -256,20 +261,6 @@
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
if (!yes || ( \
!istype(AM,/obj/machinery/door) && \
!istype(AM,/obj/machinery/recharge_station) && \
!istype(AM,/obj/machinery/disposal/deliveryChute) && \
!istype(AM,/obj/machinery/teleport/hub) && \
!istype(AM,/obj/effect/portal)
)) return
..()
return
/mob/living/silicon/robot/drone/Bumped(AM as mob|obj)
return
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct))
@@ -24,6 +24,6 @@
//Actual picking-up event.
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
get_scooped(M)
..()
@@ -38,11 +38,12 @@
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
/mob/living/silicon/robot/proc/lawsync()
/mob/living/silicon/robot/lawsync()
laws_sanity_check()
var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null
var/datum/ai_laws/master = connected_ai && lawupdate ? connected_ai.laws : null
if (master)
master.sync(src)
..()
return
/mob/living/silicon/robot/proc/robot_checklaws()
+5 -37
View File
@@ -8,6 +8,10 @@
maxHealth = 200
health = 200
mob_bump_flag = ROBOT
mob_swap_flags = ROBOT|MONKEY|SLIME|SIMPLE_ANIMAL
mob_push_flags = ALLMOBS //trundle trundle
var/lights_on = 0 // Is our integrated light on?
var/used_power_this_tick = 0
var/sight_mode = 0
@@ -575,43 +579,6 @@
if(prob(75) && Proj.damage > 0) spark_system.start()
return 2
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(20))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
now_pushing = 0
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
F.move_inside()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
return
@@ -1233,6 +1200,7 @@
/mob/living/silicon/robot/proc/disconnect_from_ai()
if(connected_ai)
sync() // One last sync attempt
connected_ai.connected_robots -= src
connected_ai = null
@@ -333,3 +333,14 @@
for(var/obj/machinery/camera/C in A.cameras())
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
src << "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])"
/mob/living/silicon/proc/is_traitor()
return mind && (mind in traitors.current_antagonists)
/mob/living/silicon/proc/is_malf()
return mind && (mind in malf.current_antagonists)
/mob/living/silicon/proc/is_malf_or_traitor()
return is_traitor() || is_malf()
@@ -11,7 +11,7 @@
icon_living = "brainslug"
icon_dead = "brainslug_dead"
speed = 5
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
attacktext = "nipped"
@@ -100,7 +100,7 @@
if(istype(host,/mob/living/carbon/human))
var/mob/living/carbon/human/H = host
var/datum/organ/external/head = H.get_organ("head")
var/obj/item/organ/external/head = H.get_organ("head")
head.implants -= src
controlling = 0
@@ -69,7 +69,7 @@
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/E = H.organs_by_name["head"]
var/obj/item/organ/external/E = H.organs_by_name["head"]
if(!E || (E.status & ORGAN_DESTROYED))
src << "\The [H] does not have a head!"
@@ -115,12 +115,12 @@
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/internal/I = H.internal_organs_by_name["brain"]
var/obj/item/organ/I = H.internal_organs_by_name["brain"]
if(!I) // No brain organ, so the borer moves in and replaces it permanently.
replace_brain()
else
// If they're in normally, implant removal can get them out.
var/datum/organ/external/head = H.get_organ("head")
var/obj/item/organ/external/head = H.get_organ("head")
head.implants += src
return
@@ -183,11 +183,11 @@
H.ChangeToHusk()
var/datum/organ/internal/borer/B = new(H)
var/obj/item/organ/borer/B = new(H)
H.internal_organs_by_name["brain"] = B
H.internal_organs |= B
var/datum/organ/external/affecting = H.get_organ("head")
var/obj/item/organ/external/affecting = H.get_organ("head")
affecting.implants -= src
var/s2h_id = src.computer_id
@@ -10,10 +10,11 @@
response_harm = "punches"
icon_dead = "shade_dead"
speed = -1
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
universal_speak = 1
universal_speak = 0
universal_understand = 1
attack_sound = 'sound/weapons/punch1.ogg'
min_oxy = 0
max_oxy = 0
@@ -24,15 +25,25 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
show_stat_health = 0
faction = "cult"
supernatural = 1
var/nullblock = 0
mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY
mob_push_flags = ALLMOBS
var/list/construct_spells = list()
/mob/living/simple_animal/construct/New()
..()
name = text("[initial(name)] ([rand(1, 1000)])")
real_name = name
add_language("Cult")
add_language("Occult")
for(var/spell in construct_spells)
spell_list += new spell(src)
updateicon()
/mob/living/simple_animal/construct/death()
new /obj/item/weapon/ectoplasm (src.loc)
@@ -40,12 +51,11 @@
ghostize()
del src
/mob/living/simple_animal/construct/attack_generic(var/mob/user)
if(istype(user, /mob/living/simple_animal/construct/builder))
if(health < maxHealth)
adjustBruteLoss(-5)
user.visible_message("<b>\The [user]</b> mends some of \the [src]'s wounds.")
user.visible_message("<span class='notice'>\The [user]</b> mends some of \the [src]'s wounds.</span>")
else
user << "<span class='notice'>\The [src] is undamaged.</span>"
return
@@ -53,7 +63,7 @@
/mob/living/simple_animal/construct/examine(mob/user)
..(user)
var/msg = ""
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
@@ -64,54 +74,12 @@
msg += "*---------*</span>"
user << msg
return
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/////////////////Juggernaut///////////////
/mob/living/simple_animal/construct/armoured
name = "Juggernaut"
real_name = "Juggernaut"
@@ -128,32 +96,12 @@
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
speed = 3
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch3.ogg'
status_flags = 0
resistance = 10
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/mob/living/simple_animal/construct/armoured/Life()
weakened = 0
..()
@@ -163,8 +111,8 @@
var/reflectchance = 80 - round(P.damage/3)
if(prob(reflectchance))
adjustBruteLoss(P.damage * 0.5)
visible_message("<span class='danger'>\The [P] was reflected by \the [src]'s shell!</span>", \
"<span class='userdanger'>\The [P] was reflected by \the [src]'s shell!</span>")
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]'s shell!</span>")
// Find a turf near or on the original location to bounce to
if(P.starting)
@@ -198,12 +146,12 @@
melee_damage_upper = 25
attacktext = "slashed"
speed = -1
environment_smash = 1
see_in_dark = 7
attack_sound = 'sound/weapons/bladeslice.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
/////////////////////////////Artificer/////////////////////////
@@ -223,7 +171,7 @@
melee_damage_upper = 5
attacktext = "rammed"
speed = 0
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch2.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
@@ -250,60 +198,35 @@
melee_damage_upper = 50
attacktext = "brutally crushed"
speed = 5
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch4.ogg'
mob_size = 20
resistance = 10
var/energy = 0
var/max_energy = 1000
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
////////////////////////Harvester////////////////////////////////
////////////////Powers//////////////////
/mob/living/simple_animal/construct/harvester
name = "Harvester"
real_name = "Harvester"
desc = "The promised reward of the livings who follow narsie. Obtained by offering their bodies to the geometer of blood"
icon = 'icons/mob/mob.dmi'
icon_state = "harvester"
icon_living = "harvester"
maxHealth = 150
health = 150
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "violently stabs"
speed = -1
environment_smash = 1
see_in_dark = 7
attack_sound = 'sound/weapons/pierce.ogg'
/*
/client/proc/summon_cultist()
set category = "Behemoth"
set name = "Summon Cultist (300)"
set desc = "Teleport a cultist to your location"
if (istype(usr,/mob/living/simple_animal/constructbehemoth))
if(usr.energy<300)
usr << "\red You do not have enough power stored!"
return
if(usr.stat)
return
usr.energy -= 300
var/list/mob/living/cultists = new
for(var/datum/mind/H in ticker.mode.cult)
if (istype(H.current,/mob/living))
cultists+=H.current
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr)
if(!cultist)
return
if (cultist == usr) //just to be sure.
return
cultist.loc = usr.loc
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
construct_spells = list(
//spell/targeted/harvest,
//spell/aoe_turf/knock/harvester,
//spell/rune_write
)
@@ -103,7 +103,7 @@
/mob/living/simple_animal/cat/attack_hand(mob/living/carbon/human/M as mob)
. = ..()
if(M.a_intent == "hurt")
if(M.a_intent == I_HURT)
set_flee_target(M)
/mob/living/simple_animal/cat/ex_act()
@@ -24,241 +24,6 @@
var/obj/item/inventory_back
var/facehugger
/*
/mob/living/simple_animal/corgi/Life()
..()
regenerate_icons()
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
user.set_machine(src)
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(inventory_head)
dat += "<br><b>Head:</b> [inventory_head] (<a href='?src=\ref[src];remove_inv=head'>Remove</a>)"
else
dat += "<br><b>Head:</b> <a href='?src=\ref[src];add_inv=head'>Nothing</a>"
if(inventory_back)
dat += "<br><b>Back:</b> [inventory_back] (<a href='?src=\ref[src];remove_inv=back'>Remove</a>)"
else
dat += "<br><b>Back:</b> <a href='?src=\ref[src];add_inv=back'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(inventory_head && inventory_back)
//helmet and armor = 100% protection
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
if( O.force )
usr << "\red This animal is wearing too much armor. You can't cause /him any damage."
for (var/mob/M in viewers(src, null))
M.show_message("\red \b [user] hits [src] with the [O], however [src] is too armored.")
else
usr << "\red This animal is wearing too much armor. You can't reach its skin."
for (var/mob/M in viewers(src, null))
M.show_message("\red [user] gently taps [src] with the [O]. ")
if(prob(15))
visible_emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression on \his face")
return
..()
/mob/living/simple_animal/corgi/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("head")
if(inventory_head)
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
desc = "It's a corgi."
SetLuminosity(0)
inventory_head.loc = src.loc
inventory_head = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
if("back")
if(inventory_back)
inventory_back.loc = src.loc
inventory_back = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
//Adding things to inventory
else if(href_list["add_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("head")
if(inventory_head)
usr << "\red It's is already wearing something."
return
else
place_on_head(usr.get_active_hand())
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
//Many hats added, Some will probably be removed, just want to see which ones are popular.
var/list/allowed_types = list(
/obj/item/clothing/head/helmet,
/obj/item/clothing/glasses/sunglasses,
/obj/item/clothing/head/caphat,
/obj/item/clothing/head/collectable/captain,
/obj/item/clothing/head/that,
/obj/item/clothing/head/that,
/obj/item/clothing/head/kitty,
/obj/item/clothing/head/collectable/kitty,
/obj/item/clothing/head/rabbitears,
/obj/item/clothing/head/collectable/rabbitears,
/obj/item/clothing/head/beret,
/obj/item/clothing/head/collectable/beret,
/obj/item/clothing/head/det_hat,
/obj/item/clothing/head/nursehat,
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/collectable/pirate,
/obj/item/clothing/head/ushanka,
/obj/item/clothing/head/chefhat,
/obj/item/clothing/head/collectable/chef,
/obj/item/clothing/head/collectable/police,
/obj/item/clothing/head/wizard/fake,
/obj/item/clothing/head/wizard,
/obj/item/clothing/head/collectable/wizard,
/obj/item/clothing/head/hardhat,
/obj/item/clothing/head/collectable/hardhat,
/obj/item/clothing/head/hardhat/white,
/obj/item/weapon/bedsheet,
/obj/item/clothing/head/helmet/space/santahat,
/obj/item/clothing/head/collectable/paper,
/obj/item/clothing/head/soft
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red It doesn't seem too keen on wearing that item."
return
usr.drop_item()
place_on_head(item_to_add)
if("back")
if(inventory_back)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
var/list/allowed_types = list(
/obj/item/clothing/suit/armor/vest,
/obj/item/device/radio
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.inventory_back = item_to_add
regenerate_icons()
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
else
..()
/mob/living/simple_animal/corgi/proc/place_on_head(obj/item/item_to_add)
item_to_add.loc = src
src.inventory_head = item_to_add
regenerate_icons()
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
switch(inventory_head && inventory_head.type)
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
name = "Captain [real_name]"
desc = "Probably better than the last captain."
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
name = "Runtime"
emote_see = list("coughs up a furball", "stretches")
emote_hear = list("purrs")
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
name = "Hoppy"
emote_see = list("twitches its nose", "hops around a bit")
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
name = "Yann"
desc = "Mon dieu! C'est un chien!"
speak = list("le woof!", "le bark!", "JAPPE!!")
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of him")
if(/obj/item/clothing/head/det_hat)
name = "Detective [real_name]"
desc = "[name] sees through your lies..."
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
if(/obj/item/clothing/head/nursehat)
name = "Nurse [real_name]"
desc = "[name] needs 100cc of beef jerky...STAT!"
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
name = "[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]"
desc = "Yaarghh!! Thar' be a scurvy dog!"
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
emote_hear = list("growls ferociously", "snarls")
speak = list("Arrrrgh!!","Grrrrrr!")
if(/obj/item/clothing/head/ushanka)
name = "[pick("Comrade","Commissar","Glorious Leader")] [real_name]"
desc = "A follower of Karl Barx."
emote_see = list("contemplates the failings of the capitalist economic model", "ponders the pros and cons of vangaurdism")
if(/obj/item/clothing/head/collectable/police)
name = "Officer [real_name]"
emote_see = list("drools","looks for donuts")
desc = "Stop right there criminal scum!"
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
name = "Grandwizard [real_name]"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
if(/obj/item/weapon/bedsheet)
name = "\improper Ghost"
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
emote_see = list("stumbles around", "shivers")
emote_hear = list("howls","groans")
desc = "Spooky!"
if(/obj/item/clothing/head/helmet/space/santahat)
name = "Rudolph the Red-Nosed Corgi"
emote_hear = list("barks christmas songs", "yaps")
desc = "He has a very shiny nose."
SetLuminosity(6)
if(/obj/item/clothing/head/soft)
name = "Corgi Tech [real_name]"
desc = "The reason your yellow gloves have chew-marks."
*/
//IAN! SQUEEEEEEEEE~
/mob/living/simple_animal/corgi/Ian
name = "Ian"
@@ -325,44 +90,6 @@
name = "Corgi meat"
desc = "Tastes like... well you know..."
/mob/living/simple_animal/corgi/Ian/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
//PC stuff-Sieve
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/weapon/newspaper))
if(!stat)
@@ -125,7 +125,7 @@
udder.add_reagent("milk", rand(5, 10))
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == "disarm" && icon_state != icon_dead)
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
icon_state = icon_dead
@@ -14,43 +14,6 @@
emote_see = list("jiggles", "bounces in place")
var/colour = "grey"
/mob/living/simple_animal/slime/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/simple_animal/adultslime
name = "pet slime"
desc = "A lovable, domesticated slime."
@@ -17,7 +17,7 @@
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashed"
a_intent = "harm"
a_intent = I_HURT
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 0
max_oxy = 0
@@ -29,7 +29,7 @@
max_n2 = 0
unsuitable_atoms_damage = 15
faction = "alien"
wall_smash = 1
environment_smash = 2
status_flags = CANPUSH
minbodytemp = 0
heat_damage_per_tick = 20
@@ -134,7 +134,7 @@
if(ishuman(target_mob))
var/mob/living/carbon/human/H = target_mob
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
var/obj/item/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"), sharp=1, edge=1)
return H
else if(isliving(target_mob))
@@ -13,7 +13,7 @@
speak = list("HONK", "Honk!", "Welcome to clown planet!")
emote_see = list("honks")
speak_chance = 1
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
maxHealth = 75
health = 75
@@ -15,7 +15,7 @@
response_harm = "hits"
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
health = 300
maxHealth = 300
@@ -18,7 +18,7 @@
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "punched"
a_intent = "harm"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife
min_oxy = 5
@@ -18,7 +18,7 @@
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "punched"
a_intent = "harm"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
var/weapon1
var/weapon2
@@ -31,7 +31,7 @@
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
wall_smash = 1
environment_smash = 1
faction = "syndicate"
status_flags = CANPUSH
@@ -159,4 +159,4 @@
/mob/living/simple_animal/hostile/viscerator/death()
..(null,"is smashed into pieces!")
del src
del src
@@ -215,7 +215,7 @@
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob)
..()
if(client) return
if(!stat && M.a_intent == "hurt")
if(!stat && M.a_intent == I_HURT)
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
@@ -475,7 +475,7 @@
if(ishuman(parrot_interest))
var/mob/living/carbon/human/H = parrot_interest
var/datum/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone)))
var/obj/item/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone)))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"), sharp=1)
visible_emote(pick("pecks [H]'s [affecting].", "cuts [H]'s [affecting] with its talons."))
@@ -607,7 +607,7 @@
stolen_item = C.r_hand
if(stolen_item)
C.u_equip(stolen_item)
C.remove_from_mob(stolen_item)
held_item = stolen_item
stolen_item.loc = src
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
+16 -30
View File
@@ -28,34 +28,20 @@
faction = "cult"
status_flags = CANPUSH
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize()
del src
return
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/shade/Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize()
del src
return
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
return
return ..()
@@ -4,6 +4,12 @@
health = 20
maxHealth = 20
mob_bump_flag = SIMPLE_ANIMAL
mob_swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
mob_push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
var/show_stat_health = 1 //does the percentage health show in the stat panel for the mob
var/icon_living = ""
var/icon_dead = ""
var/icon_gib = null //We only try to show a gibbing animation if this exists.
@@ -52,7 +58,12 @@
var/attacktext = "attacked"
var/attack_sound = null
var/friendly = "nuzzles"
var/wall_smash = 0
var/environment_smash = 0
var/resistance = 0 // Damage reduction
//Null rod stuff
var/supernatural = 0
var/purge = 0
/mob/living/simple_animal/New()
..()
@@ -88,6 +99,7 @@
handle_stunned()
handle_weakened()
handle_paralysed()
handle_supernatural()
//Movement
if(!client && !stop_automated_movement && wander && !anchored)
@@ -186,19 +198,9 @@
adjustBruteLoss(unsuitable_atoms_damage)
return 1
/mob/living/simple_animal/Bumped(AM as mob|obj)
if(!AM) return
if(resting || buckled)
return
if(isturf(src.loc))
if(ismob(AM))
var/newamloc = src.loc
src.loc = AM:loc
AM:loc = newamloc
else
..()
/mob/living/simple_animal/proc/handle_supernatural()
if(purge)
purge -= 1
/mob/living/simple_animal/gib()
..(icon_gib,1)
@@ -225,15 +227,15 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if (health > 0)
M.visible_message("\blue [M] [response_help] \the [src]")
if("disarm")
if(I_DISARM)
M.visible_message("\blue [M] [response_disarm] \the [src]")
//TODO: Push the mob away or something
if("grab")
if(I_GRAB)
if (M == src)
return
if (!(status_flags & CANPUSH))
@@ -249,62 +251,66 @@
M.visible_message("\red [M] has grabbed [src] passively!")
if("hurt")
if(I_HURT)
adjustBruteLoss(harm_intent_damage)
M.visible_message("\red [M] [response_harm] \the [src]")
return
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user) //Marker -Agouri
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD && health < maxHealth)
var/obj/item/stack/medical/medical_pack = O
if(medical_pack.use(1))
adjustBruteLoss(-medical_pack.heal_brute)
visible_message("<span class='warning'>\The [user] applies the [medical_pack] to \the [src].</span>")
user.changeNext_move(4)
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
adjustBruteLoss(-MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] applies the [MED] on [src].</span>")
else
user << "<span class='warning'>\The [src] cannot benefit from medical items in \his current state.</span>"
return
else if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
var/actual_meat_amount = max(1,(meat_amount/2))
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
del(src)
else
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
gib()
return
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
visible_message("<span class='danger'>\The [src] has been attacked with \the [O] by [user].</span>")
user << "<span class='notice>\The [src] is dead, medical items won't bring it back to life.</span>"
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
harvest(user)
else
user << "<span class='danger'>This weapon is ineffective; it does no damage.</span>"
visible_message("<span class='danger'>\The [user] gently taps [src] with the [O].</span>")
user.changeNext_move(8)
if(O.force > resistance)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
if(supernatural && istype(O,/obj/item/weapon/nullrod))
damage *= 2
purge = 3
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='danger>[src] has been attacked with the [O] by [user].</span>")
else
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] gently taps [src] with the [O].</span>")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
tally = speed
if(purge)//Purged creatures will move more slowly. The more time before their purge stops, the slower they'll move.
if(tally <= 0)
tally = 1
tally *= purge
return tally+config.animal_delay
/mob/living/simple_animal/Stat()
..()
statpanel("Status")
stat(null, "Health: [round((health / maxHealth) * 100)]%")
if(statpanel("Status") && show_stat_health)
stat(null, "Health: [round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/death()
icon_state = icon_dead
@@ -354,24 +360,32 @@
overlays += target_locked
/mob/living/simple_animal/say(var/message)
if(stat)
return
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
if(stat)
return
var/verb = "says"
if(speak_emote.len)
verb = pick(speak_emote)
message = capitalize(trim_left(message))
message = sanitize(message)
..(message, null, verb)
/mob/living/simple_animal/get_speech_ending(verb, var/ending)
return verb
/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1
// Harvest an animal's delicious byproducts
/mob/living/simple_animal/proc/harvest(var/mob/user)
var/actual_meat_amount = max(1,(meat_amount/2))
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
del(src)
else
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
gib()
@@ -30,9 +30,9 @@
max_co2 = 0
max_tox = 0
a_intent = "harm" //so they don't get pushed around
a_intent = I_HURT //so they don't get pushed around
wall_smash = 1
environment_smash = 2
speed = -1
+7 -76
View File
@@ -117,77 +117,6 @@
/mob/proc/restrained()
return
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(slot)
var/obj/item/W = get_active_hand()
if(istype(W))
equip_to_slot_if_possible(W, slot)
/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
return 1
else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning, redraw_mob))
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
if(!istype(W)) return 0
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
del(W)
else
if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
return 1
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
//In most cases you will want to use equip_to_slot_if_possible()
/mob/proc/equip_to_slot(obj/item/W as obj, slot)
return
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \
slot_back,\
slot_wear_id,\
slot_w_uniform,\
slot_wear_suit,\
slot_wear_mask,\
slot_head,\
slot_shoes,\
slot_gloves,\
slot_l_ear,\
slot_r_ear,\
slot_glasses,\
slot_belt,\
slot_s_store,\
slot_tie,\
slot_l_store,\
slot_r_store\
)
//puts the item "W" into an appropriate slot in a human's inventory
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)
if(!istype(W)) return 0
for(var/slot in slot_equipment_priority)
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
return 1
return 0
/mob/proc/reset_view(atom/A)
if (client)
if (istype(A, /atom/movable))
@@ -589,8 +518,8 @@ var/list/slot_equipment_priority = list( \
var/mob/living/carbon/human/H = src
if(H.health - H.halloss <= config.health_threshold_softcrit)
for(var/name in H.organs_by_name)
var/datum/organ/external/e = H.organs_by_name[name]
if(H.lying)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(e && H.lying)
if(((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
return 1
break
@@ -1101,7 +1030,7 @@ mob/proc/yank_out_object()
else
U << "<span class='warning'>You attempt to get a good grip on [selection] in [S]'s body.</span>"
if(!do_after(U, 80))
if(!do_after(U, 30))
return
if(!selection || !S || !U)
return
@@ -1116,9 +1045,9 @@ mob/proc/yank_out_object()
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/datum/organ/external/affected
var/obj/item/organ/external/affected
for(var/datum/organ/external/organ in H.organs) //Grab the organ holding the implant.
for(var/obj/item/organ/external/organ in H.organs) //Grab the organ holding the implant.
for(var/obj/item/O in organ.implants)
if(O == selection)
affected = organ
@@ -1137,6 +1066,8 @@ mob/proc/yank_out_object()
human_user.bloody_hands(H)
selection.loc = get_turf(src)
if(!(U.l_hand && U.r_hand))
U.put_in_hands(selection)
for(var/obj/item/weapon/O in pinned)
if(O == selection)
+2 -1
View File
@@ -14,6 +14,7 @@
var/obj/screen/blind = null
var/obj/screen/hands = null
var/obj/screen/pullin = null
var/obj/screen/purged = null
var/obj/screen/internals = null
var/obj/screen/oxygen = null
var/obj/screen/i_select = null
@@ -117,7 +118,7 @@
var/losebreath = 0.0//Carbon
var/intent = null//Living
var/shakecamera = 0
var/a_intent = "help"//Living
var/a_intent = I_HELP//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null
+29 -20
View File
@@ -92,13 +92,22 @@
/mob/living/silicon/ai/isAI()
return 1
/mob/proc/isRobot()
/mob/proc/isRobot()
return 0
/mob/living/silicon/robot/isRobot()
return 1
/mob/proc/isSynthetic()
return 0
/mob/living/carbon/human/isSynthetic()
return species.flags & IS_SYNTHETIC
/mob/living/silicon/isSynthetic()
return 1
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
@@ -125,7 +134,7 @@ proc/isobserver(A)
return 0
proc/isorgan(A)
if(istype(A, /datum/organ/external))
if(istype(A, /obj/item/organ/external))
return 1
return 0
@@ -140,7 +149,7 @@ proc/isnewplayer(A)
return 1
return 0
proc/hasorgans(A)
proc/hasorgans(A) // Fucking really??
return ishuman(A)
proc/iscuffed(A)
@@ -433,20 +442,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
//converts intent-strings into numbers and back
var/list/intents = list("help","disarm","grab","hurt")
var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
if("help") return 0
if("disarm") return 1
if("grab") return 2
if(I_HELP) return 0
if(I_DISARM) return 1
if(I_GRAB) return 2
else return 3
else
switch(argument)
if(0) return "help"
if(1) return "disarm"
if(2) return "grab"
else return "hurt"
if(0) return I_HELP
if(1) return I_DISARM
if(2) return I_GRAB
else return I_HURT
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
/mob/verb/a_intent_change(input as text)
@@ -455,7 +464,7 @@ var/list/intents = list("help","disarm","grab","hurt")
if(ishuman(src) || isbrain(src) || isslime(src))
switch(input)
if("help","disarm","grab","hurt")
if(I_HELP,I_DISARM,I_GRAB,I_HURT)
a_intent = input
if("right")
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
@@ -466,17 +475,17 @@ var/list/intents = list("help","disarm","grab","hurt")
else if(isrobot(src))
switch(input)
if("help")
a_intent = "help"
if("hurt")
a_intent = "hurt"
if(I_HELP)
a_intent = I_HELP
if(I_HURT)
a_intent = I_HURT
if("right","left")
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
if(hud_used && hud_used.action_intent)
if(a_intent == "hurt")
hud_used.action_intent.icon_state = "harm"
if(a_intent == I_HURT)
hud_used.action_intent.icon_state = I_HURT
else
hud_used.action_intent.icon_state = "help"
hud_used.action_intent.icon_state = I_HELP
proc/is_blind(A)
if(istype(A, /mob/living/carbon))
+4 -4
View File
@@ -96,8 +96,8 @@
/client/verb/drop_item()
set hidden = 1
if(!isrobot(mob))
mob.drop_item_v()
if(!isrobot(mob) && mob.stat == CONSCIOUS && isturf(mob.loc))
return mob.drop_item()
return
@@ -289,8 +289,8 @@
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(mob.buckled))
var/mob/living/carbon/human/driver = mob.buckled
var/datum/organ/external/l_hand = driver.get_organ("l_hand")
var/datum/organ/external/r_hand = driver.get_organ("r_hand")
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck!
//drunk wheelchair driving
@@ -200,12 +200,13 @@ datum/preferences
for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
if(organ_data[name] == "amputated") continue
var/icon/temp = new /icon(icobase, "[name]")
if(organ_data[name] == "cyborg")
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
var/datum/robolimb/R
if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
if(!R) R = basic_robolimb
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
continue
preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
//Tail
if(current_species && (current_species.tail))
@@ -375,7 +376,7 @@ datum/preferences
if(LAWYER)
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "briefcase"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
switch(backbag)
@@ -534,7 +535,7 @@ datum/preferences
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "toolbox_blue"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
@@ -620,7 +621,7 @@ datum/preferences
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "blueprints"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+4 -4
View File
@@ -180,7 +180,7 @@
var/alien_caste = pick("Hunter","Sentinel","Drone")
var/mob/living/carbon/human/new_xeno = create_new_xenomorph(alien_caste,loc)
new_xeno.a_intent = "hurt"
new_xeno.a_intent = I_HURT
new_xeno.key = key
new_xeno << "<B>You are now an alien.</B>"
@@ -237,7 +237,7 @@
del(t)
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.a_intent = "hurt"
new_corgi.a_intent = I_HURT
new_corgi.key = key
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
@@ -271,7 +271,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You suddenly feel more... animalistic."
@@ -291,7 +291,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You feel more... animalistic"
del(src)
+5
View File
@@ -1,6 +1,11 @@
//Most of these are defined at this level to reduce on checks elsewhere in the code.
//Having them here also makes for a nice reference list of the various overlay-updating procs available
//default item on-mob icons
#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi'
#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi'
/mob/proc/regenerate_icons() //TODO: phase this out completely if possible
return
+9 -24
View File
@@ -49,30 +49,26 @@
var/datum/ai_law/AL = locate(href_list["ref"]) in owner.laws.all_laws()
if(AL)
var/state_law = text2num(href_list["state_law"])
AL.state_law = state_law
owner.laws.set_state_law(AL, state_law)
return 1
if(href_list["add_zeroth_law"])
if(zeroth_law && is_admin(usr) && !owner.laws.zeroth_law)
log_and_message_admins("has given [owner] a new zeroth law: [zeroth_law]")
owner.set_zeroth_law(zeroth_law)
return 1
if(href_list["add_ion_law"])
if(ion_law && is_malf(usr))
log_and_message_admins("has given [owner] a new ion law: [ion_law]")
owner.add_ion_law(ion_law)
return 1
if(href_list["add_inherent_law"])
if(inherent_law && is_malf(usr))
log_and_message_admins("has given [owner] a new inherent law: [inherent_law]")
owner.add_inherent_law(inherent_law)
return 1
if(href_list["add_supplied_law"])
if(supplied_law && supplied_law_position >= 1 && MIN_SUPPLIED_LAW_NUMBER <= MAX_SUPPLIED_LAW_NUMBER && is_malf(usr))
log_and_message_admins("has given [owner] a new supplied law: [supplied_law]")
owner.add_supplied_law(supplied_law_position, supplied_law)
return 1
@@ -120,8 +116,7 @@
if(is_malf(usr))
var/datum/ai_law/AL = locate(href_list["delete_law"]) in owner.laws.all_laws()
if(AL && is_malf(usr))
log_and_message_admins("has deleted a law belonging to [owner]: [AL.law]")
owner.laws.delete_law(AL)
owner.delete_law(AL)
return 1
if(href_list["state_laws"])
@@ -143,15 +138,6 @@
current_view = 0
return 1
if(href_list["sync_laws"])
if(owner.isAI())
sync_laws(owner)
else
var/mob/living/silicon/robot/R = owner
sync_laws(R.connected_ai)
usr << "<span class='notice'>Sync complete.</span>"
return 1
if(href_list["notify_laws"])
owner << "<span class='danger'>Law Notice</span>"
owner.laws.show_laws(owner)
@@ -164,9 +150,11 @@
usr << "<span class='notice>Laws displayed.</span>"
return 1
return 0
/obj/nano_module/law_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
owner.laws.sort_laws()
owner.lawsync()
data["ion_law_nr"] = ionnum()
data["ion_law"] = ion_law
@@ -175,7 +163,7 @@
data["supplied_law"] = supplied_law
data["supplied_law_position"] = supplied_law_position
package_laws(data, "zeroth_laws", list(owner.laws.zeroth_law, owner.laws.zeroth_law_borg))
package_laws(data, "zeroth_laws", list(owner.laws.zeroth_law))
package_laws(data, "ion_laws", owner.laws.ion_laws)
package_laws(data, "inherent_laws", owner.laws.inherent_laws)
package_laws(data, "supplied_laws", owner.laws.supplied_laws)
@@ -209,7 +197,7 @@
/obj/nano_module/law_manager/proc/package_laws(var/list/data, var/field, var/list/datum/ai_law/laws)
var/packaged_laws[0]
for(var/datum/ai_law/AL in laws)
packaged_laws[++packaged_laws.len] = list("law" = sanitize(AL.law), "index" = AL.get_index(), "state" = AL.state_law, "ref" = "\ref[AL]")
packaged_laws[++packaged_laws.len] = list("law" = sanitize(AL.law), "index" = AL.get_index(), "state" = owner.laws.get_state_law(AL), "ref" = "\ref[AL]")
data[field] = packaged_laws
data["has_[field]"] = packaged_laws.len
@@ -226,16 +214,13 @@
return law_sets
/obj/nano_module/law_manager/proc/is_malf(var/mob/user)
return (is_admin(user) && !owner.is_slaved()) || owner.is_malf_loose()
/mob/living/silicon/proc/is_malf_loose()
return mind && (mind.special_role == "malfunction" || mind.special_role == "traitor")
return (is_admin(user) && !owner.is_slaved()) || owner.is_malf_or_traitor()
/mob/living/silicon/proc/is_ai_malf()
return 0
/mob/living/silicon/robot/is_ai_malf()
return is_slaved() && connected_ai.is_malf_loose()
return is_slaved() && connected_ai.is_malf_or_traitor()
/mob/living/silicon/ai/is_ai_malf()
return 0

Some files were not shown because too many files have changed in this diff Show More