mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Issues
Fixed issue 80. Hydroponics Plantmen are added, only badmin-created for now, though. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1499 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -15,6 +15,7 @@ datum/shuttle_controller
|
||||
direction = 1 //-1 = going back to central command, 1 = going back to SS13
|
||||
|
||||
endtime // timeofday that shuttle arrives
|
||||
timelimit //important when the shuttle gets called for more than shuttlearrivetime
|
||||
//timeleft = 360 //600
|
||||
fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
|
||||
|
||||
@@ -22,12 +23,12 @@ datum/shuttle_controller
|
||||
// call the shuttle
|
||||
// if not called before, set the endtime to T+600 seconds
|
||||
// otherwise if outgoing, switch to incoming
|
||||
proc/incall()
|
||||
proc/incall(coeff = 1)
|
||||
if(endtime)
|
||||
if(direction == -1)
|
||||
setdirection(1)
|
||||
else
|
||||
settimeleft(SHUTTLEARRIVETIME)
|
||||
settimeleft(SHUTTLEARRIVETIME*coeff)
|
||||
online = 1
|
||||
|
||||
proc/recall()
|
||||
@@ -57,6 +58,7 @@ datum/shuttle_controller
|
||||
// sets the time left to a given delay (in seconds)
|
||||
proc/settimeleft(var/delay)
|
||||
endtime = world.timeofday + delay * 10
|
||||
timelimit = delay
|
||||
|
||||
// sets the shuttle direction
|
||||
// 1 = towards SS13, -1 = back to centcom
|
||||
@@ -79,7 +81,7 @@ datum/shuttle_controller
|
||||
timeleft = 0
|
||||
switch(location)
|
||||
if(0)
|
||||
if(timeleft>SHUTTLEARRIVETIME)
|
||||
if(timeleft>timelimit)
|
||||
online = 0
|
||||
direction = 1
|
||||
endtime = null
|
||||
|
||||
@@ -482,4 +482,54 @@
|
||||
|
||||
if("alert")
|
||||
set_picture(signal.data["picture_state"])
|
||||
*/
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/communications/Del()
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf) && commconsole != src)
|
||||
return ..()
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
return ..()
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in world)
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
return ..()
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
|
||||
return ..()
|
||||
|
||||
emergency_shuttle.incall(2)
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
|
||||
world << sound('shuttlecalled.ogg')
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/communications/Del()
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf))
|
||||
return ..()
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src)
|
||||
return ..()
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in world)
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
return ..()
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
|
||||
return ..()
|
||||
|
||||
emergency_shuttle.incall(2)
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
|
||||
world << sound('shuttlecalled.ogg')
|
||||
|
||||
..()
|
||||
@@ -1030,15 +1030,30 @@
|
||||
src.overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!src.lying ? "_s" : "_l"]")
|
||||
|
||||
if (src.mutantrace)
|
||||
src.overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!src.lying ? "_s" : "_l"]")
|
||||
if(src.face_standing)
|
||||
del(src.face_standing)
|
||||
if(src.face_lying)
|
||||
del(src.face_lying)
|
||||
if(src.stand_icon)
|
||||
del(src.stand_icon)
|
||||
if(src.lying_icon)
|
||||
del(src.lying_icon)
|
||||
switch(mutantrace)
|
||||
if("lizard","golem","metroid")
|
||||
src.overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!src.lying ? "_s" : "_l"]")
|
||||
if(src.face_standing)
|
||||
del(src.face_standing)
|
||||
if(src.face_lying)
|
||||
del(src.face_lying)
|
||||
if(src.stand_icon)
|
||||
del(src.stand_icon)
|
||||
if(src.lying_icon)
|
||||
del(src.lying_icon)
|
||||
if("plant")
|
||||
if(stat != 2) //if not dead, that is
|
||||
src.overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!src.lying ? "_s" : "_l"]")
|
||||
else
|
||||
src.overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d")
|
||||
if(src.face_standing)
|
||||
del(src.face_standing)
|
||||
if(src.face_lying)
|
||||
del(src.face_lying)
|
||||
if(src.stand_icon)
|
||||
del(src.stand_icon)
|
||||
if(src.lying_icon)
|
||||
del(src.lying_icon)
|
||||
else
|
||||
if(!src.face_standing || !src.face_lying)
|
||||
src.update_face()
|
||||
|
||||
@@ -567,6 +567,9 @@
|
||||
return
|
||||
var/discomfort = min(abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
|
||||
if(mutantrace == "plant")
|
||||
discomfort *= 3 //I don't like magic numbers. I'll make mutantraces a datum with vars sometime later. -- Urist
|
||||
|
||||
switch(body_part)
|
||||
if(HEAD)
|
||||
TakeDamage("head", 0, 2.5*discomfort)
|
||||
@@ -589,6 +592,23 @@
|
||||
|
||||
handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(istype(loc,/turf)) //else, there's considered to be no light
|
||||
light_amount = min(10,loc:sd_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||
if(nutrition < 500) //so they can't store nutrition to survive without light forever
|
||||
nutrition += light_amount
|
||||
if(light_amount > 0) //if there's enough light, heal
|
||||
if(fireloss)
|
||||
heal_overall_damage(0,1)
|
||||
if(bruteloss)
|
||||
heal_overall_damage(1,0)
|
||||
if(toxloss)
|
||||
toxloss--
|
||||
if(oxyloss)
|
||||
oxyloss--
|
||||
|
||||
if(overeatduration > 500 && !(src.mutations & 32))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
src.mutations |= 32
|
||||
@@ -603,9 +623,15 @@
|
||||
nutrition = max (0, nutrition - HUNGER_FACTOR)
|
||||
|
||||
if (nutrition > 450)
|
||||
overeatduration++
|
||||
if(overeatduration < 600) //capped so people don't take forever to unfat
|
||||
overeatduration++
|
||||
else
|
||||
overeatduration = max (0, overeatduration - 1)
|
||||
if(overeatduration > 1)
|
||||
overeatduration -= 2 //doubled the unfat rate
|
||||
|
||||
if(mutantrace == "plant")
|
||||
if(nutrition < 200)
|
||||
take_overall_damage(2,0)
|
||||
|
||||
if (src.drowsyness)
|
||||
src.drowsyness--
|
||||
|
||||
@@ -12,8 +12,26 @@
|
||||
src.lying = 1
|
||||
src.icon_state = "ai-crash"
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf))
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
return
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in world)
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
return
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
|
||||
return
|
||||
|
||||
emergency_shuttle.incall(2)
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
|
||||
world << sound('shuttlecalled.ogg')
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 77 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.9 KiB |
Reference in New Issue
Block a user