Made some object lists less terrible to read

This commit is contained in:
CitadelStationBot
2017-07-18 09:44:43 -05:00
parent c294d781b6
commit a72962c300
236 changed files with 733 additions and 629 deletions
+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)