Merge pull request #2063 from Citadel-Station-13/upstream-merge-29304

[MIRROR] Made some object lists less terrible to read
This commit is contained in:
LetterJay
2017-07-31 03:43:03 -05:00
committed by GitHub
240 changed files with 1010 additions and 906 deletions
+2 -2
View File
@@ -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>")
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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 -1
View File
@@ -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
@@ -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"
@@ -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]
@@ -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
+1 -1
View File
@@ -111,7 +111,7 @@
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)
@@ -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
@@ -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 -1
View File
@@ -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
+1 -1
View File
@@ -877,7 +877,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))
@@ -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()
@@ -675,7 +675,7 @@
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))
if(istype(I, /obj/item/weapon/storage/bag/ore))
loc.attackby(I, src)
#undef BORG_CAMERA_BUFFER
@@ -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)
@@ -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))
@@ -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)
@@ -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)
@@ -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
@@ -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
@@ -0,0 +1,10 @@
diff a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm (rejected hunks)
@@ -21,7 +21,7 @@
gold_core_spawnable = 2
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
@@ -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))
@@ -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)
@@ -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))
@@ -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)
@@ -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
+3 -3
View File
@@ -387,7 +387,7 @@
set category = "Object"
set src = usr
if(istype(loc,/obj/mecha))
if(istype(loc, /obj/mecha))
return
if(incapacitated())
@@ -869,7 +869,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 +878,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