This commit is contained in:
Zuhayr
2015-03-24 23:52:24 +10:30
26 changed files with 115 additions and 125 deletions

View File

@@ -19,6 +19,10 @@ var/datum/antagonist/rogue_ai/malf
var/station_captured
var/can_nuke = 0
/datum/antagonist/rogue_ai/New()
..()
malf = src
/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc)
hacked_apcs |= apc

View File

@@ -146,6 +146,9 @@
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
if(H.internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
eyes.eye_colour = list(H.r_eyes,H.g_eyes,H.b_eyes)
H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative.

View File

@@ -235,6 +235,9 @@
H.r_eyes = hex2num(getblock(structure,8,3))
H.g_eyes = hex2num(getblock(structure,9,3))
H.b_eyes = hex2num(getblock(structure,10,3))
if(H.internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
eyes.eye_colour = list(H.r_eyes,H.g_eyes,H.b_eyes)
if (isblockon(getblock(structure, 11,3),11 , 1))
H.gender = FEMALE

View File

@@ -433,6 +433,11 @@ var/list/sacrificed = list()
D.b_eyes = 200
D.r_eyes = 200
D.g_eyes = 200
if(D.internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = D.internal_organs_by_name["eyes"]
eyes.eye_colour = list(D.r_eyes,D.g_eyes,D.b_eyes)
D.underwear = 0
D.key = ghost.key

View File

@@ -270,9 +270,9 @@ Class Procs:
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning()
return 1
else
return 0
if(user.stunned)
return 1
return 0
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))

View File

@@ -30,7 +30,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 2
if(usr.stunned)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)

View File

@@ -68,12 +68,12 @@
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.damage
var/passthrough = 0
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
switch(Proj.damage_type)
if(BRUTE)
//bullets
//bullets
if(Proj.original == src || prob(20))
Proj.damage *= between(0, Proj.damage/60, 0.5)
if(prob(max((damage-10)/25, 0))*100)
@@ -86,11 +86,11 @@
if(!(Proj.original == src || prob(20)))
Proj.damage *= 0.5
passthrough = 1
if(passthrough)
. = -1
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
@@ -139,7 +139,7 @@
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/wtype = ST.created_window
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
@@ -197,7 +197,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
return 1
if(user.stunned)
return 1
else
return 0
return 0

View File

