Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into newmalf-merge

This commit is contained in:
Atlantis
2015-05-22 21:01:26 +02:00
452 changed files with 11600 additions and 14417 deletions
+163
View File
@@ -0,0 +1,163 @@
/*
adds a dizziness amount to a mob
use this rather than directly changing var/dizziness
since this ensures that the dizzy_process proc is started
currently only humans get dizzy
value of dizziness ranges from 0 to 1000
below 100 is not dizzy
*/
/mob/var/dizziness = 0//Carbon
/mob/var/is_dizzy = 0
/mob/proc/make_dizzy(var/amount)
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return
dizziness = min(1000, dizziness + amount) // store what will be new value
// clamped to max 1000
if(dizziness > 100 && !is_dizzy)
spawn(0)
dizzy_process()
/*
dizzy process - wiggles the client's pixel offset over time
spawned from make_dizzy(), will terminate automatically when dizziness gets <100
note dizziness decrements automatically in the mob's Life() proc.
*/
/mob/proc/dizzy_process()
is_dizzy = 1
while(dizziness > 100)
if(client)
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_dizzy = 0
if(client)
client.pixel_x = 0
client.pixel_y = 0
// jitteriness - copy+paste of dizziness
/mob/var/is_jittery = 0
/mob/var/jitteriness = 0//Carbon
/mob/proc/make_jittery(var/amount)
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return
jitteriness = min(1000, jitteriness + amount) // store what will be new value
// clamped to max 1000
if(jitteriness > 100 && !is_jittery)
spawn(0)
jittery_process()
// Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above.
/mob/proc/jittery_process()
//var/old_x = pixel_x
//var/old_y = pixel_y
is_jittery = 1
while(jitteriness > 100)
// var/amplitude = jitteriness*(sin(jitteriness * 0.044 * world.time) + 1) / 70
// pixel_x = amplitude * sin(0.008 * jitteriness * world.time)
// pixel_y = amplitude * cos(0.008 * jitteriness * world.time)
var/amplitude = min(4, jitteriness / 100)
pixel_x = old_x + rand(-amplitude, amplitude)
pixel_y = old_y + rand(-amplitude/3, amplitude/3)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_jittery = 0
pixel_x = old_x
pixel_y = old_y
//handles up-down floaty effect in space
/mob/var/is_floating = 0
/mob/var/floatiness = 0
/mob/proc/make_floating(var/n)
floatiness = n
if(floatiness && !is_floating)
start_floating()
else if(!floatiness && is_floating)
stop_floating()
/mob/proc/start_floating()
is_floating = 1
var/amplitude = 2 //maximum displacement from original position
var/period = 36 //time taken for the mob to go up >> down >> original position, in deciseconds. Should be multiple of 4
var/top = old_y + amplitude
var/bottom = old_y - amplitude
var/half_period = period / 2
var/quarter_period = period / 4
animate(src, pixel_y = top, time = quarter_period, easing = SINE_EASING | EASE_OUT, loop = -1) //up
animate(pixel_y = bottom, time = half_period, easing = SINE_EASING, loop = -1) //down
animate(pixel_y = old_y, time = quarter_period, easing = SINE_EASING | EASE_IN, loop = -1) //back
/mob/proc/stop_floating()
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
//reset the pixel offsets to zero
is_floating = 0
/atom/movable/proc/do_attack_animation(atom/A)
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/direction = get_dir(src, A)
switch(direction)
if(NORTH)
pixel_y_diff = 8
if(SOUTH)
pixel_y_diff = -8
if(EAST)
pixel_x_diff = 8
if(WEST)
pixel_x_diff = -8
if(NORTHEAST)
pixel_x_diff = 8
pixel_y_diff = 8
if(NORTHWEST)
pixel_x_diff = -8
pixel_y_diff = 8
if(SOUTHEAST)
pixel_x_diff = 8
pixel_y_diff = -8
if(SOUTHWEST)
pixel_x_diff = -8
pixel_y_diff = -8
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2)
/mob/do_attack_animation(atom/A)
..()
is_floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement.
/mob/proc/spin(spintime, speed)
spawn()
var/D = dir
while(spintime >= speed)
sleep(speed)
switch(D)
if(NORTH)
D = EAST
if(SOUTH)
D = WEST
if(EAST)
D = SOUTH
if(WEST)
D = NORTH
set_dir(D)
spintime -= speed
return
+2 -1
View File
@@ -218,7 +218,7 @@ var/list/slot_equipment_priority = list( \
drop_from_inventory(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.
//Attemps to remove an object on a mob.
/mob/proc/remove_from_mob(var/obj/O)
src.u_equip(O)
if (src.client)
@@ -227,6 +227,7 @@ var/list/slot_equipment_priority = list( \
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.loc = src.loc
I.dropped(src)
return 1
+3 -2
View File
@@ -228,6 +228,7 @@
switch(action)
if("weed")
flick("farmbot_hoe", src)
do_attack_animation(A)
if(prob(50))
visible_message("<span class='danger'>[src] swings wildly at [A] with a minihoe, missing completely!</span>")
return
@@ -241,7 +242,7 @@
visible_message("<span class='danger'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
new /obj/item/weapon/minihoe(Tsec)
new /obj/item/weapon/material/minihoe(Tsec)
new /obj/item/weapon/reagent_containers/glass/bucket(Tsec)
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/device/analyzer/plant_analyzer(Tsec)
@@ -326,7 +327,7 @@
user.remove_from_mob(W)
qdel(W)
else if((istype(W, /obj/item/weapon/minihoe)) && (build_step == 2))
else if((istype(W, /obj/item/weapon/material/minihoe)) && (build_step == 2))
build_step++
user << "You add a minihoe to [src]."
name = "farmbot assembly with bucket and minihoe"
+3 -3
View File
@@ -154,7 +154,7 @@
target = T
break
if(maketiles && !target)
for(var/obj/item/stack/sheet/metal/T in view(src))
for(var/obj/item/stack/material/steel/T in view(src))
if(T in ignorelist)
continue
target = T
@@ -249,8 +249,8 @@
target = null
repairing = 0
update_icons()
else if(istype(A, /obj/item/stack/sheet/metal) && amount + 3 < maxAmount)
var/obj/item/stack/sheet/metal/M = A
else if(istype(A, /obj/item/stack/material/steel) && amount + 3 < maxAmount)
var/obj/item/stack/material/steel/M = A
visible_message("<span class='notice'>[src] begins to make tiles.</span>")
repairing = 1
update_icons()
+1 -2
View File
@@ -103,8 +103,7 @@
update_icons()
if(do_mob(src, H, 30))
if(t == 1)
reagent_glass.reagents.trans_to(H, injection_amount)
reagent_glass.reagents.reaction(H, 2)
reagent_glass.reagents.trans_to_mob(H, injection_amount, CHEM_BLOOD)
else
H.reagents.add_reagent(t, injection_amount)
visible_message("<span class='warning'>[src] injects [H] with the syringe!</span>")
+2
View File
@@ -264,6 +264,7 @@
if(!cuff)
C.stun_effect_act(0, 60, null)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
do_attack_animation(C)
is_attacking = 1
update_icons()
spawn(2)
@@ -283,6 +284,7 @@
var/mob/living/simple_animal/S = M
S.AdjustStunned(10)
S.adjustBruteLoss(15)
do_attack_animation(M)
playsound(loc, "swing_hit", 50, 1, -1)
is_attacking = 1
update_icons()
@@ -23,10 +23,6 @@
verbs += /mob/living/proc/ventcrawl
verbs += /mob/living/proc/hide
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
name = "[initial(name)] ([rand(1, 1000)])"
real_name = name
regenerate_icons()
@@ -1,16 +1,7 @@
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
if(istype(M))
//Let people pick the little buggers up.
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."
src.verbs += /mob/living/carbon/alien/diona/proc/split
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
src.loc = M
else
get_scooped(M)
if(istype(M) && M.a_intent == I_HELP)
if(M.species && M.species.name == "Diona" && do_merge(M))
return
get_scooped(M)
return
..()
@@ -24,18 +24,21 @@
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
if(!M || !src || !(src.Adjacent(M))) return
if(!M)
src << "There is nothing nearby to merge with."
else if(!do_merge(M))
src << "You fail to merge with \the [M]..."
if(istype(M,/mob/living/carbon/human))
M << "You feel your being twine with that of [src] as it merges with your biomass."
M.status_flags |= PASSEMOTES
src << "You feel your being twine with that of [M] as you merge with its biomass."
src.loc = M
src.verbs += /mob/living/carbon/alien/diona/proc/split
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
else
return
/mob/living/carbon/alien/diona/proc/do_merge(var/mob/living/carbon/human/H)
if(!istype(H) || !src || !(src.Adjacent(H)))
return 0
H << "You feel your being twine with that of \the [src] as it merges with your biomass."
H.status_flags |= PASSEMOTES
src << "You feel your being twine with that of \the [H] as you merge with its biomass."
loc = H
verbs += /mob/living/carbon/alien/diona/proc/split
verbs -= /mob/living/carbon/alien/diona/proc/merge
return 1
/mob/living/carbon/alien/diona/proc/split()
+10 -2
View File
@@ -35,6 +35,7 @@
var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/item/organ/brain/brainobj = null //The current brain organ.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -60,7 +61,8 @@
living_mob_list += brainmob
user.drop_item()
qdel(O)
brainobj = O
brainobj.loc = src
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
@@ -91,7 +93,13 @@
user << "\red You upend the MMI, but the brain is clamped into place."
else
user << "\blue You upend the MMI, spilling the brain onto the floor."
var/obj/item/organ/brain/brain = new(user.loc)
var/obj/item/organ/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = user.loc
brain = brainobj
brainobj = null
else //Or make a new one if empty.
brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
+12 -1
View File
@@ -105,7 +105,18 @@
proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
chem_effects.Cut()
analgesic = 0
if(touching)
touching.metabolize(0, CHEM_TOUCH)
if(ingested)
ingested.metabolize(0, CHEM_INGEST)
if(reagents)
reagents.metabolize(0, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
+4 -6
View File
@@ -7,7 +7,7 @@
var/datum/gas_mixture/breath = null
//First, check if we can breathe at all
if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
@@ -65,11 +65,9 @@
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
//maybe check air pressure here or something to see if breathing in smoke is even possible.
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
//maybe check air pressure here or something to see if breathing in smoke is even possible.
// I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
/mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath)
+47 -40
View File
@@ -1,3 +1,13 @@
/mob/living/carbon/New()
create_reagents(1000)
var/datum/reagents/R1 = new/datum/reagents(1000)
var/datum/reagents/R2 = new/datum/reagents(1000)
ingested = R1
touching = R2
R1.my_atom = src
R2.my_atom = src
..()
/mob/living/carbon/Life()
..()
@@ -122,7 +132,7 @@
/mob/living/carbon/proc/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/weapon/twohanded))
if(istype(item_in_hand,/obj/item/weapon/material/twohanded))
if(item_in_hand:wielded == 1)
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
return
@@ -163,7 +173,7 @@
)
for(var/obj/item/organ/external/org in H.organs)
var/status = ""
var/list/status = list()
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
if(halloss > 0)
@@ -171,29 +181,39 @@
brutedamage += halloss
if(prob(30))
burndamage += halloss
switch(brutedamage)
if(1 to 20)
status += "bruised"
if(20 to 40)
status += "wounded"
if(40 to INFINITY)
status += "mangled"
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "bleeding"
if(brutedamage > 40)
status = "mangled"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
status += "peeling away"
switch(burndamage)
if(1 to 10)
status += "numb"
if(10 to 40)
status += "blistered"
if(40 to INFINITY)
status += "peeling away"
else if(burndamage > 10)
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(org.status & ORGAN_DESTROYED)
status = "MISSING!"
status += "MISSING"
if(org.status & ORGAN_MUTATED)
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
status += "weirdly shapen"
if(org.dislocated == 2)
status += "dislocated"
if(org.status & ORGAN_BROKEN)
status += "hurts when touched"
if(org.status & ORGAN_DEAD)
status += "is bruised and necrotic"
if(!org.is_usable())
status += "dangling uselessly"
if(status.len)
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].",1)
else
src.show_message("My [org.name] is <span class='notice'> OK.",1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if (on_fire)
@@ -391,25 +411,6 @@
return
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[name]")
return
//generates realistic-ish pulse output based on preset levels
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
var/temp = 0 //see setup.dm:694
@@ -462,6 +463,12 @@
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(default_language)
return default_language
@@ -17,5 +17,8 @@
var/datum/surgery_status/op_stage = new/datum/surgery_status
//Active emote/pose
var/pose = null
var/list/chem_effects = list()
var/datum/reagents/ingested = null
var/datum/reagents/touching = null
var/pulse = PULSE_NORM //current pulse level
@@ -34,7 +34,8 @@
handle_hud_list()
//Handle species-specific deaths.
if(species) species.handle_death(src)
species.handle_death(src)
animate_tail_stop()
//Handle brain slugs.
var/obj/item/organ/external/head = get_organ("head")
+17 -1
View File
@@ -541,8 +541,24 @@
message = "<B>[src]</B> makes a very loud noise."
m_type = 2
if("swish")
src.animate_tail_once()
if("wag", "sway")
src.animate_tail_start()
if("qwag", "fastsway")
src.animate_tail_fast()
if("swag", "stopsway")
src.animate_tail_stop()
if ("help")
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
src << {"blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,
cry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,
grin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,
sigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,
wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
+13 -72
View File
@@ -274,76 +274,17 @@
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
continue
else
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.name]"] += " some dents"
if(21 to INFINITY)
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20)
wound_flavor_text["[temp.name]"] += " some burns"
if(21 to INFINITY)
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)
if(W.internal && !temp.open) continue // can't see internal wounds
var/this_wound_desc = W.desc
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
if(this_wound_desc in wound_descriptors)
wound_descriptors[this_wound_desc] += W.amount
continue
wound_descriptors[this_wound_desc] = W.amount
if(wound_descriptors.len)
var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
if(2)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
if(3 to 5)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
else
flavor_text += " several [wound]s"
if(6 to INFINITY)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
else
flavor_text += " a ton of [wound]\s"
var/flavor_text_string = ""
for(var/text = 1, text <= flavor_text.len, text++)
if(text == flavor_text.len && flavor_text.len > 1)
flavor_text_string += ", and"
else if(flavor_text.len > 1 && text > 1)
flavor_text_string += ","
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.name]"] = flavor_text_string
else
wound_flavor_text["[temp.name]"] = ""
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = 1
else
wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 2)
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.joint] is dislocated!</span><br>"
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.name] is dented and swollen!</span><br>"
//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.
@@ -354,9 +295,9 @@
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["upper body"]
else if(is_bleeding["upper body"])
display_chest = 1
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"]
@@ -374,9 +315,9 @@
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
display_gloves = 1
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["lower body"]
else if(is_bleeding["lower body"])
display_chest = 1
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"]
+41 -48
View File
@@ -26,10 +26,6 @@
if(mind)
mind.name = real_name
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
@@ -231,33 +227,41 @@
suit = w_uniform
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear ? l_ear : "Nothing")]</A>
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
<BR>[(suit) ? ((suit.accessories.len) ? text(" <A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
var/dat = "<B><HR><FONT size=3>[name]</FONT></B><BR><HR>"
for(var/entry in species.hud.gear)
var/list/slot_ref = species.hud.gear[entry]
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
continue
var/obj/item/thing_in_slot = get_equipped_item(slot_ref["slot"])
dat += "<BR><B>[slot_ref["name"]]:</b> <a href='?src=\ref[src];item=[slot_ref["slot"]]'>[istype(thing_in_slot) ? thing_in_slot : "nothing"]</a>"
dat += "<BR><HR>"
if(species.hud.has_hands)
dat += "<BR><b>Left hand:</b> <A href='?src=\ref[src];item=[slot_l_hand]'>[istype(l_hand) ? l_hand : "nothing"]</A>"
dat += "<BR><b>Right hand:</b> <A href='?src=\ref[src];item=[slot_r_hand]'>[istype(r_hand) ? r_hand : "nothing"]</A>"
// Do they get an option to set internals?
if(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space))
if(istype(back, /obj/item/weapon/tank) || istype(belt, /obj/item/weapon/tank) || istype(s_store, /obj/item/weapon/tank))
dat += "<BR><A href='?src=\ref[src];item=internals'>Toggle internals.</A>"
// Other incidentals.
if(istype(suit) && suit.has_sensor == 1)
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors.</A>"
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
if(suit && suit.accessories.len)
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
dat += "<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>"
dat += "<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>"
user << browse(dat, text("window=mob[name];size=340x540"))
onclose(user, "mob[name]")
return
@@ -372,6 +376,7 @@
/mob/living/carbon/human/Topic(href, href_list)
if (href_list["refresh"])
if((machine)&&(in_range(src, usr)))
show_inv(machine)
@@ -381,18 +386,8 @@
unset_machine()
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = usr
O.target = src
O.item = usr.get_active_hand()
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
requests += O
spawn( 0 )
O.process()
return
if(href_list["item"])
handle_strip(href_list["item"],usr)
if (href_list["criminal"])
if(hasHUD(usr,"security"))
@@ -1028,7 +1023,7 @@
var/list/visible_implants = list()
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))
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/material/shard/shrapnel))
visible_implants += O
return(visible_implants)
@@ -1293,7 +1288,7 @@
/mob/living/carbon/human/has_eyes()
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes = internal_organs_by_name["eyes"]
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
if(eyes && istype(eyes) && !(eyes.status & ORGAN_CUT_AWAY))
return 1
return 0
@@ -1323,7 +1318,6 @@
var/mob/S = src
var/mob/U = usr
var/self = null
if(S == U)
self = 1 // Removing object from yourself.
@@ -1332,8 +1326,7 @@
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
var/choice = input(usr,"Which joint do you wish to relocate?") as null|anything in limbs
if(!choice)
return
@@ -15,10 +15,11 @@
if(istype(H))
if((H != src) && check_shields(0, H.name))
visible_message("\red <B>[H] attempted to touch [src]!</B>")
H.do_attack_animation(src)
return 0
if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove))
H.do_attack_animation(src)
var/damage = rand(0, 9)
if(!damage)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
@@ -46,25 +47,32 @@
switch(M.a_intent)
if(I_HELP)
if(istype(H) && health < config.health_threshold_crit)
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
H << "\blue <B>Remove your mask!</B>"
H << "<span class='notice'>Remove your mask!</span>"
return 0
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
H << "\blue <B>Remove [src]'s mask!</B>"
H << "<span class='notice'>Remove [src]'s mask!</span>"
return 0
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn(0)
O.process()
if (!cpr_time)
return 0
cpr_time = 0
spawn(30)
cpr_time = 1
H.visible_message("<span class='danger'>\The [H] is trying perform CPR on \the [src]!</span>")
if(!do_after(H, 30))
return
adjustOxyLoss(-(min(getOxyLoss(), 5)))
updatehealth()
H.visible_message("<span class='danger'>\The [H] performs CPR on \the [src]!</span>")
src << "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
H << "<span class='warning'>Repeat at least every 7 seconds.</span>"
else
help_shake_act(M)
return 1
@@ -88,6 +96,7 @@
G.synch()
LAssailant = M
H.do_attack_animation(src)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
return 1
@@ -179,6 +188,7 @@
if(!attack)
return 0
H.do_attack_animation(src)
if(!attack_message)
attack.show_attack(H, src, hit_zone, rand_damage)
else
@@ -213,6 +223,7 @@
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey])")
M.do_attack_animation(src)
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -271,6 +282,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
user.do_attack_animation(src)
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
@@ -293,7 +305,7 @@
var/dislocation_str
if(prob(W.force))
dislocation_str = "[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!"
organ.dislocate()
organ.dislocate(1)
return dislocation_str
//Used to attack a joint through grabbing
@@ -317,7 +329,7 @@
user.visible_message("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
if(do_after(user, 100))
organ.dislocate()
organ.dislocate(1)
src.visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
return 1
return 0
@@ -43,7 +43,7 @@ emp_act
if(P.can_embed())
var/armor = getarmor_organ(organ, "bullet")
if(prob(20 + max(P.damage - armor, -10)))
var/obj/item/weapon/shard/shrapnel/SP = new()
var/obj/item/weapon/material/shard/shrapnel/SP = new()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
SP.loc = organ
@@ -10,9 +10,8 @@
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if(CE_SPEEDBOOST in chem_effects)
return -1
var/health_deficiency = (100 - health)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
@@ -253,6 +253,6 @@
visible_message("<span class='warning'>\The [src] quivers slightly, then splits apart with a wet slithering noise.</span>")
del(src)
qdel(src)
+25 -475
View File
@@ -116,7 +116,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_glasses()
else if (W == head)
head = null
var/update_hair = 0
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair = 1
@@ -128,7 +128,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_hair(0) //rebuild hair
update_inv_ears(0)
update_inv_wear_mask(0)
update_inv_head()
else if (W == l_ear)
l_ear = null
@@ -168,9 +168,9 @@ This saves us from having to call add_fingerprint() any time something is put in
back = null
update_inv_back()
else if (W == handcuffed)
handcuffed = null
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
buckled.unbuckle_mob()
update_inv_handcuffed()
else if (W == legcuffed)
legcuffed = null
@@ -183,7 +183,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_l_hand()
else
return 0
update_action_buttons()
return 1
@@ -321,7 +321,7 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/slot_is_accessible(var/slot, var/obj/item/I, mob/user=null)
var/obj/item/covering = null
var/check_flags = 0
switch(slot)
if(slot_wear_mask)
covering = src.head
@@ -331,7 +331,7 @@ This saves us from having to call add_fingerprint() any time something is put in
check_flags = HEADCOVERSEYES
if(slot_gloves, slot_w_uniform)
covering = src.wear_suit
if(covering)
if((covering.body_parts_covered & I.body_parts_covered) || (covering.flags & check_flags))
user << "<span class='warning'>\The [covering] is in the way.</span>"
@@ -340,473 +340,23 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/get_equipped_item(var/slot)
switch(slot)
if(slot_wear_suit) return wear_suit
if(slot_gloves) return gloves
if(slot_shoes) return shoes
if(slot_belt) return belt
if(slot_glasses) return glasses
if(slot_head) return head
if(slot_l_ear) return l_ear
if(slot_r_ear) return r_ear
if(slot_w_uniform) return w_uniform
if(slot_wear_id) return wear_id
if(slot_l_store) return l_store
if(slot_r_store) return r_store
if(slot_s_store) return s_store
if(slot_back) return back
if(slot_legcuffed) return legcuffed
if(slot_handcuffed) return handcuffed
if(slot_legcuffed) return legcuffed
if(slot_l_store) return l_store
if(slot_r_store) return r_store
if(slot_wear_mask) return wear_mask
if(slot_l_hand) return l_hand
if(slot_r_hand) return r_hand
if(slot_wear_id) return wear_id
if(slot_glasses) return glasses
if(slot_gloves) return gloves
if(slot_head) return head
if(slot_shoes) return shoes
if(slot_belt) return belt
if(slot_wear_suit) return wear_suit
if(slot_w_uniform) return w_uniform
if(slot_s_store) return s_store
if(slot_l_ear) return l_ear
if(slot_r_ear) return r_ear
return ..()
///Bizarre equip effect system below
/*
MouseDrop human inventory menu
*/
/obj/effect/equip_e
name = "equip e"
var/mob/source = null
var/s_loc = null //source location
var/t_loc = null //target location
var/obj/item/item = null
var/place = null
/obj/effect/equip_e/human
name = "human"
var/mob/living/carbon/human/target = null
/obj/effect/equip_e/process()
return
/obj/effect/equip_e/proc/done()
return
/obj/effect/equip_e/New()
if (!ticker)
qdel(src)
spawn(100)
qdel(src)
..()
return
/obj/effect/equip_e/human/process()
if (item)
item.add_fingerprint(source)
else
switch(place)
if("mask")
if (!( target.wear_mask ))
qdel(src)
if("l_hand")
if (!( target.l_hand ))
qdel(src)
if("r_hand")
if (!( target.r_hand ))
qdel(src)
if("suit")
if (!( target.wear_suit ))
qdel(src)
if("uniform")
if (!( target.w_uniform ))
qdel(src)
if("back")
if (!( target.back ))
qdel(src)
if("syringe")
return
if("pill")
return
if("fuel")
return
if("drink")
return
if("dnainjector")
return
if("handcuff")
if (!( target.handcuffed ))
qdel(src)
if("id")
if ((!( target.wear_id ) || !( target.w_uniform )))
qdel(src)
if("splints")
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/obj/item/organ/external/o = target.organs_by_name[organ]
if(o.status & ORGAN_SPLINTED)
count = 1
break
if(count == 0)
qdel(src)
return
if("sensor")
if (! target.w_uniform )
qdel(src)
if("internal")
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && (istype(target.back, /obj/item/weapon/tank) || istype(target.belt, /obj/item/weapon/tank) || istype(target.s_store, /obj/item/weapon/tank)) && !( target.internal )) ) && !( target.internal )))
qdel(src)
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel", "sensor", "internal", "tie")
if ((item && !( L.Find(place) )))
if(isrobot(source) && place != "handcuff")
qdel(src)
for(var/mob/O in viewers(target, null))
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
else
var/target_part = null
var/obj/item/target_item = null
var/message = null
switch(place)
if("mask")
target_part = "head"
target_item = target.wear_mask
if("l_hand")
target_part = "left hand"
target_item = target.l_hand
if("r_hand")
target_part = "right hand"
target_item = target.r_hand
if("gloves")
target_part = "hands"
target_item = target.gloves
if("eyes")
target_part = "eyes"
target_item = target.glasses
if("l_ear")
target_part = "left ear"
target_item = target.l_ear
if("r_ear")
target_part = "right ear"
target_item = target.r_ear
if("head")
target_part = "head"
target_item = target.head
if("shoes")
target_part = "feet"
target_item = target.shoes
if("belt")
target_part = "waist"
target_item = target.belt
if("suit")
target_part = "body"
target_item = target.wear_suit
if("back")
target_part = "back"
target_item = target.back
if("s_store")
target_part = "suit"
target_item = target.s_store
if("id")
target_part = "uniform"
target_item = target.wear_id
if("syringe")
message = "\red <B>[source] is trying to inject [target]!</B>"
if("pill")
message = "\red <B>[source] is trying to force [target] to swallow [item]!</B>"
if("drink")
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
if("dnainjector")
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
if("uniform")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if("handcuff")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unhandcuffed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unhandcuff [target.name]'s ([target.ckey])</font>")
message = "\red <B>[source] is trying to unhandcuff [target]!</B>"
if("legcuff")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unlegcuffed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unlegcuff [target.name]'s ([target.ckey])</font>")
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
if(suit.accessories.len)
var/obj/item/clothing/accessory/A = suit.accessories[1]
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their accessory ([A]) removed by [source.name] ([source.ckey])</font>"
source.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])</font>"
if(istype(A, /obj/item/clothing/accessory/holobadge) || istype(A, /obj/item/clothing/accessory/medal))
for(var/mob/M in viewers(target, null))
M.show_message("\red <B>[source] tears off \the [A] from [target]'s [suit]!</B>" , 1)
done()
return
else
message = "\red <B>[source] is trying to take off \a [A] from [target]'s [suit]!</B>"
if("pockets")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
if("CPR")
if (!target.cpr_time)
qdel(src)
target.cpr_time = 0
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
if("internal")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
if (target.internal)
message = "\red <B>[source] is trying to remove [target]'s internals</B>"
else
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
if("splints")
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
if("sensor")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) sensors</font>")
var/obj/item/clothing/under/suit = target.w_uniform
if (suit.has_sensor >= 2)
source << "The controls are locked."
return
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
if(target_item)
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their [target_item] removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) [target_item]</font>")
if(target_item.canremove)
message = "<span class='danger'>[source] is trying to take off \a [target_item] from [target]'s [target_part]!</span>"
else
source.visible_message("<span class='danger'>[source] fails to take off \a [target_item] from [target]'s [target_part]!</span>")
return
source.visible_message(message)
spawn( HUMAN_STRIP_DELAY )
done()
return
return
/*
This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag.
It works in conjuction with the process() above.
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
The else statement is for equipping stuff to empty slots.
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
It can still be worn/put on as normal.
*/
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
target.cpr_time = 1
if(isanimal(source)) return //animals cannot strip people
if(!source || !target) return //Target or source no longer exist
if(source.loc != s_loc) return //source has moved
if(target.loc != t_loc) return //target has moved
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead
var/slot_to_process
var/obj/item/strip_item //this will tell us which item we will be stripping - if any.
switch(place) //here we go again...
if("mask")
slot_to_process = slot_wear_mask
if (target.wear_mask && target.wear_mask.canremove)
strip_item = target.wear_mask
if("gloves")
slot_to_process = slot_gloves
if (target.gloves && target.gloves.canremove)
strip_item = target.gloves
if("eyes")
slot_to_process = slot_glasses
if (target.glasses)
strip_item = target.glasses
if("belt")
slot_to_process = slot_belt
if (target.belt)
strip_item = target.belt
if("s_store")
slot_to_process = slot_s_store
if (target.s_store)
strip_item = target.s_store
if("head")
slot_to_process = slot_head
if (target.head && target.head.canremove)
strip_item = target.head
if("l_ear")
slot_to_process = slot_l_ear
if (target.l_ear)
strip_item = target.l_ear
if("r_ear")
slot_to_process = slot_r_ear
if (target.r_ear)
strip_item = target.r_ear
if("shoes")
slot_to_process = slot_shoes
if (target.shoes && target.shoes.canremove)
strip_item = target.shoes
if("l_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
qdel(src)
slot_to_process = slot_l_hand
if (target.l_hand)
strip_item = target.l_hand
if("r_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
qdel(src)
slot_to_process = slot_r_hand
if (target.r_hand)
strip_item = target.r_hand
if("uniform")
slot_to_process = slot_w_uniform
if(target.w_uniform && target.w_uniform.canremove)
strip_item = target.w_uniform
if("suit")
slot_to_process = slot_wear_suit
if (target.wear_suit && target.wear_suit.canremove)
strip_item = target.wear_suit
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
//var/obj/item/clothing/accessory/tie = suit.hastie
/*if(tie)
if (istype(tie,/obj/item/clothing/accessory/storage))
var/obj/item/clothing/accessory/storage/W = tie
if (W.hold)
W.hold.close(usr)
usr.put_in_hands(tie)
suit.hastie = null*/
if(suit && suit.accessories.len)
var/obj/item/clothing/accessory/A = suit.accessories[1]
A.on_removed(usr)
suit.accessories -= A
target.update_inv_w_uniform()
if("id")
slot_to_process = slot_wear_id
if (target.wear_id)
strip_item = target.wear_id
if("back")
slot_to_process = slot_back
if (target.back)
strip_item = target.back
if("handcuff")
slot_to_process = slot_handcuffed
if (target.handcuffed)
strip_item = target.handcuffed
else if (source != target && ishuman(source))
//check that we are still grabbing them
var/grabbing = 0
for (var/obj/item/weapon/grab/G in target.grabbed_by)
if (G.loc == source && G.state >= GRAB_AGGRESSIVE)
grabbing = 1
break
if (!grabbing)
slot_to_process = null
source << "\red Your grasp was broken before you could restrain [target]!"
if("legcuff")
slot_to_process = slot_legcuffed
if (target.legcuffed)
strip_item = target.legcuffed
if("splints")
var/can_reach_splints = 1
if(target.wear_suit && istype(target.wear_suit,/obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/suit = target.wear_suit
if(suit.supporting_limbs && suit.supporting_limbs.len)
source << "You cannot remove the splints - [target]'s [suit] is supporting some of the breaks."
can_reach_splints = 0
if(can_reach_splints)
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
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
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
W.add_fingerprint(source)
if("CPR")
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
var/suff = min(target.getOxyLoss(), 5) //Pre-merge level, less healing, more prevention of dieing.
target.adjustOxyLoss(-suff)
target.updatehealth()
for(var/mob/O in viewers(source, null))
O.show_message("\red [source] performs CPR on [target]!", 1)
target << "\blue <b>You feel a breath of fresh air enter your lungs. It feels good.</b>"
source << "\red Repeat at least every 7 seconds."
if("dnainjector")
var/obj/item/weapon/dnainjector/S = item
if(S)
S.add_fingerprint(source)
if (!( istype(S, /obj/item/weapon/dnainjector) ))
S.inuse = 0
qdel(src)
S.inject(target, source)
if (S.s_time >= world.time + 30)
S.inuse = 0
qdel(src)
S.s_time = world.time
for(var/mob/O in viewers(source, null))
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
S.inuse = 0
if("pockets")
if (!item || (target.l_store && target.r_store)) // Only empty pockets when hand is empty or both pockets are full
slot_to_process = slot_l_store
strip_item = target.l_store //We'll do both
else if (target.l_store)
slot_to_process = slot_r_store
else
slot_to_process = slot_l_store
if("sensor")
var/obj/item/clothing/under/suit = target.w_uniform
if (suit)
if(suit.has_sensor >= 2)
source << "The controls are locked."
else
suit.set_sensors(source)
if("internal")
if (target.internal)
target.internal.add_fingerprint(source)
target.internal = null
if (target.internals)
target.internals.icon_state = "internal0"
else
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(target.back, /obj/item/weapon/tank))
target.internal = target.back
else if (istype(target.s_store, /obj/item/weapon/tank))
target.internal = target.s_store
else if (istype(target.belt, /obj/item/weapon/tank))
target.internal = target.belt
if (target.internal)
for(var/mob/M in viewers(target, 1))
M.show_message("[target] is now running on internals.", 1)
target.internal.add_fingerprint(source)
if (target.internals)
target.internals.icon_state = "internal1"
if(slot_to_process)
if(strip_item) //Stripping an item from the mob
if(strip_item.mob_can_unequip(target, slot_to_process, 0))
target.drop_from_inventory(strip_item)
source.put_in_hands(strip_item)
strip_item.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.drop_from_inventory(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
else
source << "<span class='warning'>You fail to remove \the [strip_item] from [target]!</span>"
else if(item)
if(target.has_organ_for_slot(slot_to_process) && item.mob_can_equip(target, slot_to_process, 0)) //Placing an item on the mob
source.drop_from_inventory(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
else
source << "<span class='warning'>You fail to place \the [item] on [target]!</span>"
if(source && target)
if(source.machine == target)
target.show_inv(source)
qdel(src)
+11 -6
View File
@@ -859,10 +859,16 @@
proc/handle_chemicals_in_body()
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
chem_effects.Cut()
analgesic = 0
var/alien = 0
if(species && species.reagent_tag)
alien = species.reagent_tag
reagents.metabolize(src,alien)
touching.metabolize(alien, CHEM_TOUCH)
ingested.metabolize(alien, CHEM_INGEST)
reagents.metabolize(alien, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
var/total_phoronloss = 0
for(var/obj/item/I in src)
@@ -951,9 +957,6 @@
silent = 0
return 1
// the analgesic effect wears off slowly
analgesic = max(0, analgesic - 1)
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
Paralyse(3)
@@ -989,6 +992,7 @@
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if(halloss > 0)
adjustHalLoss(-3)
else if(sleeping)
@@ -1003,6 +1007,7 @@
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if( prob(2) && health && !hal_crit )
spawn(0)
emote("snore")
@@ -1257,7 +1262,7 @@
see_invisible = SEE_INVISIBLE_LIVING
if(healths)
if (analgesic)
if (analgesic > 100)
healths.icon_state = "health_health_numb"
else
switch(hal_screwyhud)
@@ -1449,7 +1454,7 @@
handle_shock()
..()
if(status_flags & GODMODE) return 0 //godmode
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
if(species && species.flags & NO_PAIN) return
if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse
shock_stage = max(shock_stage, 61)
@@ -54,6 +54,25 @@
var/datum/language/species_language = all_languages[default_language]
return species_language.get_random_name(gender)
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
if(!H.back)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_back)
H.internal = H.back
else if(!H.r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_r_hand)
H.internal = H.r_hand
else if (!H.l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_l_hand)
H.internal = H.l_hand
H.internals.icon_state = "internal1"
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H.back), slot_in_backpack)
/datum/species/vox/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
if(!H.mind || !H.mind.special_role) // Pariah check.
return 0
@@ -23,7 +23,8 @@
var/blood_color = "#A10808" // Red.
var/flesh_color = "#FFC896" // Pink.
var/base_color // Used by changelings. Should also be used for icon previes..
var/tail // Name of tail image in species effects icon file.
var/tail // Name of tail state in species effects icon file.
var/tail_animation // If set, the icon to obtain tail animation states from.
var/race_key = 0 // Used for mob icon cache string.
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
var/is_small
@@ -174,6 +175,12 @@
return "unknown"
return species_language.get_random_name(gender)
/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
for(var/obj/item/organ/organ in H.contents)
@@ -259,10 +266,6 @@
/datum/species/proc/build_hud(var/mob/living/carbon/human/H)
return
// Grabs the window recieved when you click-drag someone onto you.
/datum/species/proc/get_inventory_dialogue(var/mob/living/carbon/human/H)
return
//Used by xenos understanding larvae and dionaea understanding nymphs.
/datum/species/proc/can_understand(var/mob/other)
return
@@ -17,21 +17,21 @@
// to be drawn for the mob. This is fairly delicate, try to avoid messing with it
// unless you know exactly what it does.
var/list/gear = list(
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
"o_clothing" = list("loc" = ui_oclothing, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
"mask" = list("loc" = ui_mask, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
"gloves" = list("loc" = ui_gloves, "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
"eyes" = list("loc" = ui_glasses, "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
"l_ear" = list("loc" = ui_l_ear, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"r_ear" = list("loc" = ui_r_ear, "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_head, "slot" = slot_head, "state" = "hair", "toggle" = 1),
"shoes" = list("loc" = ui_shoes, "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
)
/datum/hud_data/New()
@@ -55,20 +55,20 @@
/datum/hud_data/diona
has_internals = 0
gear = list(
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
"o_clothing" = list("loc" = ui_shoes, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
"l_ear" = list("loc" = ui_gloves, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_oclothing, "slot" = slot_head, "state" = "hair", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
"o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
"l_ear" = list("loc" = ui_gloves, "name" = "Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_oclothing, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
)
/datum/hud_data/monkey
gear = list(
"mask" = list("loc" = ui_shoes, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
"back" = list("loc" = ui_sstore1, "slot" = slot_back, "state" = "back", "dir" = NORTH),
"mask" = list("loc" = ui_shoes, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
"back" = list("loc" = ui_sstore1, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
)
@@ -29,6 +29,20 @@
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest/slime),
"groin" = list("path" = /obj/item/organ/external/groin/slime),
"head" = list("path" = /obj/item/organ/external/head/slime),
"l_arm" = list("path" = /obj/item/organ/external/arm/slime),
"r_arm" = list("path" = /obj/item/organ/external/arm/right/slime),
"l_leg" = list("path" = /obj/item/organ/external/leg/slime),
"r_leg" = list("path" = /obj/item/organ/external/leg/right/slime),
"l_hand" = list("path" = /obj/item/organ/external/hand/slime),
"r_hand" = list("path" = /obj/item/organ/external/hand/right/slime),
"l_foot" = list("path" = /obj/item/organ/external/foot/slime),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/slime)
)
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
spawn(1)
if(H)
@@ -19,6 +19,7 @@
deform = 'icons/mob/human_races/r_def_lizard.dmi'
language = "Sinta'unathi"
tail = "sogtail"
tail_animation = 'icons/mob/species/unathi/tail.dmi'
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
primitive_form = "Stok"
darksight = 3
@@ -59,6 +60,10 @@
"Your scales bristle against the cold."
)
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
/datum/species/tajaran
name = "Tajara"
name_plural = "Tajaran"
@@ -66,6 +71,7 @@
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
language = "Siik'tajr"
tail = "tajtail"
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
darksight = 8
slowdown = -1
@@ -100,6 +106,10 @@
)
cold_discomfort_level = 275
/datum/species/tajaran/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
/datum/species/skrell
name = "Skrell"
name_plural = "Skrell"
@@ -198,6 +208,12 @@
return 1
return 0
/datum/species/diona/equip_survival_gear(var/mob/living/carbon/human/H)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H.back), slot_in_backpack)
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
H.gender = NEUTER
return ..()
@@ -251,6 +267,8 @@
has_organ = list() //TODO: Positronic brain.
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
..()
if(flags & IS_SYNTHETIC)
@@ -54,8 +54,10 @@ var/const/MAX_ACTIVE_TIME = 400
user << "\red \b It looks like the proboscis has been removed."
return
/obj/item/clothing/mask/facehugger/attackby()
Die()
/obj/item/clothing/mask/facehugger/attackby(obj/item/I, mob/user)
if(I.force)
user.do_attack_animation(src)
Die()
return
/obj/item/clothing/mask/facehugger/bullet_act()
@@ -63,7 +65,7 @@ var/const/MAX_ACTIVE_TIME = 400
return
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
if(exposed_temperature > T0C+80)
Die()
return
@@ -142,7 +142,7 @@
else
if(istype(O, /turf/simulated/wall))
var/turf/simulated/wall/W = O
if(W.material.unmeltable)
if(W.material.flags & MATERIAL_UNMELTABLE)
cannot_melt = 1
else if(istype(O, /turf/simulated/floor/engine))
cannot_melt = 1
@@ -210,7 +210,7 @@
visible_message("<span class='warning'><B>[src] vomits up a thick purple substance and begins to shape it!</B></span>", "<span class='alium'>You shape a [choice].</span>")
switch(choice)
if("resin door")
new /obj/structure/mineral_door/resin(loc)
new /obj/structure/simple_door/resin(loc)
if("resin wall")
new /obj/effect/alien/resin/wall(loc)
if("resin membrane")
@@ -303,8 +303,8 @@
has_internals = 0
gear = list(
"o_clothing" = list("loc" = ui_belt, "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
"head" = list("loc" = ui_id, "slot" = slot_head, "state" = "hair"),
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
"o_clothing" = list("loc" = ui_belt, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
"head" = list("loc" = ui_id, "name" = "Hat", "slot" = slot_head, "state" = "hair"),
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
)
@@ -47,42 +47,3 @@ Des: Removes all infected images from the alien.
if(dd_hasprefix_case(I.icon_state, "infected"))
qdel(I)
return
/* TODO: Convert this over.
/mob/living/carbon/human/alien/show_inv(mob/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return
*/
/* TODO: Convert this over.
/mob/living/carbon/human/alien/queen/large
icon = 'icons/mob/alienqueen.dmi'
icon_state = "queen_s"
pixel_x = -16
/mob/living/carbon/human/alien/queen/large/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this to be here
overlays.Cut()
if(lying)
if(resting) icon_state = "queen_sleep"
else icon_state = "queen_l"
for(var/image/I in overlays_lying)
overlays += I
else
icon_state = "queen_s"
for(var/image/I in overlays_standing)
overlays += I*/
@@ -0,0 +1,158 @@
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
if(!slot_to_strip || !istype(user))
return
var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip))
switch(slot_to_strip)
// Handle things that are part of this interface but not removing/replacing a given item.
if("pockets")
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
empty_pockets(user)
return
if("splints")
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s splints!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
remove_splints(user)
return
if("sensors")
visible_message("<span class='danger'>\The [user] is trying to set \the [src]'s sensors!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
toggle_sensors(user)
return
if("internals")
visible_message("<span class='danger'>\The [usr] is trying to set \the [src]'s internals!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
toggle_internals(user)
return
if("tie")
var/obj/item/clothing/under/suit = w_uniform
if(!istype(suit) || !suit.accessories.len)
return
var/obj/item/clothing/accessory/A = suit.accessories[1]
if(!istype(A))
return
visible_message("<span class='danger'>\The [usr] is trying to remove \the [src]'s [A.name]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
return
if(!A || suit.loc != src || !(A in suit.accessories))
return
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
user.visible_message("<span class='danger'>\The [user] tears off \the [A] from [src]'s [suit.name]!</span>")
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [A] removed by [user.name] ([user.ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [A.name]</font>"
A.on_removed(user)
suit.accessories -= A
update_inv_w_uniform()
return
// Are we placing or stripping?
var/stripping
var/obj/item/held = user.get_active_hand()
if(!istype(held) || is_robot_module(held))
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
return
if(!target_slot.canremove)
user << "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>"
stripping = 1
if(stripping)
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
else
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
return
if(!stripping && user.get_active_hand() != held)
return
if(stripping)
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [target_slot] removed by [user.name] ([user.ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [target_slot.name]</font>"
drop_from_inventory(target_slot)
else
user.drop_from_inventory(held)
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
if(held.loc != src)
user.put_in_hands(held)
// Empty out everything in the target's pockets.
/mob/living/carbon/human/proc/empty_pockets(var/mob/living/user)
if(!r_store && !l_store)
user << "<span class='warning'>\The [src] has nothing in their pockets.</span>"
return
if(r_store)
drop_from_inventory(r_store)
if(l_store)
drop_from_inventory(l_store)
visible_message("<span class='danger'>\The [user] empties \the [src]'s pockets!</span>")
// Modify the current target sensor level.
/mob/living/carbon/human/proc/toggle_sensors(var/mob/living/user)
var/obj/item/clothing/under/suit = w_uniform
if(!suit)
user << "<span class='warning'>\The [src] is not wearing a suit with sensors.</span>"
return
if (suit.has_sensor >= 2)
user << "<span class='warning'>\The [src]'s suit sensor controls are locked.</span>"
return
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [name]'s ([ckey]) sensors</font>")
suit.set_sensors(user)
// Remove all splints.
/mob/living/carbon/human/proc/remove_splints(var/mob/living/user)
var/can_reach_splints = 1
if(istype(wear_suit,/obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/suit = wear_suit
if(suit.supporting_limbs && suit.supporting_limbs.len)
user << "<span class='warning'>You cannot remove the splints - [src]'s [suit] is supporting some of the breaks.</span>"
can_reach_splints = 0
if(can_reach_splints)
var/removed_splint
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/obj/item/organ/external/o = get_organ(organ)
if (o && o.status & ORGAN_SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint(get_turf(src), 1)
o.status &= ~ORGAN_SPLINTED
W.add_fingerprint(user)
removed_splint = 1
if(removed_splint)
visible_message("<span class='danger'>\The [user] removes \the [src]'s splints!</span>")
else
user << "<span class='warning'>\The [src] has no splints to remove.</span>"
// Set internals on or off.
/mob/living/carbon/human/proc/toggle_internals(var/mob/living/user)
if(internal)
internal.add_fingerprint(user)
internal = null
if(internals)
internals.icon_state = "internal0"
else
// Check for airtight mask/helmet.
if(!(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space)))
return
// Find an internal source.
if(istype(back, /obj/item/weapon/tank))
internal = back
else if(istype(s_store, /obj/item/weapon/tank))
internal = s_store
else if(istype(belt, /obj/item/weapon/tank))
internal = belt
if(internal)
visible_message("<span class='warning'>\The [src] is now running on internals!</span>")
internal.add_fingerprint(user)
if (internals)
internals.icon_state = "internal1"
else
visible_message("<span class='danger'>\The [user] disables \the [src]'s internals!</span>")
@@ -5,6 +5,7 @@
icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone]
*/
var/global/list/human_icon_cache = list()
var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin]
var/global/list/light_overlay_cache = list()
///////////////////////
@@ -330,7 +331,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[HAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if( !head_organ || (head_organ.status & ORGAN_DESTROYED) )
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
@@ -468,7 +469,7 @@ var/global/list/damage_icon_parts = list()
under_icon = w_uniform.item_icons[slot_w_uniform_str]
else
under_icon = INV_W_UNIFORM_DEF_ICON
//determine state to use
var/under_state
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
@@ -480,7 +481,7 @@ var/global/list/damage_icon_parts = list()
//need to append _s to the icon state for legacy compatibility
var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s")
//apply blood overlay
if(w_uniform.blood_DNA)
var/image/bloodsies = image(icon = species.blood_mask, icon_state = "uniformblood")
@@ -491,15 +492,14 @@ var/global/list/damage_icon_parts = list()
var/obj/item/clothing/under/under = w_uniform
if(under.accessories.len)
for(var/obj/item/clothing/accessory/A in under.accessories)
var/accessory_state = A.overlay_state? A.overlay_state : A.icon_state
standing.overlays += image(icon = INV_ACCESSORIES_DEF_ICON, icon_state = accessory_state)
standing.overlays |= A.get_inv_mob_overlay()
overlays_standing[UNIFORM_LAYER] = standing
else
overlays_standing[UNIFORM_LAYER] = null
if(update_icons)
update_icons()
update_icons()
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
if(wear_id)
@@ -754,7 +754,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
if(back)
back.screen_loc = ui_back //TODO
//determine the icon to use
var/icon/overlay_icon
if(back.icon_override)
@@ -769,7 +769,7 @@ var/global/list/damage_icon_parts = list()
overlay_icon = back.item_icons[slot_back_str]
else
overlay_icon = INV_BACK_DEF_ICON
//determine state to use
var/overlay_state
if(back.item_state_slots && back.item_state_slots[slot_back_str])
@@ -778,13 +778,13 @@ var/global/list/damage_icon_parts = list()
overlay_state = back.item_state
else
overlay_state = back.icon_state
//create the image
overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state)
else
overlays_standing[BACK_LAYER] = null
if(update_icons)
if(update_icons)
update_icons()
@@ -822,15 +822,6 @@ var/global/list/damage_icon_parts = list()
if(r_hand)
r_hand.screen_loc = ui_rhand //TODO
//determine icon to use
var/icon/t_icon
if(r_hand.icon_override)
t_icon = r_hand.icon_override
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else
t_icon = INV_R_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
@@ -839,7 +830,17 @@ var/global/list/damage_icon_parts = list()
t_state = r_hand.item_state
else
t_state = r_hand.icon_state
//determine icon to use
var/icon/t_icon
if(r_hand.icon_override)
t_state += "_r"
t_icon = r_hand.icon_override
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else
t_icon = INV_R_HAND_DEF_ICON
overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
if (handcuffed) drop_r_hand() //this should be moved out of icon code
@@ -853,15 +854,6 @@ var/global/list/damage_icon_parts = list()
if(l_hand)
l_hand.screen_loc = ui_lhand //TODO
//determine icon to use
var/icon/t_icon
if(l_hand.icon_override)
t_icon = l_hand.icon_override
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else
t_icon = INV_L_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
@@ -870,7 +862,17 @@ var/global/list/damage_icon_parts = list()
t_state = l_hand.item_state
else
t_state = l_hand.icon_state
//determine icon to use
var/icon/t_icon
if(l_hand.icon_override)
t_state += "_l"
t_icon = l_hand.icon_override
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else
t_icon = INV_L_HAND_DEF_ICON
overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
if (handcuffed) drop_l_hand() //This probably should not be here
@@ -882,13 +884,81 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
overlays_standing[TAIL_LAYER] = null
if(species.tail)
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(species.tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL))
var/icon/tail_s = get_tail_icon()
overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species.tail]_s")
animate_tail_reset(0)
overlays_standing[TAIL_LAYER] = image(tail_s)
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/get_tail_icon()
var/icon_key = "[species.race_key][r_skin][g_skin][b_skin]"
var/icon/tail_icon = tail_icon_cache[icon_key]
if(!tail_icon)
//generate a new one
tail_icon = new/icon(icon = (species.tail_animation? species.tail_animation : 'icons/effects/species.dmi'))
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
tail_icon_cache[icon_key] = tail_icon
return tail_icon
/mob/living/carbon/human/proc/set_tail_state(var/t_state)
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
if(tail_overlay && species.tail_animation)
tail_overlay.icon_state = t_state
return tail_overlay
return null
//Not really once, since BYOND can't do that.
//Update this if the ability to flick() images or make looping animation start at the first frame is ever added.
/mob/living/carbon/human/proc/animate_tail_once(var/update_icons=1)
var/t_state = "[species.tail]_once"
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
if(tail_overlay && tail_overlay.icon_state == t_state)
return //let the existing animation finish
tail_overlay = set_tail_state(t_state)
if(tail_overlay)
spawn(15)
//check that the animation hasn't changed in the meantime
if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state)
animate_tail_stop()
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1)
set_tail_state("[species.tail]_slow[rand(0,9)]")
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1)
set_tail_state("[species.tail]_loop[rand(0,9)]")
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_reset(var/update_icons=1)
if(stat != DEAD)
set_tail_state("[species.tail]_idle[rand(0,9)]")
else
set_tail_state("[species.tail]_static")
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1)
set_tail_state("[species.tail]_static")
if(update_icons)
update_icons()
+11 -1
View File
@@ -82,8 +82,18 @@
return temp_change
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
chem_effects.Cut()
analgesic = 0
if(reagents) reagents.metabolize(src)
if(touching)
touching.metabolize(0, CHEM_TOUCH)
if(ingested)
ingested.metabolize(0, CHEM_INGEST)
if(reagents)
reagents.metabolize(0, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
src.updatehealth()
@@ -61,8 +61,6 @@
verbs += /mob/living/proc/ventcrawl
create_reagents(100)
src.colour = colour
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
@@ -398,9 +396,6 @@
/mob/living/carbon/slime/var/co2overloadtime = null
/mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/show_inv(mob/user)
return
/mob/living/carbon/slime/toggle_throw_mode()
return
@@ -413,14 +408,6 @@
adjustToxLoss(-10)
nutrition = max(nutrition, get_max_nutrition())
/mob/living/carbon/slime/proc/apply_water(var/amount)
adjustToxLoss(15 + amount)
if (!client)
if (Target) // Like cats
Target = null
++Discipline
return
/mob/living/carbon/slime/can_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
+2 -2
View File
@@ -118,7 +118,7 @@
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(handcuffed)
qdel(handcuffed)
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
@@ -139,7 +139,7 @@
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(legcuffed)
qdel(legcuffed)
legcuffed = null
update_inv_legcuffed()
+2 -15
View File
@@ -13,24 +13,11 @@
1.5 * src.getFireLoss() + \
1.2 * src.getBruteLoss() + \
1.7 * src.getCloneLoss() + \
2 * src.halloss
2 * src.halloss + \
-1 * src.analgesic
if(reagents.has_reagent("alkysine"))
src.traumatic_shock -= 10
if(reagents.has_reagent("inaprovaline"))
src.traumatic_shock -= 25
if(reagents.has_reagent("synaptizine"))
src.traumatic_shock -= 40
if(reagents.has_reagent("paracetamol"))
src.traumatic_shock -= 50
if(reagents.has_reagent("tramadol"))
src.traumatic_shock -= 80
if(reagents.has_reagent("oxycodone"))
src.traumatic_shock -= 200
if(src.slurring)
src.traumatic_shock -= 20
if(src.analgesic)
src.traumatic_shock = 0
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
-17
View File
@@ -777,20 +777,3 @@ default behaviour is:
return
..()
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
while(spintime >= speed)
sleep(speed)
switch(D)
if(NORTH)
D = EAST
if(SOUTH)
D = WEST
if(EAST)
D = SOUTH
if(WEST)
D = NORTH
set_dir(D)
spintime -= speed
return
@@ -194,6 +194,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
user.do_attack_animation(src)
spawn(1) updatehealth()
return 1
@@ -265,6 +265,13 @@
return 0
else if(istype(card.loc,/mob))
var/mob/holder = card.loc
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
for(var/obj/item/organ/external/affecting in H.organs)
if(affecting.hidden == card)
affecting.take_damage(rand(30,50))
H.visible_message("<span class='danger'>\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!</span>")
break
holder.drop_from_inventory(card)
else if(istype(card.loc,/obj/item/device/pda))
var/obj/item/device/pda/holder = card.loc
@@ -125,16 +125,12 @@
var/data[0]
// This is dumb, but NanoUI breaks if it has no data to send
data["a"] = "a"
if(ui)
ui.load_cached_data(ManifestJSON)
data["manifest"] = list("__json_cache" = ManifestJSON)
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_manifest.tmpl", "Crew Manifest", 450, 600)
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -499,7 +495,6 @@
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150)
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
ui.open()
@@ -17,8 +17,6 @@
/obj/item/weapon/module/power_control,
/obj/item/weapon/stock_parts,
/obj/item/frame,
/obj/item/weapon/table_parts,
/obj/item/weapon/table_parts/rack,
/obj/item/weapon/camera_assembly,
/obj/item/weapon/tank,
/obj/item/weapon/circuitboard,
@@ -94,7 +92,7 @@
icon_state = "gripper-sheet"
can_hold = list(
/obj/item/stack/sheet
/obj/item/stack/material
)
/obj/item/weapon/gripper/attack_self(mob/user as mob)
@@ -330,10 +328,10 @@
else if(istype(W,/obj/item/ammo_casing))
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard/shrapnel))
else if(istype(W,/obj/item/weapon/material/shard/shrapnel))
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard))
else if(istype(W,/obj/item/weapon/material/shard))
if(glass)
glass.add_charge(1000)
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown))
@@ -1068,8 +1068,9 @@
if(cell.charge == 0)
return 0
if(cell.use(amount * CELLRATE * CYBORG_POWER_USAGE_MULTIPLIER))
used_power_this_tick += amount * CYBORG_POWER_USAGE_MULTIPLIER
var/power_use = amount * CYBORG_POWER_USAGE_MULTIPLIER
if(cell.checked_use(CELLRATE * power_use))
used_power_this_tick += power_use
return 1
return 0
@@ -37,8 +37,8 @@
for(var/obj/I in contents)
for(var/mob/M in I.contents)
M.death()
if(istype(I,/obj/item/stack/sheet))//Only deconsturcts one sheet at a time instead of the entire stack
var/obj/item/stack/sheet/S = I
if(istype(I,/obj/item/stack/material))//Only deconsturcts one sheet at a time instead of the entire stack
var/obj/item/stack/material/S = I
if(S.get_amount() > 1)
S.use(1)
loaded_item = S
@@ -129,7 +129,10 @@
return
if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/T = target
T.harvest(user)
if(T.harvest) //Try to harvest, assuming it's alive.
T.harvest(user)
else if(T.dead) //It's probably dead otherwise.
T.remove_dead(user)
else
user << "Harvesting \a [target] is not the purpose of this tool. The [src] is for plants being grown."
@@ -230,7 +230,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
@@ -310,7 +310,7 @@ var/global/list/robot_modules = list(
synths += plasteel
synths += glass
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
var/obj/item/stack/material/cyborg/steel/M = new (src)
M.synths = list(metal)
src.modules += M
@@ -318,11 +318,11 @@ var/global/list/robot_modules = list(
R.synths = list(metal)
src.modules += R
var/obj/item/stack/sheet/plasteel/cyborg/S = new /obj/item/stack/sheet/plasteel/cyborg(src)
var/obj/item/stack/material/cyborg/plasteel/S = new (src)
S.synths = list(plasteel)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
RG.synths = list(metal, glass)
src.modules += RG
@@ -356,11 +356,11 @@ var/global/list/robot_modules = list(
MD.glass = glass
src.modules += MD
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
var/obj/item/stack/material/cyborg/steel/M = new (src)
M.synths = list(metal)
src.modules += M
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
var/obj/item/stack/material/cyborg/glass/G = new (src)
G.synths = list(glass)
src.modules += G
@@ -376,7 +376,7 @@ var/global/list/robot_modules = list(
S.synths = list(metal)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
RG.synths = list(metal, glass)
src.modules += RG
@@ -484,8 +484,8 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/gripper/service(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
src.modules += new /obj/item/weapon/minihoe(src)
src.modules += new /obj/item/weapon/hatchet(src)
src.modules += new /obj/item/weapon/material/minihoe(src)
src.modules += new /obj/item/weapon/material/hatchet(src)
src.modules += new /obj/item/device/analyzer/plant_analyzer(src)
src.modules += new /obj/item/weapon/storage/bag/plants(src)
src.modules += new /obj/item/weapon/robot_harvester(src)
@@ -494,7 +494,7 @@ var/global/list/robot_modules = list(
M.stored_matter = 30
src.modules += M
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
var/obj/item/weapon/flame/lighter/zippo/L = new /obj/item/weapon/flame/lighter/zippo(src)
L.lit = 1
@@ -676,11 +676,11 @@ var/global/list/robot_modules = list(
MD.plastic = plastic
src.modules += MD
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
var/obj/item/stack/material/cyborg/steel/M = new (src)
M.synths = list(metal)
src.modules += M
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
var/obj/item/stack/material/cyborg/glass/G = new (src)
G.synths = list(glass)
src.modules += G
@@ -696,7 +696,7 @@ var/global/list/robot_modules = list(
S.synths = list(metal)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src)
RG.synths = list(metal, glass)
src.modules += RG
@@ -704,11 +704,11 @@ var/global/list/robot_modules = list(
WT.synths = list(wood)
src.modules += WT
var/obj/item/stack/sheet/wood/cyborg/W = new /obj/item/stack/sheet/wood/cyborg(src)
var/obj/item/stack/material/cyborg/wood/W = new (src)
W.synths = list(wood)
src.modules += W
var/obj/item/stack/sheet/mineral/plastic/cyborg/P = new /obj/item/stack/sheet/mineral/plastic/cyborg(src)
var/obj/item/stack/material/cyborg/plastic/P = new (src)
P.synths = list(plastic)
src.modules += P
@@ -56,6 +56,10 @@
if(src.Adjacent(C))
choices += C
if(!choices.len)
src << "There are no viable hosts within range..."
return
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
if(!M || !src) return
@@ -228,6 +228,23 @@
icon_dead = "kitten_dead"
gender = NEUTER
// Leaving this here for now.
/obj/item/weapon/holder/cat/fluff/bones
name = "Bones"
desc = "It's Bones! Meow."
gender = MALE
icon_state = "cat3"
/mob/living/simple_animal/cat/fluff/bones
name = "Bones"
desc = "That's Bones the cat. He's a laid back, black cat. Meow."
gender = MALE
icon_state = "cat3"
icon_living = "cat3"
icon_dead = "cat3_dead"
holder_type = /obj/item/weapon/holder/cat/fluff/bones
var/friend_name = "Erstatz Vryroxes"
/mob/living/simple_animal/cat/kitten/New()
gender = pick(MALE, FEMALE)
..()
@@ -40,240 +40,3 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "stomps"
//LOOK AT THIS - ..()??
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/wirecutters))
if(prob(50))
user << "\red \b This kills the crab."
health -= 20
death()
else
GetMad()
get
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
qdel(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
else
user << "\blue this [src] is dead, medical items won't bring it back to life."
else
if(O.force)
health -= O.force
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/crab/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(get_dist(src,usr) > 1 || !(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_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
desc = "Free crabs!"
src.sd_set_light(0)
inventory_head.loc = src.loc
inventory_head = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
if("mask")
if(inventory_mask)
inventory_mask.loc = src.loc
inventory_mask = 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(get_dist(src,usr) > 1 || !(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
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/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/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()
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/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/soft)
name = "Corgi Tech [real_name]"
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")
desc = "The reason your yellow gloves have chew-marks."
if("mask")
if(inventory_mask)
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_mask = 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/crab/GetMad()
name = "MEGAMADCRAB"
real_name = "MEGAMADCRAB"
desc = "OH NO YOU DUN IT NOW."
icon = 'icons/mob/mob.dmi'
icon_state = "madcrab"
icon_living = "madcrab"
icon_dead = "madcrab_dead"
speak_emote = list("clicks")
emote_hear = list("clicks with fury", "clicks angrily")
emote_see = list("clacks")
speak_chance = 1
turns_per_move = 15//Gotta go fast
maxHealth = 100//So they don't die as quickly
health = 100
melee_damage_lower = 3
melee_damage_upper = 10//Kill them. Kill them all
if(inventory_head)//Drops inventory so it doesn't have to be dealt with
inventory_head.loc = src.loc
inventory_head = null
if(inventory_mask)
inventory_mask.loc = src.loc
inventory_mask = null*/
@@ -49,12 +49,16 @@
var/obj/effect/plant/SV = locate() in loc
SV.die_off(1)
if(locate(/obj/machinery/portable_atmospherics/hydroponics/soil/invisible) in loc)
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/SP = locate() in loc
qdel(SP)
if(!pulledby)
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
var/step = get_step(src, direction)
if(step)
if(locate(/obj/effect/plant) in step)
Move(step)
var/obj/effect/plant/food
food = locate(/obj/effect/plant) in oview(5,loc)
if(food)
var/step = get_step_to(src, food, 0)
Move(step)
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
..()
@@ -135,19 +135,7 @@
spawn(300) src.explode()
else
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 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]. ")
attacked_with_item(O, user)
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
@@ -91,3 +91,82 @@
..()
visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...")
playsound(src, 'sound/voice/hiss6.ogg', 100, 1)
// Xenoarch aliens.
/mob/living/simple_animal/hostile/samak
name = "samak"
desc = "A fast, armoured predator accustomed to hiding and ambushing in cold terrain."
faction = "samak"
icon_state = "samak"
icon_living = "samak"
icon_dead = "samak_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 2
maxHealth = 125
health = 125
speed = 2
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "mauled"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Hruuugh!","Hrunnph")
emote_see = list("paws the ground","shakes its mane","stomps")
emote_hear = list("snuffles")
/mob/living/simple_animal/hostile/diyaab
name = "diyaab"
desc = "A small pack animal. Although omnivorous, it will hunt meat on occasion."
faction = "diyaab"
icon_state = "diyaab"
icon_living = "diyaab"
icon_dead = "diyaab_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 1
maxHealth = 25
health = 25
speed = 1
melee_damage_lower = 1
melee_damage_upper = 8
attacktext = "gouged"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Awrr?","Aowrl!","Worrl")
emote_see = list("sniffs the air cautiously","looks around")
emote_hear = list("snuffles")
/mob/living/simple_animal/hostile/shantak
name = "shantak"
desc = "A piglike creature with a bright iridiscent mane that sparkles as though lit by an inner light. Don't be fooled by its beauty though."
faction = "shantak"
icon_state = "shantak"
icon_living = "shantak"
icon_dead = "shantak_dead"
icon = 'icons/jungle.dmi'
move_to_delay = 1
maxHealth = 75
health = 75
speed = 1
melee_damage_lower = 3
melee_damage_upper = 12
attacktext = "gouged"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Shuhn","Shrunnph?","Shunpf")
emote_see = list("scratches the ground","shakes out it's mane","tinkles gently")
/mob/living/simple_animal/yithian
name = "yithian"
desc = "A friendly creature vaguely resembling an oversized snail without a shell."
icon_state = "yithian"
icon_living = "yithian"
icon_dead = "yithian_dead"
icon = 'icons/jungle.dmi'
/mob/living/simple_animal/tindalos
name = "tindalos"
desc = "It looks like a large, flightless grasshopper."
icon_state = "tindalos"
icon_living = "tindalos"
icon_dead = "tindalos_dead"
icon = 'icons/jungle.dmi'
@@ -118,7 +118,7 @@
var/list/L = hearers(src, dist)
for (var/obj/mecha/M in mechas_list)
if (get_dist(src, M) <= dist)
if (M.z == src.z && get_dist(src, M) <= dist)
L += M
return L
@@ -232,13 +232,13 @@
if(istype(A,/obj/machinery/door/airlock))
var/obj/machinery/door/airlock/D = A
D.open(1)
else if(istype(A,/obj/structure/mineral_door))
var/obj/structure/mineral_door/D = A
else if(istype(A,/obj/structure/simple_door))
var/obj/structure/simple_door/D = A
if(D.density)
D.Open()
else if(istype(A,/obj/structure/cult/pylon))
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/table/rack))
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille))
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
Move(T)
FindTarget()
@@ -170,16 +170,16 @@
var/obj/O
//shards
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//rods
@@ -196,16 +196,16 @@
step_to(O, get_turf(pick(view(7, src))))
//plasteel
O = new /obj/item/stack/sheet/plasteel(src.loc)
O = new /obj/item/stack/material/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/stack/sheet/plasteel(src.loc)
O = new /obj/item/stack/material/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/stack/sheet/plasteel(src.loc)
O = new /obj/item/stack/material/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/stack/sheet/plasteel(src.loc)
O = new /obj/item/stack/material/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//also drop dummy circuit boards deconstructable for research (loot)
@@ -20,7 +20,7 @@
attacktext = "punched"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife
var/weapon1 = /obj/item/weapon/material/knife
min_oxy = 5
max_oxy = 0
min_tox = 0
@@ -68,6 +68,7 @@
visible_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
visible_message("\red \b [src] blocks the [O] with its shield! ")
//user.do_attack_animation(src)
else
usr << "\red This weapon is ineffective, it does no damage."
visible_message("\red [user] gently taps [src] with the [O]. ")
@@ -52,5 +52,5 @@
/mob/living/simple_animal/hostile/tree/death()
..(null,"is hacked into pieces!")
new /obj/item/stack/sheet/wood(loc)
new /obj/item/stack/material/wood(loc)
qdel(src)
@@ -92,7 +92,7 @@
return 0
if(health < 1)
if(health <= 0)
death()
return
@@ -240,6 +240,7 @@
if(I_DISARM)
M.visible_message("\blue [M] [response_disarm] \the [src]")
M.do_attack_animation(src)
//TODO: Push the mob away or something
if(I_GRAB)
@@ -257,10 +258,12 @@
LAssailant = M
M.visible_message("\red [M] has grabbed [src] passively!")
M.do_attack_animation(src)
if(I_HURT)
adjustBruteLoss(harm_intent_damage)
M.visible_message("\red [M] [response_harm] \the [src]")
M.do_attack_animation(src)
return
@@ -279,28 +282,33 @@
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice'>[user] applies the [MED] on [src].</span>")
else
user << "<span class='notice'>\The [src] is dead, medical items won't bring it back to life.</span>"
user << "<span class='notice'>\The [src] is dead, medical items won't bring \him 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))
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
else
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>")
attacked_with_item(O, user)
//TODO: refactor mob attackby(), attacked_by(), and friends.
/mob/living/simple_animal/proc/attacked_with_item(var/obj/item/O, var/mob/user)
user.changeNext_move(8)
if(!O.force)
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
return
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)
else
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
visible_message("<span class='danger>[src] has been attacked with the [O] by [user].</span>")
user.do_attack_animation(src)
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
@@ -175,18 +175,18 @@
for(var/atom/movable/stomachContent in contents)
if(prob(digestionProbability))
if(istype(stomachContent,/obj/item/stack)) //converts to plasma, keeping the stack value
if(!istype(stomachContent,/obj/item/stack/sheet/mineral/phoron))
if(!istype(stomachContent,/obj/item/stack/material/phoron))
var/obj/item/stack/oldStack = stomachContent
new /obj/item/stack/sheet/mineral/phoron(src, oldStack.get_amount())
new /obj/item/stack/material/phoron(src, oldStack.get_amount())
qdel(oldStack)
continue
else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class
var/obj/item/oldItem = stomachContent
new /obj/item/stack/sheet/mineral/phoron(src, oldItem.w_class)
new /obj/item/stack/material/phoron(src, oldItem.w_class)
qdel(oldItem)
continue
else
new /obj/item/stack/sheet/mineral/phoron(src, flatPlasmaValue) //just flat amount
new /obj/item/stack/material/phoron(src, flatPlasmaValue) //just flat amount
qdel(stomachContent)
continue
+7 -126
View File
@@ -52,12 +52,13 @@
/mob/visible_message(var/message, var/self_message, var/blind_message)
for(var/mob/M in viewers(src))
if(M.see_invisible < invisibility)
continue // Cannot view the invisible
var/msg = message
if(self_message && M==src)
msg = self_message
M.show_message( msg, 1, blind_message, 2)
M.show_message(self_message, 1, blind_message, 2)
else if(M.see_invisible < invisibility) // Cannot view the invisible, but you can hear it.
if(blind_message)
M.show_message(blind_message, 2)
else
M.show_message(message, 1, blind_message, 2)
// Show a message to all mobs in sight of this atom
// Use for objects performing visible actions
@@ -136,23 +137,8 @@
client.eye = loc
return
// This is not needed short of simple_animal and carbon/alien / carbon/human, who reimplement it.
/mob/proc/show_inv(mob/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[name]")
return
//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
@@ -615,111 +601,6 @@
for(var/mob/M in viewers())
M.see(message)
/*
adds a dizziness amount to a mob
use this rather than directly changing var/dizziness
since this ensures that the dizzy_process proc is started
currently only humans get dizzy
value of dizziness ranges from 0 to 1000
below 100 is not dizzy
*/
/mob/proc/make_dizzy(var/amount)
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return
dizziness = min(1000, dizziness + amount) // store what will be new value
// clamped to max 1000
if(dizziness > 100 && !is_dizzy)
spawn(0)
dizzy_process()
/*
dizzy process - wiggles the client's pixel offset over time
spawned from make_dizzy(), will terminate automatically when dizziness gets <100
note dizziness decrements automatically in the mob's Life() proc.
*/
/mob/proc/dizzy_process()
is_dizzy = 1
while(dizziness > 100)
if(client)
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_dizzy = 0
if(client)
client.pixel_x = 0
client.pixel_y = 0
// jitteriness - copy+paste of dizziness
/mob/proc/make_jittery(var/amount)
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return
jitteriness = min(1000, jitteriness + amount) // store what will be new value
// clamped to max 1000
if(jitteriness > 100 && !is_jittery)
spawn(0)
jittery_process()
// Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above.
/mob/proc/jittery_process()
//var/old_x = pixel_x
//var/old_y = pixel_y
is_jittery = 1
while(jitteriness > 100)
// var/amplitude = jitteriness*(sin(jitteriness * 0.044 * world.time) + 1) / 70
// pixel_x = amplitude * sin(0.008 * jitteriness * world.time)
// pixel_y = amplitude * cos(0.008 * jitteriness * world.time)
var/amplitude = min(4, jitteriness / 100)
pixel_x = old_x + rand(-amplitude, amplitude)
pixel_y = old_y + rand(-amplitude/3, amplitude/3)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_jittery = 0
pixel_x = old_x
pixel_y = old_y
//handles up-down floaty effect in space
/mob/proc/make_floating(var/n)
floatiness = n
if(floatiness && !is_floating)
start_floating()
else if(!floatiness && is_floating)
stop_floating()
/mob/proc/start_floating()
is_floating = 1
var/amplitude = 2 //maximum displacement from original position
var/period = 36 //time taken for the mob to go up >> down >> original position, in deciseconds. Should be multiple of 4
var/top = old_y + amplitude
var/bottom = old_y - amplitude
var/half_period = period / 2
var/quarter_period = period / 4
animate(src, pixel_y = top, time = quarter_period, easing = SINE_EASING | EASE_OUT, loop = -1) //up
animate(pixel_y = bottom, time = half_period, easing = SINE_EASING, loop = -1) //down
animate(pixel_y = old_y, time = quarter_period, easing = SINE_EASING | EASE_IN, loop = -1) //back
/mob/proc/stop_floating()
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
//reset the pixel offsets to zero
is_floating = 0
/mob/Stat()
..()
-6
View File
@@ -108,12 +108,6 @@
var/old_x = 0
var/old_y = 0
var/drowsyness = 0.0//Carbon
var/dizziness = 0//Carbon
var/is_dizzy = 0
var/is_jittery = 0
var/jitteriness = 0//Carbon
var/is_floating = 0
var/floatiness = 0
var/charges = 0.0
var/nutrition = 400.0//Carbon
+50 -4
View File
@@ -71,10 +71,13 @@
/obj/item/weapon/grab/process()
if(gcDestroyed) // GC is trying to delete us, we'll kill our processing so we can cleanly GC
return PROCESS_KILL
confirm()
if(!assailant)
qdel(src)
return
qdel(src) // Same here, except we're trying to delete ourselves.
return PROCESS_KILL
if(assailant.client)
assailant.client.screen -= hud
@@ -294,6 +297,44 @@
assailant << "<span class='warning'>You are no longer pinning [affecting] to the ground.</span>"
force_down = 0
return
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/E = H.get_organ(hit_zone)
if(E && !(E.status & ORGAN_DESTROYED))
assailant.visible_message("<span class='notice'>[assailant] starts inspecting [affecting]'s [E.name] carefully.</span>")
if(do_mob(assailant,H, 10))
if(E.wounds.len)
assailant << "<span class='warning'>You find [E.get_wounds_desc()]</span>"
else
assailant << "<span class='notice'>You find no visible wounds.</span>"
else
assailant << "<span class='notice'>You must stand still to inspect [E] for wounds.</span>"
assailant << "<span class='notice'>Checking bones now...</span>"
if(do_mob(assailant, H, 20))
if(E.status & ORGAN_BROKEN)
assailant << "<span class='warning'>The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!</span>"
H.custom_pain("Your [E.name] hurts where it's poked.")
else
assailant << "<span class='notice'>The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine.</span>"
else
assailant << "<span class='notice'>You must stand still to feel [E] for fractures.</span>"
assailant << "<span class='notice'>Checking skin now...</span>"
if(do_mob(assailant, H, 10))
var/bad = 0
if(H.getToxLoss() >= 40)
assailant << "<span class='warning'>[H] has an unhealthy skin discoloration.</span>"
bad = 1
if(H.getOxyLoss() >= 20)
assailant << "<span class='warning'>[H]'s skin is unusaly pale.</span>"
bad = 1
if(E.status & ORGAN_DEAD)
assailant << "<span class='warning'>[E] is decaying!</span>"
bad = 1
if(!bad)
assailant << "<span class='notice'>[H]'s skin is normal.</span>"
else
assailant << "<span class='notice'>You must stand still to check [H]'s skin for abnormalities.</span>"
else
assailant << "<span class='notice'>[H] is missing that bodypart.</span>"
if(I_GRAB)
if(state < GRAB_AGGRESSIVE)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
@@ -407,7 +448,11 @@
/obj/item/weapon/grab/dropped()
loc = null
qdel(src)
if(!destroying)
qdel(src)
/obj/item/weapon/grab
var/destroying = 0
/obj/item/weapon/grab/Destroy()
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
@@ -421,4 +466,5 @@
assailant = null
qdel(hud)
hud = null
..()
destroying = 1 // stops us calling qdel(src) on dropped()
..()
+1 -1
View File
@@ -314,7 +314,7 @@
var/mob/living/character = create_character() //creates the human and transfers vars and mind
character = job_master.EquipRank(character, rank, 1) //equips the human
UpdateFactionList(character)
EquipCustomItems(character)
equip_custom_items(character)
// AIs don't need a spawnpoint, they must spawn at an empty core
if(character.mind.assigned_role == "AI")
@@ -184,7 +184,10 @@ datum/preferences
dummy.set_species(species)
dummy.flags |= GODMODE
copy_to(dummy)
for (var/obj/item/I in dummy)
dummy.drop_from_inventory(I)
if(I.loc != dummy)
qdel(I)
var/jobflag
var/dept
if(job_civilian_high)
+4 -2
View File
@@ -106,7 +106,8 @@
O.add_ai_verbs()
O.rename_self("ai",1)
qdel(src)
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
return O
//human -> robot
@@ -158,7 +159,8 @@
callHook("borgify", list(O))
O.Namepick()
qdel(src)
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
return O
//human -> alien