Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/game/objects/effects/chem/chemsmoke.dm
	code/modules/customitems/item_defines.dm
	code/modules/projectiles/guns/launcher/syringe_gun.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
	code/modules/reagents/reagent_containers/food/drinks.dm
	code/modules/reagents/reagent_containers/pill.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-05-15 11:28:05 +03:00
468 changed files with 7273 additions and 9076 deletions
+8 -3
View File
@@ -436,9 +436,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "<span class='warning'>Spawning as a mouse is currently disabled.</span>"
return
var/mob/dead/observer/M = usr
if(config.antag_hud_restricted && M.has_enabled_antagHUD == 1)
src << "<span class='warning'>antagHUD restrictions prevent you from spawning in as a mouse.</span>"
if(!MayRespawn(1))
return
var/timedifference = world.time - client.time_died_as_mouse
@@ -677,3 +675,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
client.images |= ghost_darkness_images
if (ghostimage)
client.images -= ghostimage //remove ourself
mob/dead/observer/MayRespawn(var/feedback = 0)
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
if(feedback)
src << "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>"
return 0
return 1
@@ -28,7 +28,7 @@
if(src.can_use())
cameranet.addCamera(src)
else
src.SetLuminosity(0)
src.set_light(0)
cameranet.removeCamera(src)
/obj/machinery/camera/New()
+1 -1
View File
@@ -155,7 +155,7 @@ var/list/slot_equipment_priority = list( \
Target = loc
remove_from_mob(W)
if(!W) return 1 // self destroying objects (tk, grabs)
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
update_icons()
+3 -3
View File
@@ -110,14 +110,14 @@
if(stat)
return 0
on = 1
SetLuminosity(light_strength)
set_light(light_strength)
update_icons()
return 1
/mob/living/bot/proc/turn_off()
on = 0
SetLuminosity(0)
set_light(0)
update_icons()
/mob/living/bot/proc/explode()
qdel(src)
qdel(src)
+1 -1
View File
@@ -226,7 +226,7 @@
beacon_freq = freq
if("screw")
screwloose = !screwloose
usr << "<span class='notice>You twiddle the screw.</span>"
usr << "<span class='notice'>You twiddle the screw.</span>"
if("oddbutton")
oddbutton = !oddbutton
usr << "<span class='notice'>You press the weird button.</span>"
+3 -43
View File
@@ -334,53 +334,13 @@
path = list()
/mob/living/bot/secbot/proc/check_threat(var/mob/living/M)
if(M.stat == DEAD)
if(!M || !istype(M) || M.stat)
return 0
if(emagged)
return 10
var/threatcount = 0
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.handcuffed)
return 0
var/obj/item/weapon/card/id/id = GetIdCard(H) //Agent cards lower threatlevel.
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
threatcount -= 2
if(idcheck && !access_scanner.allowed(H))
if(istype(H.l_hand, /obj/item/weapon/gun) || istype(H.l_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(H.r_hand, /obj/item/weapon/gun) || istype(H.r_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(H.belt, /obj/item/weapon/gun) || istype(H.belt, /obj/item/weapon/melee))
threatcount += 2
if(H.species.name != "Human") //beepsky so racist.
threatcount += 2
if(check_records || check_arrest)
var/perpname = H.name
if(id)
perpname = id.registered_name
var/datum/data/record/R = find_security_record("name", perpname)
if(check_records && !R)
threatcount += 4
if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
threatcount += 4
else if(isanimal(M))
if(istype(M, /mob/living/simple_animal/hostile) && !istype(M, /mob/living/simple_animal/hostile/retaliate/goat))
threatcount += 4
return threatcount
return M.assess_perp(access_scanner, idcheck, check_records, check_arrest)
/mob/living/bot/secbot/proc/patrol_step()
if(loc == patrol_target)
@@ -31,4 +31,4 @@
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1
return 1
@@ -4,10 +4,12 @@
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(loc)) //else, there's considered to be no light
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
if(L)
light_amount = min(10,L.lum_r + L.lum_g + L.lum_b) - 5 //hardcapped so it's not abused by having a ton of flashlights
else
light_amount = 5
nutrition += light_amount
+1 -1
View File
@@ -25,7 +25,7 @@
w_class = 3
origin_tech = "biotech=3"
var/list/construction_cost = list("metal"=1000,"glass"=500)
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=1000,"glass"=500)
var/construction_time = 75
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
@@ -6,7 +6,7 @@
w_class = 3
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
construction_time = 75
var/searching = 0
var/askDelay = 10 * 60 * 1
@@ -26,7 +26,7 @@
/obj/item/device/mmi/digital/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
continue
+1 -1
View File
@@ -1,7 +1,7 @@
mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr)
set category = "IC"
set name = "Give"
if(target.stat == 2 || usr.stat == 2|| target.client == null)
if(!istype(target) || target.stat == 2 || usr.stat == 2|| target.client == null)
return
var/obj/item/I
if(!usr.hand && usr.r_hand == null)
@@ -395,14 +395,14 @@
else if(is_bleeding["right foot"])
display_shoes = 1
if(display_chest)
msg += "<span class='warning'><b>[src] has blood soaking through from under [t_his] clothing!</b></span>\n"
msg += "<span class='danger'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(display_shoes)
msg += "<span class='warning'><b>[src] has blood running from [t_his] shoes!</b></span>\n"
msg += "<span class='danger'>[src] has blood running from [t_his] shoes!</span>\n"
if(display_gloves)
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
msg += "<span class='danger'>[src] has blood running from under [t_his] gloves!</span>\n"
for(var/implant in get_visible_implants(0))
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
msg += "<span class='danger'>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
@@ -1292,7 +1292,7 @@
/mob/living/carbon/human/has_eyes()
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes = internal_organs_by_name["eyes"]
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
if(eyes && istype(eyes) && !(eyes.status & ORGAN_CUT_AWAY))
return 1
return 0
@@ -72,6 +72,10 @@
if(I_GRAB)
if(M == src || anchored)
return 0
for(var/obj/item/weapon/grab/G in src.grabbed_by)
if(G.assailant == M)
M << "<span class='notice'>You already grabbed [src].</span>"
return
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -218,7 +222,7 @@
//See if they have any guns that might go off
for(var/obj/item/weapon/gun/W in holding)
if(W && prob(holding[W]))
if(W && prob(holding[W]))
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
@@ -251,11 +255,6 @@
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
//if M (and only M) has a grab on src, start dislocating limbs
if(grab_joint(M))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
@@ -304,10 +303,10 @@
if(G.affecting == src && G.state == GRAB_NECK)
has_grab = 1
break
if(!has_grab)
return 0
if(!def_zone) def_zone = user.zone_sel.selecting
var/target_zone = check_zone(def_zone)
if(!target_zone)
@@ -315,7 +314,7 @@
var/obj/item/organ/external/organ = get_organ(check_zone(target_zone))
if(!organ || organ.is_dislocated() || organ.dislocated == -1)
return 0
user.visible_message("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
if(do_after(user, 100))
organ.dislocate()
@@ -138,6 +138,14 @@ emp_act
return 1
return 0
//Used to check if they can be fed food/drinks/pills
/mob/living/carbon/human/proc/check_mouth_coverage()
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform)
for(var/obj/item/gear in protective_gear)
if(istype(gear) && (gear.body_parts_covered & FACE) && (gear.flags & (MASKCOVERSMOUTH|HEADCOVERSMOUTH)))
return gear
return null
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3)
var/obj/item/weapon/I = l_hand
@@ -281,7 +289,7 @@ emp_act
forcesay(hit_appends) //forcesay checks stat already
//Melee weapon embedded object code.
if (I && I.damtype == BRUTE && !I.anchored && !I.is_robot_module())
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I))
var/damage = effective_force
if (armor)
damage /= armor+1
@@ -355,7 +363,7 @@ emp_act
//thrown weapon embedded object code.
if(dtype == BRUTE && istype(O,/obj/item))
var/obj/item/I = O
if (!I.is_robot_module())
if (!is_robot_module(I))
var/sharp = is_sharp(I)
var/damage = throw_damage
if (armor)
@@ -116,7 +116,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_glasses()
else if (W == head)
head = null
var/update_hair = 0
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair = 1
@@ -128,7 +128,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_hair(0) //rebuild hair
update_inv_ears(0)
update_inv_wear_mask(0)
update_inv_head()
else if (W == l_ear)
l_ear = null
@@ -168,9 +168,9 @@ This saves us from having to call add_fingerprint() any time something is put in
back = null
update_inv_back()
else if (W == handcuffed)
handcuffed = null
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
buckled.unbuckle_mob()
update_inv_handcuffed()
else if (W == legcuffed)
legcuffed = null
@@ -183,7 +183,7 @@ This saves us from having to call add_fingerprint() any time something is put in
update_inv_l_hand()
else
return 0
update_action_buttons()
return 1
@@ -321,7 +321,7 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/slot_is_accessible(var/slot, var/obj/item/I, mob/user=null)
var/obj/item/covering = null
var/check_flags = 0
switch(slot)
if(slot_wear_mask)
covering = src.head
@@ -331,7 +331,7 @@ This saves us from having to call add_fingerprint() any time something is put in
check_flags = HEADCOVERSEYES
if(slot_gloves, slot_w_uniform)
covering = src.wear_suit
if(covering)
if((covering.body_parts_covered & I.body_parts_covered) || (covering.flags & check_flags))
user << "<span class='warning'>\The [covering] is in the way.</span>"
@@ -534,7 +534,7 @@ This saves us from having to call add_fingerprint() any time something is put in
var/obj/item/clothing/accessory/A = suit.accessories[1]
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their accessory ([A]) removed by [source.name] ([source.ckey])</font>"
source.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])</font>"
if(istype(A, /obj/item/clothing/accessory/holobadge) || istype(A, /obj/item/clothing/accessory/medal))
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
for(var/mob/M in viewers(target, null))
M.show_message("\red <B>[source] tears off \the [A] from [target]'s [suit]!</B>" , 1)
done()
@@ -799,7 +799,7 @@ It can still be worn/put on as normal.
target.drop_from_inventory(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
else
source << "<span class='warning'>You fail to remove \the [strip_item] from [target]!</span>"
else if(item)
else if(item)
if(target.has_organ_for_slot(slot_to_process) && item.mob_can_equip(target, slot_to_process, 0)) //Placing an item on the mob
source.drop_from_inventory(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
+65 -34
View File
@@ -32,6 +32,7 @@
var/temperature_alert = 0
var/in_stasis = 0
var/heartbeat = 0
var/global/list/overlays_cache = null
/mob/living/carbon/human/Life()
@@ -882,10 +883,11 @@
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(loc)) //else, there's considered to be no light
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
if(L)
light_amount = min(10,L.lum_r + L.lum_g + L.lum_b) - 5 //hardcapped so it's not abused by having a ton of flashlights
else
light_amount = 5
nutrition += light_amount
traumatic_shock -= light_amount
@@ -903,10 +905,11 @@
var/light_amount = 0
if(isturf(loc))
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = T.lighting_lumcount
else light_amount = 10
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
if(L)
light_amount = L.lum_r + L.lum_g + L.lum_b //hardcapped so it's not abused by having a ton of flashlights
else
light_amount = 10
if(light_amount > species.light_dam) //if there's enough light, start dying
take_overall_damage(1,1)
else //heal in the dark
@@ -1085,6 +1088,33 @@
return 1
proc/handle_regular_hud_updates()
if(!overlays_cache)
overlays_cache = list()
overlays_cache.len = 23
overlays_cache[1] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage1")
overlays_cache[2] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage2")
overlays_cache[3] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage3")
overlays_cache[4] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage4")
overlays_cache[5] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage5")
overlays_cache[6] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage6")
overlays_cache[7] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage7")
overlays_cache[8] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage8")
overlays_cache[9] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage9")
overlays_cache[10] = image('icons/mob/screen1_full.dmi', "icon_state" = "passage10")
overlays_cache[11] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1")
overlays_cache[12] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2")
overlays_cache[13] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3")
overlays_cache[14] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4")
overlays_cache[15] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5")
overlays_cache[16] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6")
overlays_cache[17] = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7")
overlays_cache[18] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1")
overlays_cache[19] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2")
overlays_cache[20] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3")
overlays_cache[21] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4")
overlays_cache[22] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5")
overlays_cache[23] = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6")
if(hud_updateflag) // update our mob's hud overlays, AKA what others see flaoting above our head
handle_hud_list()
@@ -1103,32 +1133,32 @@
if(damageoverlay.overlays)
damageoverlay.overlays = list()
if(stat == UNCONSCIOUS)
//Critical damage passage overlay
if(health <= 0)
var/image/I
switch(health)
if(-20 to -10)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage1")
I = overlays_cache[1]
if(-30 to -20)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage2")
I = overlays_cache[2]
if(-40 to -30)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage3")
I = overlays_cache[3]
if(-50 to -40)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage4")
I = overlays_cache[4]
if(-60 to -50)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage5")
I = overlays_cache[5]
if(-70 to -60)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage6")
I = overlays_cache[6]
if(-80 to -70)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage7")
I = overlays_cache[7]
if(-90 to -80)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage8")
I = overlays_cache[8]
if(-95 to -90)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage9")
I = overlays_cache[9]
if(-INFINITY to -95)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage10")
I = overlays_cache[10]
damageoverlay.overlays += I
else
//Oxygen damage overlay
@@ -1136,19 +1166,19 @@
var/image/I
switch(oxyloss)
if(10 to 20)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1")
I = overlays_cache[11]
if(20 to 25)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2")
I = overlays_cache[12]
if(25 to 30)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3")
I = overlays_cache[13]
if(30 to 35)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4")
I = overlays_cache[14]
if(35 to 40)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5")
I = overlays_cache[15]
if(40 to 45)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6")
I = overlays_cache[16]
if(45 to INFINITY)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7")
I = overlays_cache[17]
damageoverlay.overlays += I
//Fire and Brute damage overlay (BSSR)
@@ -1158,17 +1188,17 @@
var/image/I
switch(hurtdamage)
if(10 to 25)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1")
I = overlays_cache[18]
if(25 to 40)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2")
I = overlays_cache[19]
if(40 to 55)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3")
I = overlays_cache[20]
if(55 to 70)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4")
I = overlays_cache[21]
if(70 to 85)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5")
I = overlays_cache[22]
if(85 to INFINITY)
I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6")
I = overlays_cache[23]
damageoverlay.overlays += I
if( stat == DEAD )
@@ -1393,8 +1423,9 @@
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
var/turf/currentTurf = loc
if(!currentTurf.lighting_lumcount)
var/turf/T = loc
var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T
if(L && L.lum_r + L.lum_g + L.lum_b == 0)
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_stomach()
@@ -54,6 +54,25 @@
var/datum/language/species_language = all_languages[default_language]
return species_language.get_random_name(gender)
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
if(!H.back)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_back)
H.internal = H.back
else if(!H.r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_r_hand)
H.internal = H.r_hand
else if (!H.l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_l_hand)
H.internal = H.l_hand
H.internals.icon_state = "internal1"
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/vox(H.back), slot_in_backpack)
/datum/species/vox/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
if(!H.mind || !H.mind.special_role) // Pariah check.
return 0
@@ -174,6 +174,12 @@
return "unknown"
return species_language.get_random_name(gender)
/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
for(var/obj/item/organ/organ in H.contents)
@@ -59,6 +59,10 @@
"Your scales bristle against the cold."
)
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
/datum/species/tajaran
name = "Tajara"
name_plural = "Tajaran"
@@ -100,6 +104,10 @@
)
cold_discomfort_level = 275
/datum/species/tajaran/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
/datum/species/skrell
name = "Skrell"
name_plural = "Skrell"
@@ -198,6 +206,12 @@
return 1
return 0
/datum/species/diona/equip_survival_gear(var/mob/living/carbon/human/H)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H.back), slot_in_backpack)
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
H.gender = NEUTER
return ..()
@@ -251,6 +265,8 @@
has_organ = list() //TODO: Positronic brain.
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
..()
if(flags & IS_SYNTHETIC)
@@ -134,13 +134,20 @@
return
// OBJ CHECK
var/cannot_melt
if(isobj(O))
var/obj/I = O
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "<span class='alium'>You cannot dissolve this object.</span>"
return
// TURF CHECK
else if(istype(O, /turf/simulated/wall/r_wall) || istype(O, /turf/simulated/floor/engine))
if(I.unacidable)
cannot_melt = 1
else
if(istype(O, /turf/simulated/wall))
var/turf/simulated/wall/W = O
if(W.material.unmeltable)
cannot_melt = 1
else if(istype(O, /turf/simulated/floor/engine))
cannot_melt = 1
if(cannot_melt)
src << "<span class='alium'>You cannot dissolve this object.</span>"
return
@@ -468,7 +468,7 @@ var/global/list/damage_icon_parts = list()
under_icon = w_uniform.item_icons[slot_w_uniform_str]
else
under_icon = INV_W_UNIFORM_DEF_ICON
//determine state to use
var/under_state
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
@@ -480,7 +480,7 @@ var/global/list/damage_icon_parts = list()
//need to append _s to the icon state for legacy compatibility
var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s")
//apply blood overlay
if(w_uniform.blood_DNA)
var/image/bloodsies = image(icon = species.blood_mask, icon_state = "uniformblood")
@@ -499,7 +499,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[UNIFORM_LAYER] = null
if(update_icons)
update_icons()
update_icons()
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
if(wear_id)
@@ -754,7 +754,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
if(back)
back.screen_loc = ui_back //TODO
//determine the icon to use
var/icon/overlay_icon
if(back.icon_override)
@@ -769,7 +769,7 @@ var/global/list/damage_icon_parts = list()
overlay_icon = back.item_icons[slot_back_str]
else
overlay_icon = INV_BACK_DEF_ICON
//determine state to use
var/overlay_state
if(back.item_state_slots && back.item_state_slots[slot_back_str])
@@ -778,13 +778,13 @@ var/global/list/damage_icon_parts = list()
overlay_state = back.item_state
else
overlay_state = back.icon_state
//create the image
overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state)
else
overlays_standing[BACK_LAYER] = null
if(update_icons)
if(update_icons)
update_icons()
@@ -822,15 +822,6 @@ var/global/list/damage_icon_parts = list()
if(r_hand)
r_hand.screen_loc = ui_rhand //TODO
//determine icon to use
var/icon/t_icon
if(r_hand.icon_override)
t_icon = r_hand.icon_override
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else
t_icon = INV_R_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
@@ -839,7 +830,17 @@ var/global/list/damage_icon_parts = list()
t_state = r_hand.item_state
else
t_state = r_hand.icon_state
//determine icon to use
var/icon/t_icon
if(r_hand.icon_override)
t_state += "_r"
t_icon = r_hand.icon_override
else if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else
t_icon = INV_R_HAND_DEF_ICON
overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
if (handcuffed) drop_r_hand() //this should be moved out of icon code
@@ -853,15 +854,6 @@ var/global/list/damage_icon_parts = list()
if(l_hand)
l_hand.screen_loc = ui_lhand //TODO
//determine icon to use
var/icon/t_icon
if(l_hand.icon_override)
t_icon = l_hand.icon_override
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else
t_icon = INV_L_HAND_DEF_ICON
//determine icon state to use
var/t_state
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
@@ -870,7 +862,17 @@ var/global/list/damage_icon_parts = list()
t_state = l_hand.item_state
else
t_state = l_hand.icon_state
//determine icon to use
var/icon/t_icon
if(l_hand.icon_override)
t_state += "_l"
t_icon = l_hand.icon_override
else if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else
t_icon = INV_L_HAND_DEF_ICON
overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state)
if (handcuffed) drop_l_hand() //This probably should not be here
@@ -360,7 +360,7 @@
src.Hatch()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype( W, /obj/item/toy/crayon ))
if(istype( W, /obj/item/weapon/pen/crayon ))
return
else
..()
+24 -24
View File
@@ -1,6 +1,6 @@
/mob/living/carbon/process_resist()
//drop && roll
if(on_fire)
fire_stacks -= 2 //reduced
@@ -18,34 +18,34 @@
)
ExtinguishMob()
return
if(handcuffed)
spawn() escape_handcuffs()
else if(legcuffed)
spawn() escape_legcuffs()
..()
/mob/living/carbon/proc/escape_handcuffs()
if(!(last_special <= world.time)) return
next_move = world.time + 100
last_special = world.time + 100
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
break_handcuffs()
return
var/obj/item/weapon/handcuffs/HC = handcuffed
//A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/breakouttime = 1200
var/breakouttime = 1200
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
//If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
if(istype(HC))
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
visible_message(
"<span class='danger'>[src] attempts to remove \the [HC]!</span>",
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
@@ -62,7 +62,7 @@
/mob/living/carbon/proc/escape_legcuffs()
if(!(last_special <= world.time)) return
next_move = world.time + 100
last_special = world.time + 100
@@ -71,7 +71,7 @@
return
var/obj/item/weapon/legcuffs/HC = legcuffed
//A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
var/breakouttime = 1200
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
@@ -79,20 +79,20 @@
if(istype(HC))
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
visible_message(
"<span class='danger'>[usr] attempts to remove \the [HC]!</span>",
visible_message(
"<span class='danger'>[usr] attempts to remove \the [HC]!</span>",
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
)
if(do_after(src, breakouttime))
if(!legcuffed || buckled)
return
return
visible_message(
"<span class='danger'>[src] manages to remove \the [legcuffed]!</span>",
"<span class='danger'>[src] manages to remove \the [legcuffed]!</span>",
"<span class='notice'>You successfully remove \the [legcuffed].</span>"
)
drop_from_inventory(legcuffed)
legcuffed = null
update_inv_legcuffed()
@@ -106,18 +106,18 @@
"<span class='danger'>[src] is trying to break \the [handcuffed]!</span>",
"<span class='warning'>You attempt to break your [handcuffed.name]. (This will take around 5 seconds and you need to stand still)</span>"
)
if(do_after(src, 50))
if(!handcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
"<span class='warning'>You successfully break your [handcuffed.name].</span>"
)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(handcuffed)
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
@@ -131,14 +131,14 @@
if(do_after(src, 50))
if(!legcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to break the legcuffs!</span>",
"<span class='warning'>You successfully break your legcuffs.</span>"
)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(legcuffed)
legcuffed = null
update_inv_legcuffed()
+4
View File
@@ -132,6 +132,10 @@ default behaviour is:
now_pushing = 0
return
step(AM, t)
if(ishuman(AM) && AM:grabbed_by)
for(var/obj/item/weapon/grab/G in AM:grabbed_by)
step(G:assailant, get_dir(G:assailant, AM))
G.adjust_position()
now_pushing = 0
return
return
+7 -7
View File
@@ -139,7 +139,7 @@
var/obj/item/I = O
mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR
var/momentum = speed*mass
if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED)
var/dir = get_dir(O.throw_source, src)
@@ -200,14 +200,14 @@
/mob/living/proc/IgniteMob()
if(fire_stacks > 0 && !on_fire)
on_fire = 1
src.AddLuminosity(3)
set_light(light_range + 3)
update_fire()
/mob/living/proc/ExtinguishMob()
if(on_fire)
on_fire = 0
fire_stacks = 0
src.AddLuminosity(-3)
set_light(max(0, light_range - 3))
update_fire()
/mob/living/proc/update_fire()
@@ -219,18 +219,18 @@
/mob/living/proc/handle_fire()
if(fire_stacks < 0)
fire_stacks = max(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly
if(!on_fire)
return 1
else if(fire_stacks <= 0)
ExtinguishMob() //Fire's been put out.
return 1
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G.gas["oxygen"] < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return 1
var/turf/location = get_turf(src)
location.hotspot_expose(fire_burn_temperature(), 50, 1)
@@ -242,6 +242,6 @@
/mob/living/proc/fire_burn_temperature()
if (fire_stacks <= 0)
return 0
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2)
+16 -9
View File
@@ -282,7 +282,7 @@ var/list/ai_verbs_default = list(
//if(icon_state == initial(icon_state))
var/icontype = ""
if (custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Rainbow", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Soviet", "Trapped", "Heartline", "Chatterbox")
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Rainbow", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Soviet", "Trapped", "Heartline", "Chatterbox", "Helios", "Dug Too Deep", "Goon", "Database", "Glitchman", "Lonestar", "Nanotrasen")
switch(icontype)
if("Custom") icon_state = "[src.ckey]-ai"
if("Rainbow") icon_state = "ai-clown"
@@ -304,6 +304,13 @@ var/list/ai_verbs_default = list(
if("Trapped") icon_state = "ai-hades"
if("Heartline") icon_state = "ai-heartline"
if("Chatterbox") icon_state = "ai-president"
if("Helios") icon_state = "ai-helios"
if("Dug Too Deep") icon_state = "ai-toodeep"
if("Goon") icon_state = "ai-goon"
if("Database") icon_state = "ai-database"
if("Glitchman") icon_state = "ai-glitchman"
if("Lonestar") icon_state = "ai-lonestar"
if("Nanotrasen") icon_state = "ai-nanotrasen"
else icon_state = "ai"
//else
//usr <<"You can only change your display once!"
@@ -468,13 +475,13 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/reset_view(atom/A)
if(camera)
camera.SetLuminosity(0)
camera.set_light(0)
if(istype(A,/obj/machinery/camera))
camera = A
..()
if(istype(A,/obj/machinery/camera))
if(camera_light_on) A.SetLuminosity(AI_CAMERA_LUMINOSITY)
else A.SetLuminosity(0)
if(camera_light_on) A.set_light(AI_CAMERA_LUMINOSITY)
else A.set_light(0)
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
@@ -612,7 +619,7 @@ var/list/ai_verbs_default = list(
src << "Camera lights [camera_light_on ? "activated" : "deactivated"]."
if(!camera_light_on)
if(camera)
camera.SetLuminosity(0)
camera.set_light(0)
camera = null
else
lightNearbyCamera()
@@ -627,20 +634,20 @@ var/list/ai_verbs_default = list(
if(src.camera)
var/obj/machinery/camera/camera = near_range_camera(src.eyeobj)
if(camera && src.camera != camera)
src.camera.SetLuminosity(0)
src.camera.set_light(0)
if(!camera.light_disabled)
src.camera = camera
src.camera.SetLuminosity(AI_CAMERA_LUMINOSITY)
src.camera.set_light(AI_CAMERA_LUMINOSITY)
else
src.camera = null
else if(isnull(camera))
src.camera.SetLuminosity(0)
src.camera.set_light(0)
src.camera = null
else
var/obj/machinery/camera/camera = near_range_camera(src.eyeobj)
if(camera && !camera.light_disabled)
src.camera = camera
src.camera.SetLuminosity(AI_CAMERA_LUMINOSITY)
src.camera.set_light(AI_CAMERA_LUMINOSITY)
camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds.
+9 -10
View File
@@ -48,7 +48,7 @@
loc = T.loc
if (istype(loc, /area))
//stage = 4
if (!loc.master.power_equip && !istype(src.loc,/obj/item))
if (!loc.power_equip && !istype(src.loc,/obj/item))
//stage = 5
blind = 1
@@ -115,7 +115,7 @@
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
if (loc.master.power_equip)
if (loc.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
@@ -135,18 +135,17 @@
var/PRP
for (PRP=1, PRP<=4, PRP++)
for(var/area/A in current_area.master.related)
for (var/obj/machinery/power/apc/APC in A)
if (!(APC.stat & BROKEN))
theAPC = APC
break
for (var/obj/machinery/power/apc/APC in current_area)
if (!(APC.stat & BROKEN))
theAPC = APC
break
if (!theAPC)
switch(PRP)
if (1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
src:aiRestorePowerRoutine = 2
return
if (loc.master.power_equip)
if (loc.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
@@ -181,7 +180,7 @@
/mob/living/silicon/ai/proc/lacks_power()
var/turf/T = get_turf(src)
var/area/A = get_area(src)
return ((!A.master.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)
return ((!A.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
@@ -195,4 +194,4 @@
/mob/living/silicon/ai/rejuvenate()
..()
add_ai_verbs(src)
add_ai_verbs(src)
@@ -234,7 +234,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(c.ready)
var/found = 0
for(var/mob/dead/observer/o in player_list)
if(o.key == c.key)
if(o.key == c.key && o.MayRespawn())
found = 1
if(found)
available.Add(c)
@@ -347,7 +347,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
/datum/paiController/proc/requestRecruits(var/mob/user)
inquirer = user
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "pAI"))
continue
@@ -7,7 +7,13 @@ var/list/pai_emotions = list(
"Off" = 6,
"Sad" = 7,
"Angry" = 8,
"What" = 9
"What" = 9,
"Neutral" = 10,
"Silly" = 11,
"Nose" = 12,
"Smirk" = 13,
"Exclamation Points" = 14,
"Question Mark" = 15
)
@@ -125,16 +125,12 @@
var/data[0]
// This is dumb, but NanoUI breaks if it has no data to send
data["a"] = "a"
if(ui)
ui.load_cached_data(ManifestJSON)
data["manifest"] = list("__json_cache" = ManifestJSON)
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_manifest.tmpl", "Crew Manifest", 450, 600)
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -499,7 +495,6 @@
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150)
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
ui.open()
@@ -12,7 +12,7 @@
w_class = 2.0
throw_speed = 5
throw_range = 10
matter = list("metal" = 500, "glass" = 200)
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200)
origin_tech = "magnets=2;biotech=1;engineering=2"
var/mode = 1;
@@ -218,7 +218,7 @@
icon = 'icons/obj/robot_component.dmi'
icon_state = "working"
construction_time = 200
construction_cost = list("metal"=5000)
construction_cost = list(DEFAULT_WALL_MATERIAL=5000)
var/brute = 0
var/burn = 0
var/icon_state_broken = "broken"
@@ -188,8 +188,8 @@
//Standard robots use config for crit, which is somewhat excessive for these guys.
//Drones killed by damage will gib.
/mob/living/silicon/robot/drone/handle_regular_status_updates()
if((health <= -35 || (master_fabricator && src.z != master_fabricator.z)) && src.stat != 2)
var/turf/T = get_turf(src)
if((!T || health <= -35 || (master_fabricator && T.z != master_fabricator.z)) && src.stat != DEAD)
timeofdeath = world.time
death() //Possibly redundant, having trouble making death() cooperate.
gib()
@@ -287,6 +287,7 @@
src.verbs -= silicon_subsystems
/mob/living/silicon/robot/drone/construction
icon_state = "constructiondrone"
law_type = /datum/ai_laws/construction_drone
module_type = /obj/item/weapon/robot_module/drone/construction
can_pull_size = 5
@@ -16,10 +16,7 @@
/obj/item/weapon/airlock_electronics,
/obj/item/weapon/module/power_control,
/obj/item/weapon/stock_parts,
/obj/item/light_fixture_frame,
/obj/item/apc_frame,
/obj/item/alarm_frame,
/obj/item/firealarm_frame,
/obj/item/frame,
/obj/item/weapon/table_parts,
/obj/item/weapon/table_parts/rack,
/obj/item/weapon/camera_assembly,
@@ -108,6 +108,9 @@
if(jobban_isbanned(src,"Cyborg"))
usr << "<span class='danger'>You are banned from playing synthetics and cannot spawn as a drone.</span>"
return
if(!MayRespawn(1))
return
var/deathtime = world.time - src.timeofdeath
if(istype(src,/mob/dead/observer))
@@ -145,4 +148,4 @@
var/choice = input(src,"Which fabricator do you wish to use?") as null|anything in all_fabricators
if(choice)
var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice]
chosen_fabricator.create_drone(src.client)
chosen_fabricator.create_drone(src.client)
@@ -58,7 +58,7 @@
src.has_power = 0
if(lights_on) // Light is on but there is no power!
lights_on = 0
SetLuminosity(0)
set_light(0)
/mob/living/silicon/robot/proc/handle_regular_status_updates()
@@ -367,9 +367,9 @@
lights_on = !lights_on
usr << "You [lights_on ? "enable" : "disable"] your integrated light."
if(lights_on)
SetLuminosity(integrated_light_power) // 1.5x luminosity of flashlight
set_light(integrated_light_power) // 1.5x luminosity of flashlight
else
SetLuminosity(0)
set_light(0)
/mob/living/silicon/robot/verb/self_diagnosis_verb()
set category = "Robot Commands"
@@ -594,6 +594,8 @@
user << "Close the panel first."
else if(cell)
user << "There is a power cell already installed."
else if(W.w_class != 3)
user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here."
else
user.drop_item()
W.loc = src
@@ -36,27 +36,31 @@ var/global/list/robot_modules = list(
// Bookkeeping
var/list/added_languages = list()
var/list/added_networks = list()
var/obj/item/device/radio/borg/modified_radio = null
var/list/modified_key = null
var/list/original_radio_channels = list()
/obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R)
..()
add_camera_networks(R)
add_languages(R)
add_radio_channels(R)
add_subsystems(R)
apply_status_flags(R)
if(R.radio)
R.radio.recalculateChannels()
/obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
..()
R.module = null
remove_camera_networks(R)
remove_languages(R)
remove_radio_channels(R)
remove_subsystems(R)
remove_status_flags(R)
/obj/item/weapon/robot_module/Destroy()
if(R.radio)
R.radio.recalculateChannels()
qdel(src)
/obj/item/weapon/robot_module/Destroy()
qdel(modules)
qdel(synths)
qdel(emag)
@@ -115,23 +119,6 @@ var/global/list/robot_modules = list(
R.camera.remove_networks(added_networks)
added_networks.Cut()
/obj/item/weapon/robot_module/proc/add_radio_channels(var/mob/living/silicon/robot/R)
if(!R.radio)
return
modified_radio = R.radio
modified_key = R.radio.keyslot
original_radio_channels = modified_radio.channels.Copy()
modified_radio.config(channels)
/obj/item/weapon/robot_module/proc/remove_radio_channels(var/mob/living/silicon/robot/R)
// Only reset if the original radio component hasn't been altered/replaced
if(!(R.radio && R.radio == modified_radio && R.radio.keyslot == modified_key))
return
modified_radio.config(original_radio_channels)
original_radio_channels.Cut()
/obj/item/weapon/robot_module/proc/add_subsystems(var/mob/living/silicon/robot/R)
R.verbs |= subsystems
@@ -739,10 +726,3 @@ var/global/list/robot_modules = list(
LR.Charge(R, amount)
..()
return
//checks whether this item is a module of the robot it is located in.
/obj/item/proc/is_robot_module()
if (!istype(src.loc, /mob/living/silicon/robot))
return 0
var/mob/living/silicon/robot/R = src.loc
return (src in R.module.modules)
+2 -6
View File
@@ -1,23 +1,19 @@
/mob/living/silicon
var/register_alarms = 1
var/obj/nano_module/alarm_monitor/alarm_monitor
var/obj/nano_module/alarm_monitor/all/alarm_monitor
var/obj/nano_module/atmos_control/atmos_control
var/obj/nano_module/crew_monitor/crew_monitor
var/obj/nano_module/law_manager/law_manager
var/obj/nano_module/power_monitor/power_monitor
var/obj/nano_module/rcon/rcon
var/alarm_monitor_type = /obj/nano_module/alarm_monitor/borg
/mob/living/silicon
alarm_monitor_type = /obj/nano_module/alarm_monitor/borg
var/list/silicon_subsystems = list(
/mob/living/silicon/proc/subsystem_alarm_monitor,
/mob/living/silicon/proc/subsystem_law_manager
)
/mob/living/silicon/ai
alarm_monitor_type = /obj/nano_module/alarm_monitor/ai
silicon_subsystems = list(
/mob/living/silicon/proc/subsystem_alarm_monitor,
/mob/living/silicon/proc/subsystem_atmos_control,
@@ -32,7 +28,7 @@
silicon_subsystems = list(/mob/living/silicon/proc/subsystem_law_manager)
/mob/living/silicon/proc/init_subsystems()
alarm_monitor = new alarm_monitor_type(src)
alarm_monitor = new(src)
atmos_control = new(src)
crew_monitor = new(src)
law_manager = new(src)
@@ -240,7 +240,7 @@
////////////////Glow//////////////////
/mob/living/simple_animal/construct/proc/add_glow()
overlays = 0
var/overlay_layer = LIGHTING_LAYER+1
var/overlay_layer = 11
if(layer != MOB_LAYER)
overlay_layer=TURF_LAYER+0.2
@@ -228,6 +228,23 @@
icon_dead = "kitten_dead"
gender = NEUTER
// Leaving this here for now.
/obj/item/weapon/holder/cat/fluff/bones
name = "Bones"
desc = "It's Bones! Meow."
gender = MALE
icon_state = "cat3"
/mob/living/simple_animal/cat/fluff/bones
name = "Bones"
desc = "That's Bones the cat. He's a laid back, black cat. Meow."
gender = MALE
icon_state = "cat3"
icon_living = "cat3"
icon_dead = "cat3_dead"
holder_type = /obj/item/weapon/holder/cat/fluff/bones
var/friend_name = "Erstatz Vryroxes"
/mob/living/simple_animal/cat/kitten/New()
gender = pick(MALE, FEMALE)
..()
@@ -94,7 +94,7 @@
emote_hear = list("clicks")
emote_see = list("clacks")
desc = "Free crabs!"
src.sd_SetLuminosity(0)
src.sd_set_light(0)
inventory_head.loc = src.loc
inventory_head = null
else
@@ -118,7 +118,7 @@
var/list/L = hearers(src, dist)
for (var/obj/mecha/M in mechas_list)
if (get_dist(src, M) <= dist)
if (M.z == src.z && get_dist(src, M) <= dist)
L += M
return L
@@ -277,9 +277,9 @@
qdel(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] applies the [MED] on [src].</span>")
M.show_message("<span class='notice'>[user] applies the [MED] on [src].</span>")
else
user << "<span class='notice>\The [src] is dead, medical items won't bring it back to life.</span>"
user << "<span class='notice'>\The [src] is dead, medical items won't bring it 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/kitchenknife) || istype(O, /obj/item/weapon/butch))
harvest(user)
@@ -300,7 +300,7 @@
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] gently taps [src] with the [O].</span>")
M.show_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
@@ -137,10 +137,9 @@
proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
var/turf/simulated/wall/wall = target
wall.ChangeTurf(/turf/simulated/floor)
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
var/turf/simulated/wall/W = target
if((!W.reinf_material && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
W.dismantle_wall()
return 1
else if(istype(target,/atom/movable))
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
+259 -61
View File
@@ -3,14 +3,19 @@
/obj/item/weapon/grab
name = "grab"
flags = NOBLUDGEON
icon = 'icons/mob/screen1.dmi'
icon_state = "reinforce"
flags = 0
var/obj/screen/grab/hud = null
var/mob/affecting = null
var/mob/assailant = null
var/mob/living/affecting = null
var/mob/living/carbon/human/assailant = null
var/state = GRAB_PASSIVE
var/allow_upgrade = 1
var/last_upgrade = 0
var/last_action = 0
var/last_hit_zone = 0
var/force_down //determines if the affecting mob will be pinned to the ground
var/dancing //determines if assailant and affecting keep looking at each other. Basically a wrestling position
layer = 21
abstract = 1
@@ -24,7 +29,7 @@
assailant = user
affecting = victim
if(affecting.anchored)
if(affecting.anchored || !assailant.Adjacent(victim))
qdel(src)
return
@@ -32,20 +37,18 @@
hud = new /obj/screen/grab(src)
hud.icon_state = "reinforce"
icon_state = "grabbed"
hud.name = "reinforce grab"
hud.master = src
/obj/item/weapon/grab/Destroy()
//make sure the grabbed_by list doesn't fill up with nulls
if(affecting)
affecting.grabbed_by -= src
affecting = null
if(assailant)
if(assailant.client)
assailant.client.screen -= hud
assailant = null
qdel(hud)
..()
//check if assailant is grabbed by victim as well
if(assailant.grabbed_by)
for (var/obj/item/weapon/grab/G in assailant.grabbed_by)
if(G.assailant == affecting && G.affecting == assailant)
G.dancing = 1
G.adjust_position()
dancing = 1
adjust_position()
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
/obj/item/weapon/grab/proc/throw()
@@ -53,6 +56,7 @@
if(affecting.buckled)
return null
if(state >= GRAB_AGGRESSIVE)
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1)
return affecting
return null
@@ -67,7 +71,13 @@
/obj/item/weapon/grab/process()
if(gcDestroyed) // GC is trying to delete us, we'll kill our processing so we can cleanly GC
return PROCESS_KILL
confirm()
if(!assailant)
qdel(src) // Same here, except we're trying to delete ourselves.
return PROCESS_KILL
if(assailant.client)
assailant.client.screen -= hud
@@ -87,20 +97,47 @@
var/obj/item/weapon/grab/G = assailant.r_hand
if(G.affecting != affecting)
allow_upgrade = 0
if(state == GRAB_AGGRESSIVE)
affecting.drop_l_hand()
affecting.drop_r_hand()
//disallow upgrading past aggressive if we're being grabbed aggressively
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
if(G == src) continue
if(G.state >= GRAB_AGGRESSIVE)
allow_upgrade = 0
//disallow upgrading past aggressive if we're being grabbed aggressively
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
if(G == src) continue
if(G.state >= GRAB_AGGRESSIVE)
allow_upgrade = 0
if(allow_upgrade)
hud.icon_state = "reinforce"
if(state < GRAB_AGGRESSIVE)
hud.icon_state = "reinforce"
else
hud.icon_state = "reinforce1"
else
hud.icon_state = "!reinforce"
else if(!affecting.buckled)
affecting.loc = assailant.loc
if(state >= GRAB_AGGRESSIVE)
affecting.drop_l_hand()
affecting.drop_r_hand()
var/hit_zone = assailant.zone_sel.selecting
var/announce = 0
if(hit_zone != last_hit_zone)
announce = 1
last_hit_zone = hit_zone
if(ishuman(affecting))
switch(hit_zone)
if("mouth")
if(announce)
assailant.visible_message("<span class='warning'>[assailant] covers [affecting]'s mouth!</span>")
if(affecting:silent < 3)
affecting:silent = 3
if("eyes")
if(announce)
assailant.visible_message("<span class='warning'>[assailant] covers [affecting]'s eyes!</span>")
if(affecting:eye_blind < 3)
affecting:eye_blind = 3
if(force_down)
if(affecting.loc != assailant.loc)
force_down = 0
else
affecting.Weaken(2)
if(state >= GRAB_NECK)
affecting.Stun(3)
@@ -112,7 +149,59 @@
//affecting.apply_effect(STUTTER, 5) //would do this, but affecting isn't declared as mob/living for some stupid reason.
affecting.stuttering = max(affecting.stuttering, 5) //It will hamper your voice, being choked and all.
affecting.Weaken(5) //Should keep you down unless you get help.
affecting.losebreath = min(affecting.losebreath + 2, 3)
affecting.losebreath = max(affecting.losebreath + 2, 3)
adjust_position()
/obj/item/weapon/grab/attack_self()
return s_click(hud)
//Updating pixelshift, position and direction
//Gets called on process, when the grab gets upgraded or the assailant moves
/obj/item/weapon/grab/proc/adjust_position()
if(affecting.buckled)
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
return
if(affecting.lying && state != GRAB_KILL)
animate(affecting, pixel_x = 0, pixel_y = 0, 5, 1, LINEAR_EASING)
if(force_down)
affecting.set_dir(SOUTH) //face up
return
var/shift = 0
var/adir = get_dir(assailant, affecting)
affecting.layer = 4
switch(state)
if(GRAB_PASSIVE)
shift = 8
if(dancing) //look at partner
shift = 10
assailant.set_dir(get_dir(assailant, affecting))
if(GRAB_AGGRESSIVE)
shift = 12
if(GRAB_NECK, GRAB_UPGRADING)
shift = -10
adir = assailant.dir
affecting.set_dir(assailant.dir)
affecting.loc = assailant.loc
if(GRAB_KILL)
shift = 0
adir = 1
affecting.set_dir(SOUTH) //face up
affecting.loc = assailant.loc
switch(adir)
if(NORTH)
animate(affecting, pixel_x = 0, pixel_y =-shift, 5, 1, LINEAR_EASING)
affecting.layer = 3.9
if(SOUTH)
animate(affecting, pixel_x = 0, pixel_y = shift, 5, 1, LINEAR_EASING)
if(WEST)
animate(affecting, pixel_x = shift, pixel_y = 0, 5, 1, LINEAR_EASING)
if(EAST)
animate(affecting, pixel_x =-shift, pixel_y = 0, 5, 1, LINEAR_EASING)
/obj/item/weapon/grab/proc/s_click(obj/screen/S)
@@ -122,20 +211,29 @@
return
if(assailant.next_move > world.time)
return
if(world.time < (last_upgrade + UPGRADE_COOLDOWN))
if(world.time < (last_action + UPGRADE_COOLDOWN))
return
if(!assailant.canmove || assailant.lying)
qdel(src)
return
last_upgrade = world.time
last_action = world.time
if(state < GRAB_AGGRESSIVE)
if(!allow_upgrade)
return
assailant.visible_message("<span class='warning'>[assailant] has grabbed [affecting] aggressively (now hands)!</span>")
if(!affecting.lying)
assailant.visible_message("<span class='warning'>[assailant] has grabbed [affecting] aggressively (now hands)!</span>")
else
assailant.visible_message("<span class='warning'>[assailant] pins [affecting] down to the ground (now hands)!</span>")
force_down = 1
affecting.Weaken(3)
step_to(assailant, affecting)
assailant.set_dir(EAST) //face the victim
affecting.set_dir(SOUTH) //face up
state = GRAB_AGGRESSIVE
icon_state = "grabbed1"
hud.icon_state = "reinforce1"
else if(state < GRAB_NECK)
if(isslime(affecting))
assailant << "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>"
@@ -144,38 +242,27 @@
assailant.visible_message("<span class='warning'>[assailant] has reinforced \his grip on [affecting] (now neck)!</span>")
state = GRAB_NECK
icon_state = "grabbed+1"
if(!affecting.buckled)
affecting.loc = assailant.loc
assailant.set_dir(get_dir(assailant, affecting))
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
hud.icon_state = "kill"
hud.name = "kill"
affecting.Stun(10) //10 ticks of ensured grab
else if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill1"
state = GRAB_UPGRADING
if(do_after(assailant, UPGRADE_KILL_TIMER))
if(state == GRAB_KILL)
return
if(!affecting)
qdel(src)
return
if(!assailant.canmove || assailant.lying)
qdel(src)
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
hud.icon_state = "kill1"
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill"
state = GRAB_NECK
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
assailant.next_move = world.time + 10
affecting.losebreath += 1
affecting.set_dir(WEST)
adjust_position()
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
@@ -192,14 +279,109 @@
return 1
/obj/item/weapon/grab/attack(mob/M, mob/user)
/obj/item/weapon/grab/attack(mob/M, mob/living/user)
if(!affecting)
return
if(M == affecting)
s_click(hud)
if(world.time < (last_action + 20))
return
if(M == affecting)
if(ishuman(M))
last_action = world.time
var/hit_zone = assailant.zone_sel.selecting
flick(hud.icon_state, hud)
switch(assailant.a_intent)
if(I_HELP)
if(force_down)
assailant << "<span class='warning'>You are no longer pinning [affecting] to the ground.</span>"
force_down = 0
return
if(I_GRAB)
if(state < GRAB_AGGRESSIVE)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
var/obj/item/organ/external/organ = affecting:get_organ(check_zone(hit_zone))
if(!organ || organ.dislocated == -1)
return
assailant.visible_message("<span class='danger'>[assailant] [pick("bent", "twisted")] [affecting]'s [organ.name] into a jointlock!</span>")
var/armor = affecting:run_armor_check(affecting, "melee")
if(armor < 2)
affecting << "<span class='danger'>You feel extreme pain!</span>"
affecting.adjustHalLoss(Clamp(0, 40-affecting.halloss, 40)) //up to 40 halloss
return
if(I_HURT)
if(hit_zone == "eyes")
if(state < GRAB_NECK)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
if((affecting:head && affecting:head.flags & HEADCOVERSEYES) || \
(affecting:wear_mask && affecting:wear_mask.flags & MASKCOVERSEYES) || \
(affecting:glasses && affecting:glasses.flags & GLASSESCOVERSEYES))
assailant << "<span class='danger'>You're going to need to remove the eye covering first.</span>"
return
if(!affecting.has_eyes())
assailant << "<span class='danger'>You cannot locate any eyes on [affecting]!</span>"
return
assailant.visible_message("<span class='danger'>[assailant] pressed \his fingers into [affecting]'s eyes!</span>")
affecting << "<span class='danger'>You experience immense pain as you feel digits being pressed into your eyes!</span>"
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Pressed fingers into the eyes of [affecting.name] ([affecting.ckey])</font>")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had fingers pressed into their eyes by [assailant.name] ([assailant.ckey])</font>")
msg_admin_attack("[key_name(assailant)] has pressed his fingers into [key_name(affecting)]'s eyes.")
var/obj/item/organ/eyes/eyes = affecting:internal_organs_by_name["eyes"]
eyes.damage += rand(3,4)
if (eyes.damage >= eyes.min_broken_damage)
if(affecting.stat != 2)
affecting << "\red You go blind!"
else if(hit_zone != "head")
if(state < GRAB_NECK)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
if(affecting:grab_joint(assailant))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
else
if(affecting.lying)
return
assailant.visible_message("<span class='danger'>[assailant] thrusts \his head into [affecting]'s skull!</span>")
var/damage = 20
var/obj/item/clothing/hat = assailant.head
if(istype(hat))
damage += hat.force * 10
var/armor = affecting:run_armor_check(affecting, "melee")
affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", armor)
assailant.apply_damage(10*rand(90, 110)/100, BRUTE, "head", assailant:run_armor_check("head", "melee"))
if(!armor && prob(damage))
affecting.apply_effect(20, PARALYZE)
affecting.visible_message("<span class='danger'>[affecting] has been knocked unconscious!</span>")
playsound(assailant.loc, "swing_hit", 25, 1, -1)
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [affecting.name] ([affecting.ckey])</font>")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [assailant.name] ([assailant.ckey])</font>")
msg_admin_attack("[key_name(assailant)] has headbutted [key_name(affecting)]")
assailant.drop_from_inventory(src)
src.loc = null
qdel(src)
return
if(I_DISARM)
if(state < GRAB_AGGRESSIVE)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
assailant << "<span class='warning'>You start forcing [affecting] to the ground.</span>"
if(!force_down)
if(do_after(assailant, 20) && affecting)
assailant.visible_message("<span class='danger'>[assailant] is forcing [affecting] to the ground!</span>")
force_down = 1
affecting.Weaken(3)
affecting.lying = 1
step_to(assailant, affecting)
assailant.set_dir(EAST) //face the victim
affecting.set_dir(SOUTH) //face up
return
else
assailant << "<span class='warning'>You are already pinning [affecting] to the ground.</span>"
return
if(M == assailant && state >= GRAB_AGGRESSIVE)
var/can_eat
@@ -227,8 +409,24 @@
/obj/item/weapon/grab/dropped()
qdel(src)
loc = null
if(!destroying)
qdel(src)
/obj/item/weapon/grab
var/destroying = 0
/obj/item/weapon/grab/Destroy()
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
affecting.layer = 4
if(affecting)
affecting.grabbed_by -= src
affecting = null
if(assailant)
if(assailant.client)
assailant.client.screen -= hud
assailant = null
qdel(hud)
hud = null
destroying = 1 // stops us calling qdel(src) on dropped()
..()
+61 -2
View File
@@ -82,6 +82,7 @@
/mob/living/silicon/isSilicon()
return 1
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
@@ -93,10 +94,10 @@
/mob/living/silicon/ai/isAI()
return 1
/mob/proc/isRobot()
/mob/proc/isMobAI()
return 0
/mob/living/silicon/robot/isRobot()
/mob/living/silicon/ai/isMobAI()
return 1
/mob/proc/isSynthetic()
@@ -619,3 +620,61 @@ proc/is_blind(A)
// Returns true if the mob has a client which has been active in the last given X minutes.
/mob/proc/is_client_active(var/active = 1)
return client && client.inactivity < active MINUTES
#define SAFE_PERP -50
/mob/living/proc/assess_perp(var/auth_weapons, var/check_records, var/check_arrest)
if(stat == DEAD)
return SAFE_PERP
return 0
/mob/living/carbon/human/assess_perp(var/obj/access_obj, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)
return SAFE_PERP
//Agent cards lower threatlevel.
var/obj/item/weapon/card/id/id = GetIdCard(src)
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
threatcount -= 2
// A proper CentCom id is hard currency.
else if(id && istype(id, /obj/item/weapon/card/id/centcom))
return SAFE_PERP
if(auth_weapons && !access_obj.allowed(src))
if(istype(l_hand, /obj/item/weapon/gun) || istype(l_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(r_hand, /obj/item/weapon/gun) || istype(r_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(belt, /obj/item/weapon/gun) || istype(belt, /obj/item/weapon/melee))
threatcount += 2
if(species.name != "Human")
threatcount += 2
if(check_records || check_arrest)
var/perpname = name
if(id)
perpname = id.registered_name
var/datum/data/record/R = find_security_record("name", perpname)
if(check_records && !R)
threatcount += 4
if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
threatcount += 4
return threatcount
/mob/living/simple_animal/hostile/assess_perp(var/obj/access_obj, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)
return SAFE_PERP
if(!istype(src, /mob/living/simple_animal/hostile/retaliate/goat))
threatcount += 4
return threatcount
#undef SAFE_PERP
+8 -1
View File
@@ -343,6 +343,13 @@
else
. = mob.SelfMove(n, direct)
for (var/obj/item/weapon/grab/G in mob)
if (G.state == GRAB_NECK)
mob.set_dir(reverse_dir[direct])
G.adjust_position()
for (var/obj/item/weapon/grab/G in mob.grabbed_by)
G.adjust_position()
moving = 0
return .
@@ -360,7 +367,7 @@
for(var/obj/item/weapon/grab/G in list(mob.l_hand, mob.r_hand))
if(G.state == GRAB_KILL) //no wandering across the station/asteroid while choking someone
mob.visible_message("<span class='warning'>[mob] lost \his tight grip on [G.affecting]'s neck!</span>")
G.hud.icon_state = "disarm/kill"
G.hud.icon_state = "kill"
G.state = GRAB_NECK
///Process_Incorpmove
+9 -2
View File
@@ -5,6 +5,7 @@
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
var/totalPlayers = 0 //Player counts for the Lobby tab
var/totalPlayersReady = 0
universal_speak = 1
invisibility = 101
@@ -130,6 +131,8 @@
if(client.prefs.be_random_name)
client.prefs.real_name = random_name(client.prefs.gender)
if(client.prefs.dummy)
qdel(client.prefs.dummy)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
@@ -311,7 +314,7 @@
var/mob/living/character = create_character() //creates the human and transfers vars and mind
character = job_master.EquipRank(character, rank, 1) //equips the human
UpdateFactionList(character)
EquipCustomItems(character)
equip_custom_items(character)
// AIs don't need a spawnpoint, they must spawn at an empty core
if(character.mind.assigned_role == "AI")
@@ -449,7 +452,8 @@
client.prefs.randomize_appearance_for(new_character)
else
client.prefs.copy_to(new_character)
if(client.prefs.dummy)
qdel(client.prefs.dummy)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
if(mind)
@@ -527,3 +531,6 @@
/mob/new_player/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0)
return
mob/new_player/MayRespawn()
return 1
+35 -513
View File
@@ -178,519 +178,41 @@ datum/preferences
b_skin = blue
proc/update_preview_icon() //seriously. This is horrendous.
qdel(preview_icon_front)
qdel(preview_icon_side)
qdel(preview_icon)
proc/update_preview_icon() //seriously. This is horrendous. //less so now
if(!dummy)
dummy = new(null, species)
dummy.set_species(species)
dummy.flags |= GODMODE
copy_to(dummy)
var/g = "m"
if(gender == FEMALE) g = "f"
var/jobflag
var/dept
if(job_civilian_high)
jobflag = job_civilian_high
dept = CIVILIAN
else if (job_medsci_high)
jobflag = job_medsci_high
dept = MEDSCI
else if (job_engsec_high)
jobflag = job_engsec_high
dept = ENGSEC
var/icon/icobase
var/datum/species/current_species = all_species[species]
if(current_species)
icobase = current_species.icobase
else
icobase = 'icons/mob/human_races/r_human.dmi'
preview_icon = new /icon(icobase, "torso_[g]")
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
if(organ_data[name] == "amputated") continue
if(organ_data[name] == "cyborg")
var/datum/robolimb/R
if(rlimb_data[name]) R = all_robolimbs[rlimb_data[name]]
if(!R) R = basic_robolimb
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
continue
preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
//Tail
if(current_species && (current_species.tail))
var/icon/temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[current_species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin color
if(current_species && (current_species.flags & HAS_SKIN_COLOR))
preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
// Skin tone
if(current_species && (current_species.flags & HAS_SKIN_TONE))
if (s_tone >= 0)
preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
if ((current_species && (current_species.flags & HAS_EYE_COLOR)))
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/underwear_s = null
if(underwear && current_species.flags & HAS_UNDERWEAR)
underwear_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = underwear)
var/icon/undershirt_s = null
if(undershirt && current_species.flags & HAS_UNDERWEAR)
undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = undershirt)
var/icon/clothes_s = null
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
switch(job_civilian_high)
if(HOP)
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "ianshirt"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(BARTENDER)
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "tophat"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(BOTANIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "nymph"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chefhat"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apronchef"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(JANITOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_janitor"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(LIBRARIAN)
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hairflower"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(QUARTERMASTER)
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "poncho"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CARGOTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "flat_cap"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(MINER)
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "bearpelt"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(LAWYER)
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "briefcase"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHAPLAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "imperium_monk"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CLOWN)
clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
if(MIME)
clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_medsci_high)
switch(job_medsci_high)
if(RD)
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "petehat"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(SCIENTIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(XENOBIOLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHEMIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labgreen"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CMO)
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_cmo"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(DOCTOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "surgeon"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(GENETICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "monkeysuit"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(VIROLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "plaguedoctor"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ROBOTICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "toolbox_blue"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_engsec_high)
switch(job_engsec_high)
if(CAPTAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "centcomcaptain"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-cap"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(HOS)
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hosberet"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(WARDEN)
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "slippers_worn"), ICON_OVERLAY)
else
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(DETECTIVE)
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(OFFICER)
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/head.dmi', "officerberet"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CHIEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "blueprints"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ENGINEER)
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hazard"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(ATMOSTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if(prob(1))
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "firesuit"), ICON_OVERLAY)
switch(backbag)
if(2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "straight_jacket"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CYBORG)
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "cardborg"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(disabilities & NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
if(undershirt_s)
preview_icon.Blend(undershirt_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
if(jobflag && dept && job_master)
for (var/datum/job/J in job_master.occupations)
if((J.department_flag & dept) && (J.flag & jobflag))
var/alt = GetPlayerAltTitle(J)
if(alt) //more hacks
if(!dummy.mind)
dummy.mind = new
dummy.mind.role_alt_title = alt
J.equip(dummy)
break
dummy.update_eyes()
dummy.force_update_limbs()
dummy.regenerate_icons()
preview_icon = icon(dummy.icon)
for(var/image/I in dummy.overlays_standing)
if(I && I.icon)
preview_icon.Blend(icon(I.icon, I.icon_state), ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
qdel(eyes_s)
qdel(underwear_s)
qdel(undershirt_s)
qdel(clothes_s)
preview_icon_side = new(preview_icon, dir = WEST)