Merge branch 'master' into upstream-merge-29288
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
/mob/dead/new_player/proc/new_player_panel()
|
||||
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</a></p>"
|
||||
|
||||
if(SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
switch(ready)
|
||||
if(PLAYER_NOT_READY)
|
||||
output += "<p>\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | <b>Not Ready</b> | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]</p>"
|
||||
@@ -107,18 +107,17 @@
|
||||
return 1
|
||||
|
||||
if(href_list["ready"])
|
||||
if(SSticker)
|
||||
var/tready = text2num(href_list["ready"])
|
||||
//Avoid updating ready if we're after PREGAME (they should use latejoin instead)
|
||||
//This is likely not an actual issue but I don't have time to prove that this
|
||||
//no longer is required
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
ready = tready
|
||||
//if it's post initialisation and they're trying to observe we do the needful
|
||||
if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE)
|
||||
ready = tready
|
||||
make_me_an_observer()
|
||||
return
|
||||
var/tready = text2num(href_list["ready"])
|
||||
//Avoid updating ready if we're after PREGAME (they should use latejoin instead)
|
||||
//This is likely not an actual issue but I don't have time to prove that this
|
||||
//no longer is required
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
ready = tready
|
||||
//if it's post initialisation and they're trying to observe we do the needful
|
||||
if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE)
|
||||
ready = tready
|
||||
make_me_an_observer()
|
||||
return
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
|
||||
@@ -31,6 +31,16 @@
|
||||
color_src = 0
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/tails/human/bear
|
||||
name = "Bear"
|
||||
icon_state = "bear"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/ears/human/bear
|
||||
name = "Bear"
|
||||
icon_state = "bear"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/tails/human/catbig
|
||||
name = "Cat, Big"
|
||||
icon_state = "catbig"
|
||||
@@ -153,6 +163,18 @@
|
||||
icon_state = "wolf"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/tails/human/rabbit
|
||||
name = "Rabbit"
|
||||
icon_state = "rabbit"
|
||||
color_src = 0
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/ears/human/rabbit
|
||||
name = "Rabbit"
|
||||
icon_state = "rabbit"
|
||||
hasinner= 1
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/******************************************
|
||||
*************** Body Parts ****************
|
||||
*******************************************/
|
||||
@@ -222,6 +244,16 @@
|
||||
extra = 1
|
||||
extra_color_src = MUTCOLORS2
|
||||
|
||||
/datum/sprite_accessory/mam_tails/bear
|
||||
name = "Bear"
|
||||
icon_state = "bear"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/mam_ears/bear
|
||||
name = "Bear"
|
||||
icon_state = "bear"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/mam_ears/catbig
|
||||
name = "Cat, Big"
|
||||
icon_state = "cat"
|
||||
@@ -429,6 +461,18 @@
|
||||
icon_state = "guilmon"
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/mam_tails/rabbit
|
||||
name = "Rabbit"
|
||||
icon_state = "rabbit"
|
||||
color_src = 0
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/datum/sprite_accessory/mam_ears/rabbit
|
||||
name = "Rabbit"
|
||||
icon_state = "rabbit"
|
||||
hasinner= 1
|
||||
icon = 'icons/mob/mam_bodyparts.dmi'
|
||||
|
||||
/******************************************
|
||||
************ Body Markings ****************
|
||||
*******************************************/
|
||||
|
||||
@@ -326,7 +326,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
|
||||
return
|
||||
client.view = world.view
|
||||
client.change_view(world.view)
|
||||
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
|
||||
mind.current.key = key
|
||||
return 1
|
||||
@@ -468,16 +468,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
views |= i
|
||||
var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views
|
||||
if(new_view)
|
||||
client.view = Clamp(new_view, 1, max_view)
|
||||
client.change_view(Clamp(new_view, 1, max_view))
|
||||
else
|
||||
client.view = world.view
|
||||
client.change_view(world.view)
|
||||
|
||||
/mob/dead/observer/verb/add_view_range(input as num)
|
||||
set name = "Add View Range"
|
||||
set hidden = TRUE
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(input)
|
||||
client.view = Clamp(client.view + input, 1, max_view)
|
||||
client.change_view(Clamp(client.view + input, 1, max_view))
|
||||
|
||||
/mob/dead/observer/verb/boo()
|
||||
set category = "Ghost"
|
||||
@@ -680,7 +680,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, "<span class='notice'>Data HUDs enabled.</span>")
|
||||
data_huds_on = 1
|
||||
|
||||
/mob/dead/observer/verb/restore_ghost_apperance()
|
||||
/mob/dead/observer/verb/restore_ghost_appearance()
|
||||
set name = "Restore Ghost Character"
|
||||
set desc = "Sets your deadchat name and ghost appearance to your \
|
||||
roundstart character."
|
||||
@@ -781,8 +781,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/proc/register_pai()
|
||||
if(isobserver(src))
|
||||
if(SSpai)
|
||||
SSpai.recruitWindow(src)
|
||||
SSpai.recruitWindow(src)
|
||||
else
|
||||
to_chat(usr, "Can't become a pAI candidate while not dead!")
|
||||
|
||||
|
||||
@@ -137,7 +137,8 @@
|
||||
if(blood_id == C.get_blood_id())//both mobs have the same blood substance
|
||||
if(blood_id == "blood") //normal blood
|
||||
if(blood_data["viruses"])
|
||||
for(var/datum/disease/D in blood_data["viruses"])
|
||||
for(var/thing in blood_data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
|
||||
continue
|
||||
C.ForceContractDisease(D)
|
||||
@@ -162,7 +163,8 @@
|
||||
blood_data["donor"] = src
|
||||
blood_data["viruses"] = list()
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
blood_data["viruses"] += D.Copy()
|
||||
|
||||
blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/device/mmi/update_icon()
|
||||
if(brain)
|
||||
if(istype(brain,/obj/item/organ/brain/alien))
|
||||
if(istype(brain, /obj/item/organ/brain/alien))
|
||||
if(brainmob && brainmob.stat == DEAD)
|
||||
icon_state = "mmi_alien_dead"
|
||||
else
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/device/mmi/attackby(obj/item/O, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(O,/obj/item/organ/brain)) //Time to stick a brain in it --NEO
|
||||
if(istype(O, /obj/item/organ/brain)) //Time to stick a brain in it --NEO
|
||||
var/obj/item/organ/brain/newbrain = O
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>There's already a brain in the MMI!</span>")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/mob/living/brain/ClickOn(atom/A, params)
|
||||
..()
|
||||
if(istype(loc,/obj/item/device/mmi))
|
||||
if(istype(loc, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/MMI = loc
|
||||
var/obj/mecha/M = MMI.mecha
|
||||
if((src == MMI.brainmob) && istype(M))
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
if(container)
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/brain))
|
||||
if(istype(loc, /obj/item/organ/brain))
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
..()
|
||||
@@ -1,8 +1,8 @@
|
||||
/mob/living/carbon/alien/spawn_gibs(with_bodyparts)
|
||||
if(with_bodyparts)
|
||||
new /obj/effect/gibspawner/xeno(loc,viruses)
|
||||
new /obj/effect/gibspawner/xeno(get_turf(src))
|
||||
else
|
||||
new /obj/effect/gibspawner/xenobodypartless(loc,viruses)
|
||||
new /obj/effect/gibspawner/xenobodypartless(get_turf(src))
|
||||
|
||||
/mob/living/carbon/alien/gib_animation()
|
||||
new /obj/effect/temp_visual/gib_animation(loc, "gibbed-a")
|
||||
|
||||
@@ -13,7 +13,7 @@ Doesn't work on other aliens/AI.*/
|
||||
var/check_turf = 0
|
||||
var/has_action = 1
|
||||
var/datum/action/spell_action/alien/action = null
|
||||
var/action_icon = 'icons/mob/actions.dmi'
|
||||
var/action_icon = 'icons/mob/actions/actions_xeno.dmi'
|
||||
var/action_icon_state = "spell_default"
|
||||
var/action_background_icon_state = "bg_alien"
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/blocked = FALSE
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.check_shields(0, "the [name]", src, attack_type = LEAP_ATTACK))
|
||||
if(H.check_shields(src, 0, "the [name]", attack_type = LEAP_ATTACK))
|
||||
blocked = TRUE
|
||||
if(!blocked)
|
||||
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/spawn_gibs(with_bodyparts)
|
||||
if(with_bodyparts)
|
||||
new /obj/effect/gibspawner/larva(loc,viruses)
|
||||
new /obj/effect/gibspawner/larva(get_turf(src))
|
||||
else
|
||||
new /obj/effect/gibspawner/larvabodypartless(loc,viruses)
|
||||
new /obj/effect/gibspawner/larvabodypartless(get_turf(src))
|
||||
|
||||
/mob/living/carbon/alien/larva/gib_animation()
|
||||
new /obj/effect/temp_visual/gib_animation(loc, "gibbed-l")
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
var/obj/item/item_in_hand = src.get_active_held_item()
|
||||
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
|
||||
if(istype(item_in_hand,/obj/item/weapon/twohanded))
|
||||
if(istype(item_in_hand, /obj/item/weapon/twohanded))
|
||||
if(item_in_hand:wielded == 1)
|
||||
to_chat(usr, "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>")
|
||||
return
|
||||
@@ -722,8 +722,9 @@
|
||||
var/obj/item/organ/brain/B = getorgan(/obj/item/organ/brain)
|
||||
if(B)
|
||||
B.damaged_brain = 0
|
||||
for(var/datum/disease/D in viruses)
|
||||
if (D.severity != NONTHREAT)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity != NONTHREAT)
|
||||
D.cure(0)
|
||||
if(admin_revive)
|
||||
regenerate_limbs()
|
||||
|
||||
@@ -111,11 +111,13 @@
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
user.ContractDisease(D)
|
||||
|
||||
for(var/datum/disease/D in user.viruses)
|
||||
for(var/thing in user.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
|
||||
@@ -128,11 +130,13 @@
|
||||
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/monkey/M)
|
||||
for(var/datum/disease/D in viruses)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
M.ContractDisease(D)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
|
||||
@@ -141,7 +145,8 @@
|
||||
return 0
|
||||
|
||||
if(..()) //successful monkey bite.
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
ForceContractDisease(D)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
if(BRAIN)
|
||||
adjustBrainLoss(damage * hit_percent)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
adjustArousalLoss(damage * hit_percent)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
emote("deathgasp")
|
||||
|
||||
. = ..()
|
||||
if(SSticker && SSticker.mode)
|
||||
if(SSticker.mode)
|
||||
SSticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
|
||||
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts)
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
/mob/living/carbon/human/spawn_gibs(with_bodyparts)
|
||||
if(with_bodyparts)
|
||||
new /obj/effect/gibspawner/human(loc, viruses, dna)
|
||||
new /obj/effect/gibspawner/human(get_turf(src), dna)
|
||||
else
|
||||
new /obj/effect/gibspawner/humanbodypartless(loc, viruses, dna)
|
||||
new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna)
|
||||
|
||||
/mob/living/carbon/human/spawn_dust(just_ash = FALSE)
|
||||
if(just_ash)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(w_uniform && !(slot_w_uniform in obscured))
|
||||
//accessory
|
||||
var/accessory_msg
|
||||
if(istype(w_uniform,/obj/item/clothing/under))
|
||||
if(istype(w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
if(U.attached_accessory)
|
||||
accessory_msg += " with [bicon(U.attached_accessory)] \a [U.attached_accessory]"
|
||||
@@ -273,7 +273,7 @@
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if(getorgan(/obj/item/organ/brain))
|
||||
if(istype(src,/mob/living/carbon/human/interactive))
|
||||
if(istype(src, /mob/living/carbon/human/interactive))
|
||||
var/mob/living/carbon/human/interactive/auto = src
|
||||
if(auto.showexaminetext)
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] appears to be some sort of sick automaton, [t_his] eyes are glazed over and [t_his] mouth is slightly agape.</span>\n"
|
||||
@@ -300,7 +300,7 @@
|
||||
msg += "<span class='deptradio'>Rank:</span> [R.fields["rank"]]<br>"
|
||||
msg += "<a href='?src=\ref[src];hud=1;photo_front=1'>\[Front photo\]</a> "
|
||||
msg += "<a href='?src=\ref[src];hud=1;photo_side=1'>\[Side photo\]</a><br>"
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(CIH,/obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(CIH, /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
var/cyberimp_detect
|
||||
for(var/obj/item/organ/cyberimp/CI in internal_organs)
|
||||
if(CI.status == ORGAN_ROBOTIC)
|
||||
@@ -318,7 +318,7 @@
|
||||
msg += "<a href='?src=\ref[src];hud=m;evaluation=1'>\[Medical evaluation\]</a><br>"
|
||||
|
||||
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(CIH,/obj/item/organ/cyberimp/eyes/hud/security))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(CIH, /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
if(!user.stat && user != src)
|
||||
//|| !user.canmove || user.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
|
||||
var/criminal = "None"
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
real_name = "Test Dummy"
|
||||
status_flags = GODMODE|CANPUSH
|
||||
|
||||
/mob/living/carbon/human/dummy/New(loc)
|
||||
INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
|
||||
|
||||
/mob/living/carbon/human/dummy/Destroy()
|
||||
..()
|
||||
if(!initialized)
|
||||
args[1] = FALSE
|
||||
Initialize(arglist(args))
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
/mob/living/carbon/human/dummy/Life()
|
||||
return
|
||||
@@ -131,7 +131,8 @@
|
||||
//Virsuses
|
||||
if(viruses.len)
|
||||
stat("Viruses:", null)
|
||||
for(var/datum/disease/D in viruses)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
stat("*", "[D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]")
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/bp in body_parts)
|
||||
if(!bp)
|
||||
continue
|
||||
if(bp && istype(bp ,/obj/item/clothing))
|
||||
if(bp && istype(bp , /obj/item/clothing))
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & def_zone.body_part)
|
||||
protection += C.armor[d_type]
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return pda.owner
|
||||
return if_no_id
|
||||
|
||||
//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
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a separate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/get_visible_name()
|
||||
var/face_name = get_face_name("")
|
||||
var/id_name = get_id_name("")
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
return
|
||||
|
||||
if(A)
|
||||
if(!istype(A,/mob/living/carbon/human/interactive))
|
||||
if(!istype(A, /mob/living/carbon/human/interactive))
|
||||
return
|
||||
var/mob/living/carbon/human/interactive/T = A
|
||||
if(T)
|
||||
@@ -171,7 +171,7 @@
|
||||
return
|
||||
|
||||
if(A)
|
||||
if(!istype(A,/mob/living/carbon/human/interactive))
|
||||
if(!istype(A, /mob/living/carbon/human/interactive))
|
||||
return
|
||||
var/mob/living/carbon/human/interactive/T = A
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
if("Assistant")
|
||||
favoured_types = list(/obj/item/clothing, /obj/item/weapon)
|
||||
if("Captain","Head of Personnel")
|
||||
favoured_types = list(/obj/item/clothing, /obj/item/weapon/stamp/captain,/obj/item/weapon/disk/nuclear)
|
||||
favoured_types = list(/obj/item/clothing, /obj/item/weapon/stamp/captain, /obj/item/weapon/disk/nuclear)
|
||||
if("Cook")
|
||||
favoured_types = list(/obj/item/weapon/reagent_containers/food, /obj/item/weapon/kitchen)
|
||||
functions += "souschef"
|
||||
@@ -308,7 +308,7 @@
|
||||
favoured_types = list(/obj/item/weapon/mop, /obj/item/weapon/reagent_containers/glass/bucket, /obj/item/weapon/reagent_containers/spray/cleaner, /obj/effect/decal/cleanable)
|
||||
functions += "dojanitor"
|
||||
if("Clown")
|
||||
favoured_types = list(/obj/item/weapon/soap, /obj/item/weapon/reagent_containers/food/snacks/grown/banana,/obj/item/weapon/grown/bananapeel)
|
||||
favoured_types = list(/obj/item/weapon/soap, /obj/item/weapon/reagent_containers/food/snacks/grown/banana, /obj/item/weapon/grown/bananapeel)
|
||||
functions += "clowning"
|
||||
if("Mime")
|
||||
functions -= "chatter"
|
||||
@@ -354,7 +354,7 @@
|
||||
var/datum/objective_item/steal/S = new A
|
||||
traitorTarget = locate(S.targetitem) in world
|
||||
if(SNPC_MARTYR) // MY LIFE FOR SPESZUL
|
||||
var/targetType = pick(/obj/machinery/gravity_generator/main/station,/obj/machinery/power/smes/engineering,/obj/machinery/telecomms/hub)
|
||||
var/targetType = pick(/obj/machinery/gravity_generator/main/station, /obj/machinery/power/smes/engineering, /obj/machinery/telecomms/hub)
|
||||
traitorTarget = locate(targetType) in GLOB.machines
|
||||
if(SNPC_PSYCHO) // YOU'RE LIKE A FLESH BICYLE AND I WANT TO DISMANTLE YOU
|
||||
traitorTarget = null
|
||||
@@ -549,8 +549,8 @@
|
||||
var/turf/T = get_step(src,dir)
|
||||
if(T)
|
||||
for(var/obj/machinery/door/D in T.contents)
|
||||
if(!istype(D,/obj/machinery/door/poddoor) && D.density)
|
||||
if(istype(D,/obj/machinery/door/airlock))
|
||||
if(!istype(D, /obj/machinery/door/poddoor) && D.density)
|
||||
if(istype(D, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/AL = D
|
||||
if(!AL.CanAStarPass(RPID)) // only crack open doors we can't get through
|
||||
inactivity_period = 20
|
||||
@@ -623,7 +623,7 @@
|
||||
//--------DOORS
|
||||
if(istype(TARGET, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = TARGET
|
||||
if(D.check_access(MYID) && !istype(D,/obj/machinery/door/poddoor))
|
||||
if(D.check_access(MYID) && !istype(D, /obj/machinery/door/poddoor))
|
||||
inactivity_period = 10
|
||||
D.open()
|
||||
var/turf/T = get_step(get_step(D.loc,dir),dir) //recursion yo
|
||||
@@ -646,7 +646,7 @@
|
||||
else
|
||||
insert_into_backpack()
|
||||
//---------FASHION
|
||||
if(istype(TARGET,/obj/item/clothing))
|
||||
if(istype(TARGET, /obj/item/clothing))
|
||||
drop_item()
|
||||
dressup(TARGET)
|
||||
update_hands = 1
|
||||
@@ -657,7 +657,7 @@
|
||||
equip_to_appropriate_slot(MYID)
|
||||
//THIEVING SKILLS END
|
||||
//-------------TOUCH ME
|
||||
if(istype(TARGET,/obj/structure))
|
||||
if(istype(TARGET, /obj/structure))
|
||||
var/obj/structure/STR = TARGET
|
||||
if(main_hand)
|
||||
var/obj/item/weapon/W = main_hand
|
||||
@@ -815,7 +815,7 @@
|
||||
if(T.title == "Botanist")
|
||||
return /area/hydroponics
|
||||
else
|
||||
return pick(/area/hallway,/area/crew_quarters/locker)
|
||||
return pick(/area/hallway, /area/crew_quarters/locker)
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/target_filter(target)
|
||||
var/list/filtered_targets = list(/area, /turf, /obj/machinery/door, /atom/movable/light, /obj/structure/cable, /obj/machinery/atmospherics)
|
||||
@@ -1115,7 +1115,7 @@
|
||||
|
||||
if(retal && TARGET)
|
||||
for(var/obj/item/I in allContents)
|
||||
if(istype(I,/obj/item/weapon/restraints))
|
||||
if(istype(I, /obj/item/weapon/restraints))
|
||||
I.attack(TARGET,src) // go go bluespace restraint launcher!
|
||||
inactivity_period = 25
|
||||
break
|
||||
@@ -1139,7 +1139,7 @@
|
||||
var/pranksNearby = 100
|
||||
for(var/turf/open/T in orange(1,C))
|
||||
for(var/obj/item/A in T)
|
||||
if(istype(A,/obj/item/weapon/soap) || istype(A,/obj/item/weapon/reagent_containers/food/snacks/grown/banana) || istype(A,/obj/item/weapon/grown/bananapeel))
|
||||
if(istype(A, /obj/item/weapon/soap) || istype(A, /obj/item/weapon/reagent_containers/food/snacks/grown/banana) || istype(A, /obj/item/weapon/grown/bananapeel))
|
||||
pranksNearby--
|
||||
if(T.wet)
|
||||
pranksNearby -= 10
|
||||
@@ -1159,13 +1159,13 @@
|
||||
var/hasPranked = 0
|
||||
for(var/A in allContents)
|
||||
if(prob(smartness/2) && !hasPranked)
|
||||
if(istype(A,/obj/item/weapon/soap))
|
||||
if(istype(A, /obj/item/weapon/soap))
|
||||
npcDrop(A)
|
||||
hasPranked = 1
|
||||
if(istype(A,/obj/item/weapon/reagent_containers/food/snacks/grown/banana))
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/food/snacks/grown/banana))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/B = A
|
||||
B.attack(src, src)
|
||||
if(istype(A,/obj/item/weapon/grown/bananapeel))
|
||||
if(istype(A, /obj/item/weapon/grown/bananapeel))
|
||||
npcDrop(A)
|
||||
hasPranked = 1
|
||||
if(!hasPranked)
|
||||
@@ -1181,7 +1181,7 @@
|
||||
var/list/allContents = getAllContents()
|
||||
|
||||
for(var/A in allContents)
|
||||
if(istype(A,/obj/item/stack/medical))
|
||||
if(istype(A, /obj/item/stack/medical))
|
||||
shouldTryHeal = 1
|
||||
M = A
|
||||
|
||||
@@ -1281,7 +1281,7 @@
|
||||
var/list/rangeCheck = view(6,src)
|
||||
|
||||
//Make some basic custom food
|
||||
var/list/customableTypes = list(/obj/item/weapon/reagent_containers/food/snacks/customizable,/obj/item/weapon/reagent_containers/food/snacks/store/bread/plain,/obj/item/weapon/reagent_containers/food/snacks/pizzabread,/obj/item/weapon/reagent_containers/food/snacks/bun,/obj/item/weapon/reagent_containers/food/snacks/store/cake/plain,/obj/item/weapon/reagent_containers/food/snacks/pie/plain,/obj/item/weapon/reagent_containers/food/snacks/pastrybase)
|
||||
var/list/customableTypes = list(/obj/item/weapon/reagent_containers/food/snacks/customizable, /obj/item/weapon/reagent_containers/food/snacks/store/bread/plain, /obj/item/weapon/reagent_containers/food/snacks/pizzabread, /obj/item/weapon/reagent_containers/food/snacks/bun, /obj/item/weapon/reagent_containers/food/snacks/store/cake/plain, /obj/item/weapon/reagent_containers/food/snacks/pie/plain, /obj/item/weapon/reagent_containers/food/snacks/pastrybase)
|
||||
|
||||
var/foundCustom
|
||||
|
||||
@@ -1379,7 +1379,7 @@
|
||||
|
||||
var/list/finishedList = list()
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/toDisplay in allContents)
|
||||
if(!toDisplay.cooked_type && !istype(toDisplay,/obj/item/weapon/reagent_containers/food/snacks/grown)) // dont display our ingredients
|
||||
if(!toDisplay.cooked_type && !istype(toDisplay, /obj/item/weapon/reagent_containers/food/snacks/grown)) // dont display our ingredients
|
||||
finishedList += toDisplay
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/toGrab in rangeCheck)
|
||||
@@ -1410,7 +1410,7 @@
|
||||
RT.attackby(toPlop,src)
|
||||
|
||||
if(!foundCookable)
|
||||
var/list/allTypes = list(/obj/item/weapon/reagent_containers/food/snacks/piedough,/obj/item/weapon/reagent_containers/food/snacks/cakebatter,/obj/item/weapon/reagent_containers/food/snacks/dough,/obj/item/weapon/reagent_containers/food/snacks/flatdough)
|
||||
var/list/allTypes = list(/obj/item/weapon/reagent_containers/food/snacks/piedough, /obj/item/weapon/reagent_containers/food/snacks/cakebatter, /obj/item/weapon/reagent_containers/food/snacks/dough, /obj/item/weapon/reagent_containers/food/snacks/flatdough)
|
||||
|
||||
for(var/A in typesof(/obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/O = A
|
||||
@@ -1473,7 +1473,7 @@
|
||||
foundFav = 1
|
||||
return
|
||||
if(!foundFav)
|
||||
if(istype(test,/obj/item/weapon))
|
||||
if(istype(test, /obj/item/weapon))
|
||||
var/obj/item/weapon/R = test
|
||||
if(R.force > 2) // make sure we don't equip any non-weaponlike items, ie bags and stuff
|
||||
if(!best)
|
||||
@@ -1481,7 +1481,7 @@
|
||||
else
|
||||
if(best.force < R.force)
|
||||
best = R
|
||||
if(istype(R,/obj/item/weapon/gun))
|
||||
if(istype(R, /obj/item/weapon/gun))
|
||||
var/obj/item/weapon/gun/G = R
|
||||
if(G.can_shoot())
|
||||
best = R
|
||||
@@ -1495,15 +1495,15 @@
|
||||
if(M.health > 1)
|
||||
//THROWING OBJECTS
|
||||
for(var/A in allContents)
|
||||
if(istype(A,/obj/item/weapon/gun)) // guns are for shooting, not throwing.
|
||||
if(istype(A, /obj/item/weapon/gun)) // guns are for shooting, not throwing.
|
||||
continue
|
||||
if(prob(robustness))
|
||||
if(istype(A,/obj/item/weapon))
|
||||
if(istype(A, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = A
|
||||
if(W.throwforce > 19) // Only throw worthwile stuff, no more lobbing wrenches at wenches
|
||||
npcDrop(W,1)
|
||||
throw_item(TARGET)
|
||||
if(istype(A,/obj/item/weapon/grenade)) // Allahu ackbar! ALLAHU ACKBARR!!
|
||||
if(istype(A, /obj/item/weapon/grenade)) // Allahu ackbar! ALLAHU ACKBARR!!
|
||||
var/obj/item/weapon/grenade/G = A
|
||||
G.attack_self(src)
|
||||
if(prob(smartness))
|
||||
@@ -1516,10 +1516,10 @@
|
||||
swap_hands()
|
||||
if(main_hand)
|
||||
if(main_hand.force != 0)
|
||||
if(istype(main_hand,/obj/item/weapon/gun))
|
||||
if(istype(main_hand, /obj/item/weapon/gun))
|
||||
var/obj/item/weapon/gun/G = main_hand
|
||||
if(G.can_trigger_gun(src))
|
||||
if(istype(main_hand,/obj/item/weapon/gun/ballistic))
|
||||
if(istype(main_hand, /obj/item/weapon/gun/ballistic))
|
||||
var/obj/item/weapon/gun/ballistic/P = main_hand
|
||||
if(!P.chambered)
|
||||
P.chamber_round()
|
||||
@@ -1529,11 +1529,11 @@
|
||||
npcDrop(P,1)
|
||||
else
|
||||
P.afterattack(TARGET, src)
|
||||
else if(istype(main_hand,/obj/item/weapon/gun/energy))
|
||||
else if(istype(main_hand, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/P = main_hand
|
||||
var/stunning = 0
|
||||
for(var/A in P.ammo_type)
|
||||
if(ispath(A,/obj/item/ammo_casing/energy/electrode))
|
||||
if(ispath(A, /obj/item/ammo_casing/energy/electrode))
|
||||
stunning = 1
|
||||
var/shouldFire = 1
|
||||
var/mob/living/stunCheck = TARGET
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
return list(
|
||||
head,
|
||||
wear_mask,
|
||||
wear_neck,
|
||||
glasses,
|
||||
ears,
|
||||
)
|
||||
@@ -171,7 +172,7 @@
|
||||
dropItemToGround(belt)
|
||||
w_uniform = null
|
||||
update_suit_sensors()
|
||||
if(!QDELETED(src))
|
||||
if(!QDELETED(src))
|
||||
update_inv_w_uniform()
|
||||
else if(I == gloves)
|
||||
gloves = null
|
||||
|
||||
@@ -103,15 +103,17 @@
|
||||
var/datum/species/S = dna.species
|
||||
|
||||
if(S.breathid == "o2")
|
||||
throw_alert("oxy", /obj/screen/alert/oxy)
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else if(S.breathid == "tox")
|
||||
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else if(S.breathid == "co2")
|
||||
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(S.breathid == "n2")
|
||||
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
|
||||
return 0
|
||||
else
|
||||
if(istype(L,/obj/item/organ/lungs))
|
||||
if(istype(L, /obj/item/organ/lungs))
|
||||
var/obj/item/organ/lungs/lun = L
|
||||
lun.check_breath(breath,src)
|
||||
|
||||
|
||||
@@ -1506,6 +1506,8 @@
|
||||
H.adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
H.adjustStaminaLoss(damage * hit_percent)
|
||||
if(BRAIN)
|
||||
H.adjustBrainLoss(damage * hit_percent)
|
||||
return 1
|
||||
|
||||
/datum/species/proc/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm (rejected hunks)
|
||||
@@ -71,8 +71,8 @@
|
||||
var/obj/item/mutanthands = null
|
||||
var/obj/item/organ/tongue/mutanttongue = /obj/item/organ/tongue
|
||||
|
||||
- var/obj/item/organ/liver/mutantliver = null
|
||||
- var/obj/item/organ/stomach/mutantstomach = null
|
||||
+ var/obj/item/organ/liver/mutantliver
|
||||
+ var/obj/item/organ/stomach/mutantstomach
|
||||
|
||||
///////////
|
||||
// PROCS //
|
||||
@@ -66,6 +66,7 @@
|
||||
/datum/action/innate/flight
|
||||
name = "Toggle Flight"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUN
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "flight"
|
||||
|
||||
/datum/action/innate/flight/Activate()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
if(istype(chem,/datum/reagent/consumable))
|
||||
if(istype(chem, /datum/reagent/consumable))
|
||||
var/datum/reagent/consumable/nutri_check = chem
|
||||
if(nutri_check.nutriment_factor > 0)
|
||||
var/turf/pos = get_turf(H)
|
||||
@@ -26,6 +26,6 @@
|
||||
..()
|
||||
|
||||
/datum/species/fly/check_weakness(obj/item/weapon, mob/living/attacker)
|
||||
if(istype(weapon,/obj/item/weapon/melee/flyswatter))
|
||||
if(istype(weapon, /obj/item/weapon/melee/flyswatter))
|
||||
return 29 //Flyswatters deal 30x damage to flypeople.
|
||||
return 0
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/mob/dead/observe = M
|
||||
if(observe.client)
|
||||
observe.client.screen -= I
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
I.appearance_flags |= NO_CLIENT_COLOR
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
return
|
||||
adjustOxyLoss(1)
|
||||
failed_last_breath = 1
|
||||
throw_alert("oxy", /obj/screen/alert/oxy)
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
return 0
|
||||
|
||||
var/safe_oxy_min = 16
|
||||
@@ -144,14 +144,14 @@
|
||||
else
|
||||
adjustOxyLoss(3)
|
||||
failed_last_breath = 1
|
||||
throw_alert("oxy", /obj/screen/alert/oxy)
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
|
||||
else //Enough oxygen
|
||||
failed_last_breath = 0
|
||||
if(oxyloss)
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath_gases["o2"][MOLES]
|
||||
clear_alert("oxy")
|
||||
clear_alert("not_enough_oxy")
|
||||
|
||||
breath_gases["o2"][MOLES] -= oxygen_used
|
||||
breath_gases["co2"][MOLES] += oxygen_used
|
||||
@@ -174,11 +174,10 @@
|
||||
//TOXINS/PLASMA
|
||||
if(Toxins_partialpressure > safe_tox_max)
|
||||
var/ratio = (breath_gases["plasma"][MOLES]/safe_tox_max) * 10
|
||||
if(reagents)
|
||||
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
|
||||
adjustToxLoss(Clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
|
||||
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
clear_alert("tox_in_air")
|
||||
clear_alert("too_much_tox")
|
||||
|
||||
//NITROUS OXIDE
|
||||
if(breath_gases["n2o"])
|
||||
@@ -225,6 +224,15 @@
|
||||
/mob/living/carbon/proc/handle_blood()
|
||||
return
|
||||
|
||||
/mob/living/carbon/handle_diseases()
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(prob(D.infectivity))
|
||||
D.spread()
|
||||
|
||||
if(stat != DEAD)
|
||||
D.stage_act()
|
||||
|
||||
/mob/living/carbon/proc/handle_changeling()
|
||||
if(mind && hud_used && hud_used.lingchemdisplay)
|
||||
if(mind.changeling)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
return TRUE
|
||||
|
||||
// CLOTHING
|
||||
else if(istype(I,/obj/item/clothing))
|
||||
else if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
monkeyDrop(C)
|
||||
addtimer(CALLBACK(src, .proc/pickup_and_wear, C), 5)
|
||||
@@ -445,7 +445,7 @@
|
||||
retaliate(user)
|
||||
|
||||
/mob/living/carbon/monkey/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
if(istype(Proj , /obj/item/projectile/beam)||istype(Proj, /obj/item/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(!Proj.nodamage && Proj.damage < src.health)
|
||||
retaliate(Proj.firer)
|
||||
|
||||
@@ -1,286 +1,294 @@
|
||||
|
||||
/*
|
||||
apply_damage(a,b,c)
|
||||
args
|
||||
a:damage - How much damage to take
|
||||
b:damage_type - What type of damage to take, brute, burn
|
||||
c:def_zone - Where to take the damage if its brute or burn
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
|
||||
/*
|
||||
apply_damage(a,b,c)
|
||||
args
|
||||
a:damage - How much damage to take
|
||||
b:damage_type - What type of damage to take, brute, burn
|
||||
c:def_zone - Where to take the damage if its brute or burn
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE)
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!damage || (hit_percent <= 0))
|
||||
return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage * hit_percent)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage * hit_percent)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage * hit_percent)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage * hit_percent)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
adjustArousalLoss(damage * hit_percent)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
return adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
return adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
return adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
return adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
return adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
return adjustStaminaLoss(damage)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
return adjustArousalLoss(damage)
|
||||
|
||||
/mob/living/proc/get_damage_amount(damagetype = BRUTE)
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
return getBruteLoss()
|
||||
if(BURN)
|
||||
return getFireLoss()
|
||||
if(TOX)
|
||||
return getToxLoss()
|
||||
if(OXY)
|
||||
return getOxyLoss()
|
||||
if(CLONE)
|
||||
return getCloneLoss()
|
||||
if(STAMINA)
|
||||
return getStaminaLoss()
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
return getArousalLoss()
|
||||
|
||||
|
||||
/mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = 0, stamina = 0, arousal = 0)
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(brute)
|
||||
apply_damage(brute, BRUTE, def_zone, blocked)
|
||||
if(burn)
|
||||
apply_damage(burn, BURN, def_zone, blocked)
|
||||
if(tox)
|
||||
apply_damage(tox, TOX, def_zone, blocked)
|
||||
if(oxy)
|
||||
apply_damage(oxy, OXY, def_zone, blocked)
|
||||
if(clone)
|
||||
apply_damage(clone, CLONE, def_zone, blocked)
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, def_zone, blocked)
|
||||
//citadel code
|
||||
if(arousal)
|
||||
apply_damage(arousal, AROUSAL, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!damage || (hit_percent <= 0))
|
||||
return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage * hit_percent)
|
||||
if(BURN)
|
||||
adjustFireLoss(damage * hit_percent)
|
||||
if(TOX)
|
||||
adjustToxLoss(damage * hit_percent)
|
||||
if(OXY)
|
||||
adjustOxyLoss(damage * hit_percent)
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
if(BRAIN)
|
||||
adjustBrainLoss(damage * hit_percent)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
adjustArousalLoss(damage * hit_percent)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
return adjustBruteLoss(damage)
|
||||
if(BURN)
|
||||
return adjustFireLoss(damage)
|
||||
if(TOX)
|
||||
return adjustToxLoss(damage)
|
||||
if(OXY)
|
||||
return adjustOxyLoss(damage)
|
||||
if(CLONE)
|
||||
return adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
return adjustStaminaLoss(damage)
|
||||
if(BRAIN)
|
||||
return adjustBrainLoss(damage)
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
return adjustArousalLoss(damage)
|
||||
|
||||
/mob/living/proc/get_damage_amount(damagetype = BRUTE)
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
return getBruteLoss()
|
||||
if(BURN)
|
||||
return getFireLoss()
|
||||
if(TOX)
|
||||
return getToxLoss()
|
||||
if(OXY)
|
||||
return getOxyLoss()
|
||||
if(CLONE)
|
||||
return getCloneLoss()
|
||||
if(STAMINA)
|
||||
return getStaminaLoss()
|
||||
if(BRAIN)
|
||||
return getBrainLoss()
|
||||
//citadel code
|
||||
if(AROUSAL)
|
||||
return getArousalLoss()
|
||||
|
||||
|
||||
/mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = FALSE, stamina = 0, arousal = 0, brain = 0)
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(brute)
|
||||
apply_damage(brute, BRUTE, def_zone, blocked)
|
||||
if(burn)
|
||||
apply_damage(burn, BURN, def_zone, blocked)
|
||||
if(tox)
|
||||
apply_damage(tox, TOX, def_zone, blocked)
|
||||
if(oxy)
|
||||
apply_damage(oxy, OXY, def_zone, blocked)
|
||||
if(clone)
|
||||
apply_damage(clone, CLONE, def_zone, blocked)
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, def_zone, blocked)
|
||||
if(brain)
|
||||
apply_damage(brain, BRAIN, def_zone, blocked)
|
||||
//citadel code
|
||||
if(arousal)
|
||||
apply_damage(arousal, AROUSAL, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/apply_effect(effect = 0,effecttype = STUN, blocked = FALSE)
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!effect || (hit_percent <= 0))
|
||||
return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun(effect * hit_percent)
|
||||
if(KNOCKDOWN)
|
||||
Knockdown(effect * hit_percent)
|
||||
if(UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(IRRADIATE)
|
||||
radiation += max(effect * hit_percent, 0)
|
||||
if(SLUR)
|
||||
slurring = max(slurring,(effect * hit_percent))
|
||||
if(STUTTER)
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect * hit_percent))
|
||||
if(EYE_BLUR)
|
||||
blur_eyes(effect * hit_percent)
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect * hit_percent))
|
||||
if(JITTER)
|
||||
if(status_flags & CANSTUN)
|
||||
jitteriness = max(jitteriness,(effect * hit_percent))
|
||||
return 1
|
||||
|
||||
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!effect || (hit_percent <= 0))
|
||||
return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun(effect * hit_percent)
|
||||
if(KNOCKDOWN)
|
||||
Knockdown(effect * hit_percent)
|
||||
if(UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(IRRADIATE)
|
||||
radiation += max(effect * hit_percent, 0)
|
||||
if(SLUR)
|
||||
slurring = max(slurring,(effect * hit_percent))
|
||||
if(STUTTER)
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect * hit_percent))
|
||||
if(EYE_BLUR)
|
||||
blur_eyes(effect * hit_percent)
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect * hit_percent))
|
||||
if(JITTER)
|
||||
if(status_flags & CANSTUN)
|
||||
jitteriness = max(jitteriness,(effect * hit_percent))
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = FALSE, stamina = 0, jitter = 0)
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(stun)
|
||||
apply_effect(stun, STUN, blocked)
|
||||
if(knockdown)
|
||||
apply_effect(knockdown, KNOCKDOWN, blocked)
|
||||
if(unconscious)
|
||||
apply_effect(unconscious, UNCONSCIOUS, blocked)
|
||||
if(irradiate)
|
||||
apply_effect(irradiate, IRRADIATE, blocked)
|
||||
if(slur)
|
||||
apply_effect(slur, SLUR, blocked)
|
||||
if(stutter)
|
||||
apply_effect(stutter, STUTTER, blocked)
|
||||
if(eyeblur)
|
||||
apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy)
|
||||
apply_effect(drowsy, DROWSY, blocked)
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, null, blocked)
|
||||
if(jitter)
|
||||
apply_effect(jitter, JITTER, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = Clamp((bruteloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
oxyloss = Clamp((oxyloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
oxyloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = Clamp((toxloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
fireloss = Clamp((fireloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = Clamp((cloneloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getBrainLoss()
|
||||
return brainloss
|
||||
|
||||
/mob/living/proc/adjustBrainLoss(amount)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
brainloss = Clamp((brainloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
|
||||
/mob/living/proc/setBrainLoss(amount)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
brainloss = amount
|
||||
|
||||
/mob/living/proc/getStaminaLoss()
|
||||
return staminaloss
|
||||
|
||||
/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// heal MANY bodyparts, in random order
|
||||
/mob/living/proc/heal_overall_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// damage MANY bodyparts, in random order
|
||||
/mob/living/proc/take_overall_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
//heal up to amount damage, in a given order
|
||||
/mob/living/proc/heal_ordered_damage(amount, list/damage_types)
|
||||
. = amount //we'll return the amount of damage healed
|
||||
for(var/i in damage_types)
|
||||
var/amount_to_heal = min(amount, get_damage_amount(i)) //heal only up to the amount of damage we have
|
||||
if(amount_to_heal)
|
||||
apply_damage_type(-amount_to_heal, i)
|
||||
amount -= amount_to_heal //remove what we healed from our current amount
|
||||
if(!amount)
|
||||
break
|
||||
. -= amount //if there's leftover healing, remove it from what we return
|
||||
if(blocked >= 100)
|
||||
return 0
|
||||
if(stun)
|
||||
apply_effect(stun, STUN, blocked)
|
||||
if(knockdown)
|
||||
apply_effect(knockdown, KNOCKDOWN, blocked)
|
||||
if(unconscious)
|
||||
apply_effect(unconscious, UNCONSCIOUS, blocked)
|
||||
if(irradiate)
|
||||
apply_effect(irradiate, IRRADIATE, blocked)
|
||||
if(slur)
|
||||
apply_effect(slur, SLUR, blocked)
|
||||
if(stutter)
|
||||
apply_effect(stutter, STUTTER, blocked)
|
||||
if(eyeblur)
|
||||
apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy)
|
||||
apply_effect(drowsy, DROWSY, blocked)
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, null, blocked)
|
||||
if(jitter)
|
||||
apply_effect(jitter, JITTER, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = Clamp((bruteloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
oxyloss = Clamp((oxyloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
oxyloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = Clamp((toxloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
fireloss = Clamp((fireloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = Clamp((cloneloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getBrainLoss()
|
||||
return brainloss
|
||||
|
||||
/mob/living/proc/adjustBrainLoss(amount)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
brainloss = Clamp((brainloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
|
||||
|
||||
/mob/living/proc/setBrainLoss(amount)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
brainloss = amount
|
||||
|
||||
/mob/living/proc/getStaminaLoss()
|
||||
return staminaloss
|
||||
|
||||
/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_bodypart_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// heal MANY bodyparts, in random order
|
||||
/mob/living/proc/heal_overall_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
|
||||
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(-burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
// damage MANY bodyparts, in random order
|
||||
/mob/living/proc/take_overall_damage(brute, burn, updating_health = 1)
|
||||
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
|
||||
adjustFireLoss(burn, 0)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
//heal up to amount damage, in a given order
|
||||
/mob/living/proc/heal_ordered_damage(amount, list/damage_types)
|
||||
. = amount //we'll return the amount of damage healed
|
||||
for(var/i in damage_types)
|
||||
var/amount_to_heal = min(amount, get_damage_amount(i)) //heal only up to the amount of damage we have
|
||||
if(amount_to_heal)
|
||||
apply_damage_type(-amount_to_heal, i)
|
||||
amount -= amount_to_heal //remove what we healed from our current amount
|
||||
if(!amount)
|
||||
break
|
||||
. -= amount //if there's leftover healing, remove it from what we return
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
/mob/living/proc/spawn_gibs()
|
||||
new /obj/effect/gibspawner/generic(loc, viruses)
|
||||
new /obj/effect/gibspawner/generic(get_turf(src))
|
||||
|
||||
/mob/living/proc/spill_organs()
|
||||
return
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
/datum/emote/living/surrender
|
||||
key = "surrender"
|
||||
key_third_person = "surrenders"
|
||||
message = "puts their hands on their head and falls to the ground, they surrender%s!"
|
||||
message = "puts their hands on their head and falls to the ground, they surrender!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/surrender/run_emote(mob/user, params)
|
||||
|
||||
@@ -18,12 +18,16 @@
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing(times_fired)
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing(times_fired)
|
||||
|
||||
handle_diseases() // DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
|
||||
|
||||
if(stat != DEAD)
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
@@ -60,6 +64,9 @@
|
||||
radiation = 0 //so radiation don't accumulate in simple animals
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_diseases()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_diginvis()
|
||||
if(!digitaldisguise)
|
||||
src.digitaldisguise = image(loc = src)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
//the puller can always swap with its victim if on grab intent
|
||||
if(M.pulledby == src && a_intent == INTENT_GRAB)
|
||||
mob_swap = 1
|
||||
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
//restrained people act if they were on 'help' intent to prevent a person being pulled from being separated from their puller
|
||||
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
|
||||
mob_swap = 1
|
||||
if(mob_swap)
|
||||
@@ -357,7 +357,7 @@
|
||||
updatehealth() //then we check if the mob should wake up.
|
||||
update_canmove()
|
||||
update_sight()
|
||||
clear_alert("oxy")
|
||||
clear_alert("not_enough_oxy")
|
||||
reload_fullscreen()
|
||||
. = 1
|
||||
if(mind)
|
||||
@@ -412,7 +412,7 @@
|
||||
if(client)
|
||||
to_chat(src, "[src]'s Metainfo:<br>[client.prefs.metadata]")
|
||||
else
|
||||
to_chat(src, "[src] does not have any stored infomation!")
|
||||
to_chat(src, "[src] does not have any stored information!")
|
||||
else
|
||||
to_chat(src, "OOC Metadata is not supported by this server!")
|
||||
|
||||
@@ -754,7 +754,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
if(T.z == ZLEVEL_CENTCOM) //dont detect mobs on centcomm
|
||||
if(T.z == ZLEVEL_CENTCOM) //dont detect mobs on centcom
|
||||
return 0
|
||||
if(T.z >= ZLEVEL_SPACEMAX)
|
||||
return 0
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
|
||||
var/dtype = BRUTE
|
||||
var/volume = I.get_volume_by_throwforce_and_or_w_class()
|
||||
if(istype(I,/obj/item/weapon)) //If the item is a weapon...
|
||||
if(istype(I, /obj/item/weapon)) //If the item is a weapon...
|
||||
var/obj/item/weapon/W = I
|
||||
dtype = W.damtype
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
if(ranged_ability && client)
|
||||
ranged_ability.remove_mousepointer(client)
|
||||
..()
|
||||
if(!key && mind) //key and mind have become seperated.
|
||||
if(!key && mind) //key and mind have become separated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
@@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
// Faction
|
||||
"t" = "Syndicate",
|
||||
"y" = "Centcom",
|
||||
"y" = "CentCom",
|
||||
|
||||
// Species
|
||||
"b" = "binary",
|
||||
@@ -53,7 +53,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
// Faction
|
||||
"å" = "Syndicate",
|
||||
"í" = "Centcom",
|
||||
"í" = "CentCom",
|
||||
|
||||
// Species
|
||||
"è" = "binary",
|
||||
|
||||
@@ -79,8 +79,6 @@
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
|
||||
var/obj/machinery/camera/portable/builtInCamera
|
||||
|
||||
var/obj/structure/AIcore/deactivated/linked_core //For exosuit control
|
||||
var/mob/living/silicon/robot/deployed_shell = null //For shell control
|
||||
var/datum/action/innate/deploy_shell/deploy_action = new
|
||||
@@ -151,7 +149,7 @@
|
||||
GLOB.ai_list += src
|
||||
GLOB.shuttle_caller_list += src
|
||||
|
||||
builtInCamera = new /obj/machinery/camera/portable(src)
|
||||
builtInCamera = new (src)
|
||||
builtInCamera.network = list("SS13")
|
||||
|
||||
|
||||
@@ -877,7 +875,7 @@
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
if(camera_light_on)
|
||||
light_cameras()
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
if(client)
|
||||
if(ismovableatom(A))
|
||||
@@ -963,6 +961,7 @@
|
||||
/datum/action/innate/deploy_shell
|
||||
name = "Deploy to AI Shell"
|
||||
desc = "Wirelessly control a specialized cyborg shell."
|
||||
icon_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
button_icon_state = "ai_shell"
|
||||
|
||||
/datum/action/innate/deploy_shell/Trigger()
|
||||
@@ -974,6 +973,7 @@
|
||||
/datum/action/innate/deploy_last_shell
|
||||
name = "Reconnect to shell"
|
||||
desc = "Reconnect to the most recently used AI shell."
|
||||
icon_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
button_icon_state = "ai_last_shell"
|
||||
var/mob/living/silicon/robot/last_used_shell
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/spawn_gibs()
|
||||
new /obj/effect/gibspawner/robot(loc,viruses)
|
||||
new /obj/effect/gibspawner/robot(get_turf(src))
|
||||
|
||||
/mob/living/silicon/spawn_dust()
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
|
||||
/datum/action/innate/pai
|
||||
name = "PAI Action"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
var/mob/living/silicon/pai/P
|
||||
|
||||
/datum/action/innate/pai/Trigger()
|
||||
@@ -197,8 +198,10 @@
|
||||
/datum/action/innate/pai/rest/Trigger()
|
||||
..()
|
||||
P.lay_down()
|
||||
|
||||
/datum/action/innate/pai/light
|
||||
name = "Toggle Integrated Lights"
|
||||
icon_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon_state = "emp"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
/mob/living/silicon/pai/proc/downloadSoftware()
|
||||
var/dat = ""
|
||||
|
||||
dat += "<h2>Centcom pAI Module Subversion Network</h2><br>"
|
||||
dat += "<h2>CentCom pAI Module Subversion Network</h2><br>"
|
||||
dat += "<pre>Remaining Available Memory: [src.ram]</pre><br>"
|
||||
dat += "<p style=\"text-align:center\"><b>Trunks available for checkout</b><br>"
|
||||
|
||||
@@ -513,7 +513,8 @@
|
||||
Structural Integrity: [M.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getBruteLoss()]</font><br>
|
||||
Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)<br>
|
||||
"}
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
dat += {"<h4>Infection Detected.</h4><br>
|
||||
Name: [D.name]<br>
|
||||
Type: [D.spread_text]<br>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
locked = FALSE //unlock cover
|
||||
|
||||
update_canmove()
|
||||
if(camera && camera.status)
|
||||
camera.toggle_cam(src,0)
|
||||
if(!QDELETED(builtInCamera) && builtInCamera.status)
|
||||
builtInCamera.toggle_cam(src,0)
|
||||
update_headlamp(1) //So borg lights are disabled when killed.
|
||||
|
||||
uneq_all() // particularly to ensure sight modes are cleared
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(!O)
|
||||
return 0
|
||||
O.mouse_opacity = 2
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
if(istype(O, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
update_sight()
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
|
||||
var/opened = 0
|
||||
var/emagged = FALSE
|
||||
@@ -76,7 +75,6 @@
|
||||
var/lamp_recharging = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
|
||||
|
||||
var/sight_mode = 0
|
||||
var/updating = 0 //portable camera camerachunk update
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/list/upgrades = list()
|
||||
@@ -93,6 +91,8 @@
|
||||
/obj/item/clothing/head/sombrero,
|
||||
/obj/item/clothing/head/witchunter_hat)
|
||||
|
||||
var/remote_range = 7 //How far can you interact with machines.
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
can_ride_typecache = list(/mob/living/carbon/human)
|
||||
@@ -125,16 +125,16 @@
|
||||
lawupdate = FALSE
|
||||
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
if(!scrambledcodes && !camera)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
camera.network = list("SS13")
|
||||
if(!scrambledcodes && !builtInCamera)
|
||||
builtInCamera = new (src)
|
||||
builtInCamera.c_tag = real_name
|
||||
builtInCamera.network = list("SS13")
|
||||
if(wires.is_cut(WIRE_CAMERA))
|
||||
camera.status = 0
|
||||
builtInCamera.status = 0
|
||||
module = new /obj/item/weapon/robot_module(src)
|
||||
module.rebuild_modules()
|
||||
update_icons()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
//If this body is meant to be a borg controlled by the AI player
|
||||
if(shell)
|
||||
@@ -189,7 +189,6 @@
|
||||
wires = null
|
||||
module = null
|
||||
eye_lights = null
|
||||
camera = null
|
||||
cell = null
|
||||
return ..()
|
||||
|
||||
@@ -236,8 +235,8 @@
|
||||
|
||||
real_name = changed_name
|
||||
name = real_name
|
||||
if(camera)
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name //update the camera name too
|
||||
|
||||
/mob/living/silicon/robot/proc/get_standard_name()
|
||||
return "[(designation ? "[designation] " : "")][mmi.braintype]-[ident]"
|
||||
@@ -656,29 +655,6 @@
|
||||
add_overlay(head_overlay)
|
||||
update_fire()
|
||||
|
||||
#define BORG_CAMERA_BUFFER 30
|
||||
|
||||
/mob/living/silicon/robot/proc/do_camera_update(oldLoc)
|
||||
if(oldLoc != src.loc)
|
||||
GLOB.cameranet.updatePortableCamera(src.camera)
|
||||
updating = 0
|
||||
|
||||
/mob/living/silicon/robot/Move(a, b, flag)
|
||||
var/oldLoc = src.loc
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.camera)
|
||||
if(!updating)
|
||||
updating = 1
|
||||
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
|
||||
if(module)
|
||||
if(istype(module, /obj/item/weapon/robot_module/miner))
|
||||
if(istype(loc, /turf/open/floor/plating/asteroid))
|
||||
for(var/obj/item/I in held_items)
|
||||
if(istype(I,/obj/item/weapon/storage/bag/ore))
|
||||
loc.attackby(I, src)
|
||||
#undef BORG_CAMERA_BUFFER
|
||||
|
||||
/mob/living/silicon/robot/proc/self_destruct()
|
||||
if(emagged)
|
||||
if(mmi)
|
||||
@@ -697,9 +673,8 @@
|
||||
canmove = 1
|
||||
scrambledcodes = 1
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(src.camera)
|
||||
qdel(src.camera)
|
||||
src.camera = null
|
||||
if(!QDELETED(builtInCamera))
|
||||
QDEL_NULL(builtInCamera)
|
||||
// I'm trying to get the Cyborg to not be listed in the camera list
|
||||
// Instead of being listed as "deactivated". The downside is that I'm going
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
@@ -980,8 +955,8 @@
|
||||
|
||||
/mob/living/silicon/robot/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..()) //successfully ressuscitated from death
|
||||
if(camera && !wires.is_cut(WIRE_CAMERA))
|
||||
camera.toggle_cam(src,0)
|
||||
if(!QDELETED(builtInCamera) && !wires.is_cut(WIRE_CAMERA))
|
||||
builtInCamera.toggle_cam(src,0)
|
||||
update_headlamp()
|
||||
if(admin_revive)
|
||||
locked = TRUE
|
||||
@@ -992,8 +967,8 @@
|
||||
..()
|
||||
if(oldname != real_name)
|
||||
notify_ai(RENAME, oldname, newname)
|
||||
if(camera)
|
||||
camera.c_tag = real_name
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name
|
||||
custom_name = newname
|
||||
|
||||
|
||||
@@ -1057,8 +1032,8 @@
|
||||
name = "[designation] AI Shell [rand(100,999)]"
|
||||
real_name = name
|
||||
GLOB.available_ai_shells |= src
|
||||
if(camera)
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name //update the camera name too
|
||||
diag_hud_set_aishell()
|
||||
notify_ai(AI_SHELL)
|
||||
|
||||
@@ -1073,15 +1048,15 @@
|
||||
GLOB.available_ai_shells -= src
|
||||
name = "Unformatted Cyborg [rand(100,999)]"
|
||||
real_name = name
|
||||
if(camera)
|
||||
camera.c_tag = real_name
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name
|
||||
diag_hud_set_aishell()
|
||||
|
||||
/mob/living/silicon/robot/proc/deploy_init(var/mob/living/silicon/ai/AI)
|
||||
real_name = "[AI.real_name] shell [rand(100, 999)] - [designation]" //Randomizing the name so it shows up seperately in the shells list
|
||||
real_name = "[AI.real_name] shell [rand(100, 999)] - [designation]" //Randomizing the name so it shows up separately in the shells list
|
||||
name = real_name
|
||||
if(camera)
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name //update the camera name too
|
||||
mainframe = AI
|
||||
deployed = TRUE
|
||||
connected_ai = mainframe
|
||||
@@ -1102,6 +1077,7 @@
|
||||
/datum/action/innate/undeployment
|
||||
name = "Disconnect from shell"
|
||||
desc = "Stop controlling your shell and resume normal core operations."
|
||||
icon_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
button_icon_state = "ai_core"
|
||||
|
||||
/datum/action/innate/undeployment/Trigger()
|
||||
@@ -1125,8 +1101,8 @@
|
||||
undeployment_action.Remove(src)
|
||||
if(radio) //Return radio to normal
|
||||
radio.recalculateChannels()
|
||||
if(camera)
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
if(!QDELETED(builtInCamera))
|
||||
builtInCamera.c_tag = real_name //update the camera name too
|
||||
diag_hud_set_aishell()
|
||||
mainframe.diag_hud_set_deployed()
|
||||
if(mainframe.laws)
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
icon_state = "std_module"
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags = CONDUCT
|
||||
|
||||
var/list/basic_modules = list() //a list of paths, converted to a list of instances on New()
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC //There is only one kind of diag hud
|
||||
|
||||
var/law_change_counter = 0
|
||||
var/obj/machinery/camera/builtInCamera = null
|
||||
var/updating = FALSE //portable camera camerachunk update
|
||||
|
||||
/mob/living/silicon/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.silicon_mobs += src
|
||||
var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC]
|
||||
diag_hud.add_to_hud(src)
|
||||
@@ -54,6 +56,7 @@
|
||||
/mob/living/silicon/Destroy()
|
||||
radio = null
|
||||
aicamera = null
|
||||
QDEL_NULL(builtInCamera)
|
||||
GLOB.silicon_mobs -= src
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/mob/living/silicon/Moved(oldLoc, dir)
|
||||
. = ..()
|
||||
update_camera_location(oldLoc)
|
||||
|
||||
/mob/living/silicon/forceMove(atom/destination)
|
||||
. = ..()
|
||||
update_camera_location(destination)
|
||||
|
||||
/mob/living/silicon/proc/do_camera_update(oldLoc)
|
||||
if(!QDELETED(builtInCamera) && oldLoc != get_turf(src))
|
||||
GLOB.cameranet.updatePortableCamera(builtInCamera)
|
||||
updating = FALSE
|
||||
|
||||
#define SILICON_CAMERA_BUFFER 10
|
||||
/mob/living/silicon/proc/update_camera_location(oldLoc)
|
||||
oldLoc = get_turf(oldLoc)
|
||||
if(!QDELETED(builtInCamera) && !updating && oldLoc != get_turf(src))
|
||||
updating = TRUE
|
||||
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), SILICON_CAMERA_BUFFER)
|
||||
#undef SILICON_CAMERA_BUFFER
|
||||
@@ -116,7 +116,7 @@
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
access_card = new /obj/item/weapon/card/id(src)
|
||||
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
|
||||
access_card.access += ACCESS_ROBOTICS
|
||||
|
||||
@@ -299,13 +299,13 @@
|
||||
return
|
||||
|
||||
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
|
||||
if(istype(src,/obj/item/weapon/storage/firstaid/fire))
|
||||
if(istype(src, /obj/item/weapon/storage/firstaid/fire))
|
||||
A.skin = "ointment"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/toxin))
|
||||
else if(istype(src, /obj/item/weapon/storage/firstaid/toxin))
|
||||
A.skin = "tox"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/o2))
|
||||
else if(istype(src, /obj/item/weapon/storage/firstaid/o2))
|
||||
A.skin = "o2"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/brute))
|
||||
else if(istype(src, /obj/item/weapon/storage/firstaid/brute))
|
||||
A.skin = "brute"
|
||||
|
||||
qdel(S)
|
||||
|
||||
@@ -201,7 +201,7 @@ Auto Patrol[]"},
|
||||
set_weapon()
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam/laser)||istype(Proj,/obj/item/projectile/bullet))
|
||||
if(istype(Proj , /obj/item/projectile/beam/laser)||istype(Proj, /obj/item/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(!Proj.nodamage && Proj.damage < src.health)
|
||||
retaliate(Proj.firer)
|
||||
|
||||
@@ -373,7 +373,8 @@
|
||||
return 1
|
||||
|
||||
if(treat_virus && !C.reagents.has_reagent(treatment_virus_avoid) && !C.reagents.has_reagent(treatment_virus))
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
for(var/thing in C.viruses)
|
||||
var/datum/disease/D = thing
|
||||
//the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC) \
|
||||
&& D.severity != NONTHREAT \
|
||||
@@ -424,7 +425,8 @@
|
||||
else
|
||||
if(treat_virus)
|
||||
var/virus = 0
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
for(var/thing in C.viruses)
|
||||
var/datum/disease/D = thing
|
||||
//detectable virus
|
||||
if((!(D.visibility_flags & HIDDEN_SCANNER)) || (!(D.visibility_flags & HIDDEN_PANDEMIC)))
|
||||
if(D.severity != NONTHREAT) //virus is harmful
|
||||
@@ -459,6 +461,8 @@
|
||||
break
|
||||
|
||||
if(!reagent_id) //If they don't need any of that they're probably cured!
|
||||
if(C.maxHealth - C.health < heal_threshold)
|
||||
to_chat(src, "<span class='notice'>[C] is healthy! Your programming prevents you from injecting anyone without at least [heal_threshold] damage of any one type ([heal_threshold + 15] for oxygen damage.)</span>")
|
||||
var/list/messagevoice = list("All patched up!" = 'sound/voice/mpatchedup.ogg',"An apple a day keeps me away." = 'sound/voice/mapple.ogg',"Feel better soon!" = 'sound/voice/mfeelbetter.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
..()
|
||||
if(open)
|
||||
on = FALSE
|
||||
else if(istype(I,/obj/item/weapon/stock_parts/cell) && open && !cell)
|
||||
else if(istype(I, /obj/item/weapon/stock_parts/cell) && open && !cell)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
var/obj/item/weapon/stock_parts/cell/C = I
|
||||
@@ -343,7 +343,7 @@
|
||||
return
|
||||
|
||||
var/obj/structure/closet/crate/CRATE
|
||||
if(istype(AM,/obj/structure/closet/crate))
|
||||
if(istype(AM, /obj/structure/closet/crate))
|
||||
CRATE = AM
|
||||
else
|
||||
if(!wires.is_cut(WIRE_LOADCHECK))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
desc = "It's Officer Beep O'sky's smaller, just-as aggressive cousin, Pipsqueak."
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/beepsky/jr/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
resize = 0.8
|
||||
update_transform()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
radio_channel = "AI Private"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = "secbot[on]"
|
||||
spawn(3)
|
||||
var/datum/job/detective/J = new/datum/job/detective
|
||||
@@ -191,7 +191,7 @@ Auto Patrol: []"},
|
||||
icon_state = "secbot[on]"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
if(istype(Proj , /obj/item/projectile/beam)||istype(Proj, /obj/item/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(!Proj.nodamage && Proj.damage < src.health)
|
||||
retaliate(Proj.firer)
|
||||
|
||||
@@ -383,6 +383,7 @@
|
||||
/datum/action/innate/seek_prey
|
||||
name = "Seek the Harvest"
|
||||
desc = "None can hide from Nar'Sie, activate to track a survivor attempting to flee the red harvest!"
|
||||
icon_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
background_icon_state = "bg_demon"
|
||||
buttontooltipstyle = "cult"
|
||||
button_icon_state = "cult_mark"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
//If someone can do this in a neater way, be my guest-Kor
|
||||
|
||||
//This has to be seperate from the Away Mission corpses, because New() doesn't work for those, and initialize() doesn't work for these.
|
||||
//This has to be separate from the Away Mission corpses, because New() doesn't work for those, and initialize() doesn't work for these.
|
||||
|
||||
//To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now).
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
verb_yell = "flutters intensely"
|
||||
|
||||
/mob/living/simple_animal/butterfly/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
|
||||
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
|
||||
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
else
|
||||
visible_message("<span class='notice'>[src] avoids getting crushed.</span>")
|
||||
else
|
||||
if(istype(AM,/obj/structure))
|
||||
if(istype(AM, /obj/structure))
|
||||
if(prob(squish_chance))
|
||||
AM.visible_message("<span class='notice'>[src] was crushed under [AM].</span>")
|
||||
adjustBruteLoss(1)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
break
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
regenerate_icons()
|
||||
|
||||
|
||||
@@ -178,13 +178,13 @@
|
||||
to_chat(usr, "<span class='warning'>\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s back!</span>")
|
||||
return
|
||||
|
||||
if(istype(item_to_add,/obj/item/weapon/grenade/plastic)) // last thing he ever wears, I guess
|
||||
if(istype(item_to_add, /obj/item/weapon/grenade/plastic)) // last thing he ever wears, I guess
|
||||
item_to_add.afterattack(src,usr,1)
|
||||
return
|
||||
|
||||
//The objects that corgis can wear on their backs.
|
||||
var/allowed = FALSE
|
||||
if(ispath(item_to_add.dog_fashion,/datum/dog_fashion/back))
|
||||
if(ispath(item_to_add.dog_fashion, /datum/dog_fashion/back))
|
||||
allowed = TRUE
|
||||
|
||||
if(!allowed)
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/proc/place_on_head(obj/item/item_to_add, mob/user)
|
||||
|
||||
if(istype(item_to_add,/obj/item/weapon/grenade/plastic)) // last thing he ever wears, I guess
|
||||
if(istype(item_to_add, /obj/item/weapon/grenade/plastic)) // last thing he ever wears, I guess
|
||||
item_to_add.afterattack(src,user,1)
|
||||
return
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
var/saved_head //path
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
//parent call must happen first to ensure IAN
|
||||
//is not in nullspace when child puppies spawn
|
||||
Read_Memory()
|
||||
|
||||
@@ -196,5 +196,6 @@
|
||||
|
||||
/datum/action/generic/drone/select_filter
|
||||
name = "Select Vision Filter"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon_state = "drone_vision"
|
||||
procname = /mob/living/simple_animal/drone/verb/toggle_statics
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
devourable = TRUE
|
||||
obj_damage = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
var/static/list/edibles = typecacheof(list(/mob/living/simple_animal/butterfly,/mob/living/simple_animal/cockroach)) //list of atoms, however turfs won't affect AI, but will affect consumption.
|
||||
var/static/list/edibles = typecacheof(list(/mob/living/simple_animal/butterfly, /mob/living/simple_animal/cockroach)) //list of atoms, however turfs won't affect AI, but will affect consumption.
|
||||
|
||||
/mob/living/simple_animal/hostile/lizard/CanAttack(atom/the_target)//Can we actually attack a possible target?
|
||||
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
|
||||
|
||||
@@ -602,7 +602,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
/obj/item/weapon/guardiancreator/tech/choose/dextrous
|
||||
possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support")
|
||||
|
||||
/obj/item/weapon/paper/guardian
|
||||
/obj/item/weapon/paper/guides/antag/guardian
|
||||
name = "Holoparasite Guide"
|
||||
icon_state = "alienpaper_words"
|
||||
info = {"<b>A list of Holoparasite Types</b><br>
|
||||
@@ -626,10 +626,10 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
<br>
|
||||
"}
|
||||
|
||||
/obj/item/weapon/paper/guardian/update_icon()
|
||||
/obj/item/weapon/paper/guides/antag/guardian/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/guardian/wizard
|
||||
/obj/item/weapon/paper/guides/antag/guardian/wizard
|
||||
name = "Guardian Guide"
|
||||
info = {"<b>A list of Guardian Types</b><br>
|
||||
|
||||
@@ -661,7 +661,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
/obj/item/weapon/storage/box/syndie_kit/guardian/Initialize()
|
||||
..()
|
||||
new /obj/item/weapon/guardiancreator/tech/choose/traitor(src)
|
||||
new /obj/item/weapon/paper/guardian(src)
|
||||
new /obj/item/weapon/paper/guides/antag/guardian(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/guardiancreator/carp
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
|
||||
/obj/item/queen_bee/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I,/obj/item/weapon/reagent_containers/syringe))
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = I
|
||||
if(S.reagents.has_reagent("royal_bee_jelly")) //checked twice, because I really don't want royal bee jelly to be duped
|
||||
if(S.reagents.has_reagent("royal_bee_jelly",5))
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
//Lets the wizard summon his art to fight for him
|
||||
/datum/action/boss/wizard_summon_minions
|
||||
name = "Summon Minions"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "art_summon"
|
||||
usage_probability = 40
|
||||
boss_cost = 30
|
||||
@@ -54,6 +55,7 @@
|
||||
//Hitting the wizard himself destroys all decoys
|
||||
/datum/action/boss/wizard_mimic
|
||||
name = "Craft Mimicry"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "mimic_summon"
|
||||
usage_probability = 30
|
||||
boss_cost = 40
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(!busy && prob(30)) //30% chance to stop wandering and do something
|
||||
//first, check for potential food nearby to cocoon
|
||||
for(var/mob/living/C in can_see)
|
||||
if(C.stat && !istype(C,/mob/living/simple_animal/hostile/poison/giant_spider) && !C.anchored)
|
||||
if(C.stat && !istype(C, /mob/living/simple_animal/hostile/poison/giant_spider) && !C.anchored)
|
||||
cocoon_target = C
|
||||
busy = MOVING_TO_TARGET
|
||||
Goto(C, move_to_delay)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
loot = list(/obj/effect/decal/cleanable/robot_debris)
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
deathmessage = "[src] blows apart!"
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/range
|
||||
@@ -63,4 +63,4 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/death(gibbed)
|
||||
do_sparks(3, TRUE, src)
|
||||
..(1)
|
||||
..(1)
|
||||
|
||||
@@ -585,3 +585,249 @@
|
||||
#undef MOOK_ATTACK_ACTIVE
|
||||
#undef MOOK_ATTACK_RECOVERY
|
||||
#undef ATTACK_INTERMISSION_TIME
|
||||
|
||||
////Jungle Seedling////
|
||||
|
||||
#define SEEDLING_STATE_NEUTRAL 0
|
||||
#define SEEDLING_STATE_WARMUP 1
|
||||
#define SEEDLING_STATE_ACTIVE 2
|
||||
#define SEEDLING_STATE_RECOVERY 3
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling
|
||||
name = "seedling"
|
||||
desc = "This oversized, predatory flower conceals what can only be described as an organic energy cannon, and it will not die until its hidden vital organs are sliced out. \
|
||||
The concentrated streams of energy it sometimes produces require its full attention, attacking it during this time will prevent it from finishing its attack."
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
icon = 'icons/mob/jungle/arachnid.dmi'
|
||||
icon_state = "seedling"
|
||||
icon_living = "seedling"
|
||||
icon_dead = "seedling_dead"
|
||||
pixel_x = -16
|
||||
pixel_y = -14
|
||||
minimum_distance = 3
|
||||
move_to_delay = 20
|
||||
vision_range = 9
|
||||
aggro_vision_range = 15
|
||||
ranged = TRUE
|
||||
ranged_cooldown_time = 10
|
||||
projectiletype = /obj/item/projectile/seedling
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
robust_searching = TRUE
|
||||
stat_attack = UNCONSCIOUS
|
||||
anchored = TRUE
|
||||
var/combatant_state = SEEDLING_STATE_NEUTRAL
|
||||
var/obj/seedling_weakpoint/weak_point
|
||||
var/mob/living/beam_debuff_target
|
||||
var/solar_beam_identifier = 0
|
||||
|
||||
/obj/item/projectile/seedling
|
||||
name = "solar energy"
|
||||
icon_state = "seedling"
|
||||
damage = 10
|
||||
damage_type = BURN
|
||||
light_range = 2
|
||||
flag = "energy"
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
||||
nondirectional_sprite = TRUE
|
||||
|
||||
/obj/item/projectile/seedling/Collide(atom/A)//Stops seedlings from destroying other jungle mobs through FF
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if("jungle" in L.faction)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/effect/temp_visual/solarbeam_killsat
|
||||
name = "beam of solar energy"
|
||||
icon_state = "solar_beam"
|
||||
icon = 'icons/effects/beam.dmi'
|
||||
layer = LIGHTING_LAYER
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
|
||||
/datum/status_effect/seedling_beam_indicator
|
||||
id = "seedling beam indicator"
|
||||
duration = 30
|
||||
status_type = STATUS_EFFECT_MULTIPLE
|
||||
alert_type = null
|
||||
tick_interval = 1
|
||||
var/obj/screen/seedling/seedling_screen_object
|
||||
var/atom/target
|
||||
|
||||
|
||||
/datum/status_effect/seedling_beam_indicator/on_creation(mob/living/new_owner, target_plant)
|
||||
. = ..()
|
||||
if(.)
|
||||
target = target_plant
|
||||
tick()
|
||||
|
||||
/datum/status_effect/seedling_beam_indicator/on_apply()
|
||||
if(owner.client)
|
||||
seedling_screen_object = new /obj/screen/seedling()
|
||||
owner.client.screen += seedling_screen_object
|
||||
tick()
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/seedling_beam_indicator/Destroy()
|
||||
if(owner)
|
||||
if(owner.client)
|
||||
owner.client.screen -= seedling_screen_object
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/seedling_beam_indicator/tick()
|
||||
var/target_angle = Get_Angle(owner, target)
|
||||
var/matrix/final = matrix()
|
||||
final.Turn(target_angle)
|
||||
seedling_screen_object.transform = final
|
||||
|
||||
/obj/screen/seedling
|
||||
icon = 'icons/mob/jungle/arachnid.dmi'
|
||||
icon_state = "seedling_beam_indicator"
|
||||
screen_loc = "CENTER:-16,CENTER:-16"
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/Goto()
|
||||
if(combatant_state != SEEDLING_STATE_NEUTRAL)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/AttackingTarget()
|
||||
if(isliving(target))
|
||||
if(ranged_cooldown <= world.time && combatant_state == SEEDLING_STATE_NEUTRAL)
|
||||
OpenFire(target)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/OpenFire()
|
||||
WarmupAttack()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/WarmupAttack()
|
||||
if(combatant_state == SEEDLING_STATE_NEUTRAL)
|
||||
combatant_state = SEEDLING_STATE_WARMUP
|
||||
walk(src,0)
|
||||
update_icons()
|
||||
var/target_dist = get_dist(src,target)
|
||||
var/living_target_check = isliving(target)
|
||||
if(living_target_check)
|
||||
if(target_dist > 7)//Offscreen check
|
||||
SolarBeamStartup(target)
|
||||
return
|
||||
if(get_dist(src,target) >= 4 && prob(40))
|
||||
SolarBeamStartup(target)
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/Volley), 5)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/SolarBeamStartup(mob/living/living_target)//It's more like requiem than final spark
|
||||
if(combatant_state == SEEDLING_STATE_WARMUP && target)
|
||||
combatant_state = SEEDLING_STATE_ACTIVE
|
||||
living_target.apply_status_effect(/datum/status_effect/seedling_beam_indicator, src)
|
||||
beam_debuff_target = living_target
|
||||
playsound(src,'sound/effects/seedling_chargeup.ogg', 100, 0)
|
||||
if(get_dist(src,living_target) > 7)
|
||||
playsound(living_target,'sound/effects/seedling_chargeup.ogg', 100, 0)
|
||||
solar_beam_identifier = world.time
|
||||
addtimer(CALLBACK(src, .proc/Beamu, living_target, solar_beam_identifier), 35)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/Beamu(mob/living/living_target, beam_id = 0)
|
||||
if(combatant_state == SEEDLING_STATE_ACTIVE && living_target && beam_id == solar_beam_identifier)
|
||||
if(living_target.z == z)
|
||||
update_icons()
|
||||
var/obj/effect/temp_visual/solarbeam_killsat/S = new (get_turf(src))
|
||||
var/matrix/starting = matrix()
|
||||
starting.Scale(1,32)
|
||||
starting.Translate(0,520)
|
||||
S.transform = starting
|
||||
var/obj/effect/temp_visual/solarbeam_killsat/K = new (get_turf(living_target))
|
||||
var/matrix/final = matrix()
|
||||
final.Scale(1,32)
|
||||
final.Translate(0,512)
|
||||
K.transform = final
|
||||
living_target.adjustFireLoss(30)
|
||||
living_target.adjust_fire_stacks(0.2)//Just here for the showmanship
|
||||
living_target.IgniteMob()
|
||||
playsound(living_target,'sound/weapons/sear.ogg', 50, 1)
|
||||
addtimer(CALLBACK(src, .proc/AttackRecovery), 5)
|
||||
return
|
||||
AttackRecovery()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/Volley()
|
||||
if(combatant_state == SEEDLING_STATE_WARMUP && target)
|
||||
combatant_state = SEEDLING_STATE_ACTIVE
|
||||
update_icons()
|
||||
var/datum/callback/cb = CALLBACK(src, .proc/InaccurateShot)
|
||||
for(var/i in 1 to 13)
|
||||
addtimer(cb, i)
|
||||
addtimer(CALLBACK(src, .proc/AttackRecovery), 14)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/InaccurateShot()
|
||||
if(!QDELETED(target) && combatant_state == SEEDLING_STATE_ACTIVE && !stat)
|
||||
if(get_dist(src,target) <= 3)//If they're close enough just aim straight at them so we don't miss at point blank ranges
|
||||
Shoot(target)
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
var/obj/item/projectile/seedling/readied_shot = new /obj/item/projectile/seedling(our_turf)
|
||||
readied_shot.current = our_turf
|
||||
readied_shot.starting = our_turf
|
||||
readied_shot.firer = src
|
||||
readied_shot.original = target
|
||||
readied_shot.yo = target.y - our_turf.y + rand(-1,1)
|
||||
readied_shot.xo = target.x - our_turf.x + rand(-1,1)
|
||||
readied_shot.fire()
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/AttackRecovery()
|
||||
if(combatant_state == SEEDLING_STATE_ACTIVE)
|
||||
combatant_state = SEEDLING_STATE_RECOVERY
|
||||
update_icons()
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
if(target)
|
||||
face_atom(target)
|
||||
addtimer(CALLBACK(src, .proc/ResetNeutral), 10)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/proc/ResetNeutral()
|
||||
combatant_state = SEEDLING_STATE_NEUTRAL
|
||||
if(target && !stat)
|
||||
update_icons()
|
||||
Goto(target, move_to_delay, minimum_distance)
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/adjustHealth()
|
||||
. = ..()
|
||||
if(combatant_state == SEEDLING_STATE_ACTIVE && beam_debuff_target)
|
||||
beam_debuff_target.remove_status_effect(/datum/status_effect/seedling_beam_indicator)
|
||||
beam_debuff_target = null
|
||||
solar_beam_identifier = 0
|
||||
AttackRecovery()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/update_icons()
|
||||
. = ..()
|
||||
if(!stat)
|
||||
switch(combatant_state)
|
||||
if(SEEDLING_STATE_NEUTRAL)
|
||||
icon_state = "seedling"
|
||||
if(SEEDLING_STATE_WARMUP)
|
||||
icon_state = "seedling_charging"
|
||||
if(SEEDLING_STATE_ACTIVE)
|
||||
icon_state = "seedling_fire"
|
||||
if(SEEDLING_STATE_RECOVERY)
|
||||
icon_state = "seedling"
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/GiveTarget()
|
||||
if(target)
|
||||
if(combatant_state == SEEDLING_STATE_WARMUP || combatant_state == SEEDLING_STATE_ACTIVE)//So it doesn't 180 and blast you in the face while it's firing at someone else
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/seedling/LoseTarget()
|
||||
if(combatant_state == SEEDLING_STATE_WARMUP || combatant_state == SEEDLING_STATE_ACTIVE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
#undef SEEDLING_STATE_NEUTRAL
|
||||
#undef SEEDLING_STATE_WARMUP
|
||||
#undef SEEDLING_STATE_ACTIVE
|
||||
#undef SEEDLING_STATE_RECOVERY
|
||||
@@ -78,7 +78,7 @@ Difficulty: Very Hard
|
||||
double_spiral()
|
||||
else
|
||||
visible_message("<span class='colossus'>\"<b>Judgement.</b>\"</span>")
|
||||
INVOKE_ASYNC(src, .proc/spiral_shoot, rand(0, 1))
|
||||
INVOKE_ASYNC(src, .proc/spiral_shoot, pick(TRUE, FALSE))
|
||||
|
||||
else if(prob(20))
|
||||
ranged_cooldown = world.time + 30
|
||||
@@ -142,46 +142,11 @@ Difficulty: Very Hard
|
||||
|
||||
sleep(10)
|
||||
INVOKE_ASYNC(src, .proc/spiral_shoot)
|
||||
INVOKE_ASYNC(src, .proc/spiral_shoot, 1)
|
||||
INVOKE_ASYNC(src, .proc/spiral_shoot, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/spiral_shoot(negative = 0, counter_start = 1)
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/spiral_shoot(negative = FALSE, counter_start = 8)
|
||||
var/counter = counter_start
|
||||
var/turf/marker
|
||||
for(var/i in 1 to 80)
|
||||
switch(counter)
|
||||
if(1)
|
||||
marker = locate(x, y - 2, z)
|
||||
if(2)
|
||||
marker = locate(x - 1, y - 2, z)
|
||||
if(3)
|
||||
marker = locate(x - 2, y - 2, z)
|
||||
if(4)
|
||||
marker = locate(x - 2, y - 1, z)
|
||||
if(5)
|
||||
marker = locate(x - 2, y, z)
|
||||
if(6)
|
||||
marker = locate(x - 2, y + 1, z)
|
||||
if(7)
|
||||
marker = locate(x - 2, y + 2, z)
|
||||
if(8)
|
||||
marker = locate(x - 1, y + 2, z)
|
||||
if(9)
|
||||
marker = locate(x, y + 2, z)
|
||||
if(10)
|
||||
marker = locate(x + 1, y + 2, z)
|
||||
if(11)
|
||||
marker = locate(x + 2, y + 2, z)
|
||||
if(12)
|
||||
marker = locate(x + 2, y + 1, z)
|
||||
if(13)
|
||||
marker = locate(x + 2, y, z)
|
||||
if(14)
|
||||
marker = locate(x + 2, y - 1, z)
|
||||
if(15)
|
||||
marker = locate(x + 2, y - 2, z)
|
||||
if(16)
|
||||
marker = locate(x + 1, y - 2, z)
|
||||
|
||||
if(negative)
|
||||
counter--
|
||||
else
|
||||
@@ -190,25 +155,25 @@ Difficulty: Very Hard
|
||||
counter = 1
|
||||
if(counter < 1)
|
||||
counter = 16
|
||||
shoot_projectile(marker)
|
||||
shoot_projectile(null, counter * 22.5)
|
||||
playsound(get_turf(src), 'sound/magic/clockwork/invoke_general.ogg', 20, 1)
|
||||
sleep(1)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/shoot_projectile(turf/marker)
|
||||
if(!marker || marker == loc)
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/shoot_projectile(turf/marker, set_angle)
|
||||
if(!isnum(set_angle) && (!marker || marker == loc))
|
||||
return
|
||||
var/turf/startloc = get_turf(src)
|
||||
var/obj/item/projectile/P = new /obj/item/projectile/colossus(startloc)
|
||||
P.current = startloc
|
||||
P.starting = startloc
|
||||
P.firer = src
|
||||
P.yo = marker.y - startloc.y
|
||||
P.xo = marker.x - startloc.x
|
||||
if(marker)
|
||||
P.yo = marker.y - startloc.y
|
||||
P.xo = marker.x - startloc.x
|
||||
P.original = marker
|
||||
if(target)
|
||||
P.original = target
|
||||
else
|
||||
P.original = marker
|
||||
P.fire()
|
||||
P.fire(set_angle)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/random_shots()
|
||||
var/turf/U = get_turf(src)
|
||||
@@ -217,17 +182,21 @@ Difficulty: Very Hard
|
||||
if(prob(5))
|
||||
shoot_projectile(T)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/blast()
|
||||
playsound(get_turf(src), 'sound/magic/clockwork/invoke_general.ogg', 200, 1, 2)
|
||||
var/turf/T = get_turf(target)
|
||||
newtonian_move(get_dir(T, targets_from))
|
||||
for(var/turf/turf in range(1, T))
|
||||
shoot_projectile(turf)
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/blast(set_angle)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 200, 1, 2)
|
||||
newtonian_move(get_dir(target_turf, src))
|
||||
var/angle_to_target = Get_Angle(src, target_turf)
|
||||
if(isnum(set_angle))
|
||||
angle_to_target = set_angle
|
||||
var/static/list/colossus_shotgun_shot_angles = list(12.5, 7.5, 2.5, -2.5, -7.5, -12.5)
|
||||
for(var/i in colossus_shotgun_shot_angles)
|
||||
shoot_projectile(null, angle_to_target + i)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/dir_shots(list/dirs)
|
||||
if(!islist(dirs))
|
||||
dirs = GLOB.alldirs.Copy()
|
||||
playsound(get_turf(src), 'sound/magic/clockwork/invoke_general.ogg', 200, 1, 2)
|
||||
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 200, 1, 2)
|
||||
for(var/d in dirs)
|
||||
var/turf/E = get_step(src, d)
|
||||
shoot_projectile(E)
|
||||
@@ -235,9 +204,9 @@ Difficulty: Very Hard
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/telegraph()
|
||||
for(var/mob/M in range(10,src))
|
||||
if(M.client)
|
||||
flash_color(M.client, rgb(200, 0, 0), 1)
|
||||
flash_color(M.client, "#C80000", 1)
|
||||
shake_camera(M, 4, 3)
|
||||
playsound(get_turf(src),'sound/magic/clockwork/narsie_attack.ogg', 200, 1)
|
||||
playsound(src, 'sound/magic/clockwork/narsie_attack.ogg', 200, 1)
|
||||
|
||||
|
||||
|
||||
@@ -785,6 +754,7 @@ Difficulty: Very Hard
|
||||
range = -1
|
||||
include_user = 1
|
||||
selection_type = "view"
|
||||
action_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
action_icon_state = "exit_possession"
|
||||
sound = null
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ Difficulty: Medium
|
||||
animate(src, pixel_z = 0, time = duration)
|
||||
|
||||
/obj/effect/temp_visual/target
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon = 'icons/mob/actions/actions_items.dmi'
|
||||
icon_state = "sniper_zoom"
|
||||
layer = BELOW_MOB_LAYER
|
||||
light_range = 2
|
||||
|
||||
@@ -260,9 +260,9 @@
|
||||
if(prob(20))
|
||||
suit = pickweight(list(/obj/item/clothing/suit/hooded/explorer = 18, /obj/item/clothing/suit/hooded/cloak/goliath = 2))
|
||||
if(prob(30))
|
||||
r_pocket = pickweight(list(/obj/item/stack/marker_beacon = 20, /obj/item/stack/spacecash/c1000 = 7,/obj/item/weapon/reagent_containers/hypospray/medipen/survival = 2, /obj/item/borg/upgrade/modkit/damage = 1 ))
|
||||
r_pocket = pickweight(list(/obj/item/stack/marker_beacon = 20, /obj/item/stack/spacecash/c1000 = 7, /obj/item/weapon/reagent_containers/hypospray/medipen/survival = 2, /obj/item/borg/upgrade/modkit/damage = 1 ))
|
||||
if(prob(10))
|
||||
l_pocket = pickweight(list(/obj/item/stack/spacecash/c1000 = 7,/obj/item/weapon/reagent_containers/hypospray/medipen/survival = 2, /obj/item/borg/upgrade/modkit/cooldown = 1 ))
|
||||
l_pocket = pickweight(list(/obj/item/stack/spacecash/c1000 = 7, /obj/item/weapon/reagent_containers/hypospray/medipen/survival = 2, /obj/item/borg/upgrade/modkit/cooldown = 1 ))
|
||||
if("Ashwalker")
|
||||
mob_species = /datum/species/lizard/ashwalker
|
||||
uniform = /obj/item/clothing/under/gladiator/ash_walker
|
||||
@@ -273,7 +273,7 @@
|
||||
suit = /obj/item/clothing/suit/armor/bone
|
||||
gloves = /obj/item/clothing/gloves/bracer
|
||||
if(prob(5))
|
||||
back = pickweight(list(/obj/item/weapon/twohanded/bonespear = 3,/obj/item/weapon/twohanded/fireaxe/boneaxe = 2))
|
||||
back = pickweight(list(/obj/item/weapon/twohanded/bonespear = 3, /obj/item/weapon/twohanded/fireaxe/boneaxe = 2))
|
||||
if(prob(10))
|
||||
belt = /obj/item/weapon/storage/belt/mining/primitive
|
||||
if(prob(30))
|
||||
@@ -286,7 +286,7 @@
|
||||
belt = null
|
||||
backpack_contents = list()
|
||||
if(prob(70))
|
||||
backpack_contents += pick(list(/obj/item/weapon/stamp/clown = 1, /obj/item/weapon/reagent_containers/spray/waterflower = 1,/obj/item/weapon/reagent_containers/food/snacks/grown/banana = 1, /obj/item/device/megaphone/clown = 1,/obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter = 1,/obj/item/weapon/pneumatic_cannon/pie = 1))
|
||||
backpack_contents += pick(list(/obj/item/weapon/stamp/clown = 1, /obj/item/weapon/reagent_containers/spray/waterflower = 1, /obj/item/weapon/reagent_containers/food/snacks/grown/banana = 1, /obj/item/device/megaphone/clown = 1, /obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter = 1, /obj/item/weapon/pneumatic_cannon/pie = 1))
|
||||
if(prob(30))
|
||||
backpack_contents += list(/obj/item/stack/sheet/mineral/bananium = pickweight(list( 1 = 3, 2 = 2, 3 = 1)))
|
||||
if(prob(10))
|
||||
@@ -296,9 +296,9 @@
|
||||
if("Golem")
|
||||
mob_species = pick(list(/datum/species/golem/adamantine, /datum/species/golem/plasma, /datum/species/golem/diamond, /datum/species/golem/gold, /datum/species/golem/silver, /datum/species/golem/plasteel, /datum/species/golem/titanium, /datum/species/golem/plastitanium))
|
||||
if(prob(30))
|
||||
glasses = pickweight(list(/obj/item/clothing/glasses/meson = 2, /obj/item/clothing/glasses/hud/health = 2,/obj/item/clothing/glasses/hud/diagnostic =2, /obj/item/clothing/glasses/science = 2, /obj/item/clothing/glasses/welding = 2, /obj/item/clothing/glasses/night = 1))
|
||||
glasses = pickweight(list(/obj/item/clothing/glasses/meson = 2, /obj/item/clothing/glasses/hud/health = 2, /obj/item/clothing/glasses/hud/diagnostic =2, /obj/item/clothing/glasses/science = 2, /obj/item/clothing/glasses/welding = 2, /obj/item/clothing/glasses/night = 1))
|
||||
if(prob(10))
|
||||
belt = pick(list(/obj/item/weapon/storage/belt/mining/vendor,/obj/item/weapon/storage/belt/utility/full))
|
||||
belt = pick(list(/obj/item/weapon/storage/belt/mining/vendor, /obj/item/weapon/storage/belt/utility/full))
|
||||
if(prob(50))
|
||||
neck = /obj/item/weapon/bedsheet/rd/royal_cape
|
||||
if(prob(10))
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_dead = "stickdog_dead"
|
||||
|
||||
/mob/living/simple_animal/hostile/stickman/Initialize(mapload, var/wizard_summoned)
|
||||
..()
|
||||
. = ..()
|
||||
new /obj/effect/temp_visual/paper_scatter(src)
|
||||
summoned_by_wizard = wizard_summoned
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!ears)
|
||||
var/headset = pick(/obj/item/device/radio/headset/headset_sec, \
|
||||
/obj/item/device/radio/headset/headset_eng, \
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
//Mobs with objects
|
||||
/mob/living/simple_animal/parrot/attackby(obj/item/O, mob/living/user, params)
|
||||
if(!stat && !client && !istype(O, /obj/item/stack/medical) && !istype(O,/obj/item/weapon/reagent_containers/food/snacks/cracker))
|
||||
if(!stat && !client && !istype(O, /obj/item/stack/medical) && !istype(O, /obj/item/weapon/reagent_containers/food/snacks/cracker))
|
||||
if(O.force)
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
@@ -336,7 +336,7 @@
|
||||
parrot_state |= PARROT_FLEE
|
||||
icon_state = "parrot_fly"
|
||||
drop_held_item(0)
|
||||
else if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/cracker)) //Poly wants a cracker.
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cracker)) //Poly wants a cracker.
|
||||
qdel(O)
|
||||
user.drop_item()
|
||||
if(health < maxHealth)
|
||||
@@ -764,7 +764,7 @@
|
||||
|
||||
|
||||
//parrots will eat crackers instead of dropping them
|
||||
if(istype(held_item,/obj/item/weapon/reagent_containers/food/snacks/cracker) && (drop_gently))
|
||||
if(istype(held_item, /obj/item/weapon/reagent_containers/food/snacks/cracker) && (drop_gently))
|
||||
qdel(held_item)
|
||||
held_item = null
|
||||
if(health < maxHealth)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
update_canmove()
|
||||
|
||||
if(SSticker && SSticker.mode)
|
||||
if(SSticker.mode)
|
||||
SSticker.mode.check_win()
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
/datum/action/innate/slime
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
var/needs_growth = NO_GROWTH_NEEDED
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user))
|
||||
return 1
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plasma) && !stat) //Let's you feed slimes plasma.
|
||||
if(istype(W, /obj/item/stack/sheet/mineral/plasma) && !stat) //Let's you feed slimes plasma.
|
||||
if (user in Friends)
|
||||
++Friends[user]
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(client)
|
||||
client.click_intercept = null
|
||||
|
||||
client.view = world.view // Resets the client.view in case it was changed.
|
||||
client.change_view(world.view) // Resets the client.view in case it was changed.
|
||||
|
||||
if(!GLOB.individual_log_list[ckey])
|
||||
GLOB.individual_log_list[ckey] = logging
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
qdel(hud_used)
|
||||
if(mind && mind.current == src)
|
||||
spellremove(src)
|
||||
for(var/infection in viruses)
|
||||
qdel(infection)
|
||||
QDEL_LIST(viruses)
|
||||
for(var/cc in client_colours)
|
||||
qdel(cc)
|
||||
client_colours = null
|
||||
@@ -387,7 +386,7 @@
|
||||
set category = "Object"
|
||||
set src = usr
|
||||
|
||||
if(istype(loc,/obj/mecha))
|
||||
if(istype(loc, /obj/mecha))
|
||||
return
|
||||
|
||||
if(incapacitated())
|
||||
@@ -869,7 +868,7 @@
|
||||
var/search_pda = 1
|
||||
|
||||
for(var/A in searching)
|
||||
if( search_id && istype(A,/obj/item/weapon/card/id) )
|
||||
if( search_id && istype(A, /obj/item/weapon/card/id) )
|
||||
var/obj/item/weapon/card/id/ID = A
|
||||
if(ID.registered_name == oldname)
|
||||
ID.registered_name = newname
|
||||
@@ -878,7 +877,7 @@
|
||||
break
|
||||
search_id = 0
|
||||
|
||||
else if( search_pda && istype(A,/obj/item/device/pda) )
|
||||
else if( search_pda && istype(A, /obj/item/device/pda) )
|
||||
var/obj/item/device/pda/PDA = A
|
||||
if(PDA.owner == oldname)
|
||||
PDA.owner = newname
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
//List of active diseases
|
||||
|
||||
var/list/viruses = list() // replaces var/datum/disease/virus
|
||||
var/list/viruses = list() // list of all diseases in a mob
|
||||
var/list/resistances = list()
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
@@ -141,3 +141,5 @@
|
||||
|
||||
var/list/progressbars = null //for stacking do_after bars
|
||||
var/list/can_ride_typecache = list()
|
||||
|
||||
var/list/mousemove_intercept_objects
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
This is a basic explanation of how say() works. Read this if you don't understand something.
|
||||
|
||||
The basic "flow" of say() is that a speaker says a message, which is heard by hearers. What appears on screen
|
||||
is constructed by each hearer seperately, and not by the speaker.
|
||||
is constructed by each hearer separately, and not by the speaker.
|
||||
|
||||
This rewrite was needed, but is far from perfect. Report any bugs you come across and feel free to fix things up.
|
||||
Radio code, while very much related to saycode, is not something I wanted to touch, so the code related to that may be messy.
|
||||
@@ -122,7 +122,7 @@ global procs
|
||||
Called right before handle_inherent_channels()
|
||||
|
||||
can_speak_vocal(message)
|
||||
Checks if the mob can vocalize their message. This is seperate so, for example, muzzles don't block
|
||||
Checks if the mob can vocalize their message. This is separate so, for example, muzzles don't block
|
||||
hivemind chat.
|
||||
Called right after handle_inherent_channels()
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
if (tr_flags & TR_KEEPVIRUS)
|
||||
O.viruses = viruses
|
||||
viruses = list()
|
||||
for(var/datum/disease/D in O.viruses)
|
||||
for(var/thing in O.viruses)
|
||||
var/datum/disease/D = thing
|
||||
D.affected_mob = O
|
||||
D.holder = O
|
||||
|
||||
//keep damage?
|
||||
if (tr_flags & TR_KEEPDAMAGE)
|
||||
@@ -219,9 +219,9 @@
|
||||
if (tr_flags & TR_KEEPVIRUS)
|
||||
O.viruses = viruses
|
||||
viruses = list()
|
||||
for(var/datum/disease/D in O.viruses)
|
||||
for(var/thing in O.viruses)
|
||||
var/datum/disease/D = thing
|
||||
D.affected_mob = O
|
||||
D.holder = O
|
||||
O.med_hud_set_status()
|
||||
|
||||
//keep damage?
|
||||
|
||||
Reference in New Issue
Block a user