mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 07:23:16 +00:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport
Conflicts: baystation12.dme code/datums/supplypacks.dm code/game/jobs/job/captain.dm code/game/jobs/job/security.dm code/modules/clothing/spacesuits/rig.dm icons/mob/head.dmi icons/mob/suit.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,590 +0,0 @@
|
||||
/mob/living/carbon/amorph
|
||||
name = "amorph"
|
||||
real_name = "amorph"
|
||||
voice_name = "amorph"
|
||||
icon = 'icons/mob/amorph.dmi'
|
||||
icon_state = ""
|
||||
|
||||
|
||||
var/species = "Amorph"
|
||||
age = 30.0
|
||||
|
||||
var/used_skillpoints = 0
|
||||
var/skill_specialization = null
|
||||
var/list/skills = null
|
||||
|
||||
var/obj/item/l_ear = null
|
||||
|
||||
// might use this later to recolor armorphs with icon.SwapColor
|
||||
var/slime_color = null
|
||||
|
||||
var/examine_text = ""
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/New()
|
||||
|
||||
..()
|
||||
|
||||
// Amorphs don't have a blood vessel, but they can have reagents in their body
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
// Amorphs have no DNA(they're more like carbon-based machines)
|
||||
|
||||
// Amorphs don't have organs
|
||||
..()
|
||||
|
||||
/mob/living/carbon/amorph/Bump(atom/movable/AM as mob|obj, yes)
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if (ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
|
||||
//BubbleWrap - Should stop you pushing a restrained person out of the way
|
||||
|
||||
if(istype(tmob, /mob/living/carbon/human))
|
||||
|
||||
for(var/mob/M in range(tmob, 1))
|
||||
if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restrained, you cannot push past"
|
||||
now_pushing = 0
|
||||
return
|
||||
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restraining [M], you cannot push past"
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
now_pushing = 0
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
|
||||
if(Metroid.Victim == tmob)
|
||||
Metroid.UpdateFeed()
|
||||
return
|
||||
|
||||
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
|
||||
now_pushing = 0
|
||||
spawn(0)
|
||||
..()
|
||||
if (!istype(AM, /atom/movable))
|
||||
return
|
||||
if (!now_pushing)
|
||||
now_pushing = 1
|
||||
|
||||
if (!AM.anchored)
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = 0
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/movement_delay()
|
||||
var/tally = 2 // amorphs are a bit slower than humans
|
||||
var/mob/M = pulling
|
||||
|
||||
if(reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
if(reagents.has_reagent("nuka_cola")) return -1
|
||||
|
||||
if(analgesic) return -1
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
var/health_deficiency = traumatic_shock
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/300
|
||||
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
if (stuttering < 10)
|
||||
stuttering = 10
|
||||
|
||||
if(shock_stage >= 10) tally += 3
|
||||
|
||||
if(tally < 0)
|
||||
tally = 0
|
||||
|
||||
if(istype(M) && M.lying) //Pulling lying down people is slower
|
||||
tally += 3
|
||||
|
||||
if(mRun in mutations)
|
||||
tally = 0
|
||||
|
||||
return tally
|
||||
|
||||
/mob/living/carbon/amorph/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
|
||||
stat(null, "Intent: [a_intent]")
|
||||
stat(null, "Move Mode: [m_intent]")
|
||||
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
if (client.statpanel == "Status")
|
||||
if (internal)
|
||||
if (!internal.air_contents)
|
||||
del(internal)
|
||||
else
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
stat("Distribution Pressure", internal.distribute_pressure)
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
stat("Chemical Storage", changeling.chem_charges)
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
|
||||
/mob/living/carbon/amorph/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
|
||||
var/shielded = 0
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
b_loss += 500
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
gib()
|
||||
return
|
||||
else
|
||||
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
|
||||
throw_at(target, 200, 4)
|
||||
|
||||
if (2.0)
|
||||
if (!shielded)
|
||||
b_loss += 60
|
||||
|
||||
f_loss += 60
|
||||
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
b_loss = b_loss/1.5
|
||||
f_loss = f_loss/1.5
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
b_loss = b_loss/2
|
||||
if (prob(50) && !shielded)
|
||||
Paralyse(10)
|
||||
|
||||
src.bruteloss += b_loss
|
||||
src.fireloss += f_loss
|
||||
|
||||
UpdateDamageIcon()
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/blob_act()
|
||||
if(stat == 2) return
|
||||
show_message("\red The blob attacks you!")
|
||||
src.bruteloss += rand(30,40)
|
||||
UpdateDamageIcon()
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/u_equip(obj/item/W as obj)
|
||||
// These are the only slots an amorph has
|
||||
if (W == l_ear)
|
||||
l_ear = null
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
|
||||
update_clothing()
|
||||
|
||||
/mob/living/carbon/amorph/db_click(text, t1)
|
||||
var/obj/item/W = equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if ((!emptyHand) && (!istype(W, /obj/item)))
|
||||
return
|
||||
if (emptyHand)
|
||||
usr.next_move = usr.prev_move
|
||||
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
|
||||
switch(text)
|
||||
if("l_ear")
|
||||
if (l_ear)
|
||||
if (emptyHand)
|
||||
l_ear.DblClick()
|
||||
return
|
||||
else if(emptyHand)
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
|
||||
return
|
||||
u_equip(W)
|
||||
l_ear = W
|
||||
W.equipped(src, text)
|
||||
|
||||
update_clothing()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
if (istype(O, /obj/effect/immovablerod))
|
||||
src.bruteloss += 101
|
||||
else
|
||||
src.bruteloss += 25
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/Move(a, b, flag)
|
||||
|
||||
if (buckled)
|
||||
return
|
||||
|
||||
if (restrained())
|
||||
pulling = null
|
||||
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
pulling = null
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
|
||||
diary <<"REPORT THIS"
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
pulling = null
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
var/diag = get_dir(src, pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
diag = null
|
||||
if ((get_dist(src, pulling) > 1 || diag))
|
||||
if (ismob(pulling))
|
||||
var/mob/M = pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by))
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//G = null
|
||||
del(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/t = M.pulling
|
||||
M.pulling = null
|
||||
|
||||
//this is the gay blood on floor shit -- Added back -- Skie
|
||||
if (M.lying && (prob(M.getBruteLoss() / 6)))
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/H = M
|
||||
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
|
||||
if(blood_volume > 0)
|
||||
H:vessel.remove_reagent("blood",1)
|
||||
if(prob(5))
|
||||
M.adjustBruteLoss(1)
|
||||
visible_message("\red \The [M]'s wounds open more from being dragged!")
|
||||
if(M.pull_damage())
|
||||
if(prob(25))
|
||||
M.adjustBruteLoss(2)
|
||||
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/H = M
|
||||
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
|
||||
if(blood_volume > 0)
|
||||
H:vessel.remove_reagent("blood",1)
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.pulling = t
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window))
|
||||
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
pulling = null
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
pulling = null
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/proc/misc_clothing_updates()
|
||||
// Temporary proc to shove stuff in that was put into update_clothing()
|
||||
// for questionable reasons
|
||||
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.intents
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS4
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS4
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
// Probably a lazy way to make sure all items are on the screen exactly once
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
|
||||
/mob/living/carbon/amorph/rebuild_appearance()
|
||||
// Lazy method: Just rebuild everything.
|
||||
// This can be called when the mob is created, but on other occasions, rebuild_body_overlays(),
|
||||
// rebuild_clothing_overlays() etc. should be called individually.
|
||||
|
||||
misc_clothing_updates() // silly stuff
|
||||
|
||||
/mob/living/carbon/amorph/update_body_appearance()
|
||||
// Should be called whenever something about the body appearance itself changes.
|
||||
|
||||
misc_clothing_updates() // silly stuff
|
||||
|
||||
if(lying)
|
||||
icon_state = "lying"
|
||||
else
|
||||
icon_state = "standing"
|
||||
|
||||
/mob/living/carbon/amorph/update_lying()
|
||||
// Should be called whenever something about the lying status of the mob might have changed.
|
||||
|
||||
if(lying)
|
||||
icon_state = "lying"
|
||||
else
|
||||
icon_state = "standing"
|
||||
|
||||
/mob/living/carbon/amorph/hand_p(mob/M as mob)
|
||||
// not even sure what this is meant to do
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/restrained()
|
||||
if (handcuffed)
|
||||
return 0 // handcuffs don't work on amorphs
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/amorph/var/co2overloadtime = null
|
||||
/mob/living/carbon/amorph/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/amorph/show_inv(mob/user as mob)
|
||||
// TODO: add a window for extracting stuff from an amorph's mouth
|
||||
|
||||
// called when something steps onto an amorph
|
||||
// this could be made more general, but for now just handle mulebot
|
||||
/mob/living/carbon/amorph/HasEntered(var/atom/movable/AM)
|
||||
var/obj/machinery/bot/mulebot/MB = AM
|
||||
if(istype(MB))
|
||||
MB.RunOver(src)
|
||||
|
||||
//gets assignment from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/amorph/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
|
||||
// TODO: get the ID from the amorph's contents
|
||||
return
|
||||
|
||||
//gets name from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/amorph/proc/get_authentification_name(var/if_no_id = "Unknown")
|
||||
// TODO: get the ID from the amorph's contents
|
||||
return
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/amorph/proc/get_visible_name()
|
||||
// amorphs can't wear clothes or anything, so always return face_name
|
||||
return get_face_name()
|
||||
|
||||
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
|
||||
/mob/living/carbon/amorph/proc/get_face_name()
|
||||
// there might later be ways for amorphs to change the appearance of their face
|
||||
return "[real_name]"
|
||||
|
||||
|
||||
//gets ID card object from special clothes slot or null.
|
||||
/mob/living/carbon/amorph/proc/get_idcard()
|
||||
// TODO: get the ID from the amorph's contents
|
||||
|
||||
|
||||
// heal the amorph
|
||||
/mob/living/carbon/amorph/heal_overall_damage(var/brute, var/burn)
|
||||
bruteloss -= brute
|
||||
fireloss -= burn
|
||||
bruteloss = max(bruteloss, 0)
|
||||
fireloss = max(fireloss, 0)
|
||||
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/amorph/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
bruteloss += brute
|
||||
fireloss += burn
|
||||
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
/mob/living/carbon/amorph/Topic(href, href_list)
|
||||
if (href_list["refresh"])
|
||||
if((machine)&&(in_range(src, usr)))
|
||||
show_inv(machine)
|
||||
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
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.equipped()
|
||||
O.s_loc = usr.loc
|
||||
O.t_loc = loc
|
||||
O.place = href_list["item"]
|
||||
if(href_list["loc"])
|
||||
O.internalloc = href_list["loc"]
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
|
||||
if (href_list["criminal"])
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/perpname = "wot"
|
||||
var/modified = 0
|
||||
|
||||
/*if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else*/
|
||||
perpname = src.name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
|
||||
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
|
||||
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
if(setcriminal != "Cancel")
|
||||
R.fields["criminal"] = setcriminal
|
||||
modified = 1
|
||||
|
||||
spawn()
|
||||
H.handle_regular_hud_updates()
|
||||
|
||||
if(!modified)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
///eyecheck()
|
||||
///Returns a number between -1 to 2
|
||||
/mob/living/carbon/amorph/eyecheck()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/IsAdvancedToolUser()
|
||||
return 1//Amorphs can use guns and such
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/updatehealth()
|
||||
if(src.nodamage)
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
return
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/abiotic(var/full_body = 0)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/amorph/abiotic2(var/full_body2 = 0)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/amorph/getBruteLoss()
|
||||
return src.bruteloss
|
||||
|
||||
/mob/living/carbon/amorph/adjustBruteLoss(var/amount, var/used_weapon = null)
|
||||
src.bruteloss += amount
|
||||
if(bruteloss < 0) bruteloss = 0
|
||||
|
||||
/mob/living/carbon/amorph/getFireLoss()
|
||||
return src.fireloss
|
||||
|
||||
/mob/living/carbon/amorph/adjustFireLoss(var/amount,var/used_weapon = null)
|
||||
src.fireloss += amount
|
||||
if(fireloss < 0) fireloss = 0
|
||||
|
||||
/mob/living/carbon/amorph/get_visible_gender()
|
||||
return gender
|
||||
@@ -1,248 +0,0 @@
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
adjustBruteLoss(rand(0, 1))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.charge -= 2500
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if (O.client)
|
||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (M.a_intent == "hurt")
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
attack_verb = "slash"
|
||||
|
||||
if ((prob(75) && health > 0))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
|
||||
|
||||
var/damage = rand(5, 10)
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
adjustBruteLoss(damage/10)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
||||
else
|
||||
if (M.a_intent == "grab")
|
||||
if (M == src)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
else
|
||||
if (!( paralysis ))
|
||||
drop_item()
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
|
||||
|
||||
if ("hurt")
|
||||
if ((prob(95) && health > 0))
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
var/damage = rand(15, 30)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||
adjustBruteLoss(damage/10)
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if ("disarm")
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
if(prob(95))
|
||||
Weaken(rand(10,15))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
|
||||
else
|
||||
drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
adjustBruteLoss(damage)
|
||||
react_to_attack(M)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
bruteloss += damage
|
||||
|
||||
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(M, /mob/living/carbon/metroid/adult))
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
|
||||
src.cloneloss += damage
|
||||
|
||||
UpdateDamageIcon()
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
@@ -1,12 +0,0 @@
|
||||
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
|
||||
return heal_overall_damage(brute, burn)
|
||||
|
||||
/mob/living/carbon/amorph/UpdateDamageIcon()
|
||||
// no damage sprites for amorphs yet
|
||||
return
|
||||
|
||||
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if(damagetype == BRUTE)
|
||||
take_overall_damage(damage, 0)
|
||||
else
|
||||
take_overall_damage(0, damage)
|
||||
@@ -1,300 +0,0 @@
|
||||
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new /obj/screen( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.g_dither.name = "Mask"
|
||||
src.g_dither.icon = ui_style
|
||||
src.g_dither.icon_state = "dither12g"
|
||||
src.g_dither.layer = 18
|
||||
src.g_dither.mouse_opacity = 0
|
||||
|
||||
src.alien_view = new /obj/screen(src)
|
||||
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.alien_view.name = "Alien"
|
||||
src.alien_view.icon = ui_style
|
||||
src.alien_view.icon_state = "alien"
|
||||
src.alien_view.layer = 18
|
||||
src.alien_view.mouse_opacity = 0
|
||||
|
||||
src.blurry = new /obj/screen( src )
|
||||
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon = ui_style
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
|
||||
src.druggy = new /obj/screen( src )
|
||||
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.druggy.name = "Druggy"
|
||||
src.druggy.icon = ui_style
|
||||
src.druggy.icon_state = "druggy"
|
||||
src.druggy.layer = 17
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "harm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_monkey_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTHEAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.throw_icon = new /obj/screen(null)
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen( null )
|
||||
mymob.pressure.icon = ui_style
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
|
||||
mymob.internals = new /obj/screen( null )
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.icon_state = "internal0"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.bodytemp = new /obj/screen( null )
|
||||
mymob.bodytemp.icon = ui_style
|
||||
mymob.bodytemp.icon_state = "temp1"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = ui_style
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
return
|
||||
@@ -1,516 +0,0 @@
|
||||
/mob/living/carbon/amorph
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
|
||||
var/temperature_alert = 0
|
||||
|
||||
|
||||
/mob/living/carbon/amorph/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(src.loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
if (src.stat != 2) //still breathing
|
||||
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
breathe()
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
src.blinded = null
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Status updates, death etc.
|
||||
// UpdateLuminosity()
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
/mob/living/carbon/amorph
|
||||
proc
|
||||
|
||||
clamp_values()
|
||||
|
||||
AdjustStunned(0)
|
||||
AdjustParalysis(0)
|
||||
AdjustWeakened(0)
|
||||
|
||||
handle_disabilities()
|
||||
if (src.disabilities & 4)
|
||||
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
|
||||
src.drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (src.disabilities & 8)
|
||||
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (src.disabilities & 16)
|
||||
if (prob(10))
|
||||
src.stuttering = max(10, src.stuttering)
|
||||
|
||||
update_mind()
|
||||
if(!mind && client)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.key = key
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
// amorphs are immune to this stuff
|
||||
|
||||
breathe()
|
||||
if(src.reagents)
|
||||
|
||||
if(src.reagents.has_reagent("lexorin")) return
|
||||
|
||||
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
src.losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas))
|
||||
block = 1
|
||||
|
||||
if(!block)
|
||||
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // 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
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(src.internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (src.internals)
|
||||
src.internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (src.internals)
|
||||
src.internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
|
||||
else canmove = 1
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(src.nodamage)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
adjustOxyLoss(7)
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
return 0
|
||||
|
||||
var/safe_oxygen_min = 8 // Minimum safe partial pressure of O2, in kPa
|
||||
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
|
||||
var/SA_para_min = 0.5
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the O2 in our breath
|
||||
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
|
||||
if(O2_pp < safe_oxygen_min) // Too little oxygen
|
||||
if(prob(20))
|
||||
spawn(0) emote("gasp")
|
||||
if (O2_pp == 0)
|
||||
O2_pp = 0.01
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
else // We're in safe limits
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
oxygen_alert = 0
|
||||
|
||||
breath.oxygen -= oxygen_used
|
||||
breath.carbon_dioxide += oxygen_used
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
src.sleeping = max(src.sleeping+2, 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
|
||||
return 1
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(loc, /turf/space))
|
||||
environment_heat_capacity = loc:heat_capacity
|
||||
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
|
||||
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
|
||||
// if(!wear_suit) Monkies cannot into space.
|
||||
// if(!istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
|
||||
/*if(pressure < 20)
|
||||
if(prob(25))
|
||||
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
|
||||
adjustBruteLoss(5)
|
||||
*/
|
||||
|
||||
if(pressure > HAZARD_HIGH_PRESSURE)
|
||||
|
||||
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
|
||||
|
||||
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(src.nodamage) return
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
if(exposed_temperature > bodytemperature)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
handle_chemicals_in_body()
|
||||
// most chemicals will have no effect on amorphs
|
||||
//if(reagents) reagents.metabolize(src)
|
||||
|
||||
if (src.drowsyness)
|
||||
src.drowsyness--
|
||||
src.eye_blurry = max(2, src.eye_blurry)
|
||||
if (prob(5))
|
||||
src.sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 25) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(5)
|
||||
if (prob(1) && health) spawn(0) emote("snore")
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
// shuffle around the chemical effects for amorphs a little ;)
|
||||
if(!src.reagents.has_reagent("antitoxin") && src.stat != 2) src.adjustOxyLoss(2)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (src.slurring) src.slurring--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.disabilities & 128)
|
||||
src.blinded = 1
|
||||
if (src.disabilities & 32)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || (XRAY in mutations))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_MOBS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 2
|
||||
src.see_invisible = 0
|
||||
|
||||
if (src.sleep)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
|
||||
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
src.healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
src.healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
src.healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
src.healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
|
||||
if (pressure)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure.icon_state = "pressure-1"
|
||||
else
|
||||
pressure.icon_state = "pressure-2"
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
|
||||
|
||||
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
|
||||
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
if(bodytemp)
|
||||
switch(src.bodytemperature) //310.055 optimal body temp
|
||||
if(345 to INFINITY)
|
||||
src.bodytemp.icon_state = "temp4"
|
||||
if(335 to 345)
|
||||
src.bodytemp.icon_state = "temp3"
|
||||
if(327 to 335)
|
||||
src.bodytemp.icon_state = "temp2"
|
||||
if(316 to 327)
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
if(300 to 316)
|
||||
src.bodytemp.icon_state = "temp0"
|
||||
if(295 to 300)
|
||||
src.bodytemp.icon_state = "temp-1"
|
||||
if(280 to 295)
|
||||
src.bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280)
|
||||
src.bodytemp.icon_state = "temp-3"
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-4"
|
||||
|
||||
src.client.screen -= src.hud_used.blurry
|
||||
src.client.screen -= src.hud_used.druggy
|
||||
src.client.screen -= src.hud_used.vimpaired
|
||||
|
||||
if ((src.blind && src.stat != 2))
|
||||
if ((src.blinded))
|
||||
src.blind.layer = 18
|
||||
else
|
||||
src.blind.layer = 0
|
||||
|
||||
if (src.disabilities & 1)
|
||||
src.client.screen += src.hud_used.vimpaired
|
||||
|
||||
if (src.eye_blurry)
|
||||
src.client.screen += src.hud_used.blurry
|
||||
|
||||
if (src.druggy)
|
||||
src.client.screen += src.hud_used.druggy
|
||||
|
||||
if (src.stat != 2)
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
handle_virus_updates()
|
||||
// amorphs can't come down with human diseases
|
||||
return
|
||||
@@ -1,6 +0,0 @@
|
||||
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
|
||||
if(act == "me")
|
||||
return custom_emote(m_type, message)
|
||||
|
||||
/mob/living/carbon/amorph/say_quote(var/text)
|
||||
return "[src.say_message], \"[text]\"";
|
||||
@@ -2,12 +2,6 @@
|
||||
gender = MALE
|
||||
var/list/stomach_contents = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/ribcage_op_stage = 0
|
||||
var/alien_op_stage = 0.0
|
||||
/*
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
*/
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/resistances2 = list()
|
||||
var/antibodies = 0
|
||||
@@ -22,3 +16,7 @@
|
||||
var/number_wounds = 0
|
||||
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
|
||||
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
|
||||
//Surgery info
|
||||
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
@@ -589,3 +589,10 @@
|
||||
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
|
||||
/mob/living/carbon/human/verb/pose()
|
||||
set name = "Set pose"
|
||||
set desc = "Sets description which will be shown when someone examines you"
|
||||
set category = "IC"
|
||||
|
||||
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
|
||||
|
||||
@@ -418,5 +418,7 @@
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
if (pose)
|
||||
msg += "\n[t_He] is [pose]."
|
||||
|
||||
usr << msg
|
||||
|
||||
@@ -691,13 +691,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
fire_alert = max(fire_alert, 1)
|
||||
switch(bodytemperature)
|
||||
if(360 to 400)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(400 to 1000)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(1000 to INFINITY)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
@@ -705,13 +705,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
switch(bodytemperature)
|
||||
if(200 to 260)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_1, BURN)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_1, BURN, used_weapon = "Low Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(120 to 200)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_2, BURN)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_2, BURN, used_weapon = "Low Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(-INFINITY to 120)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_3, BURN)
|
||||
apply_damage(COLD_DAMAGE_LEVEL_3, BURN, used_weapon = "Low Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null)
|
||||
if(!damage || (blocked >= 2)) return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
@@ -71,4 +71,4 @@
|
||||
if(stutter) apply_effect(stutter, STUTTER, blocked)
|
||||
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
P.on_hit(src,2)
|
||||
return 2
|
||||
if(!P.nodamage)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
|
||||
|
||||
@@ -1,596 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
// === MEMETIC ANOMALY ===
|
||||
// =======================
|
||||
|
||||
/**
|
||||
This life form is a form of parasite that can gain a certain level of control
|
||||
over its host. Its player will share vision and hearing with the host, and it'll
|
||||
be able to influence the host through various commands.
|
||||
**/
|
||||
|
||||
// The maximum amount of points a meme can gather.
|
||||
var/global/const/MAXIMUM_MEME_POINTS = 750
|
||||
|
||||
|
||||
// === PARASITE ===
|
||||
// ================
|
||||
|
||||
// a list of all the parasites in the mob
|
||||
mob/living/carbon/var/list/parasites = list()
|
||||
|
||||
mob/living/parasite
|
||||
var/mob/living/carbon/host // the host that this parasite occupies
|
||||
|
||||
Login()
|
||||
..()
|
||||
|
||||
// make the client see through the host instead
|
||||
client.eye = host
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
|
||||
mob/living/parasite/proc/enter_host(mob/living/carbon/host)
|
||||
// by default, parasites can't share a body with other life forms
|
||||
if(host.parasites.len > 0)
|
||||
return 0
|
||||
|
||||
src.host = host
|
||||
src.loc = host
|
||||
host.parasites.Add(src)
|
||||
|
||||
if(client) client.eye = host
|
||||
|
||||
return 1
|
||||
|
||||
mob/living/parasite/proc/exit_host()
|
||||
src.host.parasites.Remove(src)
|
||||
src.host = null
|
||||
src.loc = null
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
// === MEME ===
|
||||
// ============
|
||||
|
||||
// Memes use points for many actions
|
||||
mob/living/parasite/meme/var/meme_points = 100
|
||||
mob/living/parasite/meme/var/dormant = 0
|
||||
|
||||
// Memes have a list of indoctrinated hosts
|
||||
mob/living/parasite/meme/var/list/indoctrinated = list()
|
||||
|
||||
mob/living/parasite/meme/Life()
|
||||
..()
|
||||
|
||||
if(client)
|
||||
if(blinded) client.eye = null
|
||||
else client.eye = host
|
||||
|
||||
if(!host) return
|
||||
|
||||
// recover meme points slowly
|
||||
var/gain = 3
|
||||
if(dormant) gain = 9 // dormant recovers points faster
|
||||
|
||||
meme_points = min(meme_points + gain, MAXIMUM_MEME_POINTS)
|
||||
|
||||
// if there are sleep toxins in the host's body, that's bad
|
||||
if(host.reagents.has_reagent("stoxin"))
|
||||
src << "\red <b>Something in your host's blood makes you lose consciousness.. you fade away..</b>"
|
||||
src.death()
|
||||
return
|
||||
// a host without brain is no good
|
||||
if(!host.mind)
|
||||
src << "\red <b>Your host has no mind.. you fade away..</b>"
|
||||
src.death()
|
||||
return
|
||||
if(host.stat == 2)
|
||||
src << "\red <b>Your host has died.. you fade away..</b>"
|
||||
src.death()
|
||||
return
|
||||
|
||||
if(host.blinded && host.stat != 1) src.blinded = 1
|
||||
else src.blinded = 0
|
||||
|
||||
|
||||
mob/living/parasite/meme/death()
|
||||
// make sure the mob is on the actual map before gibbing
|
||||
if(host) src.loc = host.loc
|
||||
src.stat = 2
|
||||
..()
|
||||
del src
|
||||
|
||||
// When a meme speaks, it speaks through its host
|
||||
mob/living/parasite/meme/say(message as text)
|
||||
if(dormant)
|
||||
usr << "\red You're dormant!"
|
||||
return
|
||||
if(!host)
|
||||
usr << "\red You can't speak without host!"
|
||||
return
|
||||
|
||||
return host.say(message)
|
||||
|
||||
// Same as speak, just with whisper
|
||||
mob/living/parasite/meme/whisper(message as text)
|
||||
if(dormant)
|
||||
usr << "\red You're dormant!"
|
||||
return
|
||||
if(!host)
|
||||
usr << "\red You can't speak without host!"
|
||||
return
|
||||
|
||||
return host.whisper(message)
|
||||
|
||||
// Make the host do things
|
||||
mob/living/parasite/meme/me_verb(message as text)
|
||||
set name = "Me"
|
||||
|
||||
|
||||
if(dormant)
|
||||
usr << "\red You're dormant!"
|
||||
return
|
||||
|
||||
if(!host)
|
||||
usr << "\red You can't emote without host!"
|
||||
return
|
||||
|
||||
return host.me_verb(message)
|
||||
|
||||
// A meme understands everything their host understands
|
||||
mob/living/parasite/meme/say_understands(mob/other)
|
||||
if(!host) return 0
|
||||
|
||||
return host.say_understands(other)
|
||||
|
||||
// Try to use amount points, return 1 if successful
|
||||
mob/living/parasite/meme/proc/use_points(amount)
|
||||
if(dormant)
|
||||
usr << "\red You're dormant!"
|
||||
return
|
||||
if(src.meme_points < amount)
|
||||
src << "<b>* You don't have enough meme points(need [amount]).</b>"
|
||||
return 0
|
||||
|
||||
src.meme_points -= round(amount)
|
||||
return 1
|
||||
|
||||
// Let the meme choose one of his indoctrinated mobs as target
|
||||
mob/living/parasite/meme/proc/select_indoctrinated(var/title, var/message)
|
||||
var/list/candidates
|
||||
|
||||
// Can only affect other mobs thant he host if not blinded
|
||||
if(blinded)
|
||||
candidates = list()
|
||||
src << "\red You are blinded, so you can not affect mobs other than your host."
|
||||
else
|
||||
candidates = indoctrinated.Copy()
|
||||
|
||||
candidates.Add(src.host)
|
||||
|
||||
var/mob/target = null
|
||||
if(candidates.len == 1)
|
||||
target = candidates[1]
|
||||
else
|
||||
var/selected
|
||||
|
||||
var/list/text_candidates = list()
|
||||
var/list/map_text_to_mob = list()
|
||||
|
||||
for(var/mob/living/carbon/human/M in candidates)
|
||||
text_candidates += M.real_name
|
||||
map_text_to_mob[M.real_name] = M
|
||||
|
||||
selected = input(message,title) as null|anything in text_candidates
|
||||
if(!selected) return null
|
||||
|
||||
target = map_text_to_mob[selected]
|
||||
|
||||
return target
|
||||
|
||||
|
||||
// A meme can make people hear things with the thought ability
|
||||
mob/living/parasite/meme/verb/Thought()
|
||||
set category = "Meme"
|
||||
set name = "Thought(50)"
|
||||
set desc = "Implants a thought into the target, making them think they heard someone talk."
|
||||
|
||||
if(meme_points < 50)
|
||||
// just call use_points() to give the standard failure message
|
||||
use_points(50)
|
||||
return
|
||||
|
||||
var/list/candidates = indoctrinated.Copy()
|
||||
if(!(src.host in candidates))
|
||||
candidates.Add(src.host)
|
||||
|
||||
var/mob/target = select_indoctrinated("Thought", "Select a target which will hear your thought.")
|
||||
|
||||
if(!target) return
|
||||
|
||||
var/speaker = input("Select the voice in which you would like to make yourself heard.", "Voice") as null|text
|
||||
if(!speaker) return
|
||||
|
||||
var/message = input("What would you like to say?", "Message") as null
|
||||
if(!message) return
|
||||
|
||||
// Use the points at the end rather than the beginning, because the user might cancel
|
||||
if(!use_points(50)) return
|
||||
|
||||
message = say_quote(message)
|
||||
var/rendered = "<span class='game say'><span class='name'>[speaker]</span> <span class='message'>[message]</span></span>"
|
||||
target.show_message(rendered)
|
||||
|
||||
usr << "<i>You make [target] hear:</i> [rendered]"
|
||||
|
||||
// Mutes the host
|
||||
mob/living/parasite/meme/verb/Mute()
|
||||
set category = "Meme"
|
||||
set name = "Mute(250)"
|
||||
set desc = "Prevents your host from talking for a while."
|
||||
|
||||
if(!src.host) return
|
||||
if(!host.speech_allowed)
|
||||
usr << "\red Your host already can't speak.."
|
||||
return
|
||||
if(!use_points(250)) return
|
||||
|
||||
spawn
|
||||
// backup the host incase we switch hosts after using the verb
|
||||
var/mob/host = src.host
|
||||
|
||||
host << "\red Your tongue feels numb.. You lose your ability to speak."
|
||||
usr << "\red Your host can't speak anymore."
|
||||
|
||||
host.speech_allowed = 0
|
||||
|
||||
sleep(1200)
|
||||
|
||||
host.speech_allowed = 1
|
||||
host << "\red Your tongue has feeling again.."
|
||||
usr << "\red [host] can speak again."
|
||||
|
||||
// Makes the host unable to emote
|
||||
mob/living/parasite/meme/verb/Paralyze()
|
||||
set category = "Meme"
|
||||
set name = "Paralyze(250)"
|
||||
set desc = "Prevents your host from using emote for a while."
|
||||
|
||||
if(!src.host) return
|
||||
if(!host.emote_allowed)
|
||||
usr << "\red Your host already can't use body language.."
|
||||
return
|
||||
if(!use_points(250)) return
|
||||
|
||||
spawn
|
||||
// backup the host incase we switch hosts after using the verb
|
||||
var/mob/host = src.host
|
||||
|
||||
host << "\red Your body feels numb.. You lose your ability to use body language."
|
||||
usr << "\red Your host can't use body language anymore."
|
||||
|
||||
host.emote_allowed = 0
|
||||
|
||||
sleep(1200)
|
||||
|
||||
host.emote_allowed = 1
|
||||
host << "\red Your body has feeling again.."
|
||||
usr << "\red [host] can use body language again."
|
||||
|
||||
|
||||
|
||||
// Cause great agony with the host, used for conditioning the host
|
||||
mob/living/parasite/meme/verb/Agony()
|
||||
set category = "Meme"
|
||||
set name = "Agony(200)"
|
||||
set desc = "Causes significant pain in your host."
|
||||
|
||||
if(!src.host) return
|
||||
if(!use_points(200)) return
|
||||
|
||||
spawn
|
||||
// backup the host incase we switch hosts after using the verb
|
||||
var/mob/host = src.host
|
||||
|
||||
host.paralysis = max(host.paralysis, 2)
|
||||
|
||||
host.flash_weak_pain()
|
||||
host << "\red <font size=5>You feel excrutiating pain all over your body! It is so bad you can't think or articulate yourself properly..</font>"
|
||||
|
||||
usr << "<b>You send a jolt of agonizing pain through [host], they should be unable to concentrate on anything else for half a minute.</b>"
|
||||
|
||||
host.emote("scream")
|
||||
|
||||
for(var/i=0, i<10, i++)
|
||||
host.stuttering = 2
|
||||
sleep(50)
|
||||
if(prob(80)) host.flash_weak_pain()
|
||||
if(prob(10)) host.paralysis = max(host.paralysis, 2)
|
||||
if(prob(15)) host.emote("twitch")
|
||||
else if(prob(15)) host.emote("scream")
|
||||
else if(prob(10)) host.emote("collapse")
|
||||
|
||||
if(i == 10)
|
||||
host << "\red THE PAIN! AGHH, THE PAIN! MAKE IT STOP! ANYTHING TO MAKE IT STOP!"
|
||||
|
||||
host << "\red The pain subsides.."
|
||||
|
||||
// Cause great joy with the host, used for conditioning the host
|
||||
mob/living/parasite/meme/verb/Joy()
|
||||
set category = "Meme"
|
||||
set name = "Joy(200)"
|
||||
set desc = "Causes significant joy in your host."
|
||||
|
||||
if(!src.host) return
|
||||
if(!use_points(200)) return
|
||||
|
||||
spawn
|
||||
var/mob/host = src.host
|
||||
host.druggy = max(host.druggy, 50)
|
||||
host.slurring = max(host.slurring, 10)
|
||||
|
||||
usr << "<b>You stimulate [host.name]'s brain, injecting waves of endorphines and dopamine into the tissue. They should now forget all their worries, particularly relating to you, for around a minute."
|
||||
|
||||
host << "\red You are feeling wonderful! Your head is numb and drowsy, and you can't help forgetting all the worries in the world."
|
||||
|
||||
while(host.druggy > 0)
|
||||
sleep(10)
|
||||
|
||||
host << "\red You are feeling clear-headed again.."
|
||||
|
||||
// Cause the target to hallucinate.
|
||||
mob/living/parasite/meme/verb/Hallucinate()
|
||||
set category = "Meme"
|
||||
set name = "Hallucinate(300)"
|
||||
set desc = "Makes your host hallucinate, has a short delay."
|
||||
|
||||
var/mob/target = select_indoctrinated("Hallucination", "Who should hallucinate?")
|
||||
|
||||
if(!target) return
|
||||
if(!use_points(300)) return
|
||||
|
||||
target.hallucination += 100
|
||||
|
||||
usr << "<b>You make [target] hallucinate.</b>"
|
||||
|
||||
// Jump to a closeby target through a whisper
|
||||
mob/living/parasite/meme/verb/SubtleJump(mob/living/carbon/human/target as mob in world)
|
||||
set category = "Meme"
|
||||
set name = "Subtle Jump(350)"
|
||||
set desc = "Move to a closeby human through a whisper."
|
||||
|
||||
if(!istype(target, /mob/living/carbon/human) || !target.mind)
|
||||
src << "<b>You can't jump to this creature..</b>"
|
||||
return
|
||||
if(!(target in view(1, host)+src))
|
||||
src << "<b>The target is not close enough.</b>"
|
||||
return
|
||||
|
||||
// Find out whether we can speak
|
||||
if (host.silent || (host.disabilities & 64))
|
||||
src << "<b>Your host can't speak..</b>"
|
||||
return
|
||||
|
||||
if(!use_points(350)) return
|
||||
|
||||
for(var/mob/M in view(1, host))
|
||||
M.show_message("<B>[host]</B> whispers something incoherent.",2) // 2 stands for hearable message
|
||||
|
||||
// Find out whether the target can hear
|
||||
if(target.disabilities & 32 || target.ear_deaf)
|
||||
src << "<b>Your target doesn't seem to hear you..</b>"
|
||||
return
|
||||
|
||||
if(target.parasites.len > 0)
|
||||
src << "<b>Your target already is possessed by something..</b>"
|
||||
return
|
||||
|
||||
src.exit_host()
|
||||
src.enter_host(target)
|
||||
|
||||
usr << "<b>You successfully jumped to [target]."
|
||||
log_admin("[src.key] has jumped to [target]")
|
||||
message_admins("[src.key] has jumped to [target]")
|
||||
|
||||
// Jump to a distant target through a shout
|
||||
mob/living/parasite/meme/verb/ObviousJump(mob/living/carbon/human/target as mob in world)
|
||||
set category = "Meme"
|
||||
set name = "Obvious Jump(750)"
|
||||
set desc = "Move to any mob in view through a shout."
|
||||
|
||||
if(!istype(target, /mob/living/carbon/human) || !target.mind)
|
||||
src << "<b>You can't jump to this creature..</b>"
|
||||
return
|
||||
if(!(target in view(host)))
|
||||
src << "<b>The target is not close enough.</b>"
|
||||
return
|
||||
|
||||
// Find out whether we can speak
|
||||
if (host.silent || (host.disabilities & 64))
|
||||
src << "<b>Your host can't speak..</b>"
|
||||
return
|
||||
|
||||
if(!use_points(750)) return
|
||||
|
||||
for(var/mob/M in view(host)+src)
|
||||
M.show_message("<B>[host]</B> screams something incoherent!",2) // 2 stands for hearable message
|
||||
|
||||
// Find out whether the target can hear
|
||||
if(target.disabilities & 32 || target.ear_deaf)
|
||||
src << "<b>Your target doesn't seem to hear you..</b>"
|
||||
return
|
||||
|
||||
if(target.parasites.len > 0)
|
||||
src << "<b>Your target already is possessed by something..</b>"
|
||||
return
|
||||
|
||||
src.exit_host()
|
||||
src.enter_host(target)
|
||||
|
||||
usr << "<b>You successfully jumped to [target]."
|
||||
log_admin("[src.key] has jumped to [target]")
|
||||
message_admins("[src.key] has jumped to [target]")
|
||||
|
||||
// Jump to an attuned mob for free
|
||||
mob/living/parasite/meme/verb/AttunedJump(mob/living/carbon/human/target as mob in world)
|
||||
set category = "Meme"
|
||||
set name = "Attuned Jump(0)"
|
||||
set desc = "Move to a mob in sight that you have already attuned."
|
||||
|
||||
if(!istype(target, /mob/living/carbon/human) || !target.mind)
|
||||
src << "<b>You can't jump to this creature..</b>"
|
||||
return
|
||||
if(!(target in view(host)))
|
||||
src << "<b>You need to make eye-contact with the target.</b>"
|
||||
return
|
||||
if(!(target in indoctrinated))
|
||||
src << "<b>You need to attune the target first.</b>"
|
||||
return
|
||||
|
||||
src.exit_host()
|
||||
src.enter_host(target)
|
||||
|
||||
usr << "<b>You successfully jumped to [target]."
|
||||
|
||||
log_admin("[src.key] has jumped to [target]")
|
||||
message_admins("[src.key] has jumped to [target]")
|
||||
|
||||
// ATTUNE a mob, adding it to the indoctrinated list
|
||||
mob/living/parasite/meme/verb/Attune()
|
||||
set category = "Meme"
|
||||
set name = "Attune(400)"
|
||||
set desc = "Change the host's brain structure, making it easier for you to manipulate him."
|
||||
|
||||
if(host in src.indoctrinated)
|
||||
usr << "<b>You have already attuned this host.</b>"
|
||||
return
|
||||
|
||||
if(!host) return
|
||||
if(!use_points(400)) return
|
||||
|
||||
src.indoctrinated.Add(host)
|
||||
|
||||
usr << "<b>You successfully indoctrinated [host]."
|
||||
host << "\red Your head feels a bit roomier.."
|
||||
|
||||
log_admin("[src.key] has attuned [host]")
|
||||
message_admins("[src.key] has attuned [host]")
|
||||
|
||||
// Enables the mob to take a lot more damage
|
||||
mob/living/parasite/meme/verb/Analgesic()
|
||||
set category = "Meme"
|
||||
set name = "Analgesic(500)"
|
||||
set desc = "Combat drug that the host to move normally, even under life-threatening pain."
|
||||
|
||||
if(!host) return
|
||||
if(!(host in indoctrinated))
|
||||
usr << "\red You need to attune the host first."
|
||||
return
|
||||
if(!use_points(500)) return
|
||||
|
||||
usr << "<b>You inject drugs into [host]."
|
||||
host << "\red You feel your body strengthen and your pain subside.."
|
||||
host.analgesic = 60
|
||||
while(host.analgesic > 0)
|
||||
sleep(10)
|
||||
host << "\red The dizziness wears off, and you can feel pain again.."
|
||||
|
||||
|
||||
mob/proc/clearHUD()
|
||||
if(client) client.screen.Cut()
|
||||
|
||||
// Take control of the mob
|
||||
mob/living/parasite/meme/verb/Possession()
|
||||
set category = "Meme"
|
||||
set name = "Possession(500)"
|
||||
set desc = "Take direct control of the host for a while."
|
||||
|
||||
if(!host) return
|
||||
if(!(host in indoctrinated))
|
||||
usr << "\red You need to attune the host first."
|
||||
return
|
||||
if(!use_points(500)) return
|
||||
|
||||
usr << "<b>You take control of [host]!</b>"
|
||||
host << "\red Everything goes black.."
|
||||
|
||||
spawn
|
||||
var/mob/dummy = new()
|
||||
dummy.loc = 0
|
||||
dummy.sight = BLIND
|
||||
|
||||
var/datum/mind/host_mind = host.mind
|
||||
var/datum/mind/meme_mind = src.mind
|
||||
|
||||
host_mind.transfer_to(dummy)
|
||||
meme_mind.transfer_to(host)
|
||||
host_mind.current.clearHUD()
|
||||
host.update_clothing()
|
||||
|
||||
dummy << "\blue You feel very drowsy.. Your eyelids become heavy..."
|
||||
|
||||
log_admin("[meme_mind.key] has taken possession of [host]([host_mind.key])")
|
||||
message_admins("[meme_mind.key] has taken possession of [host]([host_mind.key])")
|
||||
|
||||
sleep(600)
|
||||
|
||||
log_admin("[meme_mind.key] has lost possession of [host]([host_mind.key])")
|
||||
message_admins("[meme_mind.key] has lost possession of [host]([host_mind.key])")
|
||||
|
||||
meme_mind.transfer_to(src)
|
||||
host_mind.transfer_to(host)
|
||||
meme_mind.current.clearHUD()
|
||||
host.update_clothing()
|
||||
src << "\red You lose control.."
|
||||
|
||||
del dummy
|
||||
|
||||
// Enter dormant mode, increases meme point gain
|
||||
mob/living/parasite/meme/verb/Dormant()
|
||||
set category = "Meme"
|
||||
set name = "Dormant(100)"
|
||||
set desc = "Speed up point recharging, will force you to cease all actions until all points are recharged."
|
||||
|
||||
if(!host) return
|
||||
if(!use_points(100)) return
|
||||
|
||||
usr << "<b>You enter dormant mode.. You won't be able to take action until all your points have recharged.</b>"
|
||||
|
||||
dormant = 1
|
||||
|
||||
while(meme_points < MAXIMUM_MEME_POINTS)
|
||||
sleep(10)
|
||||
|
||||
dormant = 0
|
||||
|
||||
usr << "\red You have regained all points and exited dormant mode!"
|
||||
|
||||
mob/living/parasite/meme/verb/Show_Points()
|
||||
set category = "Meme"
|
||||
|
||||
usr << "<b>Meme Points: [src.meme_points]/[MAXIMUM_MEME_POINTS]</b>"
|
||||
|
||||
// Stat panel to show meme points, copypasted from alien
|
||||
/mob/living/parasite/meme/Stat()
|
||||
..()
|
||||
|
||||
statpanel("Status")
|
||||
if (client && client.holder)
|
||||
stat(null, "([x], [y], [z])")
|
||||
|
||||
if (client && client.statpanel == "Status")
|
||||
stat(null, "Meme Points: [src.meme_points]")
|
||||
|
||||
// Game mode helpers, used for theft objectives
|
||||
// --------------------------------------------
|
||||
mob/living/parasite/check_contents_for(t)
|
||||
if(!host) return 0
|
||||
|
||||
return host.check_contents_for(t)
|
||||
|
||||
mob/living/parasite/check_contents_for_reagent(t)
|
||||
if(!host) return 0
|
||||
|
||||
return host.check_contents_for_reagent(t)
|
||||
@@ -1,160 +0,0 @@
|
||||
#define BEAR_STANCE_IDLE 1
|
||||
#define BEAR_STANCE_ALERT 2
|
||||
#define BEAR_STANCE_ATTACK 3
|
||||
#define BEAR_STANCE_ATTACKING 4
|
||||
#define BEAR_STANCE_TIRED 5
|
||||
|
||||
//Space bears!
|
||||
/mob/living/simple_animal/bear
|
||||
name = "space bear"
|
||||
desc = "RawrRawr!!"
|
||||
icon_state = "bear"
|
||||
icon_living = "bear"
|
||||
icon_dead = "bear_dead"
|
||||
icon_gib = "bear_gib"
|
||||
speak = list("RAWR!","Rawr!","GRR!","Growl!")
|
||||
speak_emote = list("growls", "roars")
|
||||
emote_hear = list("rawrs","grumbles","grawls")
|
||||
emote_see = list("stares ferociously", "stomps")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "pokes the"
|
||||
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 60
|
||||
health = 60
|
||||
|
||||
//Space bears aren't affected by atmos.
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
|
||||
var/stance = BEAR_STANCE_IDLE //Used to determine behavior
|
||||
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
|
||||
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
|
||||
|
||||
/proc/isbear(var/mob/M)
|
||||
return istype(M, /mob/living/simple_animal/bear)
|
||||
|
||||
/mob/living/simple_animal/bear/Life()
|
||||
..()
|
||||
|
||||
if(!stat)
|
||||
if(loc && istype(loc,/turf/space))
|
||||
icon_state = "bear"
|
||||
else
|
||||
icon_state = "bearfloor"
|
||||
|
||||
switch(stance)
|
||||
if(BEAR_STANCE_IDLE)
|
||||
stop_automated_movement = 0
|
||||
stance_step++
|
||||
if(stance_step > 5)
|
||||
stance_step = 0
|
||||
for( var/mob/living/L in viewers(7,src) )
|
||||
if(isbear(L)) continue
|
||||
if(!L.stat)
|
||||
emote("stares alertly at [L]")
|
||||
stance = BEAR_STANCE_ALERT
|
||||
break
|
||||
if(BEAR_STANCE_ALERT)
|
||||
stop_automated_movement = 1
|
||||
var/found_mob = 0
|
||||
for( var/mob/living/L in viewers(7,src) )
|
||||
if(isbear(L)) continue
|
||||
if(!L.stat)
|
||||
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
|
||||
stance_step++
|
||||
found_mob = 1
|
||||
target_mob = L
|
||||
src.dir = get_dir(src,target_mob) //Keep staring at the mob
|
||||
|
||||
if(stance_step in list(1,4,7)) //every 3 ticks
|
||||
var/action = pick( list( "growls at [L]", "stares angrily at [L]", "prepares to attack [L]", "closely watches [L]" ) )
|
||||
if(action)
|
||||
emote(action)
|
||||
break
|
||||
if(!found_mob)
|
||||
stance_step--
|
||||
|
||||
if(stance_step <= -20) //If we have not found a mob for 20-ish ticks, revert to idle mode
|
||||
stance = BEAR_STANCE_IDLE
|
||||
if(stance_step >= 7) //If we have been staring at a mob for 7 ticks,
|
||||
stance = BEAR_STANCE_ATTACK
|
||||
if(BEAR_STANCE_ATTACK) //This one should only be active for one tick,
|
||||
stop_automated_movement = 1
|
||||
if(!target_mob || target_mob.stat)
|
||||
stance = BEAR_STANCE_ALERT
|
||||
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
|
||||
if(target_mob in viewers(7,src))
|
||||
walk_to(src, target_mob, 1, 3)
|
||||
stance = BEAR_STANCE_ATTACKING
|
||||
stance_step = 0
|
||||
if(BEAR_STANCE_ATTACKING)
|
||||
|
||||
stop_automated_movement = 1
|
||||
stance_step++
|
||||
if(!target_mob || target_mob.stat)
|
||||
stance = BEAR_STANCE_ALERT
|
||||
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
|
||||
return
|
||||
if(!(target_mob in viewers(7,src)))
|
||||
stance = BEAR_STANCE_ALERT
|
||||
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
|
||||
target_mob = null
|
||||
return
|
||||
if(get_dist(src, target_mob) <= 1) //Attacking
|
||||
emote( pick( list("slashes at [target_mob]", "bites [target_mob]") ) )
|
||||
|
||||
var/damage = rand(20,30)
|
||||
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
|
||||
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
|
||||
else if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
L.adjustBruteLoss(damage)
|
||||
|
||||
if(stance_step >= 20) //attacks for 20 ticks, then it gets tired and needs to rest
|
||||
emote( "is worn out and needs to rest" )
|
||||
stance = BEAR_STANCE_TIRED
|
||||
stance_step = 0
|
||||
walk(src, 0) //This stops the bear's walking
|
||||
return
|
||||
if(BEAR_STANCE_TIRED)
|
||||
stop_automated_movement = 1
|
||||
stance_step++
|
||||
if(stance_step >= 10) //rests for 10 ticks
|
||||
if(target_mob && target_mob in viewers(7,src))
|
||||
stance = BEAR_STANCE_ATTACK //If the mob he was chasing is still nearby, resume the attack, otherwise go idle.
|
||||
else
|
||||
stance = BEAR_STANCE_IDLE
|
||||
|
||||
|
||||
/mob/living/simple_animal/bear/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
|
||||
stance = BEAR_STANCE_ALERT
|
||||
stance_step = 6
|
||||
target_mob = user
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bear/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(stance != BEAR_STANCE_ATTACK && stance != BEAR_STANCE_ATTACKING)
|
||||
stance = BEAR_STANCE_ALERT
|
||||
stance_step = 6
|
||||
target_mob = M
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bear/Process_Spacemove(var/check_drift = 0)
|
||||
return //No drifting in space for space bears!
|
||||
@@ -1,126 +0,0 @@
|
||||
/mob/living/simple_animal/constructbehemoth
|
||||
name = "Behemoth"
|
||||
real_name = "Behemoth"
|
||||
original_name = "Behemoth"
|
||||
desc = "The pinnacle of occult technology, Behemoths are the ultimate weapon in the Cult of Nar-Sie's arsenal."
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "behemoth"
|
||||
icon_living = "behemoth"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 750
|
||||
health = 750
|
||||
speak_emote = list("rumbles")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "harmlessly punches the"
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 50
|
||||
melee_damage_upper = 50
|
||||
attacktext = "brutally crushes"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = 5
|
||||
wall_smash = 1
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructbehemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
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
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b The [O] bounces harmlessly off of [src]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructbehemoth/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
////////////////Powers//////////////////
|
||||
|
||||
|
||||
/*
|
||||
/client/proc/summon_cultist()
|
||||
set category = "Behemoth"
|
||||
set name = "Summon Cultist (300)"
|
||||
set desc = "Teleport a cultist to your location"
|
||||
if (istype(usr,/mob/living/simple_animal/constructbehemoth))
|
||||
|
||||
if(usr.energy<300)
|
||||
usr << "\red You do not have enough power stored!"
|
||||
return
|
||||
|
||||
if(usr.stat)
|
||||
return
|
||||
|
||||
usr.energy -= 300
|
||||
var/list/mob/living/cultists = new
|
||||
for(var/datum/mind/H in ticker.mode.cult)
|
||||
if (istype(H.current,/mob/living))
|
||||
cultists+=H.current
|
||||
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr)
|
||||
if(!cultist)
|
||||
return
|
||||
if (cultist == usr) //just to be sure.
|
||||
return
|
||||
cultist.loc = usr.loc
|
||||
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
|
||||
@@ -1,189 +0,0 @@
|
||||
#define CARP_STANCE_IDLE 1
|
||||
#define CARP_STANCE_ATTACK 2
|
||||
#define CARP_STANCE_ATTACKING 3
|
||||
|
||||
/mob/living/simple_animal/carp
|
||||
name = "space carp"
|
||||
desc = "A ferocious, fang-bearing creature that resembles a fish."
|
||||
icon_state = "carp"
|
||||
icon_living = "carp"
|
||||
icon_dead = "carp_dead"
|
||||
icon_gib = "carp_gib"
|
||||
speak_chance = 0
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "bites"
|
||||
attack_sound = 'bite.ogg'
|
||||
|
||||
//Space carp aren't affected by atmos.
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0 //so they don't freeze in space
|
||||
maxbodytemp = 295 //if it's just 25 degrees, they start to burn up
|
||||
|
||||
var/stance = CARP_STANCE_IDLE //Used to determine behavior
|
||||
var/stance_step = 0 //Used to delay checks depending on what stance the bear is in
|
||||
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
|
||||
heat_damage_per_tick = 1
|
||||
|
||||
/mob/living/simple_animal/carp/elite
|
||||
desc = "A ferocious, fang-bearing creature that resembles a fish. It has an evil gleam in its eye."
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 20
|
||||
|
||||
/proc/iscarp(var/mob/M)
|
||||
return istype(M, /mob/living/simple_animal/carp)
|
||||
|
||||
/mob/living/simple_animal/carp/Life()
|
||||
..()
|
||||
|
||||
if(!stat)
|
||||
switch(stance)
|
||||
if(CARP_STANCE_IDLE)
|
||||
stop_automated_movement = 0
|
||||
stance_step++
|
||||
if(stance_step > 5)
|
||||
stance_step = 0
|
||||
for( var/mob/living/L in viewers(7,src) )
|
||||
if(iscarp(L)) continue
|
||||
if(!L.stat)
|
||||
if(prob(50))
|
||||
src.visible_message("<b>[src]</b> gnashes at [L]!")
|
||||
stance = CARP_STANCE_ATTACK
|
||||
target_mob = L
|
||||
break
|
||||
|
||||
if(CARP_STANCE_ATTACK) //This one should only be active for one tick
|
||||
stop_automated_movement = 1
|
||||
if(!target_mob || target_mob.stat)
|
||||
stance = CARP_STANCE_IDLE
|
||||
stance_step = 5 //Make it very alert, so it quickly attacks again if a mob returns
|
||||
if(target_mob in viewers(7,src))
|
||||
walk_to(src, target_mob, 1, 3)
|
||||
stance = CARP_STANCE_ATTACKING
|
||||
stance_step = 0
|
||||
|
||||
if(CARP_STANCE_ATTACKING)
|
||||
stop_automated_movement = 1
|
||||
stance_step++
|
||||
if(!target_mob || target_mob.stat)
|
||||
stance = CARP_STANCE_IDLE
|
||||
stance_step = 4 //Make it very alert, so it quickly attacks again if a mob returns
|
||||
target_mob = null
|
||||
walk(src,0)
|
||||
return
|
||||
if(!(target_mob in viewers(7,src)))
|
||||
stance = CARP_STANCE_IDLE
|
||||
stance_step = 1
|
||||
target_mob = null
|
||||
walk(src,0)
|
||||
return
|
||||
if(get_dist(src, target_mob) <= 1) //Attacking
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
L.attack_animal(src)
|
||||
if(prob(10))
|
||||
L.Weaken(5)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/carp/Die()
|
||||
..()
|
||||
target_mob = null
|
||||
stance = CARP_STANCE_IDLE
|
||||
walk(src,0)
|
||||
|
||||
/mob/living/simple_animal/carp/Process_Spacemove(var/check_drift = 0)
|
||||
return 0 //No drifting in space for space carp! //original comments do not steal
|
||||
|
||||
/mob/living/simple_animal/carp/Process_Spaceslipping(var/prob_slip = 5)
|
||||
return 0
|
||||
|
||||
//----
|
||||
|
||||
/mob/living/simple_animal/carp/cyborg
|
||||
name = "cyborg space carp"
|
||||
desc = "A ferocious, fang-bearing cyborg that resembles a fish. It has glowing red eyes."
|
||||
icon_state = "carpborg"
|
||||
icon_living = "carpborg"
|
||||
icon_dead = "carpborg_dead"
|
||||
icon_gib = "carpborg_gib"
|
||||
speak = list("Objective established.","Goal: Terminate.","Mission parameters defined.","All casualties are acceptable.")
|
||||
speak_emote = list("beeps")
|
||||
emote_hear = list("makes a sinister clanking noise.","hisses and steams.","makes a menacing beeping noise.")
|
||||
emote_see = list("sparks slightly.","flashes a red light ominously.")
|
||||
speak_chance = 10
|
||||
var/firing = 0
|
||||
|
||||
/mob/living/simple_animal/carp/cyborg/Life()
|
||||
..()
|
||||
walk(src,0)
|
||||
|
||||
if(!stat)
|
||||
if(prob(5))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
switch(stance)
|
||||
if(CARP_STANCE_ATTACKING)
|
||||
if(target_mob)
|
||||
src.dir = get_dir(src, target_mob)
|
||||
/*if(get_dist(src, target_mob) > 5)
|
||||
step_towards(src,target_mob)*/
|
||||
if(get_dist(src, target_mob) > 1 && !firing)
|
||||
//fire laser eyes
|
||||
firing = 1
|
||||
if(prob(40))
|
||||
emote("[pick("makes an ominous whining noise!","makes a low humming noise!","begins charging up something!")]")
|
||||
|
||||
spawn(40)
|
||||
if(!target_mob)
|
||||
return
|
||||
firing = 0
|
||||
//load_into_chamber()
|
||||
var/obj/item/projectile/beam/B = new(src)
|
||||
|
||||
B.firer = src
|
||||
//B.def_zone = targloc
|
||||
//in_chamber.def_zone = user.zone_sel.selecting
|
||||
|
||||
var/turf/targloc = get_turf(target_mob)
|
||||
var/turf/myloc = get_turf(src)
|
||||
|
||||
B.original = targloc
|
||||
B.loc = myloc
|
||||
B.starting = myloc
|
||||
B.silenced = 0
|
||||
B.current = myloc
|
||||
B.yo = targloc.y - myloc.y
|
||||
B.xo = targloc.x - myloc.x
|
||||
//
|
||||
B.fired()
|
||||
|
||||
//shake the camera? probably not, these lasers don't explode... yet
|
||||
/*for(var/mob/M in view(src,7))
|
||||
shake_camera(user, recoil + 1, recoil)*/
|
||||
playsound(src, pick('pulse.ogg','pulse2.ogg','pulse3.ogg'), 50, 1)
|
||||
|
||||
/mob/living/simple_animal/carp/cyborg/Die()
|
||||
if(prob(15))
|
||||
src.say_auto("I'll be back!")
|
||||
..()
|
||||
@@ -1,67 +0,0 @@
|
||||
//Cat
|
||||
/mob/living/simple_animal/cat
|
||||
name = "cat"
|
||||
desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers."
|
||||
icon_state = "cat"
|
||||
icon_living = "cat"
|
||||
icon_dead = "cat_dead"
|
||||
speak = list("Meow!","Esp!","Purr!","HSSSSS")
|
||||
speak_emote = list("purrs", "meows")
|
||||
emote_hear = list("meows","mews")
|
||||
emote_see = list("shakes its head", "shivers")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "kicks the"
|
||||
var/turns_since_scan = 0
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
|
||||
/mob/living/simple_animal/cat/Life()
|
||||
//MICE!
|
||||
if((src.loc) && isturf(src.loc))
|
||||
if(!stat && !resting && !buckled)
|
||||
for(var/mob/living/simple_animal/mouse/M in view(1,src))
|
||||
if(!M.stat)
|
||||
M.splat()
|
||||
emote(pick("\red splats the [M]!","\red toys with the [M]","worries the [M]"))
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
break
|
||||
|
||||
..()
|
||||
|
||||
for(var/mob/living/simple_animal/mouse/snack in oview(src, 3))
|
||||
if(prob(15))
|
||||
emote(pick("hisses and spits!","mrowls fiercely!","eyes [snack] hungrily."))
|
||||
break
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
walk_to(src,0)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
for(var/mob/living/simple_animal/mouse/snack in oview(src,3))
|
||||
if(isturf(snack.loc) && !snack.stat)
|
||||
movement_target = snack
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
|
||||
//RUNTIME IS ALIVE! SQUEEEEEEEE~
|
||||
/mob/living/simple_animal/cat/Runtime
|
||||
name = "Runtime"
|
||||
desc = "Its fur has the look and feel of velvet, and it's tail quivers occasionally."
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
|
||||
/////////////////Juggernaut///////////////
|
||||
|
||||
/mob/living/simple_animal/constructarmoured
|
||||
name = "Juggernaut"
|
||||
real_name = "Juggernaut"
|
||||
original_name = "Juggernaut"
|
||||
desc = "A possessed suit of armour driven by the will of the restless dead"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "armour"
|
||||
icon_living = "armour"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "harmlessly punches the"
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
attacktext = "smashes their armoured gauntlet into"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = 3
|
||||
wall_smash = 1
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
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
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b The [O] bounces harmlessly off of [src]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(5))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 10
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Juggernaut"
|
||||
mind.key = G.key
|
||||
|
||||
////////////////////////Wraith/////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith
|
||||
name = "Wraith"
|
||||
real_name = "Wraith"
|
||||
original_name = "Wraith"
|
||||
desc = "A wicked bladed shell contraption piloted by a bound spirit"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "floating"
|
||||
icon_living = "floating"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches the"
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = -1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
see_in_dark = 7
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
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/constructwraith/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(50))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructwraith/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 10
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructwraith/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Wraith"
|
||||
mind.key = G.key
|
||||
|
||||
/////////////////////////////Artificer/////////////////////////
|
||||
|
||||
/mob/living/simple_animal/constructbuilder
|
||||
name = "Artificer"
|
||||
real_name = "Artificer"
|
||||
original_name = "Artificer"
|
||||
desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "artificer"
|
||||
icon_living = "artificer"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "viciously beats"
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "rams"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = 0
|
||||
wall_smash = 1
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 5
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Artificer"
|
||||
mind.key = G.key
|
||||
@@ -1,365 +0,0 @@
|
||||
//Corgi
|
||||
/mob/living/simple_animal/corgi
|
||||
name = "\improper corgi"
|
||||
real_name = "corgi"
|
||||
desc = "It's a corgi."
|
||||
icon_state = "corgi"
|
||||
icon_living = "corgi"
|
||||
icon_dead = "corgi_dead"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
emote_see = list("shakes its head", "shivers")
|
||||
speak_chance = 1
|
||||
turns_per_move = 10
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi
|
||||
meat_amount = 3
|
||||
response_help = "pets the"
|
||||
response_disarm = "bops the"
|
||||
response_harm = "kicks the"
|
||||
see_in_dark = 5
|
||||
var/obj/item/inventory_head
|
||||
var/obj/item/inventory_back
|
||||
var/turns_since_scan = 0
|
||||
var/obj/movement_target
|
||||
|
||||
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
|
||||
/*
|
||||
user.machine = src
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
if(inventory_head)
|
||||
dat += "<br><b>Head:</b> [inventory_head] (<a href='?src=\ref[src];remove_inv=head'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Head:</b> <a href='?src=\ref[src];add_inv=head'>Nothing</a>"
|
||||
if(inventory_back)
|
||||
dat += "<br><b>Back:</b> [inventory_back] (<a href='?src=\ref[src];remove_inv=back'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Back:</b> <a href='?src=\ref[src];add_inv=back'>Nothing</a>"
|
||||
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[real_name]")
|
||||
*/
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(inventory_head && inventory_back)
|
||||
//helmet and armor = 100% protection
|
||||
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
|
||||
if( O.force )
|
||||
usr << "\red This animal is wearing too much armor. You can't cause /him any damage."
|
||||
for (var/mob/M in viewers(src, null))
|
||||
M.show_message("\red \b [user] hits [src] with the [O], however [src] is too armored.")
|
||||
else
|
||||
usr << "\red This animal is wearing too much armor. You can't reach its skin."
|
||||
for (var/mob/M in viewers(src, null))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
if(prob(15))
|
||||
emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression on \his face")
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/corgi/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
name = real_name
|
||||
desc = initial(desc)
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
emote_see = list("shakes its head", "shivers")
|
||||
desc = "It's a corgi."
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
if("back")
|
||||
if(inventory_back)
|
||||
inventory_back.loc = src.loc
|
||||
inventory_back = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(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/ushanka,
|
||||
/obj/item/clothing/head/chefhat,
|
||||
/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/wizard/fake,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/collectable/wizard,
|
||||
/obj/item/clothing/head/collectable/hardhat,
|
||||
/obj/item/weapon/bedsheet,
|
||||
/obj/item/clothing/head/helmet/space/santahat,
|
||||
/obj/item/clothing/head/collectable/paper,
|
||||
)
|
||||
|
||||
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
|
||||
rebuild_appearance()
|
||||
|
||||
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
|
||||
|
||||
|
||||
switch(inventory_head && inventory_head.type)
|
||||
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
|
||||
name = "Captain [real_name]"
|
||||
desc = "Probably better than the last captain."
|
||||
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
|
||||
name = "Runtime"
|
||||
emote_see = list("coughs up a furball", "stretches")
|
||||
emote_hear = list("purrs")
|
||||
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
|
||||
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
|
||||
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
|
||||
name = "Hoppy"
|
||||
emote_see = list("twitches its nose", "hops around a bit")
|
||||
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
|
||||
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
|
||||
name = "Yann"
|
||||
desc = "Mon dieu! C'est un chien!"
|
||||
speak = list("le woof!", "le bark!", "JAPPE!!")
|
||||
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of /him")
|
||||
if(/obj/item/clothing/head/det_hat)
|
||||
name = "Detective [real_name]"
|
||||
desc = "[name] sees through your lies..."
|
||||
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
|
||||
if(/obj/item/clothing/head/nursehat)
|
||||
name = "Nurse [real_name]"
|
||||
desc = "[name] needs 100cc of beef jerky...STAT!"
|
||||
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
|
||||
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
|
||||
desc = "Yaarghh!! Thar' be a scurvy dog!"
|
||||
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
|
||||
emote_hear = list("growls ferociously", "snarls")
|
||||
speak = list("Arrrrgh!!","Grrrrrr!")
|
||||
if(/obj/item/clothing/head/ushanka)
|
||||
name = "[pick("Comrade","Commissar","Glorious Leader")] [real_name]"
|
||||
desc = "A follower of Karl Barx."
|
||||
emote_see = list("contemplates the failings of the capitalist economic model", "ponders the pros and cons of vangaurdism")
|
||||
if(/obj/item/clothing/head/collectable/police)
|
||||
name = "Officer [real_name]"
|
||||
emote_see = list("drools","looks for donuts")
|
||||
desc = "Stop right there criminal scum!"
|
||||
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
|
||||
name = "Grandwizard [real_name]"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
|
||||
if(/obj/item/weapon/bedsheet)
|
||||
name = "\improper Ghost"
|
||||
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
|
||||
emote_see = list("stumbles around", "shivers")
|
||||
emote_hear = list("howls","groans")
|
||||
desc = "Spooky!"
|
||||
if(/obj/item/clothing/head/helmet/space/santahat)
|
||||
name = "Rudolph the Red-Nosed Corgi"
|
||||
emote_hear = list("barks christmas songs", "yaps")
|
||||
desc = "He has a very shiny nose."
|
||||
|
||||
if("back")
|
||||
if(inventory_back)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
/obj/item/device/radio
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_back = item_to_add
|
||||
rebuild_appearance()
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/corgi/Life()
|
||||
..()
|
||||
rebuild_appearance()
|
||||
|
||||
//Feeding, chasing food, FOOOOODDDD
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/S in oview(src,3))
|
||||
if(isturf(S.loc) || ishuman(S.loc))
|
||||
movement_target = S
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = 1
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
|
||||
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
|
||||
if (movement_target.loc.x < src.x)
|
||||
dir = WEST
|
||||
else if (movement_target.loc.x > src.x)
|
||||
dir = EAST
|
||||
else if (movement_target.loc.y < src.y)
|
||||
dir = SOUTH
|
||||
else if (movement_target.loc.y > src.y)
|
||||
dir = NORTH
|
||||
else
|
||||
dir = SOUTH
|
||||
|
||||
if(isturf(movement_target.loc) )
|
||||
movement_target.attack_animal(src)
|
||||
else if(ishuman(movement_target.loc) )
|
||||
if(prob(20))
|
||||
emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face")
|
||||
|
||||
if(prob(1))
|
||||
emote(pick("dances around","chases its tail"))
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
|
||||
dir = i
|
||||
sleep(1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/corgi
|
||||
name = "Corgi meat"
|
||||
desc = "Tastes like... well you know..."
|
||||
|
||||
/mob/living/simple_animal/corgi/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(70))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
//PC stuff-Sieve
|
||||
|
||||
/mob/living/simple_animal/corgi/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Corgi"
|
||||
mind.key = G.key
|
||||
|
||||
|
||||
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/weapon/newspaper))
|
||||
if(!stat)
|
||||
for(var/mob/M in viewers(user, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\blue [user] baps [name] on the nose with the rolled up [O]")
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2))
|
||||
dir = i
|
||||
sleep(1)
|
||||
else
|
||||
..()
|
||||
|
||||
//IAN! SQUEEEEEEEEE~
|
||||
/mob/living/simple_animal/corgi/Ian
|
||||
name = "Ian"
|
||||
real_name = "Ian" //Intended to hold the name without altering it.
|
||||
gender = "male"
|
||||
desc = "It's a somewhat notorious corgi."
|
||||
response_help = "pets"
|
||||
response_disarm = "bops"
|
||||
response_harm = "kicks"
|
||||
@@ -1,31 +0,0 @@
|
||||
//Look Sir, free crabs!
|
||||
/mob/living/simple_animal/crab
|
||||
name = "crab"
|
||||
desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time."
|
||||
icon_state = "crab"
|
||||
icon_living = "crab"
|
||||
icon_dead = "crab_dead"
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "stomps the"
|
||||
stop_automated_movement = 1
|
||||
friendly = "pinches"
|
||||
var/obj/item/inventory_head
|
||||
var/obj/item/inventory_mask
|
||||
|
||||
/mob/living/simple_animal/crab/Life()
|
||||
..()
|
||||
//CRAB movement
|
||||
if(!ckey && !stat)
|
||||
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(4,8)))
|
||||
turns_since_move = 0
|
||||
rebuild_appearance()
|
||||
@@ -1,152 +0,0 @@
|
||||
/mob/living/simple_animal/mouse
|
||||
name = "mouse"
|
||||
real_name = "mouse"
|
||||
desc = "It's a small, disease-ridden rodent."
|
||||
icon_state = "mouse_gray"
|
||||
icon_living = "mouse_gray"
|
||||
icon_dead = "mouse_gray_dead"
|
||||
speak = list("Squeek!","SQUEEK!","Squeek?")
|
||||
speak_emote = list("squeeks","squeeks","squiks")
|
||||
emote_hear = list("squeeks","squeaks","squiks")
|
||||
emote_see = list("runs in a circle", "shakes", "scritches at something")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
health = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "splats the"
|
||||
density = 0
|
||||
var/color //brown, gray and white
|
||||
layer = 2.5 //so they can hide under objects
|
||||
swap_on_mobbump = 0
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
|
||||
/mob/living/simple_animal/mouse/Life()
|
||||
..()
|
||||
if(!stat && prob(speak_chance))
|
||||
for(var/mob/M in view())
|
||||
M << 'sound/effects/mousesqueek.ogg'
|
||||
|
||||
/mob/living/simple_animal/mouse/gray
|
||||
color = "gray"
|
||||
icon_state = "mouse_gray"
|
||||
|
||||
/mob/living/simple_animal/mouse/white
|
||||
color = "white"
|
||||
icon_state = "mouse_white"
|
||||
|
||||
/mob/living/simple_animal/mouse/brown
|
||||
color = "brown"
|
||||
icon_state = "mouse_brown"
|
||||
|
||||
/mob/living/simple_animal/mouse/New()
|
||||
if(!color)
|
||||
color = pick( list("brown","gray","white") )
|
||||
icon_state = "mouse_[color]"
|
||||
icon_living = "mouse_[color]"
|
||||
icon_dead = "mouse_[color]_dead"
|
||||
desc = "It's a small [color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
|
||||
|
||||
/mob/living/simple_animal/mouse/proc/splat()
|
||||
src.health = 0
|
||||
src.stat = DEAD
|
||||
src.icon_dead = "mouse_[color]_splat"
|
||||
src.icon_state = "mouse_[color]_splat"
|
||||
|
||||
/proc/ismouse(var/obj/O)
|
||||
return istype(O,/mob/living/simple_animal/mouse)
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one also
|
||||
/mob/living/simple_animal/mouse/verb/ventcrawl()
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Mouse"
|
||||
|
||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
||||
// return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/welded = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
break
|
||||
else
|
||||
welded = 1
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "\blue You need to remain still while entering a vent."
|
||||
else
|
||||
src << "\blue This vent is not connected to anything."
|
||||
else if(welded)
|
||||
src << "\red That vent is welded."
|
||||
else
|
||||
src << "\blue You must be standing on or beside an air vent to enter it."
|
||||
return
|
||||
|
||||
//copy paste from alien/larva, if that func is updated please update this one alsoghost
|
||||
/mob/living/simple_animal/mouse/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Mouse"
|
||||
|
||||
if (layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
src << text("\blue You are now hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("<B>[] scurries to the ground!</B>", src)
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
src << text("\blue You have stopped hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("[] slowly peaks up from the ground...", src)
|
||||
|
||||
//make mice fit under tables etc? this was hacky, and not working
|
||||
/*
|
||||
/mob/living/simple_animal/mouse/Move(var/dir)
|
||||
|
||||
var/turf/target_turf = get_step(src,dir)
|
||||
//CanReachThrough(src.loc, target_turf, src)
|
||||
var/can_fit_under = 0
|
||||
if(target_turf.ZCanPass(get_turf(src),1))
|
||||
can_fit_under = 1
|
||||
|
||||
..(dir)
|
||||
if(can_fit_under)
|
||||
src.loc = target_turf
|
||||
for(var/d in cardinal)
|
||||
var/turf/O = get_step(T,d)
|
||||
//Simple pass check.
|
||||
if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles)
|
||||
open += O
|
||||
*/
|
||||
|
||||
mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop
|
||||
return 1
|
||||
@@ -1,94 +0,0 @@
|
||||
/mob/living/simple_animal/parrot
|
||||
name = "\improper Parrot"
|
||||
desc = "It's a parrot! No dirty words!"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "parrot"
|
||||
icon_living = "parrot"
|
||||
icon_dead = "parrot_dead"
|
||||
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
|
||||
speak_emote = list("squawks","says","yells")
|
||||
emote_hear = list("squawks.","bawks.")
|
||||
emote_see = list("flutters its wings.", "glares at you.")
|
||||
speak_chance = 5
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently moves aside the"
|
||||
response_harm = "swats the"
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
|
||||
l_ear = new /obj/item/device/radio/headset/headset_eng()
|
||||
|
||||
/mob/living/simple_animal/parrot/DrProfessor
|
||||
name = "Doctor Professor Parrot, PhD"
|
||||
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
|
||||
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE",":e Open secure storage please.",":e I think something happened to the containment field...")
|
||||
response_harm = "is attacked in the face by"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cracker/
|
||||
name = "Cracker"
|
||||
desc = "It's a salted cracker."
|
||||
|
||||
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
if(l_ear)
|
||||
dat += "<br><b>Headset:</b> [l_ear] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
|
||||
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[real_name]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("ears")
|
||||
if(l_ear)
|
||||
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
|
||||
l_ear.loc = src.loc
|
||||
l_ear = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(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("ears")
|
||||
if(l_ear)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
if( !istype(item_to_add, /obj/item/device/radio/headset) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.l_ear = item_to_add
|
||||
else
|
||||
..()
|
||||
@@ -1,59 +0,0 @@
|
||||
/mob/living/simple_animal/shade
|
||||
name = "Shade"
|
||||
desc = "A bound spirit"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "shade"
|
||||
icon_living = "shade"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "puts their hand through"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches the"
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "drains the life from"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = -1
|
||||
stop_automated_movement = 1
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
if(istype(O, /obj/item/device/soulstone))
|
||||
O.transfer_soul("SHADE", src, user)
|
||||
else
|
||||
if(O.force)
|
||||
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]. ")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/shade/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Shade"
|
||||
mind.key = G.key
|
||||
@@ -1,58 +0,0 @@
|
||||
/mob/living/simple_animal
|
||||
name = "animal"
|
||||
icon = 'animal.dmi'
|
||||
var/icon_living = ""
|
||||
var/icon_dead = ""
|
||||
var/icon_gib = null //We only try to show a gibbing animation if this exists.
|
||||
maxHealth = 20
|
||||
var/list/speak = list()
|
||||
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
|
||||
var/speak_chance = 0
|
||||
var/list/emote_hear = list() //EHearable emotes
|
||||
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
|
||||
health = 20
|
||||
var/turns_per_move = 1
|
||||
var/turns_since_move = 0
|
||||
universal_speak = 1
|
||||
var/meat_amount = 0
|
||||
var/meat_type
|
||||
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
|
||||
var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it.
|
||||
|
||||
//Interaction
|
||||
var/response_help = "You try to help"
|
||||
var/response_disarm = "You try to disarm"
|
||||
var/response_harm = "You try to hurt"
|
||||
var/harm_intent_damage = 3
|
||||
|
||||
//Temperature effect
|
||||
var/minbodytemp = 270
|
||||
var/maxbodytemp = 325
|
||||
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
|
||||
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
|
||||
var/min_oxy = 5
|
||||
var/max_oxy = 0 //Leaving something at 0 means it's off - has no maximum
|
||||
var/min_tox = 0
|
||||
var/max_tox = 1
|
||||
var/min_co2 = 0
|
||||
var/max_co2 = 5
|
||||
var/min_n2 = 0
|
||||
var/max_n2 = 0
|
||||
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
|
||||
|
||||
|
||||
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
|
||||
var/melee_damage_lower = 0
|
||||
var/melee_damage_upper = 0
|
||||
var/attacktext = "attacks"
|
||||
var/attack_sound = null
|
||||
var/friendly = "nuzzles" //If the mob does no damage with it's attack
|
||||
var/wall_smash = 0 //if they can smash walls
|
||||
|
||||
var/speed = 5
|
||||
|
||||
var/can_open_doors = 0 //door opening kind of guy
|
||||
|
||||
var/obj/item/device/radio/headset/l_ear = null
|
||||
@@ -1,95 +0,0 @@
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
|
||||
//Health
|
||||
if(stat == DEAD)
|
||||
if(health > 0)
|
||||
icon_state = icon_living
|
||||
stat = CONSCIOUS
|
||||
density = 1
|
||||
return
|
||||
else if(health < 1)
|
||||
Die()
|
||||
else if(health > maxHealth)
|
||||
health = maxHealth
|
||||
|
||||
//Movement
|
||||
if(!ckey && !stop_automated_movement)
|
||||
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(cardinal)))
|
||||
turns_since_move = 0
|
||||
|
||||
//Speaking
|
||||
if(!ckey && prob(speak_chance))
|
||||
var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0)
|
||||
if(speak && speak.len && prob((speak.len / length) * 100))
|
||||
src.say_auto(pick(speak))
|
||||
else if(emote_see && emote_see.len && prob((emote_see.len / length) * 100))
|
||||
emote("auto",1,pick(emote_see))
|
||||
else if(emote_hear && emote_hear.len)
|
||||
emote("auto",2,pick(emote_hear))
|
||||
//var/act,var/m_type=1,var/message = null
|
||||
|
||||
//Atmos
|
||||
var/atmos_suitable = 1
|
||||
|
||||
var/atom/A = src.loc
|
||||
if(isturf(A))
|
||||
var/turf/T = A
|
||||
var/areatemp = T.temperature
|
||||
if( abs(areatemp - bodytemperature) > 50 )
|
||||
var/diff = areatemp - bodytemperature
|
||||
diff = diff / 5
|
||||
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
|
||||
bodytemperature += diff
|
||||
|
||||
if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/ST = T
|
||||
if(ST.air)
|
||||
var/tox = ST.air.toxins
|
||||
var/oxy = ST.air.oxygen
|
||||
var/n2 = ST.air.nitrogen
|
||||
var/co2 = ST.air.carbon_dioxide
|
||||
|
||||
if(min_oxy)
|
||||
if(oxy < min_oxy)
|
||||
atmos_suitable = 0
|
||||
if(max_oxy)
|
||||
if(oxy > max_oxy)
|
||||
atmos_suitable = 0
|
||||
if(min_tox)
|
||||
if(tox < min_tox)
|
||||
atmos_suitable = 0
|
||||
if(max_tox)
|
||||
if(tox > max_tox)
|
||||
atmos_suitable = 0
|
||||
if(min_n2)
|
||||
if(n2 < min_n2)
|
||||
atmos_suitable = 0
|
||||
if(max_n2)
|
||||
if(n2 > max_n2)
|
||||
atmos_suitable = 0
|
||||
if(min_co2)
|
||||
if(co2 < min_co2)
|
||||
atmos_suitable = 0
|
||||
if(max_co2)
|
||||
if(co2 > max_co2)
|
||||
atmos_suitable = 0
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
health -= cold_damage_per_tick
|
||||
if(prob(15))
|
||||
emote("auto",1,"shivers![prob(50) ? "[pick(" It seems quite cold."," It seems to be freezing.")]" : ""]")
|
||||
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
health -= heat_damage_per_tick
|
||||
if(prob(15))
|
||||
emote("auto",1,"sweats![prob(50) ? "[pick(" It seems quite hot."," It seems to be burning up.")]" : ""]")
|
||||
|
||||
if(!atmos_suitable)
|
||||
health -= unsuitable_atoms_damage
|
||||
if(prob(15))
|
||||
emote("auto",1,"gasps![prob(50) ? "[pick(" It seems unable to breath."," It seems to be asphyxiating.")]" : ""]")
|
||||
@@ -1,217 +0,0 @@
|
||||
|
||||
/mob/living/simple_animal/Login()
|
||||
if(src && src.client)
|
||||
src.client.screen = null
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/Bumped(AM as mob|obj)
|
||||
if(!AM) return
|
||||
if(isturf(src.loc) && !resting && !buckled)
|
||||
if(ismob(AM))
|
||||
var/newamloc = src.loc
|
||||
src.loc = AM:loc
|
||||
AM:loc = newamloc
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/gib()
|
||||
if(meat_amount && meat_type)
|
||||
for(var/i = 0; i < meat_amount; i++)
|
||||
new meat_type(src.loc)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/say_quote(var/text)
|
||||
if(speak_emote && speak_emote.len)
|
||||
var/emote = pick(speak_emote)
|
||||
if(emote)
|
||||
return "<b>[src]</b> [emote], \"[text]\""
|
||||
return "says, \"[text]\"";
|
||||
|
||||
//when talking, simple_animals can only understand each other
|
||||
/mob/living/simple_animal/say(var/message)
|
||||
for(var/mob/M in view(src,7))
|
||||
if(istype(M, src.type) || M.universal_speak)
|
||||
M << say_quote(message)
|
||||
else
|
||||
M << "<b>[src]</b> [pick("makes some strange noises.","makes some strange noises.","makes some strange noises.","makes a small commotion.","kicks up a fuss about something.")]"
|
||||
return
|
||||
|
||||
//when talking, simple_animals can only understand each other
|
||||
/mob/living/simple_animal/proc/say_auto(var/message)
|
||||
for(var/mob/M in view(src,7))
|
||||
M << "<b>[src]</b> [pick(speak_emote)], \"[message]\""
|
||||
|
||||
/mob/living/simple_animal/emote(var/act = "auto", var/m_type=1, var/message = null)
|
||||
switch(act)
|
||||
if ("scream")
|
||||
message = "<B>[src]</B> makes a loud and pained whimper"
|
||||
m_type = 2
|
||||
if ("custom")
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if("auto")
|
||||
message = "<B>[src]</B> [message]"
|
||||
/*else
|
||||
if(!message)
|
||||
src << "Invalid Emote: [act]"*/
|
||||
if ((message && src.stat == 0))
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj) return
|
||||
src.health -= Proj.damage
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if (health > 0)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\blue [M] [response_help] [src]")
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
return
|
||||
if (nopush)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
if ("hurt")
|
||||
health -= harm_intent_damage
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] [response_harm] [src]")
|
||||
|
||||
if ("disarm")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\blue [M] [response_disarm] [src]")
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
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)
|
||||
del(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/movement_delay()
|
||||
return speed
|
||||
|
||||
/mob/living/simple_animal/Stat()
|
||||
..()
|
||||
|
||||
statpanel("Status")
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/proc/Die()
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
src << "\red You have died!"
|
||||
verbs -= /mob/living/simple_animal/say
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
health -= 500
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2.0)
|
||||
health -= 60
|
||||
|
||||
|
||||
if(3.0)
|
||||
health -= 30
|
||||
|
||||
/proc/issimpleanimal(var/mob/AM)
|
||||
return istype(AM,/mob/living/simple_animal)
|
||||
@@ -1,199 +0,0 @@
|
||||
/mob/living/simple_animal/space_worm
|
||||
name = "space worm segment"
|
||||
desc = "A part of a space worm."
|
||||
icon = 'critter.dmi'
|
||||
icon_state = "spaceworm"
|
||||
icon_living = "spaceworm"
|
||||
icon_dead = "spacewormdead"
|
||||
|
||||
speak_emote = list("transmits") //not supposed to be used under AI control
|
||||
emote_hear = list("transmits") //I'm just adding it so it doesn't runtime if controlled by player who speaks
|
||||
|
||||
response_help = "touches"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches the"
|
||||
|
||||
harm_intent_damage = 2
|
||||
|
||||
maxHealth = 30
|
||||
health = 30
|
||||
|
||||
stop_automated_movement = 1
|
||||
animate_movement = SYNC_STEPS
|
||||
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 350
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
|
||||
a_intent = "harm" //so they don't get pushed around
|
||||
|
||||
nopush = 1
|
||||
wall_smash = 1
|
||||
|
||||
speed = -1
|
||||
|
||||
var/mob/living/simple_animal/space_worm/previous //next/previous segments, correspondingly
|
||||
var/mob/living/simple_animal/space_worm/next //head is the nextest segment
|
||||
|
||||
var/stomachProcessProbability = 50
|
||||
var/digestionProbability = 20
|
||||
var/flatPlasmaValue = 5 //flat plasma amount given for non-items
|
||||
|
||||
var/atom/currentlyEating //what the worm is currently eating
|
||||
var/eatingDuration = 0 //how long he's been eating it for
|
||||
|
||||
head
|
||||
name = "space worm head"
|
||||
icon_state = "spacewormhead"
|
||||
icon_living = "spacewormhead"
|
||||
icon_dead = "spacewormdead"
|
||||
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 15
|
||||
attacktext = "bites"
|
||||
|
||||
animate_movement = SLIDE_STEPS
|
||||
|
||||
New(var/location, var/segments = 6)
|
||||
..()
|
||||
|
||||
var/mob/living/simple_animal/space_worm/current = src
|
||||
|
||||
for(var/i = 1 to segments)
|
||||
var/mob/living/simple_animal/space_worm/newSegment = new /mob/living/simple_animal/space_worm(loc)
|
||||
current.Attach(newSegment)
|
||||
current = newSegment
|
||||
|
||||
update_icon()
|
||||
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
|
||||
icon_state = "spacewormhead[previous?1:0]"
|
||||
if(previous)
|
||||
dir = get_dir(previous,src)
|
||||
else
|
||||
icon_state = "spacewormheaddead"
|
||||
|
||||
Life()
|
||||
..()
|
||||
|
||||
if(next && !(next in view(src,1)))
|
||||
Detach()
|
||||
|
||||
if(stat == DEAD) //dead chunks fall off and die immediately
|
||||
if(previous)
|
||||
previous.Detach()
|
||||
if(next)
|
||||
Detach(1)
|
||||
|
||||
if(prob(stomachProcessProbability))
|
||||
ProcessStomach()
|
||||
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
Del() //if a chunk a destroyed, make a new worm out of the split halves
|
||||
if(previous)
|
||||
previous.Detach()
|
||||
..()
|
||||
|
||||
Move()
|
||||
var/attachementNextPosition = loc
|
||||
if(..())
|
||||
if(previous)
|
||||
previous.Move(attachementNextPosition)
|
||||
update_icon()
|
||||
|
||||
Bump(atom/obstacle)
|
||||
if(currentlyEating != obstacle)
|
||||
currentlyEating = obstacle
|
||||
eatingDuration = 0
|
||||
|
||||
if(!AttemptToEat(obstacle))
|
||||
eatingDuration++
|
||||
else
|
||||
currentlyEating = null
|
||||
eatingDuration = 0
|
||||
|
||||
return
|
||||
|
||||
proc/update_icon() //only for the sake of consistency with the other update icon procs
|
||||
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
|
||||
if(previous) //midsection
|
||||
icon_state = "spaceworm[get_dir(src,previous) | get_dir(src,next)]" //see 3 lines below
|
||||
else //tail
|
||||
icon_state = "spacewormtail"
|
||||
dir = get_dir(src,next) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
|
||||
else
|
||||
icon_state = "spacewormdead"
|
||||
|
||||
return
|
||||
|
||||
proc/AttemptToEat(var/atom/target)
|
||||
if(istype(target,/turf/simulated/wall))
|
||||
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
|
||||
var/turf/simulated/wall/wall = target
|
||||
wall.ReplaceWithFloor()
|
||||
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
|
||||
return 1
|
||||
else if(istype(target,/atom/movable))
|
||||
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
|
||||
var/atom/movable/objectOrMob = target
|
||||
contents += objectOrMob
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
proc/Attach(var/mob/living/simple_animal/space_worm/attachement)
|
||||
if(!attachement)
|
||||
return
|
||||
|
||||
previous = attachement
|
||||
attachement.next = src
|
||||
|
||||
return
|
||||
|
||||
proc/Detach(die = 0)
|
||||
var/mob/living/simple_animal/space_worm/newHead = new /mob/living/simple_animal/space_worm/head(loc,0)
|
||||
var/mob/living/simple_animal/space_worm/newHeadPrevious = previous
|
||||
|
||||
previous = null //so that no extra heads are spawned
|
||||
|
||||
newHead.Attach(newHeadPrevious)
|
||||
|
||||
if(die)
|
||||
newHead.Die()
|
||||
|
||||
del(src)
|
||||
|
||||
proc/ProcessStomach()
|
||||
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/plasma))
|
||||
var/obj/item/stack/oldStack = stomachContent
|
||||
new /obj/item/stack/sheet/plasma(src, oldStack.amount)
|
||||
del(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/plasma(src, oldItem.w_class)
|
||||
del(oldItem)
|
||||
continue
|
||||
else
|
||||
new /obj/item/stack/sheet/plasma(src, flatPlasmaValue) //just flat amount
|
||||
del(stomachContent)
|
||||
continue
|
||||
|
||||
if(previous)
|
||||
for(var/atom/movable/stomachContent in contents) //transfer it along the digestive tract
|
||||
previous.contents += stomachContent
|
||||
else
|
||||
for(var/atom/movable/stomachContent in contents) //or poop it out
|
||||
loc.contents += stomachContent
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user