@@ -801,6 +801,9 @@ var/list/admin_verbs_mentor = list(
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
if(M.internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = M.internal_organs_by_name["eyes"]
eyes.eye_colour = list(M.r_eyes,M.g_eyes,M.b_eyes)
var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
if(new_skin)

View File

@@ -688,27 +688,28 @@
//Todo
/obj/item/weapon/rig/proc/malfunction()
return 0
return 0
/obj/item/weapon/rig/emp_act(severity_class)
//set malfunctioning
if(emp_protection < 30) //for ninjas, really.
malfunctioning += 10
if(malfunction_delay <= 0)
malfunction_delay = max(malfunction_delay, round(30/severity_class))
malfunction_delay = max(malfunction_delay, round(30/severity_class))
//drain some charge
if(cell) cell.emp_act(severity_class + 15)
//possibly damage some modules
take_hit((100/severity_class), "electrical pulse", 1)
take_hit((100/severity_class), "electrical pulse", 1)
/obj/item/weapon/rig/proc/shock(mob/user)
if (electrocute_mob(user, cell, src))
spark_system.start()
return 1
if(user.stunned)
return 1
return 0
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
if(!installed_modules.len)
@@ -740,7 +741,7 @@
dam_module = pick(damaged_modules)
else if(valid_modules.len)
dam_module = pick(valid_modules)
if(!dam_module) return
dam_module.damage++
@@ -748,11 +749,11 @@
if(!source)
source = "hit"
if(wearer)
if(wearer)
if(dam_module.damage >= 2)
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!"
else
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
dam_module.deactivate()
/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user)

View File

@@ -66,7 +66,9 @@ var/global/datum/controller/plants/plant_controller // Set in New().
plant_sprites[base] = ikey
for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi'))
plant_product_sprites |= icostate
var/split = findtext(icostate,"-")
if(split)
plant_product_sprites |= copytext(icostate,1,split)
// Populate the global seed datum list.
for(var/type in typesof(/datum/seed)-/datum/seed)

View File

@@ -12,6 +12,8 @@ var/global/list/plant_seed_sprites = list()
var/modified = 0
/obj/item/seeds/New()
while(!plant_controller)
sleep(30)
update_seed()
..()

View File

@@ -83,6 +83,10 @@
g_eyes = green
b_eyes = blue
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
eyes.eye_colour = list(r_eyes,g_eyes,b_eyes)
update_body()
return 1

View File

@@ -801,6 +801,10 @@
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
b_eyes = hex2num(copytext(new_eyes, 6, 8))
if(internal_organs_by_name["eyes"])
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
eyes.eye_colour = list(r_eyes,g_eyes,b_eyes)
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", "[35-s_tone]") as text

View File

@@ -154,21 +154,21 @@
H.internal_organs_by_name = list()
//This is a basic humanoid limb setup.
H.organs_by_name["chest"] = new/obj/item/organ/external/chest(null,H)
H.organs_by_name["groin"] = new/obj/item/organ/external/groin(H.organs_by_name["chest"],H)
H.organs_by_name["head"] = new/obj/item/organ/external/head(H.organs_by_name["chest"],H)
H.organs_by_name["l_arm"] = new/obj/item/organ/external/arm(H.organs_by_name["chest"],H)
H.organs_by_name["r_arm"] = new/obj/item/organ/external/arm/right(H.organs_by_name["chest"],H)
H.organs_by_name["r_leg"] = new/obj/item/organ/external/leg(H.organs_by_name["groin"],H)
H.organs_by_name["l_leg"] = new/obj/item/organ/external/leg/right(H.organs_by_name["groin"],H)
H.organs_by_name["l_hand"] = new/obj/item/organ/external/hand(H.organs_by_name["l_arm"],H)
H.organs_by_name["r_hand"] = new/obj/item/organ/external/hand/right(H.organs_by_name["r_arm"],H)
H.organs_by_name["l_foot"] = new/obj/item/organ/external/foot(H.organs_by_name["l_leg"],H)
H.organs_by_name["r_foot"] = new/obj/item/organ/external/foot/right(H.organs_by_name["r_leg"],H)
H.organs_by_name["chest"] = new/obj/item/organ/external/chest(H)
H.organs_by_name["groin"] = new/obj/item/organ/external/groin(H)
H.organs_by_name["head"] = new/obj/item/organ/external/head(H)
H.organs_by_name["l_arm"] = new/obj/item/organ/external/arm(H)
H.organs_by_name["r_arm"] = new/obj/item/organ/external/arm/right(H)
H.organs_by_name["r_leg"] = new/obj/item/organ/external/leg(H)
H.organs_by_name["l_leg"] = new/obj/item/organ/external/leg/right(H)
H.organs_by_name["l_hand"] = new/obj/item/organ/external/hand(H)
H.organs_by_name["r_hand"] = new/obj/item/organ/external/hand/right(H)
H.organs_by_name["l_foot"] = new/obj/item/organ/external/foot(H)
H.organs_by_name["r_foot"] = new/obj/item/organ/external/foot/right(H)
for(var/organ in has_organ)
var/organ_type = has_organ[organ]
H.internal_organs_by_name[organ] = new organ_type(H,H,1)
H.internal_organs_by_name[organ] = new organ_type(H,1)
for(var/name in H.organs_by_name)
H.organs += H.organs_by_name[name]

View File

@@ -243,10 +243,6 @@ proc/get_damage_icon_part(damage_state, body_part)
var/icon_key = "[species.race_key][g][s_tone]"
for(var/obj/item/organ/external/part in organs)
if(istype(part,/obj/item/organ/external/head) && !(part.status & ORGAN_DESTROYED))
has_head = 1
if(part.status & ORGAN_DESTROYED)
icon_key = "[icon_key]0"
else if(part.status & ORGAN_ROBOT)
@@ -274,36 +270,24 @@ proc/get_damage_icon_part(damage_state, body_part)
base_icon = chest.get_icon()
for(var/obj/item/organ/external/part in organs)
var/icon/temp = part.get_icon(skeleton)
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
if(part.icon_position&(LEFT|RIGHT))
var/icon/temp2 = new('icons/mob/human.dmi',"blank")
temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH)
temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH)
if(!(part.icon_position & LEFT))
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(!(part.icon_position & RIGHT))
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_OVERLAY)
if(part.icon_position & LEFT)
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
if(part.icon_position & RIGHT)
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
base_icon.Blend(temp2, ICON_UNDERLAY)
else
base_icon.Blend(temp, ICON_OVERLAY)
if(!skeleton)
@@ -884,41 +868,6 @@ proc/get_damage_icon_part(damage_state, body_part)
overlays_standing[SURGERY_LEVEL] = total
if(update_icons) update_icons()
// Used mostly for creating head items
/mob/living/carbon/human/proc/generate_head_icon()
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
// var/g = "m"
// if (gender == FEMALE) g = "f"
//base icons
var/icon/face_lying = new /icon('icons/mob/human_face.dmi',"bald_l")
if(f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
face_lying.Blend(facial_l, ICON_OVERLAY)
if(h_style)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
face_lying.Blend(hair_l, ICON_OVERLAY)
//Eyes
// Note: These used to be in update_face(), and the fact they're here will make it difficult to create a disembodied head
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
face_lying.Blend(eyes_l, ICON_OVERLAY)
if(lip_style)
face_lying.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
var/image/face_lying_image = new /image(icon = face_lying)
return face_lying_image
//Human Overlays Indexes/////////
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER

View File

@@ -189,7 +189,7 @@ var/list/ai_verbs_default = list(
src << radio_text
if (!(ticker && ticker.mode && (mind in malf.current_antagonists)))
if (malf && !(mind in malf.current_antagonists))
show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"

View File

@@ -196,7 +196,7 @@
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass)
src.modules += R
src.modules += RG
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"

View File

@@ -25,32 +25,27 @@ var/list/organ_cache = list()
/obj/item/organ/proc/update_health()
return
/obj/item/organ/New(var/newloc, var/mob/living/carbon/holder, var/internal)
..(newloc)
/obj/item/organ/New(var/mob/living/carbon/holder, var/internal)
..(holder)
create_reagents(5)
if(!max_damage) max_damage = min_broken_damage * 2
if(!max_damage)
max_damage = min_broken_damage * 2
if(istype(holder))
if(internal)
holder.internal_organs |= src
src.owner = holder
var/mob/living/carbon/human/H = holder
if(istype(H))
if(internal)
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
if(E)
if(E.internal_organs == null)
E.internal_organs = list()
E.internal_organs |= src
if(H.dna)
if(!blood_DNA)
blood_DNA = list()
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
if(E)
if(E.internal_organs == null)
E.internal_organs = list()
E.internal_organs |= src
if(internal)
holder.internal_organs |= src
/obj/item/organ/proc/die()
name = "dead [initial(name)]"

View File

@@ -108,13 +108,15 @@
return
/obj/item/organ/external/New(var/newloc, var/mob/living/carbon/holder, var/obj/item/organ/external/P)
if(P)
parent = P
if(!parent.children)
parent.children = list()
parent.children.Add(src)
return ..()
/obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal)
..()
if(owner && parent_organ && istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
var/obj/item/organ/external/parent = H.organs_by_name[src.parent_organ]
if(parent)
if(!parent.children)
parent.children = list()
parent.children.Add(src)
/****************************************************
DAMAGE PROCS

View File

@@ -35,7 +35,7 @@ var/global/list/limb_icon_cache = list()
//TODO: cache these icons
if(skeletal)
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else if (status & ORGAN_ROBOT && !(owner.species && owner.species.flags & IS_SYNTHETIC))
else if ((status & ORGAN_ROBOT) && !(owner.species && owner.species.flags & IS_SYNTHETIC))
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else
if (status & ORGAN_MUTATED)
@@ -55,9 +55,9 @@ var/global/list/limb_icon_cache = list()
else if(owner.species.flags & HAS_SKIN_COLOR)
mob_icon.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin), ICON_ADD)
icon = mob_icon
dir = EAST
return icon
icon = mob_icon
return mob_icon
/obj/item/organ/external/head/get_icon(var/skeletal)
@@ -73,7 +73,7 @@ var/global/list/limb_icon_cache = list()
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
if(owner.lip_style && (owner.species && owner.species.flags & HAS_LIPS))
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
if(owner.f_style)
@@ -94,7 +94,7 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(hair, ICON_OVERLAY)
icon = mob_icon
return icon
return mob_icon
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)

View File

@@ -68,7 +68,7 @@
gender = PLURAL
organ_tag = "eyes"
parent_organ = "head"
var/list/eye_colour
var/list/eye_colour = list(0,0,0)
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
..()
@@ -79,6 +79,15 @@
if(is_broken())
owner.eye_blind = 20
/obj/item/organ/eyes/New()
..()
if(owner)
eye_colour = list(
owner.r_eyes ? owner.r_eyes : 0,
owner.g_eyes ? owner.g_eyes : 0,
owner.b_eyes ? owner.b_eyes : 0
)
/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user)
if(!eye_colour)

View File

@@ -324,8 +324,7 @@
if(href_list["write"])
var/id = href_list["write"]
//var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message
//var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
var/t = input("Enter what you want to write:", "Write", null, null) as message
var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN)
var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))

View File

@@ -534,7 +534,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
if(user.stunned)
return
C.use(10)
user.visible_message(\
"<span class='warning'>[user.name] has added cables to the APC frame!</span>",\
@@ -554,7 +555,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
if(usr.stunned)
return
new /obj/item/stack/cable_coil(loc,10)
user << "<span class='notice'>You cut the cables and dismantle the power terminal.</span>"
del(terminal) // qdel

View File

@@ -193,9 +193,9 @@ By design, d1 is the smallest direction and d2 is the highest
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
if(usr.stunned)
return 1
return 0
//explosion handling
/obj/structure/cable/ex_act(severity)

View File

@@ -275,7 +275,8 @@
s.set_up(5, 1, src)
s.start()
building_terminal = 0
return 0
if(usr.stunned)
return 0
new /obj/item/stack/cable_coil(loc,10)
user.visible_message(\
"<span class='notice'>[user.name] cut the cables and dismantled the power terminal.</span>",\

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB