Merge pull request #3395 from Zuhayr/feature

Podman rewrite, icons. Fixes from master. ERT stuff from Meyar.
This commit is contained in:
Chinsky
2013-07-30 14:47:55 -07:00
10 changed files with 224 additions and 158 deletions
+1 -1
View File
@@ -314,6 +314,7 @@
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\podmen.dm"
#include "code\game\machinery\portable_turret.dm"
#include "code\game\machinery\recharger.dm"
#include "code\game\machinery\rechargestation.dm"
@@ -1324,7 +1325,6 @@
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
#include "code\WorkInProgress\Chinsky\ashtray.dm"
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
#include "code\WorkInProgress\kilakk\responseteam.dm"
#include "code\WorkInProgress\Mini\ATM.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
-24
View File
@@ -81,30 +81,6 @@
plant_type = 2
growthstages = 3
/obj/item/seeds/replicapod
name = "pack of replica pod seeds"
desc = "These seeds grow into replica pods. They say these are used to harvest humans."
icon_state = "seed-replicapod"
mypath = "/obj/item/seeds/replicapod"
species = "replicapod"
plantname = "Replica Pod"
productname = "/mob/living/carbon/human" //verrry special -- Urist
lifespan = 50 //no idea what those do
endurance = 8
maturation = 10
production = 10
yield = 1 //seeds if there isn't a dna inside
oneharvest = 1
potency = 30
plant_type = 0
growthstages = 6
var/ui = null //for storing the guy
var/se = null
var/ckey = null
var/realName = null
var/datum/mind/mind = null
gender = MALE
/obj/item/seeds/grapeseed
name = "pack of grape seeds"
desc = "These seeds grow into grape vines."
+2 -104
View File
@@ -915,115 +915,13 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
parent.update_tray()
/obj/item/seeds/replicapod/harvest(mob/user = usr) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
var/mob/ghost
if(ckey && config.revival_pod_plants)
ghost = find_dead_player("[ckey]")
if(ismob(ghost))
if(istype(ghost,/mob/dead/observer))
var/mob/dead/observer/O = ghost
if(istype(mind,/datum/mind))
if(O.can_reenter_corpse)
make_podman = 1
else
make_podman = 1
if(make_podman) //all conditions met!
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
if(realName)
podman.real_name = realName
else
podman.real_name = "Pod Person [rand(0,999)]"
var/oldactive = mind.active
mind.active = 1
mind.transfer_to(podman)
mind.active = oldactive
// -- Mode/mind specific stuff goes here. TODO! Broken :( Should be merged into mob/living/Login
switch(ticker.mode.name)
if ("revolution")
if (podman.mind in ticker.mode:revolutionaries)
ticker.mode:add_revolutionary(podman.mind)
ticker.mode:update_all_rev_icons() //So the icon actually appears
if (podman.mind in ticker.mode:head_revolutionaries)
ticker.mode:update_all_rev_icons()
if ("nuclear emergency")
if (podman.mind in ticker.mode:syndicates)
ticker.mode:update_all_synd_icons()
if ("cult")
if (podman.mind in ticker.mode:cult)
ticker.mode:add_cultist(podman.mind)
ticker.mode:update_all_cult_icons() //So the icon actually appears
// -- End mode specific stuff
podman.gender = ghost.gender
if(podman.gender in list(NEUTER, PLURAL)) //Sanity check, which should never actually happen.
podman.gender = pick(MALE,FEMALE)
if(!podman.dna)
podman.dna = new /datum/dna()
podman.dna.real_name = podman.real_name
if(ui)
podman.dna.uni_identity = ui
updateappearance(podman, ui)
if(se)
podman.dna.struc_enzymes = se
if(!prob(potency)) //if it fails, plantman!
if(podman)
// podman.dna.mutantrace = "plant"
podman.mutations.Add(PLANT)
podman.update_mutantrace()
else //else, one packet of seeds. maybe two
var/seed_count = 1
if(prob(yield * parent.yieldmod * 20))
seed_count++
for(var/i=0,i<seed_count,i++)
var/obj/item/seeds/replicapod/harvestseeds = new /obj/item/seeds/replicapod(user.loc)
harvestseeds.lifespan = lifespan
harvestseeds.endurance = endurance
harvestseeds.maturation = maturation
harvestseeds.production = production
harvestseeds.yield = yield
harvestseeds.potency = potency
parent.update_tray()
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers))
user << "You inject the contents of the syringe into the seeds."
for(var/datum/reagent/blood/bloodSample in W:reagents.reagent_list)
var/mob/living/carbon/human/source = bloodSample.data["donor"] //hacky, since it gets the CURRENT condition of the mob, not how it was when the blood sample was taken
if (!istype(source))
continue
//ui = bloodSample.data["blood_dna"] doesn't work for whatever reason
ui = source.dna.uni_identity
se = source.dna.struc_enzymes
if(source.ckey)
ckey = source.ckey
else if(source.mind)
ckey = ckey(source.mind.key)
realName = source.real_name
gender = source.gender
if (!isnull(source.mind))
mind = source.mind
W:reagents.clear_reagents()
else
return ..()
/obj/machinery/hydroponics/proc/update_tray(mob/user = usr)
harvest = 0
lastproduce = age
if((yieldmod * myseed.yield) <= 0)
if((yieldmod * myseed.yield) <= 0 || istype(myseed,/obj/item/seeds/replicapod))
user << text("\red You fail to harvest anything useful.")
else
user << text("You harvest from the [myseed.plantname]")
user << text("You harvest from the [myseed.plantname].")
if(myseed.oneharvest)
del(myseed)
planted = 0
+153
View File
@@ -0,0 +1,153 @@
/* Moved all the plant people code here for ease of reference and coherency.
Injecting a pod person with a blood sample will grow a pod person with the memories and persona of that mob.
Growing it to term with nothing injected will grab a ghost from the observers. */
/obj/item/seeds/replicapod
name = "pack of dionaea-replicant seeds"
desc = "These seeds grow into 'replica pods' or 'dionaea', a form of strange sapient plantlife."
icon_state = "seed-replicapod"
mypath = "/obj/item/seeds/replicapod"
species = "replicapod"
plantname = "Dionaea"
productname = "/mob/living/carbon/human" //verrry special -- Urist
lifespan = 50 //no idea what those do
endurance = 8
maturation = 10
production = 10
yield = 1 //seeds if there isn't a dna inside
oneharvest = 1
potency = 30
plant_type = 0
growthstages = 6
var/ckey = null
var/realName = null
var/mob/living/carbon/human/source //Donor of blood, if any.
gender = MALE
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers))
user << "You inject the contents of the syringe into the seeds."
var/datum/reagent/blood/B
//Find a blood sample to inject.
for(var/datum/reagent/R in W:reagents.reagent_list)
if(istype(R,/datum/reagent/blood))
B = R
break
if(B)
source = B.data["donor"]
user << "The strange, sluglike seeds quiver gently and swell with blood."
if(!source.client && source.mind)
for(var/mob/dead/observer/O in player_list)
if(O.mind == source.mind && config.revival_pod_plants)
O << "<b><font color = #330033><font size = 3>Your blood has been placed into a replica pod seed. Return to your body if you want to be returned to life as a pod person!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
else
user << "Nothing happens."
return
if (!istype(source))
return
if(source.ckey)
realName = source.real_name
ckey = source.ckey
W:reagents.clear_reagents()
return
return ..()
/obj/item/seeds/replicapod/harvest(mob/user = usr)
var/obj/machinery/hydroponics/parent = loc
var/mob/ghost
var/list/candidates = list()
user.visible_message("\blue You carefully begin to open the pod...","[user] carefully begins to open the pod...")
//If a sample is injected (and revival is allowed) the plant will be controlled by the original donor.
if(source && source.mind && source.ckey && config.revival_pod_plants)
ghost = source
else // If no sample was injected or revival is not allowed, we grab an interested observer.
for(var/mob/dead/observer/O in player_list)
if(O.client)
var/response = alert(O, "Someone is harvesting a replica pod. Would you like to play as a Dionaea?", "Replica pod harvest", "Yes", "No")
if(response == "Yes")
candidates += O
if(!do_after(user, 100))
return
if(!src || !user)
return
if(candidates.len)
ghost = pick(candidates)
//If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds.
if(!ghost || !(ghost.ckey))
user << "The pod has formed badly, and all you can do is salvage some of the seeds."
var/seed_count = 1
if(prob(yield * parent.yieldmod * 20))
seed_count++
for(var/i=0,i<seed_count,i++)
new /obj/item/seeds/replicapod(user.loc)
parent.update_tray()
return
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
podman.ckey = ghost.ckey
if(ghost.mind)
ghost.mind.transfer_to(podman)
if(realName)
podman.real_name = realName
else
podman.real_name = "Diona [rand(0,999)]"
podman.gender = NEUTER
podman.dna = new /datum/dna()
podman.dna.real_name = podman.real_name
podman.dna.mutantrace = "plant"
podman.update_mutantrace()
// Update mode specific HUD icons.
switch(ticker.mode.name)
if ("revolution")
if (podman.mind in ticker.mode:revolutionaries)
ticker.mode:add_revolutionary(podman.mind)
ticker.mode:update_all_rev_icons() //So the icon actually appears
if (podman.mind in ticker.mode:head_revolutionaries)
ticker.mode:update_all_rev_icons()
if ("nuclear emergency")
if (podman.mind in ticker.mode:syndicates)
ticker.mode:update_all_synd_icons()
if ("cult")
if (podman.mind in ticker.mode:cult)
ticker.mode:add_cultist(podman.mind)
ticker.mode:update_all_cult_icons() //So the icon actually appears
// -- End mode specific stuff
visible_message("\blue The pod disgorges a fully-formed plant person!")
spawn(0)
podman << "\green <B>You awaken slowly, feeling your sap stir into sluggish motion as the warm air caresses your bark.</B>"
if(source && ckey && podman.ckey == ckey)
podman << "<B>Memories of a life as [source] drift oddly through a mind unsuited for them, like a skin of oil over a fathomless lake.</B>"
podman << "<B>You are now one of the Dionaea, a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
podman << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
if(!realName)
var/newname = input(podman,"Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
podman.real_name = newname
parent.update_tray()
+45 -5
View File
@@ -1,9 +1,43 @@
//STRIKE TEAMS
//Thanks to Kilakk for the admin-button portion of this code.
var/list/response_team_members = list()
var/global/send_emergency_team = 0 // Used for automagic response teams
// 'admin_emergency_team' for admin-spawned response teams
/client/proc/response_team()
set name = "Dispatch Emergency Response Team"
set category = "Special Verbs"
set desc = "Send an emergency response team to the station"
if(!holder)
usr << "\red Only administrators may use this command."
return
if(!ticker)
usr << "\red The game hasn't started yet!"
return
if(ticker.current_state == 1)
usr << "\red The round hasn't started yet!"
return
if(send_emergency_team)
usr << "\red Central Command has already dispatched an emergency response team!"
return
if(alert("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes")
return
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
switch(alert("The station has not entered code red recently. Do you still want to dispatch a response team?",,"Yes","No"))
if("No")
return
if(send_emergency_team)
usr << "\red Looks like somebody beat you to it!"
return
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
log_admin("[key_name(usr)] used Dispatch Response Team.")
trigger_armed_response_team(1)
client/verb/JoinResponseTeam()
set category = "IC"
@@ -11,9 +45,9 @@ client/verb/JoinResponseTeam()
if(!send_emergency_team)
usr << "No emergency response team is currently being sent."
return
if(admin_emergency_team)
/* if(admin_emergency_team)
usr << "An emergency response team has already been sent."
return
return */
if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer"))
usr << "<font color=red><b>You are jobbanned from the emergency reponse team!"
return
@@ -69,10 +103,10 @@ proc/percentage_antagonists()
proc/trigger_armed_response_team(var/force = 0)
if(send_emergency_team || admin_emergency_team)
if(send_emergency_team)
return
var/send_team_chance = 20 // base chance that a team will be sent
var/send_team_chance = 50 // base chance that a team will be sent
send_team_chance += 2*percentage_dead() // the more people are dead, the higher the chance
send_team_chance += percentage_antagonists() // the more antagonists, the higher the chance
send_team_chance = min(send_team_chance, 100)
@@ -82,7 +116,7 @@ proc/trigger_armed_response_team(var/force = 0)
// there's only a certain chance a team will be sent
if(!prob(send_team_chance)) return
command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "NMV Icarus Command")
command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "Central Command")
send_emergency_team = 1
@@ -224,6 +258,12 @@ proc/trigger_armed_response_team(var/force = 0)
//Special radio setup
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
//Adding Camera Network
var/obj/machinery/camera/camera = new /obj/machinery/camera(src) //Gives all the commandos internals cameras.
camera.network = "CREED"
camera.c_tag = real_name
//Replaced with new ERT uniform
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
@@ -10,7 +10,7 @@ emp_act
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
//Old taser nerf.
// BEGIN TASER NERF
/* Commenting out new-old taser nerf.
if(C.siemens_coefficient == 0) //If so, is that clothing shock proof?
if(prob(deflectchance))
@@ -28,7 +28,7 @@ emp_act
// END TASER NERF
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
if(istype(P, /obj/item/projectile/energy) || !(istype(P, /obj/item/projectile/energy/electrode)) || istype(P, /obj/item/projectile/beam))
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 40 - round(P.damage/3)
if(!(def_zone in list("chest", "groin")))
reflectchance /= 2
@@ -50,7 +50,8 @@ emp_act
P.xo = new_x - curloc.x
return -1 // complete projectile permutation
//Book's taser nerf.
//BEGIN BOOK'S TASER NERF.
if(istype(P, /obj/item/projectile/energy/electrode))
var/datum/organ/external/select_area = get_organ(def_zone) // We're checking the outside, buddy!
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking?
@@ -65,8 +66,7 @@ emp_act
apply_effect(P.agony,AGONY,0)
flash_pain()
src <<"\red You have been shot!"
del P
//End taser nerf.
//END TASER NERF
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2)
+2 -4
View File
@@ -841,8 +841,7 @@
if(status_flags & GODMODE) return 0 //godmode
adjustToxLoss(total_plasmaloss)
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
if(PLANT in mutations)
if(PLANT in mutations || (dna && dna.mutantrace == "plant"))
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
@@ -900,8 +899,7 @@
if(overeatduration > 1)
overeatduration -= 2 //doubled the unfat rate
// if(dna && dna.mutantrace == "plant")
if(PLANT in mutations)
if(PLANT in mutations || (dna && dna.mutantrace == "plant"))
if(nutrition < 200)
take_overall_damage(2,0)
@@ -220,14 +220,14 @@ proc/get_damage_icon_part(damage_state, body_part)
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
var/plant_color_mod = rgb(144,224,144)
//var/plant_color_mod = rgb(144,224,144)
var/necrosis_color_mod = rgb(10,50,0)
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
var/hulk = (HULK in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/plant = (PLANT in src.mutations)
var/plant = (PLANT in src.mutations || (dna && dna.mutantrace == "plant"))
var/g = "m"
if(gender == FEMALE) g = "f"
@@ -240,8 +240,8 @@ proc/get_damage_icon_part(damage_state, body_part)
else if(hulk)
var/list/TONE = ReadRGB(hulk_color_mod)
stand_icon.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
else if(plant)
stand_icon.ColorTone(plant_color_mod)
//else if(plant)
// stand_icon.ColorTone(plant_color_mod)
var/datum/organ/external/head = get_organ("head")
var/has_head = 0
@@ -269,8 +269,8 @@ proc/get_damage_icon_part(damage_state, body_part)
else if(hulk)
var/list/TONE = ReadRGB(hulk_color_mod)
temp.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
else if(plant)
temp.ColorTone(plant_color_mod)
//else if(plant)
// temp.ColorTone(plant_color_mod)
//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)
@@ -320,7 +320,7 @@ proc/get_damage_icon_part(damage_state, body_part)
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
//Underwear
if(underwear >0 && underwear < 12 && (src.dna.mutantrace != "vox" && src.dna.mutantrace != "kidan"))
if(underwear >0 && underwear < 12 && (src.dna.mutantrace != "vox" && src.dna.mutantrace != "plant" && src.dna.mutantrace != "kidan"))
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
@@ -440,11 +440,12 @@ proc/get_damage_icon_part(damage_state, body_part)
if("skrell")
race_icon = 'icons/mob/human_races/r_skrell.dmi'
deform_icon = 'icons/mob/human_races/r_def_skrell.dmi'
if("vox")
race_icon = 'icons/mob/human_races/r_vox.dmi'
deform_icon = 'icons/mob/human_races/r_def_vox.dmi'
if("plant")
race_icon = 'icons/mob/human_races/r_plant.dmi'
deform_icon = 'icons/mob/human_races/r_def_plant.dmi'
else
race_icon = 'icons/mob/human_races/r_human.dmi'
deform_icon = 'icons/mob/human_races/r_def_human.dmi'
@@ -459,12 +460,12 @@ proc/get_damage_icon_part(damage_state, body_part)
// if("lizard","tajaran","skrell")
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s")
if("plant")
if(stat == DEAD) //TODO
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
else
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
// if("plant")
// if(stat == DEAD) //TODO
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
// else
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
else
overlays_lying[MUTANTRACE_LAYER] = null
overlays_standing[MUTANTRACE_LAYER] = null
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB