Merge remote-tracking branch 'upstream/dev' into attack-cleanup2

Conflicts:
	code/modules/mob/living/simple_animal/friendly/spiderbot.dm
	code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
HarpyEagle
2015-10-05 19:20:33 -04:00
189 changed files with 8211 additions and 8024 deletions
+10 -3
View File
@@ -141,6 +141,8 @@ Works together with spawning an observer, noted above.
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
for(var/mob/living/silicon/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
return 1
/mob/proc/ghostize(var/can_reenter_corpse = 1)
@@ -215,7 +217,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
mind.current.key = key
mind.current.aghosted = null
mind.current.teleop = null
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
@@ -460,6 +462,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in config.admin_levels))
src << "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>"
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
@@ -475,8 +482,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
if(!v.welded && v.z == T.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
+6 -6
View File
@@ -78,13 +78,13 @@ var/list/slot_equipment_priority = list( \
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
newitem.loc = src.back
newitem.forceMove(src.back)
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
newitem.loc = S
newitem.forceMove(S)
return 1
return 0
@@ -106,7 +106,7 @@ var/list/slot_equipment_priority = list( \
if(lying) return 0
if(!istype(W)) return 0
if(!l_hand)
W.loc = src //TODO: move to equipped?
W.forceMove(src) //TODO: move to equipped?
l_hand = W
W.layer = 20 //TODO: move to equipped?
// l_hand.screen_loc = ui_lhand
@@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \
if(lying) return 0
if(!istype(W)) return 0
if(!r_hand)
W.loc = src
W.forceMove(src)
r_hand = W
W.layer = 20
// r_hand.screen_loc = ui_rhand
@@ -157,7 +157,7 @@ var/list/slot_equipment_priority = list( \
update_inv_r_hand()
return 1
else
W.loc = get_turf(src)
W.forceMove(get_turf(src))
W.layer = initial(W.layer)
W.dropped()
return 0
@@ -250,7 +250,7 @@ var/list/slot_equipment_priority = list( \
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.loc = src.loc
I.forceMove(src.loc)
I.dropped(src)
return 1
+5
View File
@@ -70,6 +70,11 @@
else
icon_state = "secbot[on]"
if(on)
set_light(2, 1, "#FF6A00")
else
set_light(0)
/mob/living/bot/secbot/attack_hand(var/mob/user)
user.set_machine(src)
var/dat
+1 -1
View File
@@ -262,7 +262,7 @@
var/show_ssd
var/mob/living/carbon/human/H = src
if(istype(H)) show_ssd = H.species.show_ssd
if(show_ssd && !client && !aghosted)
if(show_ssd && !client && !teleop)
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping)
+6 -10
View File
@@ -238,7 +238,7 @@
// Other incidentals.
if(istype(suit) && suit.has_sensor == 1)
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors.</A>"
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors</A>"
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
@@ -701,21 +701,21 @@
/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain")
if(!species.has_organ[brain_tag])
return 0
var/obj/item/organ/affecting = internal_organs_by_name[brain_tag]
target_zone = check_zone(target_zone)
if(!affecting || affecting.parent_organ != target_zone)
return 0
//if the parent organ is significantly larger than the brain organ, then hitting it is not guaranteed
var/obj/item/organ/parent = get_organ(target_zone)
if(!parent)
return 0
if(parent.w_class > affecting.w_class + 1)
return prob(100 / 2**(parent.w_class - affecting.w_class - 1))
return 1
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
@@ -1177,10 +1177,6 @@
else
return 0
mob_bump_flag = species.bump_flag
mob_swap_flags = species.swap_flags
mob_push_flags = species.push_flags
/mob/living/carbon/human/proc/bloody_doodle()
set category = "IC"
set name = "Write in blood"
+1 -5
View File
@@ -920,11 +920,7 @@
if(status_flags & GODMODE) return 0
//SSD check, if a logged player is awake put them back to sleep!
if(species.show_ssd && !client && !aghosted)
sleeping = 2
//SSD check, if a logged player is awake put them back to sleep!
if(species.show_ssd && !client && !aghosted)
if(species.show_ssd && !client && !teleop)
Sleeping(2)
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
@@ -28,7 +28,7 @@
var/tail_hair
var/race_key = 0 // Used for mob icon cache string.
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
var/is_small
var/mob_size = MOB_MEDIUM
var/show_ssd = "fast asleep"
var/virus_immune
var/short_sighted
@@ -150,6 +150,8 @@
var/push_flags = ~HEAVY // What can we push?
var/swap_flags = ~HEAVY // What can we swap place with?
var/pass_flags = 0
/datum/species/New()
if(hud_type)
hud = new hud_type()
@@ -279,6 +281,11 @@
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment.
add_inherent_verbs(H)
H.mob_bump_flag = bump_flag
H.mob_swap_flags = swap_flags
H.mob_push_flags = push_flags
H.pass_flags = pass_flags
H.mob_size = mob_size
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return
@@ -11,7 +11,7 @@
language = null
default_language = "Chimpanzee"
greater_form = "Human"
is_small = 1
mob_size = MOB_SMALL
has_fine_manipulation = 0
show_ssd = null
@@ -38,6 +38,8 @@
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
pass_flags = PASSTABLE
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
@@ -27,7 +27,7 @@
total_health = 50
brute_mod = 1.35
burn_mod = 1.35
is_small = 1
mob_size = MOB_SMALL
holder_type = /obj/item/weapon/holder/human
short_sighted = 1
gluttonous = 1
@@ -1,7 +1,7 @@
/datum/species/slime
name = "Slime"
name_plural = "slimes"
is_small = 1
mob_size = MOB_SMALL
icobase = 'icons/mob/human_races/r_slime.dmi'
deform = 'icons/mob/human_races/r_slime.dmi'
@@ -113,24 +113,25 @@ Please contact me on #coderbus IRC. ~Carn x
#define ID_LAYER 5
#define SHOES_LAYER 6
#define GLOVES_LAYER 7
#define SUIT_LAYER 8
#define TAIL_LAYER 9 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
#define BACK_LAYER 13
#define HAIR_LAYER 14 //TODO: make part of head layer?
#define EARS_LAYER 15
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
#define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20
#define L_HAND_LAYER 21
#define R_HAND_LAYER 22
#define FIRE_LAYER 23 //If you're on fire
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 24
#define BELT_LAYER 8
#define SUIT_LAYER 9
#define TAIL_LAYER 10 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 11
#define BELT_LAYER_ALT 12
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define EARS_LAYER 16
#define FACEMASK_LAYER 17
#define HEAD_LAYER 18
#define COLLAR_LAYER 19
#define HANDCUFF_LAYER 20
#define LEGCUFF_LAYER 21
#define L_HAND_LAYER 22
#define R_HAND_LAYER 23
#define FIRE_LAYER 24 //If you're on fire
#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 25
//////////////////////////////////
/mob/living/carbon/human
@@ -718,15 +719,24 @@ var/global/list/damage_icon_parts = list()
else
standing.icon = 'icons/mob/belt.dmi'
if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt))
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
var/belt_layer = BELT_LAYER
if(istype(belt, /obj/item/weapon/storage/belt))
var/obj/item/weapon/storage/belt/ubelt = belt
if(ubelt.show_above_suit)
overlays_standing[BELT_LAYER] = null
belt_layer = BELT_LAYER_ALT
else
overlays_standing[BELT_LAYER_ALT] = null
if(belt.contents.len)
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
overlays_standing[BELT_LAYER] = standing
overlays_standing[belt_layer] = standing
else
overlays_standing[BELT_LAYER] = null
overlays_standing[BELT_LAYER_ALT] = null
if(update_icons) update_icons()
+2 -2
View File
@@ -41,7 +41,7 @@
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1)
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
@@ -53,7 +53,7 @@
if(AGONY)
halloss += effect // Useful for objects that cause "subdual" damage. PAIN!
if(IRRADIATE)
var/rad_protection = getarmor(null, "rad")/100
var/rad_protection = check_protection ? getarmor(null, "rad")/100 : 0
radiation += max((1-rad_protection)*effect/(blocked+1),0)//Rads auto check armor
if(STUTTER)
if(status_flags & CANSTUN) // stun is usually associated with stutter
+3 -3
View File
@@ -87,8 +87,8 @@ default behaviour is:
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
forceMove(tmob.loc)
tmob.forceMove(oldloc)
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
@@ -605,7 +605,7 @@ default behaviour is:
src << "<span class='warning'>You wriggle out of [M]'s grip!</span>"
else if(istype(H.loc,/obj/item))
src << "<span class='warning'>You struggle free of [H.loc].</span>"
H.loc = get_turf(H)
H.forceMove(get_turf(H))
if(istype(M))
for(var/atom/A in M.contents)
@@ -39,10 +39,7 @@
var/tod = null // Time of death
var/update_slimes = 1
var/silent = null // Can't talk. Value goes down every life proc.
var/mob_size // Used by lockers.
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
+2 -2
View File
@@ -128,8 +128,8 @@ var/list/ai_verbs_default = list(
aiRadio = new(src)
common_radio = aiRadio
aiRadio.myAi = src
additional_law_channels += "Binary"
additional_law_channels += "Holopad"
additional_law_channels["Binary"] = ":b"
additional_law_channels["Holopad"] = ":h"
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
+7 -6
View File
@@ -1,6 +1,6 @@
/mob/living/silicon
var/datum/ai_laws/laws = null
var/list/additional_law_channels = list("State")
var/list/additional_law_channels = list("State" = "")
/mob/living/silicon/proc/laws_sanity_check()
if (!src.laws)
@@ -59,11 +59,12 @@
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws)
var/prefix = ""
switch(lawchannel)
if(MAIN_CHANNEL) prefix = ";"
if("Binary") prefix = ":b "
else
prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " "
if(MAIN_CHANNEL == lawchannel)
prefix = ";"
else if(lawchannel in additional_law_channels)
prefix = additional_law_channels[lawchannel]
else
prefix = get_radio_key_from_channel(lawchannel)
dostatelaws(lawchannel, prefix, laws)
+1 -1
View File
@@ -4,8 +4,8 @@
icon_state = "repairbot"
emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person)
small = 1
pass_flags = 1
mob_size = MOB_SMALL
var/network = "SS13"
var/obj/machinery/camera/current = null
@@ -42,6 +42,8 @@ var/list/mob_hat_cache = list()
mob_push_flags = SIMPLE_ANIMAL
mob_always_swap = 1
mob_size = MOB_TINY
//Used for self-mailing.
var/mail_destination = ""
var/obj/machinery/drone_fabricator/master_fabricator
@@ -68,6 +70,7 @@ var/list/mob_hat_cache = list()
can_pull_mobs = 1
hat_x_offset = 1
hat_y_offset = -12
mob_size = MOB_SMALL
/mob/living/silicon/robot/drone/New()
@@ -95,7 +98,7 @@ var/list/mob_hat_cache = list()
/mob/living/silicon/robot/drone/init()
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
additional_law_channels["Drone"] = ":d"
if(!laws) laws = new law_type
if(!module) module = new module_type(src)
@@ -155,7 +155,7 @@
/mob/living/silicon/robot/proc/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/nanotrasen()
additional_law_channels += "Binary"
additional_law_channels["Binary"] = ":b"
var/new_ai = select_active_ai_with_fewest_borgs()
if(new_ai)
lawupdate = 1
@@ -214,7 +214,9 @@
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
..()
qdel(wires)
wires = null
return ..()
/mob/living/silicon/robot/proc/set_module_sprites(var/list/new_sprites)
module_sprites = new_sprites.Copy()
+1 -1
View File
@@ -76,7 +76,7 @@
set name = "Law Manager"
set category = "Subystems"
law_manager.ui_interact(usr, state = self_state)
law_manager.ui_interact(usr, state = conscious_state)
/********************
* Power Monitor *
@@ -98,7 +98,7 @@
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
mob_size = MOB_LARGE
speed = 3
environment_smash = 2
attack_sound = 'sound/weapons/heavysmash.ogg'
@@ -23,7 +23,7 @@
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
holder_type = /obj/item/weapon/holder/cat
mob_size = 5
mob_size = MOB_SMALL
/mob/living/simple_animal/cat/Life()
//MICE!
@@ -5,7 +5,7 @@
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
small = 1
mob_size = MOB_SMALL
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
@@ -55,9 +55,9 @@
if(!pulledby)
var/obj/effect/plant/food
food = locate(/obj/effect/plant) in oview(5,loc)
food = locate(/obj/effect/plant) in oview(5,loc)
if(food)
var/step = get_step_to(src, food, 0)
var/step = get_step_to(src, food, 0)
Move(step)
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
@@ -167,7 +167,7 @@
health = 1
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE
small = 1
mob_size = MOB_MINISCULE
/mob/living/simple_animal/chick/New()
..()
@@ -209,7 +209,7 @@ var/global/chicken_count = 0
var/eggsleft = 0
var/body_color
pass_flags = PASSTABLE
small = 1
mob_size = MOB_SMALL
/mob/living/simple_animal/chicken/New()
..()
@@ -5,7 +5,6 @@
icon_state = "lizard"
icon_living = "lizard"
icon_dead = "lizard-dead"
small = 1
speak_emote = list("hisses")
health = 5
maxHealth = 5
@@ -15,4 +14,4 @@
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
mob_size = 1
mob_size = MOB_MINISCULE
@@ -10,7 +10,6 @@
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
pass_flags = PASSTABLE
small = 1
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -29,7 +28,7 @@
universal_speak = 0
universal_understand = 1
holder_type = /obj/item/weapon/holder/mouse
mob_size = 1
mob_size = MOB_MINISCULE
/mob/living/simple_animal/mouse/Life()
..()
@@ -4,7 +4,7 @@
icon_state = "mushroom"
icon_living = "mushroom"
icon_dead = "mushroom_dead"
small = 1
mob_size = MOB_SMALL
speak_chance = 0
turns_per_move = 1
maxHealth = 5
@@ -5,7 +5,7 @@
max_co2 = 0
minbodytemp = 0
maxbodytemp = 500
mob_size = 5
mob_size = MOB_SMALL
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
@@ -39,7 +39,6 @@
var/obj/item/held_item = null //Storage for single item they can hold.
speed = -1 //Spiderbots gotta go fast.
pass_flags = PASSTABLE
small = 1
speak_emote = list("beeps","clicks","chirps")
/mob/living/simple_animal/spiderbot/New()
@@ -33,7 +33,7 @@
icon_living = "parrot_fly"
icon_dead = "parrot_dead"
pass_flags = PASSTABLE
small = 1
mob_size = MOB_SMALL
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
@@ -284,14 +284,14 @@
user << "<span class='notice'>\The [src] is dead, medical items won't bring \him back to life.</span>"
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
harvest(user)
else
if(!O.force)
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
else
O.attack(src, user, user.zone_sel.selecting)
/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone)
/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone)
visible_message("<span class='danger'>\The [src] has been attacked with \the [O] by [user].</span>")
@@ -307,7 +307,7 @@
purge = 3
adjustBruteLoss(damage)
return 0
return 0
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
@@ -396,7 +396,7 @@
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
if(issmall(src))
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(src)
+1 -1
View File
@@ -966,7 +966,7 @@ mob/proc/yank_out_object()
var/mob/living/carbon/human/human_user = U
human_user.bloody_hands(H)
selection.loc = get_turf(src)
selection.forceMove(get_turf(src))
if(!(U.l_hand && U.r_hand))
U.put_in_hands(selection)
+4 -5
View File
@@ -88,7 +88,6 @@
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
var/lastpuke = 0
var/unacidable = 0
var/small = 0
var/list/pinned = list() // List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() // Embedded items, since simple mobs don't have organs.
var/list/languages = list() // For speaking/listening.
@@ -214,12 +213,12 @@
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
//Indicates if a clientless mob is actually an admin aghosting
var/mob/dead/observer/aghosted = null
//If set, indicates that the client "belonging" to this (clientless) mob is currently controlling some other mob
//so don't treat them as being SSD even though their client var is null.
var/mob/teleop = null
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/list/active_genes=list()
var/mob_size = MOB_MEDIUM
+1 -1
View File
@@ -149,7 +149,7 @@
if(istype(H) && H.species.gluttonous)
if(H.species.gluttonous == 2)
can_eat = 2
else if(!ishuman(target) && !issmall(target) && (target.small || iscarbon(target)))
else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target))
can_eat = 1
if(can_eat)
+6 -127
View File
@@ -1,14 +1,4 @@
// fun if you want to typecast humans/monkeys/etc without writing long path-filled lines.
/proc/ishuman(A)
if(istype(A, /mob/living/carbon/human))
return 1
return 0
/proc/isalien(A)
if(istype(A, /mob/living/carbon/alien))
return 1
return 0
/proc/isxenomorph(A)
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
@@ -16,85 +6,12 @@
return 0
/proc/issmall(A)
if(A && istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(H.species && H.species.is_small)
return 1
if(A && istype(A, /mob/living))
var/mob/living/L = A
return L.mob_size <= MOB_SMALL
return 0
/proc/isbrain(A)
if(A && istype(A, /mob/living/carbon/brain))
return 1
return 0
/proc/isslime(A)
if(istype(A, /mob/living/carbon/slime))
return 1
return 0
/proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot))
return 1
return 0
/proc/isanimal(A)
if(istype(A, /mob/living/simple_animal))
return 1
return 0
/proc/iscorgi(A)
if(istype(A, /mob/living/simple_animal/corgi))
return 1
return 0
/proc/iscrab(A)
if(istype(A, /mob/living/simple_animal/crab))
return 1
return 0
/proc/iscat(A)
if(istype(A, /mob/living/simple_animal/cat))
return 1
return 0
/proc/ismouse(A)
if(istype(A, /mob/living/simple_animal/mouse))
return 1
return 0
/proc/isbear(A)
if(istype(A, /mob/living/simple_animal/hostile/bear))
return 1
return 0
/proc/iscarp(A)
if(istype(A, /mob/living/simple_animal/hostile/carp))
return 1
return 0
/proc/isclown(A)
if(istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
return 1
return 0
/mob/proc/isSilicon()
return 0
/mob/living/silicon/isSilicon()
return 1
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
/mob/proc/isMobAI()
return 0
/mob/living/silicon/ai/isMobAI()
return 1
/mob/proc/isSynthetic()
/mob/living/proc/isSynthetic()
return 0
/mob/living/carbon/human/isSynthetic()
@@ -107,56 +24,18 @@
/mob/living/silicon/isSynthetic()
return 1
/mob/living/carbon/human/isMonkey()
return istype(species, /datum/species/monkey)
/mob/proc/isMonkey()
return 0
/mob/living/carbon/human/isMonkey()
return istype(species, /datum/species/monkey)
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
return 0
/proc/iscarbon(A)
if(istype(A, /mob/living/carbon))
return 1
return 0
/proc/issilicon(A)
if(istype(A, /mob/living/silicon))
return 1
return 0
/proc/isliving(A)
if(istype(A, /mob/living))
return 1
return 0
proc/isobserver(A)
if(istype(A, /mob/dead/observer))
return 1
return 0
proc/isorgan(A)
if(istype(A, /obj/item/organ/external))
return 1
return 0
proc/isdeaf(A)
if(istype(A, /mob))
var/mob/M = A
return (M.sdisabilities & DEAF) || M.ear_deaf
return 0
proc/isnewplayer(A)
if(istype(A, /mob/new_player))
return 1
return 0
proc/hasorgans(A) // Fucking really??
return ishuman(A)
@@ -410,7 +289,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/proc/shake_camera(mob/M, duration, strength=1)
if(!M || !M.client || M.shakecamera)
if(!M || !M.client || M.shakecamera || M.stat || isEye(M) || isAI(M))
return
M.shakecamera = 1
spawn(1)
@@ -644,7 +523,7 @@ proc/is_blind(A)
// A proper CentCom id is hard currency.
else if(id && istype(id, /obj/item/weapon/card/id/centcom))
return SAFE_PERP
if(check_access && !access_obj.allowed(src))
threatcount += 4
+4 -4
View File
@@ -176,7 +176,7 @@
if(!mob.control_object) return
mob.control_object.dir = direct
else
mob.control_object.loc = get_step(mob.control_object,direct)
mob.control_object.forceMove(get_step(mob.control_object,direct))
return
@@ -382,7 +382,7 @@
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
return
else
mob.loc = get_step(mob, direct)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
if(2)
if(prob(50))
@@ -411,7 +411,7 @@
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
mob.forceMove(locate(locx,locy,mobloc.z))
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
@@ -422,7 +422,7 @@
else
spawn(0)
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
// Crossed is always a bit iffy
for(var/obj/S in mob.loc)
+9 -15
View File
@@ -1,3 +1,9 @@
/var/atom/movable/lobby_image = new /atom/movable{icon = 'icons/misc/title.dmi'; icon_state = "title"; screen_loc = "1,1"; name = "Baystation12"}
/mob/new_player
var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled
/mob/new_player/Login()
update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
if(join_motd)
@@ -8,24 +14,12 @@
mind.active = 1
mind.current = src
if(length(newplayer_start))
loc = pick(newplayer_start)
else
loc = locate(1,1,1)
lastarea = loc
loc = null
client.screen += lobby_image
my_client = client
sight |= SEE_TURFS
player_list |= src
/*
var/list/watch_locations = list()
for(var/obj/effect/landmark/landmark in landmarks_list)
if(landmark.tag == "landmark*new_player")
watch_locations += landmark.loc
if(watch_locations.len>0)
loc = pick(watch_locations)
*/
new_player_panel()
spawn(40)
if(client)
+7 -1
View File
@@ -1,7 +1,13 @@
/mob/new_player/Logout()
ready = 0
// see login.dm
if(my_client)
my_client.screen -= lobby_image
my_client = null
..()
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
key = null//We null their key before deleting the mob, so they are properly kicked out.
qdel(src)
return
return
+2 -18
View File
@@ -330,23 +330,7 @@
return
//Find our spawning point.
var/join_message
var/datum/spawnpoint/S
if(spawning_at)
S = spawntypes[spawning_at]
if(S && istype(S))
if(S.check_job_spawning(rank))
character.loc = pick(S.turfs)
join_message = S.msg
else
character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
character.loc = pick(latejoin)
join_message = "has arrived on the station"
else
character.loc = pick(latejoin)
join_message = "has arrived on the station"
var/join_message = job_master.LateSpawn(character, rank)
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
@@ -486,7 +470,7 @@
src << browse(null, "window=playersetup") //closes the player setup window
proc/has_admin_rights()
return client.holder.rights & R_ADMIN
return check_rights(R_ADMIN, 0, src)
proc/is_species_whitelisted(datum/species/S)
if(!S) return 1