Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into HTML
@@ -289,6 +289,9 @@
|
||||
#include "code\game\machinery\atmo_control.dm"
|
||||
#include "code\game\machinery\autolathe.dm"
|
||||
#include "code\game\machinery\Beacon.dm"
|
||||
#include "code\game\machinery\bees.dm"
|
||||
#include "code\game\machinery\bees_apiary.dm"
|
||||
#include "code\game\machinery\bees_items.dm"
|
||||
#include "code\game\machinery\biogenerator.dm"
|
||||
#include "code\game\machinery\buttons.dm"
|
||||
#include "code\game\machinery\cell_charger.dm"
|
||||
@@ -342,6 +345,7 @@
|
||||
#include "code\game\machinery\bots\bots.dm"
|
||||
#include "code\game\machinery\bots\cleanbot.dm"
|
||||
#include "code\game\machinery\bots\ed209bot.dm"
|
||||
#include "code\game\machinery\bots\floorbot.dm"
|
||||
#include "code\game\machinery\bots\medbot.dm"
|
||||
#include "code\game\machinery\bots\mulebot.dm"
|
||||
#include "code\game\machinery\bots\secbot.dm"
|
||||
@@ -1072,6 +1076,7 @@
|
||||
#include "code\modules\projectiles\ammunition.dm"
|
||||
#include "code\modules\projectiles\gun.dm"
|
||||
#include "code\modules\projectiles\projectile.dm"
|
||||
#include "code\modules\projectiles\targeting.dm"
|
||||
#include "code\modules\projectiles\ammunition\boxes.dm"
|
||||
#include "code\modules\projectiles\ammunition\bullets.dm"
|
||||
#include "code\modules\projectiles\guns\energy.dm"
|
||||
|
||||
@@ -1,300 +1,318 @@
|
||||
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new /obj/screen( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.g_dither.name = "Mask"
|
||||
src.g_dither.icon = ui_style
|
||||
src.g_dither.icon_state = "dither12g"
|
||||
src.g_dither.layer = 18
|
||||
src.g_dither.mouse_opacity = 0
|
||||
|
||||
src.alien_view = new /obj/screen(src)
|
||||
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.alien_view.name = "Alien"
|
||||
src.alien_view.icon = ui_style
|
||||
src.alien_view.icon_state = "alien"
|
||||
src.alien_view.layer = 18
|
||||
src.alien_view.mouse_opacity = 0
|
||||
|
||||
src.blurry = new /obj/screen( src )
|
||||
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon = ui_style
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
|
||||
src.druggy = new /obj/screen( src )
|
||||
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.druggy.name = "Druggy"
|
||||
src.druggy.icon = ui_style
|
||||
src.druggy.icon_state = "druggy"
|
||||
src.druggy.layer = 17
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "harm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_monkey_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTHEAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.throw_icon = new /obj/screen(null)
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen( null )
|
||||
mymob.pressure.icon = ui_style
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
|
||||
mymob.internals = new /obj/screen( null )
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.icon_state = "internal0"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.bodytemp = new /obj/screen( null )
|
||||
mymob.bodytemp.icon = ui_style
|
||||
mymob.bodytemp.icon_state = "temp1"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = ui_style
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
return
|
||||
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new /obj/screen( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.g_dither.name = "Mask"
|
||||
src.g_dither.icon = ui_style
|
||||
src.g_dither.icon_state = "dither12g"
|
||||
src.g_dither.layer = 18
|
||||
src.g_dither.mouse_opacity = 0
|
||||
|
||||
src.alien_view = new /obj/screen(src)
|
||||
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.alien_view.name = "Alien"
|
||||
src.alien_view.icon = ui_style
|
||||
src.alien_view.icon_state = "alien"
|
||||
src.alien_view.layer = 18
|
||||
src.alien_view.mouse_opacity = 0
|
||||
|
||||
src.blurry = new /obj/screen( src )
|
||||
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon = ui_style
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
|
||||
src.druggy = new /obj/screen( src )
|
||||
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.druggy.name = "Druggy"
|
||||
src.druggy.icon = ui_style
|
||||
src.druggy.icon_state = "druggy"
|
||||
src.druggy.layer = 17
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "harm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_monkey_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTHEAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new /obj/screen( src )
|
||||
using.name = null
|
||||
using.icon = ui_style
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.throw_icon = new /obj/screen(null)
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen( null )
|
||||
mymob.pressure.icon = ui_style
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
|
||||
mymob.internals = new /obj/screen( null )
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.icon_state = "internal0"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.bodytemp = new /obj/screen( null )
|
||||
mymob.bodytemp.icon = ui_style
|
||||
mymob.bodytemp.icon_state = "temp1"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = ui_style
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.dir = 2
|
||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||
if (G.target)
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.dir = 1
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
if (mymob.client.target_can_move)
|
||||
mymob.gun_move_icon.dir = 1
|
||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
if (mymob.client.target_can_run)
|
||||
mymob.gun_run_icon.dir = 1
|
||||
src.adding += mymob.gun_run_icon
|
||||
src.adding += mymob.gun_move_icon
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
return
|
||||
|
||||
@@ -259,7 +259,7 @@ mob/living/parasite/meme/verb/Paralyze()
|
||||
set desc = "Prevents your host from using emote for a while."
|
||||
|
||||
if(!src.host) return
|
||||
if(!host.emote_allowed)
|
||||
if(!host.use_me)
|
||||
usr << "\red Your host already can't use body language.."
|
||||
return
|
||||
if(!use_points(250)) return
|
||||
@@ -271,11 +271,11 @@ mob/living/parasite/meme/verb/Paralyze()
|
||||
host << "\red Your body feels numb.. You lose your ability to use body language."
|
||||
usr << "\red Your host can't use body language anymore."
|
||||
|
||||
host.emote_allowed = 0
|
||||
host.use_me = 0
|
||||
|
||||
sleep(1200)
|
||||
|
||||
host.emote_allowed = 1
|
||||
host.use_me = 1
|
||||
host << "\red Your body has feeling again.."
|
||||
usr << "\red [host] can use body language again."
|
||||
|
||||
|
||||
@@ -75,6 +75,24 @@ datum/controller/vote
|
||||
choices[master_mode] += non_voters
|
||||
if(choices[master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[master_mode]
|
||||
else if(mode == "crew_transfer")
|
||||
var/factor = 0.5
|
||||
switch(world.time / (10 * 60)) // minutes
|
||||
if(0 to 60)
|
||||
factor = 0.5
|
||||
if(61 to 120)
|
||||
factor = 0.8
|
||||
if(121 to 240)
|
||||
factor = 1
|
||||
if(241 to 300)
|
||||
factor = 1.2
|
||||
else
|
||||
factor = 1.4
|
||||
choices["Initiate Crew Transfer"] = round(choices["Initiate Crew Transfer"] * factor)
|
||||
world << "<font color='purple'>Crew Transfer Factor: [factor]</font>"
|
||||
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Continue The Round"])
|
||||
|
||||
|
||||
//get all options with that many votes and return them in a list
|
||||
. = list()
|
||||
if(greatest_votes)
|
||||
|
||||
@@ -113,4 +113,8 @@
|
||||
|
||||
/datum/organ/internal/kidney
|
||||
name = "kidney"
|
||||
parent_organ = "chest"
|
||||
parent_organ = "chest"
|
||||
|
||||
/datum/organ/internal/brain
|
||||
name = "brain"
|
||||
parent_organ = "head"
|
||||
@@ -87,4 +87,23 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
var/datum/organ/internal/I = internal_organs[organ_name]
|
||||
if(I.damage > 2) if(prob(2))
|
||||
var/datum/organ/external/parent = get_organ(I.parent_organ)
|
||||
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1)
|
||||
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1)
|
||||
|
||||
var/toxDamageMessage = null
|
||||
var/toxMessageProb = 1
|
||||
switch(getToxLoss())
|
||||
if(1 to 5)
|
||||
toxMessageProb = 1
|
||||
toxDamageMessage = "Your body stings slightly."
|
||||
if(6 to 10)
|
||||
toxMessageProb = 2
|
||||
toxDamageMessage = "Your whole body hurts a little."
|
||||
if(11 to 15)
|
||||
toxMessageProb = 2
|
||||
toxDamageMessage = "Your whole body hurts."
|
||||
else
|
||||
toxMessageProb = 5
|
||||
toxDamageMessage = "Your body aches all over, it's driving you mad."
|
||||
|
||||
if(toxDamageMessage && prob(toxMessageProb))
|
||||
src.custom_pain(toxDamageMessage, getToxLoss() >= 15)
|
||||
@@ -227,6 +227,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/largecrate/lisa
|
||||
containername = "Corgi Crate"
|
||||
group = "Hydroponics"
|
||||
|
||||
/datum/supply_packs/hydroponics // -- Skie
|
||||
name = "Hydroponics Supply Crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
|
||||
@@ -343,7 +344,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/virus
|
||||
name = "Virus crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
/* contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion,
|
||||
@@ -354,7 +355,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion,
|
||||
/obj/item/weapon/storage/box/syringes,
|
||||
/obj/item/weapon/storage/box/beakers,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)*/
|
||||
contains = list(/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random,
|
||||
/obj/item/weapon/virusdish/random)
|
||||
cost = 25
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Virus crate"
|
||||
@@ -931,3 +936,18 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Atmospheric circulator crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/bee_keeper
|
||||
name = "Beekeeping Crate"
|
||||
contains = list(/obj/item/beezeez,
|
||||
/obj/item/beezeez,
|
||||
/obj/item/weapon/bee_net,
|
||||
/obj/item/apiary,
|
||||
/obj/item/queen_bee,
|
||||
/obj/item/queen_bee,
|
||||
/obj/item/queen_bee)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate/hydroponics
|
||||
containername = "Beekeeping crate"
|
||||
access = access_hydroponics
|
||||
group = "Hydroponics"
|
||||
|
||||
@@ -550,6 +550,8 @@ its easier to just keep the beam vertical.
|
||||
|
||||
/atom/Click(location,control,params)
|
||||
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
|
||||
if(!istype(src,/obj/item/weapon/gun))
|
||||
usr.last_target_click = world.time
|
||||
if(usr.client.buildmode)
|
||||
build_click(usr, usr.client.buildmode, location, control, params, src)
|
||||
return
|
||||
|
||||
@@ -1060,4 +1060,4 @@ message = replacetext(message, "ch", "chi")
|
||||
message = replacetext(message, "than", "sen")
|
||||
message = replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -336,7 +336,7 @@ datum/objective/silence
|
||||
|
||||
|
||||
datum/objective/escape
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive."
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive and free."
|
||||
|
||||
|
||||
check_completion()
|
||||
@@ -353,6 +353,10 @@ datum/objective/escape
|
||||
return 0
|
||||
|
||||
if(istype(location, /turf/simulated/shuttle/floor4)) // Fails tratiors if they are in the shuttle brig -- Polymorph
|
||||
if(istype(owner.current, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = owner.current
|
||||
if (!C.handcuffed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
var/area/check_area = location.loc
|
||||
|
||||
@@ -78,6 +78,17 @@
|
||||
rev_mind.special_role = "Head Revolutionary"
|
||||
obj_count++
|
||||
|
||||
// Show each head revolutionary up to 3 candidates
|
||||
var/list/already_considered = list()
|
||||
for(var/i = 0, i < 2, i++)
|
||||
var/mob/rev_mob = rev_mind.current
|
||||
already_considered += rev_mob
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M && !(M.mind in head_revolutionaries) && !(M in already_considered))
|
||||
rev_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
|
||||
rev_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
//Deals with converting players to the revolution//
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
#define ui_borg_module "13:26,2:7"
|
||||
#define ui_borg_panel "14:28,2:7"
|
||||
|
||||
//Gun buttons
|
||||
#define ui_gun1 "13:26,3:7"
|
||||
#define ui_gun2 "14:28, 4:7"
|
||||
#define ui_gun3 "13:26,4:7"
|
||||
#define ui_gun_select "14:28,3:7"
|
||||
|
||||
//Upper-middle right (damage indicators)
|
||||
#define ui_toxin "14:28,13:27"
|
||||
#define ui_fire "14:28,12:25"
|
||||
|
||||
1
code/game/jobs/departments.dm
Normal file
@@ -0,0 +1 @@
|
||||
var/list/departments = list("Command", "Medical", "Engineering", "Security", "Civilian", "Cargo")
|
||||
@@ -23,7 +23,7 @@
|
||||
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
|
||||
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
|
||||
H.equip_to_slot_or_del(U, slot_w_uniform)
|
||||
//H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/viro(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/virologist(H), slot_wear_suit)
|
||||
@@ -215,4 +215,4 @@
|
||||
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)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -495,5 +495,5 @@ var/global/datum/controller/occupations/job_master
|
||||
level3++
|
||||
else level4++ //not selected
|
||||
|
||||
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|-|YOUNG=[level6]|-"
|
||||
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
|
||||
feedback_add_details("job_preferences",tmp_str)
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
dat += text("[]\tBlood Level %: [] ([blood_volume] units)</FONT><BR>", (blood_volume > 448 ?"<font color='blue'>" : "<font color='red'>"), blood_volume)
|
||||
dat += text("[]\tBlood Level %: [] ([] units)</FONT><BR>", (blood_volume > 448 ?"<font color='blue'>" : "<font color='red'>"), blood_percent, blood_volume)
|
||||
if(occupant.reagents)
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
|
||||
184
code/game/machinery/bees.dm
Normal file
@@ -0,0 +1,184 @@
|
||||
|
||||
/obj/effect/bee
|
||||
name = "bees"
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "bees1"
|
||||
var/strength = 1
|
||||
var/feral = 0
|
||||
var/mut = 0
|
||||
var/toxic = 0
|
||||
var/turf/target_turf
|
||||
var/mob/target_mob
|
||||
var/obj/machinery/apiary/parent
|
||||
pass_flags = PASSGRILLE|PASSTABLE
|
||||
|
||||
/obj/effect/bee/New(loc, var/obj/machinery/apiary/new_parent)
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
parent = new_parent
|
||||
|
||||
/obj/effect/bee/Del()
|
||||
processing_objects.Remove(src)
|
||||
if(parent)
|
||||
parent.owned_bee_swarms.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/effect/bee/process()
|
||||
|
||||
//if we're strong enough, sting some people
|
||||
var/overrun = strength - 5 + feral / 2
|
||||
if(prob(max( overrun * 10 + feral * 10, 0)))
|
||||
var/mob/living/carbon/human/M = locate() in src.loc
|
||||
if(M)
|
||||
var/sting_prob = 100
|
||||
var/obj/item/clothing/worn_suit = M.wear_suit
|
||||
var/obj/item/clothing/worn_helmet = M.head
|
||||
if(worn_suit)
|
||||
sting_prob -= worn_suit.armor["bio"]
|
||||
if(worn_helmet)
|
||||
sting_prob -= worn_helmet.armor["bio"]
|
||||
|
||||
if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) )
|
||||
M.apply_damage(overrun / 2 + mut / 2, BRUTE)
|
||||
M.apply_damage(overrun / 2 + toxic / 2, TOX)
|
||||
M << "\red You have been stung!"
|
||||
M.flash_pain()
|
||||
|
||||
//if we're chasing someone, get a little bit angry
|
||||
if(target_mob && prob(10))
|
||||
feral++
|
||||
|
||||
//calm down a little bit
|
||||
var/move_prob = 40
|
||||
if(feral > 0)
|
||||
if(prob(feral * 10))
|
||||
feral -= 1
|
||||
else
|
||||
//if feral is less than 0, we're becalmed by smoke or steam
|
||||
if(feral < 0)
|
||||
feral += 1
|
||||
|
||||
if(target_mob)
|
||||
target_mob = null
|
||||
target_turf = null
|
||||
if(strength > 5)
|
||||
//calm down and spread out a little
|
||||
var/obj/effect/bee/B = new(get_turf(pick(orange(src,1))))
|
||||
B.strength = rand(1,5)
|
||||
src.strength -= B.strength
|
||||
if(src.strength <= 5)
|
||||
src.icon_state = "bees[src.strength]"
|
||||
B.icon_state = "bees[B.strength]"
|
||||
if(src.parent)
|
||||
B.parent = src.parent
|
||||
src.parent.owned_bee_swarms.Add(B)
|
||||
|
||||
//make some noise
|
||||
if(prob(0.5))
|
||||
src.visible_message("\blue [pick("Buzzzz.","Hmmmmm.","Bzzz.")]")
|
||||
|
||||
//smoke, water and steam calms us down
|
||||
var/calming = 0
|
||||
var/list/calmers = list(/obj/effect/effect/chem_smoke, /obj/effect/effect/water, /obj/effect/effect/foam, /obj/effect/effect/steam, /obj/effect/mist)
|
||||
|
||||
for(var/this_type in calmers)
|
||||
var/obj/effect/check_effect = locate() in src.loc
|
||||
if(check_effect.type == this_type)
|
||||
calming = 1
|
||||
break
|
||||
|
||||
if(calming)
|
||||
if(feral > 0)
|
||||
src.visible_message("\blue The bees calm down!")
|
||||
feral = -10
|
||||
target_mob = null
|
||||
target_turf = null
|
||||
|
||||
for(var/obj/effect/bee/B in src.loc)
|
||||
if(B == src)
|
||||
continue
|
||||
|
||||
if(feral > 0)
|
||||
src.strength += B.strength
|
||||
del(B)
|
||||
src.icon_state = "bees[src.strength]"
|
||||
if(strength > 5)
|
||||
icon_state = "bees_swarm"
|
||||
else if(prob(10))
|
||||
//make the other swarm of bees stronger, then move away
|
||||
var/total_bees = B.strength + src.strength
|
||||
if(total_bees < 10)
|
||||
B.strength = min(5, total_bees)
|
||||
src.strength = total_bees - B.strength
|
||||
|
||||
B.icon_state = "bees[B.strength]"
|
||||
if(src.strength <= 0)
|
||||
del(src)
|
||||
return
|
||||
src.icon_state = "bees[B.strength]"
|
||||
var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8)))
|
||||
density = 1
|
||||
if(T.Enter(src, get_turf(src)))
|
||||
src.loc = T
|
||||
density = 0
|
||||
break
|
||||
|
||||
if(target_mob)
|
||||
if(target_mob in view(src,7))
|
||||
target_turf = get_turf(target_mob)
|
||||
else
|
||||
for(var/mob/living/carbon/M in view(src,7))
|
||||
target_mob = M
|
||||
break
|
||||
|
||||
if(target_turf)
|
||||
var/turf/next_turf = get_step(src.loc, get_dir(src,target_turf))
|
||||
|
||||
//hacky, but w/e
|
||||
var/old_density = -1
|
||||
if(target_mob && get_dist(src, target_mob) <= 1)
|
||||
old_density = target_mob.density
|
||||
target_mob.density = 0
|
||||
density = 1
|
||||
if(next_turf.Enter(src, get_turf(src)))
|
||||
src.loc = next_turf
|
||||
density = 0
|
||||
if(src.loc == target_turf)
|
||||
target_turf = null
|
||||
if(target_mob && old_density != -1)
|
||||
target_mob.density = old_density
|
||||
else
|
||||
//find some flowers, harvest
|
||||
//angry bee swarms don't hang around
|
||||
if(feral > 0)
|
||||
move_prob = 60
|
||||
else if(feral < 0)
|
||||
move_prob = 0
|
||||
else
|
||||
var/obj/machinery/hydroponics/H = locate() in src.loc
|
||||
if(H)
|
||||
if(H.planted && !H.dead && H.myseed)
|
||||
move_prob = 1
|
||||
|
||||
//chance to wander around
|
||||
if(prob(move_prob))
|
||||
var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8)))
|
||||
density = 1
|
||||
if(T.Enter(src, get_turf(src)))
|
||||
src.loc = T
|
||||
density = 0
|
||||
|
||||
pixel_x = rand(-12,12)
|
||||
pixel_y = rand(-12,12)
|
||||
|
||||
if(!parent && prob(10))
|
||||
strength -= 1
|
||||
if(strength <= 0)
|
||||
del(src)
|
||||
else if(strength <= 5)
|
||||
icon_state = "bees[strength]"
|
||||
|
||||
//debugging
|
||||
/*icon_state = "[strength]"
|
||||
if(strength > 5)
|
||||
icon_state = "unknown"*/
|
||||
238
code/game/machinery/bees_apiary.dm
Normal file
@@ -0,0 +1,238 @@
|
||||
//http://www.youtube.com/watch?v=-1GadTfGFvU
|
||||
//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code
|
||||
|
||||
/obj/machinery/apiary
|
||||
name = "apiary tray"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "hydrotray3"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/nutrilevel = 0
|
||||
var/yieldmod = 1
|
||||
var/mut = 1
|
||||
var/toxic = 0
|
||||
var/dead = 0
|
||||
var/health = -1
|
||||
var/maxhealth = 100
|
||||
var/lastcycle = 0
|
||||
var/cycledelay = 100
|
||||
var/harvestable_honey = 0
|
||||
var/beezeez = 0
|
||||
var/swarming = 0
|
||||
|
||||
var/bees_in_hive = 0
|
||||
var/list/owned_bee_swarms = list()
|
||||
|
||||
//overwrite this after it's created if the apiary needs a custom machinery sprite
|
||||
/obj/machinery/apiary/New()
|
||||
..()
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
|
||||
|
||||
/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj ,/obj/item/projectile/energy/floramut))
|
||||
mut++
|
||||
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
|
||||
if(!yieldmod)
|
||||
yieldmod += 1
|
||||
//world << "Yield increased by 1, from 0, to a total of [myseed.yield]"
|
||||
else if (prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
|
||||
yieldmod += 1
|
||||
//world << "Yield increased by 1, to a total of [myseed.yield]"
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/queen_bee))
|
||||
if(health > 0)
|
||||
user << "\red There is already a queen in there."
|
||||
else
|
||||
health = 10
|
||||
nutrilevel += 10
|
||||
user.drop_item()
|
||||
del(O)
|
||||
user << "\blue You carefully insert the queen into [src], she gets busy making a hive."
|
||||
bees_in_hive = 0
|
||||
else if(istype(O, /obj/item/beezeez))
|
||||
beezeez += 100
|
||||
nutrilevel += 10
|
||||
user.drop_item()
|
||||
if(health > 0)
|
||||
user << "\blue You insert [O] into [src]. A relaxed humming appears to pick up."
|
||||
else
|
||||
user << "\blue You insert [O] into [src]. Now it just needs some bees."
|
||||
del(O)
|
||||
else if(istype(O, /obj/item/weapon/minihoe))
|
||||
if(health > 0)
|
||||
user << "\red <b>You begin to dislodge the apiary from the tray, the bees don't like that.</b>"
|
||||
angry_swarm(user)
|
||||
else
|
||||
user << "\blue You begin to dislodge the dead apiary from the tray."
|
||||
if(do_after(user, 50))
|
||||
new /obj/machinery/hydroponics(src.loc)
|
||||
new /obj/item/apiary(src.loc)
|
||||
user << "\red You dislodge the apiary from the tray."
|
||||
del(src)
|
||||
else if(istype(O, /obj/item/weapon/bee_net))
|
||||
var/obj/item/weapon/bee_net/N = O
|
||||
if(N.caught_bees > 0)
|
||||
user << "\blue You empty the bees into the apiary."
|
||||
bees_in_hive += N.caught_bees
|
||||
N.caught_bees = 0
|
||||
else
|
||||
user << "\blue There are no more bees in the net."
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
if(harvestable_honey > 0)
|
||||
if(health > 0)
|
||||
user << "\red You begin to harvest the honey. The bees don't seem to like it."
|
||||
angry_swarm()
|
||||
else
|
||||
user << "\blue You begin to harvest the honey."
|
||||
if(do_after(user,50))
|
||||
G.reagents.add_reagent("honey",harvestable_honey)
|
||||
harvestable_honey = 0
|
||||
user << "\blue You successfully harvest the honey."
|
||||
else
|
||||
user << "\blue There is no honey left to harvest."
|
||||
else
|
||||
angry_swarm()
|
||||
..()
|
||||
|
||||
/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/apiary/process()
|
||||
|
||||
if(swarming > 0)
|
||||
swarming -= 1
|
||||
if(swarming <= 0)
|
||||
for(var/obj/effect/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
del(B)
|
||||
else if(bees_in_hive < 10)
|
||||
for(var/obj/effect/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
del(B)
|
||||
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
lastcycle = world.time
|
||||
if(health < 0)
|
||||
return
|
||||
|
||||
//magical bee formula
|
||||
if(beezeez > 0)
|
||||
beezeez -= 1
|
||||
|
||||
nutrilevel += 2
|
||||
health += 1
|
||||
toxic = max(0, toxic - 1)
|
||||
|
||||
//handle nutrients
|
||||
nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5
|
||||
if(nutrilevel > 0)
|
||||
bees_in_hive += 1 * yieldmod
|
||||
if(health < maxhealth)
|
||||
health++
|
||||
else
|
||||
//nutrilevel is less than 1, so we're effectively subtracting here
|
||||
health += max(nutrilevel - 1, round(-health / 2))
|
||||
bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2))
|
||||
if(owned_bee_swarms.len)
|
||||
var/obj/effect/bee/B = pick(owned_bee_swarms)
|
||||
B.target_turf = get_turf(src)
|
||||
|
||||
//clear out some toxins
|
||||
if(toxic > 0)
|
||||
toxic -= 1
|
||||
health -= 1
|
||||
|
||||
if(health <= 0)
|
||||
return
|
||||
|
||||
//make a bit of honey
|
||||
if(harvestable_honey < 50)
|
||||
harvestable_honey += 0.5
|
||||
|
||||
//make some new bees
|
||||
if(bees_in_hive >= 10 && prob(bees_in_hive * 10))
|
||||
var/obj/effect/bee/B = new(get_turf(src), src)
|
||||
owned_bee_swarms.Add(B)
|
||||
B.mut = mut
|
||||
B.toxic = toxic
|
||||
bees_in_hive -= 1
|
||||
|
||||
//find some plants, harvest
|
||||
for(var/obj/machinery/hydroponics/H in view(7, src))
|
||||
if(H.planted && !H.dead && H.myseed && prob(owned_bee_swarms.len * 10))
|
||||
if(mut < H.mutmod - 1)
|
||||
mut = H.mutmod - 1
|
||||
else if(mut > H.mutmod - 1)
|
||||
H.mutmod = mut
|
||||
|
||||
//flowers give us pollen (nutrients)
|
||||
if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
|
||||
src.nutrilevel++
|
||||
H.nutrilevel++
|
||||
|
||||
//have a few beneficial effects on nearby plants
|
||||
if(prob(10))
|
||||
H.lastcycle -= 5
|
||||
if(prob(10))
|
||||
H.myseed.lifespan = max(initial(H.myseed.lifespan) * 1.5, H.myseed.lifespan + 1)
|
||||
if(prob(10))
|
||||
H.myseed.endurance = max(initial(H.myseed.endurance) * 1.5, H.myseed.endurance + 1)
|
||||
if(H.toxic && prob(10))
|
||||
H.toxic = min(0, H.toxic - 1)
|
||||
toxic++
|
||||
|
||||
/obj/machinery/apiary/proc/die()
|
||||
if(owned_bee_swarms.len)
|
||||
var/obj/effect/bee/B = pick(owned_bee_swarms)
|
||||
B.target_turf = get_turf(src)
|
||||
B.strength -= 1
|
||||
if(B.strength <= 0)
|
||||
del(B)
|
||||
else if(B.strength <= 5)
|
||||
B.icon_state = "bees[B.strength]"
|
||||
bees_in_hive = 0
|
||||
health = 0
|
||||
|
||||
/obj/machinery/apiary/proc/angry_swarm(var/mob/M)
|
||||
for(var/obj/effect/bee/B in owned_bee_swarms)
|
||||
B.feral = 50
|
||||
B.target_mob = M
|
||||
|
||||
swarming = 25
|
||||
|
||||
while(bees_in_hive > 0)
|
||||
var/spawn_strength = bees_in_hive
|
||||
if(bees_in_hive >= 5)
|
||||
spawn_strength = 6
|
||||
|
||||
var/obj/effect/bee/B = new(get_turf(src), src)
|
||||
B.target_mob = M
|
||||
B.strength = spawn_strength
|
||||
B.feral = 5
|
||||
B.mut = mut
|
||||
B.toxic = toxic
|
||||
bees_in_hive -= spawn_strength
|
||||
|
||||
/obj/machinery/apiary/verb/harvest_honeycomb()
|
||||
set src in oview(1)
|
||||
set name = "Harvest honeycomb"
|
||||
set category = "Object"
|
||||
|
||||
while(health > 15)
|
||||
health -= 15
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
|
||||
if(toxic > 0)
|
||||
H.reagents.add_reagent("toxin", toxic)
|
||||
|
||||
usr << "\blue You harvest the honeycomb from the hive. There is a wild buzzing!"
|
||||
angry_swarm(usr)
|
||||
122
code/game/machinery/bees_items.dm
Normal file
@@ -0,0 +1,122 @@
|
||||
|
||||
/obj/item/queen_bee
|
||||
name = "queen bee packet"
|
||||
desc = "Place her into an apiary so she can get busy."
|
||||
icon = 'icons/obj/seeds.dmi'
|
||||
icon_state = "seed-kudzu"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/bee_net
|
||||
name = "bee net"
|
||||
desc = "For catching rogue bees."
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "bee_net"
|
||||
item_state = "bedsheet"
|
||||
w_class = 3
|
||||
var/caught_bees = 0
|
||||
|
||||
/obj/item/weapon/bee_net/attack_self(mob/user as mob)
|
||||
var/turf/T = get_step(get_turf(user), user.dir)
|
||||
for(var/obj/effect/bee/B in T)
|
||||
if(B.feral < 0)
|
||||
caught_bees += B.strength
|
||||
del(B)
|
||||
user.visible_message("\blue [user] nets some bees.","\blue You net up some of the becalmed bees.")
|
||||
else
|
||||
user.visible_message("\red [user] swings at some bees, they don't seem to like it.","\red You swing at some bees, they don't seem to like it.")
|
||||
B.feral = 5
|
||||
B.target_mob = user
|
||||
|
||||
/obj/item/weapon/bee_net/verb/empty_bees()
|
||||
set src in usr
|
||||
set name = "Empty bee net"
|
||||
set category = "Object"
|
||||
var/mob/living/carbon/M
|
||||
if(iscarbon(usr))
|
||||
M = usr
|
||||
|
||||
while(caught_bees > 0)
|
||||
//release a few super massive swarms
|
||||
while(caught_bees > 5)
|
||||
var/obj/effect/bee/B = new(src.loc)
|
||||
B.feral = 5
|
||||
B.target_mob = M
|
||||
B.strength = 6
|
||||
B.icon_state = "bees_swarm"
|
||||
caught_bees -= 6
|
||||
|
||||
//what's left over
|
||||
var/obj/effect/bee/B = new(src.loc)
|
||||
B.strength = caught_bees
|
||||
B.icon_state = "bees[B.strength]"
|
||||
B.feral = 5
|
||||
B.target_mob = M
|
||||
|
||||
caught_bees = 0
|
||||
|
||||
/obj/item/apiary
|
||||
name = "moveable apiary"
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "apiary_item"
|
||||
item_state = "giftbag"
|
||||
w_class = 5
|
||||
|
||||
/obj/item/beezeez
|
||||
name = "bottle of BeezEez"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle17"
|
||||
flags = FPRINT | TABLEPASS
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/honeycomb
|
||||
name = "honeycomb"
|
||||
icon_state = "honeycomb"
|
||||
desc = "Dripping with sugary sweetness."
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/honeycomb/New()
|
||||
..()
|
||||
reagents.add_reagent("honey",10)
|
||||
reagents.add_reagent("nutriment", 0.5)
|
||||
reagents.add_reagent("sugar", 2)
|
||||
bitesize = 2
|
||||
|
||||
/datum/reagent/honey
|
||||
name = "Honey"
|
||||
id = "honey"
|
||||
description = "A golden yellow syrup, loaded with sugary sweetness."
|
||||
color = "#FFFF00"
|
||||
|
||||
/obj/item/weapon/book/manual/hydroponics_beekeeping
|
||||
name = "The Ins and Outs of Apiculture - A Precise Art"
|
||||
icon_state ="bookHydroponicsBees"
|
||||
author = "Beekeeper Dave"
|
||||
title = "The Ins and Outs of Apiculture - A Precise Art"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Raising Bees</h3>
|
||||
|
||||
Bees are loving but fickle creatures. Don't mess with their hive and stay away from any clusters of them, and you'll avoid their ire.
|
||||
Sometimes, you'll need to dig around in there for those delicious sweeties though - in that case make sure you wear sealed protection gear
|
||||
and carry an extinguisher or smoker with you - any bees chasing you, once calmed down, can thusly be netted and returned safely to the hive.<br.
|
||||
<br>
|
||||
Beezeez is a cure-all panacea for them, but use it too much and the hive may grow to apocalyptic proportions. Other than that, bees are excellent pets
|
||||
for all the family and are excellent caretakers of one's garden: having a hive or two around will aid in the longevity and growth rate of plants,
|
||||
and aid them in fighting off poisons and disease.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
//Potential replacement for genetics revives or something I dunno (?)
|
||||
|
||||
#define CLONE_BIOMASS 150
|
||||
|
||||
/obj/machinery/clonepod
|
||||
anchored = 1
|
||||
name = "cloning pod"
|
||||
@@ -18,6 +20,7 @@
|
||||
var/mess = 0 //Need to clean out it if it's full of exploded clone.
|
||||
var/attempting = 0 //One clone attempt at a time thanks
|
||||
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
|
||||
var/biomass = CLONE_BIOMASS
|
||||
|
||||
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
|
||||
//TO-DO: Make the genetics machine accept them.
|
||||
@@ -133,7 +136,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
src.heal_level = rand(60,100) //Randomizes what health the clone is when ejected
|
||||
src.heal_level = rand(10,40) //Randomizes what health the clone is when ejected
|
||||
src.attempting = 1 //One at a time!!
|
||||
src.locked = 1
|
||||
|
||||
@@ -150,8 +153,8 @@
|
||||
|
||||
src.icon_state = "pod_1"
|
||||
//Get the clone body ready
|
||||
H.adjustCloneLoss(src.heal_level + 100) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustBrainLoss(heal_level)
|
||||
H.adjustCloneLoss(150) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustBrainLoss(src.heal_level + 50 + rand(10, 30)) // The rand(10, 30) will come out as extra brain damage
|
||||
H.Paralyse(4)
|
||||
|
||||
//Here let's calculate their health so the pod doesn't immediately eject them!!!
|
||||
@@ -271,6 +274,12 @@
|
||||
src.locked = 0
|
||||
src.go_out()
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
|
||||
user << "\blue \The [src] processes \the [W]."
|
||||
biomass += 50
|
||||
user.drop_item()
|
||||
del(W)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -328,6 +337,9 @@
|
||||
domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
|
||||
src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
||||
src.occupant = null
|
||||
|
||||
src.biomass -= CLONE_BIOMASS
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/proc/malfunction()
|
||||
|
||||
@@ -202,6 +202,9 @@
|
||||
|
||||
dat += "Lock status: <a href='byond://?src=\ref[src];lock=1'>[src.scanner.locked ? "Locked" : "Unlocked"]</a><br>"
|
||||
|
||||
if (!isnull(src.pod1))
|
||||
dat += "Biomass: <i>[src.pod1.biomass]</i><br>"
|
||||
|
||||
// Database
|
||||
dat += "<h4>Database Functions</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=2'>View Records</a><br>"
|
||||
@@ -243,8 +246,12 @@
|
||||
dat += "<br>" //Keeping a line empty for appearances I guess.
|
||||
|
||||
dat += {"<b>UI:</b> [src.active_record.fields["UI"]]<br>
|
||||
<b>SE:</b> [src.active_record.fields["SE"]]<br><br>
|
||||
<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
|
||||
<b>SE:</b> [src.active_record.fields["SE"]]<br><br>"}
|
||||
|
||||
if(pod1 && pod1.biomass >= CLONE_BIOMASS)
|
||||
dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
|
||||
else
|
||||
dat += {"<b>Unsufficient biomass</b><br>"}
|
||||
|
||||
if(4)
|
||||
if (!src.active_record)
|
||||
@@ -378,6 +385,8 @@
|
||||
temp = "Error: No Clonepod detected."
|
||||
else if(pod1.occupant)
|
||||
temp = "Error: Clonepod is currently occupied."
|
||||
else if(pod1.biomass < CLONE_BIOMASS)
|
||||
temp = "Error: Not enough biomass."
|
||||
else if(pod1.mess)
|
||||
temp = "Error: Clonepod malfunction."
|
||||
else if(!config.revival_cloning)
|
||||
@@ -389,6 +398,7 @@
|
||||
del(C)
|
||||
menu = 1
|
||||
else
|
||||
|
||||
var/mob/selected = find_dead_player("[C.fields["ckey"]]")
|
||||
selected << 'chime.ogg' //probably not the best sound but I think it's reasonable
|
||||
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
|
||||
|
||||
@@ -847,6 +847,8 @@ About the new airlock wires panel:
|
||||
if(src.shock(user, 100))
|
||||
return
|
||||
|
||||
// No. -- cib
|
||||
/**
|
||||
if(ishuman(user) && prob(40) && src.density)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.getBrainLoss() >= 60)
|
||||
@@ -861,6 +863,7 @@ About the new airlock wires panel:
|
||||
else
|
||||
visible_message("\red [user] headbutts the airlock. Good thing they're wearing a helmet.")
|
||||
return
|
||||
**/
|
||||
|
||||
if(src.p_open)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define SPEED_MULTIPLIER 0.5
|
||||
#define HYDRO_SPEED_MULTIPLIER 0.25
|
||||
|
||||
/obj/machinery/hydroponics
|
||||
name = "hydroponics tray"
|
||||
@@ -38,6 +38,14 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
obj/machinery/hydroponics/process()
|
||||
|
||||
if(myseed && (myseed.loc != src))
|
||||
@@ -47,42 +55,42 @@ obj/machinery/hydroponics/process()
|
||||
lastcycle = world.time
|
||||
if(planted && !dead)
|
||||
// Advance age
|
||||
age += 1 * SPEED_MULTIPLIER
|
||||
age += 1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
//Nutrients//////////////////////////////////////////////////////////////
|
||||
// Nutrients deplete slowly
|
||||
if(nutrilevel > 0)
|
||||
if(prob(50))
|
||||
nutrilevel -= 1 * SPEED_MULTIPLIER
|
||||
nutrilevel -= 1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// Lack of nutrients hurts non-weeds
|
||||
if(nutrilevel <= 0 && myseed.plant_type != 1)
|
||||
health -= rand(1,3) * SPEED_MULTIPLIER
|
||||
health -= rand(1,3) * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
//Water//////////////////////////////////////////////////////////////////
|
||||
// Drink random amount of water
|
||||
waterlevel = max(waterlevel - rand(1,6) * SPEED_MULTIPLIER, 0)
|
||||
waterlevel = max(waterlevel - rand(1,6) * HYDRO_SPEED_MULTIPLIER, 0)
|
||||
|
||||
// If the plant is dry, it loses health pretty fast, unless mushroom
|
||||
if(waterlevel <= 10 && myseed.plant_type != 2)
|
||||
health -= rand(0,1) * SPEED_MULTIPLIER
|
||||
health -= rand(0,1) * HYDRO_SPEED_MULTIPLIER
|
||||
if(waterlevel <= 0)
|
||||
health -= rand(0,2) * SPEED_MULTIPLIER
|
||||
health -= rand(0,2) * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// Sufficient water level and nutrient level = plant healthy
|
||||
else if(waterlevel > 10 && nutrilevel > 0)
|
||||
health += rand(1,2) * SPEED_MULTIPLIER
|
||||
health += rand(1,2) * HYDRO_SPEED_MULTIPLIER
|
||||
if(prob(5)) //5 percent chance the weed population will increase
|
||||
weedlevel += 1 * SPEED_MULTIPLIER
|
||||
weedlevel += 1 * HYDRO_SPEED_MULTIPLIER
|
||||
//Toxins/////////////////////////////////////////////////////////////////
|
||||
|
||||
// Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly
|
||||
if(toxic >= 40 && toxic < 80)
|
||||
health -= 1 * SPEED_MULTIPLIER
|
||||
toxic -= rand(1,10) * SPEED_MULTIPLIER
|
||||
health -= 1 * HYDRO_SPEED_MULTIPLIER
|
||||
toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER
|
||||
else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out
|
||||
health -= 3 * SPEED_MULTIPLIER
|
||||
toxic -= rand(1,10) * SPEED_MULTIPLIER
|
||||
health -= 3 * HYDRO_SPEED_MULTIPLIER
|
||||
toxic -= rand(1,10) * HYDRO_SPEED_MULTIPLIER
|
||||
else if(toxic < 0) // Make sure it won't go overoboard
|
||||
toxic = 0
|
||||
|
||||
@@ -93,11 +101,11 @@ obj/machinery/hydroponics/process()
|
||||
pestlevel = 10
|
||||
|
||||
else if(pestlevel >= 5)
|
||||
health -= 1 * SPEED_MULTIPLIER
|
||||
health -= 1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// If it's a weed, it doesn't stunt the growth
|
||||
if(weedlevel >= 5 && myseed.plant_type != 1 )
|
||||
health -= 1 * SPEED_MULTIPLIER
|
||||
health -= 1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
|
||||
//Health & Age///////////////////////////////////////////////////////////
|
||||
@@ -109,12 +117,12 @@ obj/machinery/hydroponics/process()
|
||||
else if(health <= 0)
|
||||
dead = 1
|
||||
harvest = 0
|
||||
weedlevel += 1 * SPEED_MULTIPLIER // Weeds flourish
|
||||
weedlevel += 1 * HYDRO_SPEED_MULTIPLIER // Weeds flourish
|
||||
pestlevel = 0 // Pests die
|
||||
|
||||
// If the plant is too old, lose health fast
|
||||
if(age > myseed.lifespan)
|
||||
health -= rand(1,5) * SPEED_MULTIPLIER
|
||||
health -= rand(1,5) * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// Harvest code
|
||||
if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead))
|
||||
@@ -131,10 +139,10 @@ obj/machinery/hydroponics/process()
|
||||
else
|
||||
lastproduce = age
|
||||
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
|
||||
pestlevel += 1 * SPEED_MULTIPLIER
|
||||
pestlevel += 1 * HYDRO_SPEED_MULTIPLIER
|
||||
else
|
||||
if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
|
||||
weedlevel += 1 * SPEED_MULTIPLIER
|
||||
weedlevel += 1 * HYDRO_SPEED_MULTIPLIER
|
||||
if(weedlevel > 10)
|
||||
weedlevel = 10
|
||||
|
||||
@@ -761,6 +769,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(src, /obj/machinery/hydroponics/soil))
|
||||
user << "You clear up the [src]!"
|
||||
del(src)
|
||||
else if(istype(O, /obj/item/apiary))
|
||||
if(planted)
|
||||
user << "\red The hydroponics tray is already occupied!"
|
||||
else
|
||||
user.drop_item()
|
||||
del(O)
|
||||
|
||||
var/obj/machinery/apiary/A = new(src.loc)
|
||||
A.icon = src.icon
|
||||
A.icon_state = src.icon_state
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -1042,4 +1061,4 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
SetLuminosity(0)
|
||||
return
|
||||
|
||||
#undef SPEED_MULTIPLIER
|
||||
#undef HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
@@ -644,7 +644,7 @@
|
||||
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
|
||||
icon_state = "nutri"
|
||||
icon_deny = "nutri-deny"
|
||||
products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
|
||||
products = list(/obj/item/beezeez = 45,/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
|
||||
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-m"
|
||||
|
||||
/obj/item/device/pda/viro
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-v"
|
||||
|
||||
/obj/item/device/pda/engineering
|
||||
default_cartridge = /obj/item/weapon/cartridge/engineering
|
||||
icon_state = "pda-e"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
canhear_range = 2
|
||||
canhear_range = 7
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
|
||||
@@ -103,6 +103,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
|
||||
@@ -23,4 +23,5 @@
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/bee_net(src)
|
||||
return
|
||||
@@ -169,11 +169,21 @@
|
||||
name = "large crate"
|
||||
desc = "A hefty metal crate with an electronic locking system."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largecrate"
|
||||
icon_opened = "largecrateopen"
|
||||
icon_closed = "largecrate"
|
||||
redlight = "largecrater"
|
||||
greenlight = "largecrateg"
|
||||
icon_state = "largemetal"
|
||||
icon_opened = "largemetalopen"
|
||||
icon_closed = "largemetal"
|
||||
redlight = "largemetalr"
|
||||
greenlight = "largemetalg"
|
||||
|
||||
/obj/structure/closet/crate/secure/large_reinforced
|
||||
name = "large crate"
|
||||
desc = "A hefty, reinforced metal crate with an electronic locking system."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largermetal"
|
||||
icon_opened = "largermetalopen"
|
||||
icon_closed = "largermetal"
|
||||
redlight = "largemetalr"
|
||||
greenlight = "largemetalg"
|
||||
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
@@ -192,10 +202,9 @@
|
||||
name = "large crate"
|
||||
desc = "A hefty metal crate."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largecrate"
|
||||
icon_opened = "largecrateopen"
|
||||
icon_closed = "largecrate"
|
||||
density = 1
|
||||
icon_state = "largemetal"
|
||||
icon_opened = "largemetalopen"
|
||||
icon_closed = "largemetal"
|
||||
|
||||
/obj/structure/closet/crate/hydroponics
|
||||
name = "Hydroponics crate"
|
||||
|
||||
@@ -104,9 +104,17 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
else if (usr.a_intent == "hurt")
|
||||
playsound(src.loc, 'Glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
playsound(src.loc, 'Glassknock.ogg', 80, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].", \
|
||||
"You knock on the [src.name].", \
|
||||
"You hear a knocking sound.")
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/attack_paw(mob/user as mob)
|
||||
|
||||
@@ -11,6 +11,19 @@
|
||||
src << "You can't commit suicide before the game starts!"
|
||||
return
|
||||
|
||||
|
||||
var/permitted = 0
|
||||
var/list/allowed = list("Syndicate","traitor","Wizard","Head Revolutionary","Cultist","Changeling")
|
||||
for(var/T in allowed)
|
||||
if(mind.special_role == T)
|
||||
permitted = 1
|
||||
break
|
||||
|
||||
if(!permitted)
|
||||
message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1)
|
||||
src << "No. Adminhelp if there is a legitimate reason."
|
||||
return
|
||||
|
||||
if (suiciding)
|
||||
src << "You're already committing suicide! Be patient!"
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
//Chief Engineer's rig
|
||||
/obj/item/clothing/head/helmet/space/rig/elite
|
||||
name = "advanced hardsuit helmet"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
desc = "An advanced helmet designed for work in a hazardous, low pressure environment. Shines with a high polish."
|
||||
icon_state = "rig0-white"
|
||||
item_state = "ce_helm"
|
||||
color = "white"
|
||||
@@ -58,12 +58,14 @@
|
||||
/obj/item/clothing/suit/space/rig/elite
|
||||
icon_state = "rig-white"
|
||||
name = "advanced hardsuit"
|
||||
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
item_state = "ce_hardsuit"
|
||||
|
||||
|
||||
//Mining rig
|
||||
/obj/item/clothing/head/helmet/space/rig/mining
|
||||
name = "mining hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has reinforced plating."
|
||||
icon_state = "rig0-mining"
|
||||
item_state = "mining_helm"
|
||||
color = "mining"
|
||||
@@ -71,6 +73,7 @@
|
||||
/obj/item/clothing/suit/space/rig/mining
|
||||
icon_state = "rig-mining"
|
||||
name = "mining hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating."
|
||||
item_state = "mining_hardsuit"
|
||||
|
||||
|
||||
@@ -78,6 +81,7 @@
|
||||
//Syndicate rig
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
|
||||
icon_state = "rig0-syndi"
|
||||
item_state = "syndie_helm"
|
||||
color = "syndi"
|
||||
@@ -87,6 +91,7 @@
|
||||
/obj/item/clothing/suit/space/rig/syndi
|
||||
icon_state = "rig-syndi"
|
||||
name = "blood-red hardsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
@@ -97,6 +102,7 @@
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
desc = "A bizarre gem-encrusted helmet that radiates magical energies."
|
||||
icon_state = "rig0-wiz"
|
||||
item_state = "wiz_helm"
|
||||
color = "wiz"
|
||||
@@ -106,6 +112,7 @@
|
||||
/obj/item/clothing/suit/space/rig/wizard
|
||||
icon_state = "rig-wiz"
|
||||
name = "gem-encrusted hardsuit"
|
||||
desc = "A bizarre gem-encrusted suit that radiates magical energies."
|
||||
item_state = "wiz_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
@@ -116,6 +123,7 @@
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/medical
|
||||
name = "medical hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has minor radiation shielding."
|
||||
icon_state = "rig0-medical"
|
||||
item_state = "medical_helm"
|
||||
color = "medical"
|
||||
@@ -123,6 +131,7 @@
|
||||
/obj/item/clothing/suit/space/rig/medical
|
||||
icon_state = "rig-medical"
|
||||
name = "medical hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has minor radiation shielding."
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
|
||||
@@ -130,6 +139,7 @@
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
color = "sec"
|
||||
@@ -138,6 +148,7 @@
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
icon_state = "rig-sec"
|
||||
name = "security hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_hardsuit"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/melee/baton)
|
||||
|
||||
@@ -11,13 +11,14 @@
|
||||
break
|
||||
|
||||
/datum/event/pda_spam/tick()
|
||||
if(!useMS.active)
|
||||
if(!useMS || !useMS.active)
|
||||
useMS = null
|
||||
if(!useMS && message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
if(useMS)
|
||||
time_failed = world.time
|
||||
if(prob(2))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else if(prob(50))
|
||||
msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution."
|
||||
else
|
||||
msg = "Syndicate saboteurs have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
|
||||
msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
|
||||
command_alert(msg, "Rogue drone alert")
|
||||
|
||||
/datum/event/rogue_drone/tick()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// All mobs should have custom emote, really..
|
||||
mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
|
||||
if(!emote_allowed && usr == src)
|
||||
if(!use_me && usr == src)
|
||||
usr << "You are unable to emote."
|
||||
return
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/ghost_name = "Unknown"
|
||||
var/creating_blob = 0
|
||||
faction = "blob"
|
||||
use_me = 0 //Blobs can't emote
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#define X_SUIT_LAYER 2
|
||||
#define X_L_HAND_LAYER 3
|
||||
#define X_R_HAND_LAYER 4
|
||||
#define X_TOTAL_LAYERS 4
|
||||
#define TARGETED_LAYER 5
|
||||
#define X_TOTAL_LAYERS 5
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
@@ -132,10 +133,22 @@
|
||||
overlays_standing[X_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/alien/humanoid/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_lying[TARGETED_LAYER] = target_locked
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_lying[TARGETED_LAYER] = null
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Xeno Overlays Indexes//////////
|
||||
#undef X_HEAD_LAYER
|
||||
#undef X_SUIT_LAYER
|
||||
#undef X_L_HAND_LAYER
|
||||
#undef X_R_HAND_LAYER
|
||||
#undef TARGETED_LAYER
|
||||
#undef X_TOTAL_LAYERS
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/timeofhostdeath = 0
|
||||
var/emp_damage = 0//Handles a type of MMI damage
|
||||
var/alert = null
|
||||
use_me = 0 //Can't use the me verb, it's a freaking immobile brain
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
@@ -48,6 +49,8 @@
|
||||
|
||||
|
||||
/mob/living/carbon/brain/update_canmove()
|
||||
if(in_contents_of(/obj/mecha)) canmove = 1
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
use_me = 1 //If it can move, let it emote
|
||||
else canmove = 0
|
||||
return canmove
|
||||
@@ -413,8 +413,35 @@
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
var/perpname = "wot"
|
||||
var/medical = "None"
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
medical = R.fields["p_stat"]
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a>\n"
|
||||
|
||||
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
@@ -485,9 +485,30 @@
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.dir = 2
|
||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||
if (G.target)
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.dir = 1
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
if (mymob.client.target_can_move)
|
||||
mymob.gun_move_icon.dir = 1
|
||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
if (mymob.client.target_can_run)
|
||||
mymob.gun_run_icon.dir = 1
|
||||
src.adding += mymob.gun_run_icon
|
||||
src.adding += mymob.gun_move_icon
|
||||
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||
inventory_shown = 0;
|
||||
|
||||
|
||||
@@ -42,32 +42,9 @@
|
||||
new/datum/organ/internal/lungs(src)
|
||||
new/datum/organ/internal/liver(src)
|
||||
new/datum/organ/internal/kidney(src)
|
||||
new/datum/organ/internal/brain(src)
|
||||
|
||||
|
||||
// connect feet to legs and hands to arms
|
||||
/* var/datum/organ/external/organ = organs_by_name["l_hand"]
|
||||
organ.parent = organs_by_name["l_arm"]
|
||||
organ = organs_by_name["r_hand"]
|
||||
organ.parent = organs_by_name["r_arm"]
|
||||
organ = organs_by_name["l_foot"]
|
||||
organ.parent = organs_by_name["l_leg"]
|
||||
organ = organs_by_name["r_foot"]
|
||||
organ.parent = organs_by_name["r_leg"]
|
||||
organ = organs_by_name["r_foot"]
|
||||
organ.parent = organs_by_name["r_leg"]
|
||||
organ = organs_by_name["head"]
|
||||
organ.parent = organs_by_name["chest"]
|
||||
organ = organs_by_name["groin"]
|
||||
organ.parent = organs_by_name["chest"]
|
||||
organ = organs_by_name["r_leg"]
|
||||
organ.parent = organs_by_name["groin"]
|
||||
organ = organs_by_name["l_leg"]
|
||||
organ.parent = organs_by_name["groin"]
|
||||
organ = organs_by_name["r_arm"]
|
||||
organ.parent = organs_by_name["chest"]
|
||||
organ = organs_by_name["l_arm"]
|
||||
organ.parent = organs_by_name["chest"]
|
||||
*/
|
||||
for(var/name in organs_by_name)
|
||||
organs += organs_by_name[name]
|
||||
|
||||
@@ -632,6 +609,103 @@
|
||||
|
||||
if(!modified)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
|
||||
if (href_list["secrecord"])
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/perpname = "wot"
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
usr << "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]"
|
||||
usr << "<b>Minor Crimes:</b> [R.fields["mi_crim"]]"
|
||||
usr << "<b>Details:</b> [R.fields["mi_crim_d"]]"
|
||||
usr << "<b>Major Crimes:</b> [R.fields["ma_crim"]]"
|
||||
usr << "<b>Details:</b> [R.fields["ma_crim_d"]]"
|
||||
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
||||
read = 1
|
||||
|
||||
if(!read)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
|
||||
if (href_list["medical"])
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
var/perpname = "wot"
|
||||
var/modified = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
|
||||
var/setmedical = input(usr, "Specify a new criminal status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*Deceased*", "*Unconscious*", "Physically Unfit", "Active", "Cancel")
|
||||
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
if(setmedical != "Cancel")
|
||||
R.fields["p_stat"] = setmedical
|
||||
modified = 1
|
||||
|
||||
spawn()
|
||||
H.handle_regular_hud_updates()
|
||||
|
||||
if(!modified)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
|
||||
if (href_list["medrecord"])
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
var/perpname = "wot"
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.medical)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
usr << "<b>Name:</b> [R.fields["name"]] <b>Blood Type:</b> [R.fields["b_type"]]"
|
||||
usr << "<b>DNA:</b> [R.fields["b_dna"]]"
|
||||
usr << "<b>Minor Disabilities:</b> [R.fields["mi_dis"]]"
|
||||
usr << "<b>Details:</b> [R.fields["mi_dis_d"]]"
|
||||
usr << "<b>Major Disabilities:</b> [R.fields["ma_dis"]]"
|
||||
usr << "<b>Details:</b> [R.fields["ma_dis_d"]]"
|
||||
usr << "<b>Notes:</b> [R.fields["notes"]]"
|
||||
read = 1
|
||||
|
||||
if(!read)
|
||||
usr << "\red Unable to locate a data core entry for this person."
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
ChangeToHusk()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
var/res = brainloss
|
||||
var/datum/organ/internal/brain/sponge = internal_organs["brain"]
|
||||
if (sponge.is_bruised())
|
||||
res += 20
|
||||
if (sponge.is_broken())
|
||||
res += 50
|
||||
res = min(res,maxHealth*2)
|
||||
return res
|
||||
|
||||
//These procs fetch a cumulative total damage from all organs
|
||||
/mob/living/carbon/human/getBruteLoss()
|
||||
|
||||
@@ -261,7 +261,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
// No. -- cib
|
||||
/*if (getBrainLoss() >= 60 && stat != 2)
|
||||
if (prob(3))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
@@ -270,6 +271,25 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!"))
|
||||
if(3)
|
||||
emote("drool")
|
||||
*/
|
||||
|
||||
if(stat != 2)
|
||||
var/rn = rand(0, 200)
|
||||
if(getBrainLoss() >= 5)
|
||||
if(0 <= rn && rn <= 3)
|
||||
custom_pain("Your head feels numb and painful.")
|
||||
if(getBrainLoss() >= 15)
|
||||
if(4 <= rn && rn <= 6) if(eye_blurry <= 0)
|
||||
src << "\red It becomes hard to see for some reason."
|
||||
eye_blurry = 10
|
||||
if(getBrainLoss() >= 35)
|
||||
if(7 <= rn && rn <= 9) if(hand && equipped())
|
||||
src << "\red Your hand won't respond properly, you drop what you're holding."
|
||||
drop_item()
|
||||
if(getBrainLoss() >= 50)
|
||||
if(10 <= rn && rn <= 12) if(!lying)
|
||||
src << "\red Your legs won't respond properly, you fall down."
|
||||
lying = 1
|
||||
|
||||
proc/handle_organs()
|
||||
// take care of organ related updates, such as broken and missing limbs
|
||||
|
||||
@@ -64,6 +64,7 @@ There are several things that need to be remembered:
|
||||
update_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc
|
||||
update_hair() //Handles updating your hair overlay (used to be update_face, but mouth and
|
||||
...eyes were merged into update_body)
|
||||
update_targeted() // Updates the target overlay when someone points a gun at you
|
||||
|
||||
> All of these procs update our overlays_lying and overlays_standing, and then call update_icons() by default.
|
||||
If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call
|
||||
@@ -117,7 +118,8 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define L_HAND_LAYER 19
|
||||
#define R_HAND_LAYER 20
|
||||
#define TAIL_LAYER 21 //bs12 specific. this hack is probably gonna come back to haunt me
|
||||
#define TOTAL_LAYERS 21
|
||||
#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 22
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -130,7 +132,6 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
|
||||
//I'll work on removing that stuff by rewriting some of the cloaking stuff at a later date.
|
||||
/mob/living/carbon/human/update_icons()
|
||||
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays.Cut()
|
||||
@@ -472,6 +473,19 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
update_hair(0)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/human/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_lying[TARGETED_LAYER] = target_locked
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_lying[TARGETED_LAYER] = null
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/* --------------------------------------- */
|
||||
//For legacy support.
|
||||
/mob/living/carbon/human/regenerate_icons()
|
||||
@@ -858,4 +872,5 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
#undef L_HAND_LAYER
|
||||
#undef R_HAND_LAYER
|
||||
#undef TAIL_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
#undef TARGETED_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
|
||||
@@ -220,9 +220,29 @@
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.dir = 2
|
||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||
if (G.target)
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.dir = 1
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
if (mymob.client.target_can_move)
|
||||
mymob.gun_move_icon.dir = 1
|
||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
if (mymob.client.target_can_run)
|
||||
mymob.gun_run_icon.dir = 1
|
||||
src.adding += mymob.gun_run_icon
|
||||
src.adding += mymob.gun_move_icon
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
return
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#define M_HANDCUFF_LAYER 3
|
||||
#define M_L_HAND_LAYER 4
|
||||
#define M_R_HAND_LAYER 5
|
||||
#define M_TOTAL_LAYERS 5
|
||||
#define TARGETED_LAYER 6
|
||||
#define M_TOTAL_LAYERS 6
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
@@ -101,11 +102,24 @@
|
||||
if (client)
|
||||
client.screen |= contents
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_lying[TARGETED_LAYER] = target_locked
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_lying[TARGETED_LAYER] = null
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Monkey Overlays Indexes////////
|
||||
#undef M_MASK_LAYER
|
||||
#undef M_BACK_LAYER
|
||||
#undef M_HANDCUFF_LAYER
|
||||
#undef M_L_HAND_LAYER
|
||||
#undef M_R_HAND_LAYER
|
||||
#undef TARGETED_LAYER
|
||||
#undef M_TOTAL_LAYERS
|
||||
|
||||
|
||||
@@ -142,6 +142,9 @@ var/list/department_radio_keys = list(
|
||||
// Check changed so that parrots can use headsets. Other simple animals do not have ears and will cause runtimes.
|
||||
// And borgs -Sieve
|
||||
|
||||
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
|
||||
message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
@@ -179,12 +182,14 @@ var/list/department_radio_keys = list(
|
||||
var/is_speaking_skrell = 0
|
||||
var/is_speaking_soghun = 0
|
||||
var/is_speaking_taj = 0
|
||||
var/is_speaking_radio = 0
|
||||
|
||||
switch (message_mode)
|
||||
if ("headset")
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message)
|
||||
used_radios += src:ears
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -194,6 +199,7 @@ var/list/department_radio_keys = list(
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, 1)
|
||||
used_radios += src:ears
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -202,6 +208,7 @@ var/list/department_radio_keys = list(
|
||||
if (r_hand)
|
||||
r_hand.talk_into(src, message)
|
||||
used_radios += src:r_hand
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -210,6 +217,7 @@ var/list/department_radio_keys = list(
|
||||
if (l_hand)
|
||||
l_hand.talk_into(src, message)
|
||||
used_radios += src:l_hand
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -218,6 +226,7 @@ var/list/department_radio_keys = list(
|
||||
for (var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message)
|
||||
used_radios += I
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -244,6 +253,7 @@ var/list/department_radio_keys = list(
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
is_speaking_radio = 1
|
||||
else if(istype(src, /mob/living/silicon/robot))
|
||||
if (src:radio)
|
||||
src:radio.talk_into(src, message, message_mode)
|
||||
@@ -375,6 +385,10 @@ var/list/department_radio_keys = list(
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
for(var/mob/M in hearers(5, src))
|
||||
if(M != src && is_speaking_radio)
|
||||
M:show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
|
||||
@@ -383,7 +397,6 @@ var/list/department_radio_keys = list(
|
||||
message_a = "<i>[message_a]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
|
||||
for (var/M in heard_a)
|
||||
if(hascall(M,"show_message"))
|
||||
var/deaf_message = ""
|
||||
|
||||
@@ -143,9 +143,29 @@
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.dir = 2
|
||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||
if (G.target)
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.dir = 1
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
if (mymob.client.target_can_move)
|
||||
mymob.gun_move_icon.dir = 1
|
||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
if (mymob.client.target_can_run)
|
||||
mymob.gun_run_icon.dir = 1
|
||||
src.adding += mymob.gun_run_icon
|
||||
src.adding += mymob.gun_move_icon
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/robot
|
||||
name = "Cyborg"
|
||||
real_name = "Cyborg"
|
||||
icon = 'icons/mob/robots.dmi'//
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "robot"
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
@@ -806,7 +806,13 @@
|
||||
overlays += "ov-openpanel -c"
|
||||
return
|
||||
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/silicon/robot/update_targeted()
|
||||
if(!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
updateicon()
|
||||
if (targeted_by && target_locked)
|
||||
overlays += target_locked
|
||||
|
||||
/mob/living/silicon/robot/proc/installed_modules()
|
||||
if(weapon_lock)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
|
||||
/*
|
||||
/* If you're turning this back on, scroll down and uncomment target_updated
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
@@ -404,7 +404,6 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/corgi/puppy
|
||||
name = "\improper corgi puppy"
|
||||
real_name = "corgi"
|
||||
|
||||
@@ -456,4 +456,12 @@
|
||||
var/obj/machinery/bot/B = target_mob
|
||||
if(B.health > 0)
|
||||
return (0)
|
||||
return (1)
|
||||
return (1)
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/simple_animal/update_targeted()
|
||||
if(!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
overlays = null
|
||||
if (targeted_by && target_locked)
|
||||
overlays += target_locked
|
||||
@@ -27,6 +27,10 @@
|
||||
var/obj/screen/pressure = null
|
||||
var/obj/screen/damageoverlay = null
|
||||
var/obj/screen/pain = null
|
||||
var/obj/screen/gun/item/item_use_icon = null
|
||||
var/obj/screen/gun/move/gun_move_icon = null
|
||||
var/obj/screen/gun/run/gun_run_icon = null
|
||||
var/obj/screen/gun/mode/gun_setting_icon = null
|
||||
|
||||
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
|
||||
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
|
||||
@@ -36,6 +40,7 @@
|
||||
*/
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
|
||||
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
|
||||
var/damageoverlaytemp = 0
|
||||
var/computer_id = null
|
||||
var/lastattacker = null
|
||||
@@ -210,4 +215,4 @@
|
||||
var/has_limbs = 1 //Whether this mob have any limbs he can move with
|
||||
var/can_stand = 1 //Whether this mob have ability to stand
|
||||
|
||||
var/immune_to_ssd = 0
|
||||
var/immune_to_ssd = 0
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
return 0
|
||||
|
||||
move_delay = world.time//set move delay
|
||||
|
||||
mob.last_move_intent = world.time + 10
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(mob.drowsyness > 0)
|
||||
|
||||
@@ -382,56 +382,62 @@
|
||||
*/
|
||||
|
||||
/datum/sprite_accessory/hair
|
||||
spines_long
|
||||
una_spines_long
|
||||
name = "Long Unathi Spines"
|
||||
icon_state = "soghun_longspines"
|
||||
species_allowed = list("Unathi")
|
||||
|
||||
spines_short
|
||||
una_spines_short
|
||||
name = "Short Unathi Spines"
|
||||
icon_state = "soghun_shortspines"
|
||||
species_allowed = list("Unathi")
|
||||
|
||||
frills_long
|
||||
una_frills_long
|
||||
name = "Long Unathi Frills"
|
||||
icon_state = "soghun_longfrills"
|
||||
species_allowed = list("Unathi")
|
||||
|
||||
frills_short
|
||||
una_frills_short
|
||||
name = "Short Unathi Frills"
|
||||
icon_state = "soghun_shortfrill"
|
||||
species_allowed = list("Unathi")
|
||||
|
||||
horns
|
||||
una_horns
|
||||
name = "Unathi Horns"
|
||||
icon_state = "soghun_horns"
|
||||
species_allowed = list("Unathi")
|
||||
|
||||
tentacle_f
|
||||
skr_tentacle_m
|
||||
name = "Skrell Male Tentacles"
|
||||
icon_state = "skrell_hair_m"
|
||||
species_allowed = list("Skrell")
|
||||
gender = MALE
|
||||
|
||||
skr_tentacle_f
|
||||
name = "Skrell Female Tentacles"
|
||||
icon_state = "skrell_hair_f"
|
||||
species_allowed = list("Skrell")
|
||||
gender = FEMALE
|
||||
|
||||
gold_m
|
||||
skr_gold_m
|
||||
name = "Gold plated Skrell Male Tentacles"
|
||||
icon_state = "skrell_goldhair_m"
|
||||
species_allowed = list("Skrell")
|
||||
gender = MALE
|
||||
|
||||
gold_f
|
||||
skr_gold_f
|
||||
name = "Gold chained Skrell Female Tentacles"
|
||||
icon_state = "skrell_goldhair_f"
|
||||
species_allowed = list("Skrell")
|
||||
gender = FEMALE
|
||||
|
||||
clothtentacle_m
|
||||
skr_clothtentacle_m
|
||||
name = "Cloth draped Skrell Male Tentacles"
|
||||
icon_state = "skrell_clothhair_m"
|
||||
species_allowed = list("Skrell")
|
||||
gender = MALE
|
||||
|
||||
clothtentacle_f
|
||||
skr_clothtentacle_f
|
||||
name = "Cloth draped Skrell Female Tentacles"
|
||||
icon_state = "skrell_clothhair_f"
|
||||
species_allowed = list("Skrell")
|
||||
@@ -443,12 +449,12 @@
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_clean
|
||||
name = "Clean"
|
||||
name = "Tajara Clean"
|
||||
icon_state = "hair_clean"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_shaggy
|
||||
name = "Shaggy"
|
||||
name = "Tajara Shaggy"
|
||||
icon_state = "hair_shaggy"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
@@ -458,64 +464,64 @@
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_plait
|
||||
name = "Plait"
|
||||
name = "Tajara Plait"
|
||||
icon_state = "hair_plait"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_straight
|
||||
name = "Straight"
|
||||
name = "Tajara Straight"
|
||||
icon_state = "hair_straight"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_long
|
||||
name = "Long"
|
||||
name = "Tajara Long"
|
||||
icon_state = "hair_long"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_rattail
|
||||
name = "Rat Tail"
|
||||
name = "Tajara Rat Tail"
|
||||
icon_state = "hair_rattail"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_spiky
|
||||
name = "Tajaran Spiky"
|
||||
name = "Tajara Spiky"
|
||||
icon_state = "hair_tajspiky"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_ears_messy
|
||||
name = "Messy"
|
||||
name = "Tajara Messy"
|
||||
icon_state = "hair_messy"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
/datum/sprite_accessory/facial_hair
|
||||
|
||||
taj_sideburns
|
||||
name = "Sideburns"
|
||||
name = "Tajara Sideburns"
|
||||
icon_state = "facial_mutton"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_mutton
|
||||
name = "Mutton"
|
||||
name = "Tajara Mutton"
|
||||
icon_state = "facial_mutton"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_pencilstache
|
||||
name = "Pencilstache"
|
||||
name = "Tajara Pencilstache"
|
||||
icon_state = "facial_pencilstache"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_moustache
|
||||
name = "Moustache"
|
||||
name = "Tajara Moustache"
|
||||
icon_state = "facial_moustache"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_goatee
|
||||
name = "Goatee"
|
||||
name = "Tajara Goatee"
|
||||
icon_state = "facial_goatee"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
taj_smallstache
|
||||
name = "Smallsatche"
|
||||
name = "Tajara Smallsatche"
|
||||
icon_state = "facial_smallstache"
|
||||
species_allowed = list("Tajaran")
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(ishuman(src) || isrobot(src))
|
||||
if(use_me)
|
||||
usr.emote("me",1,message)
|
||||
else
|
||||
usr.emote(message)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
unacidable = 1
|
||||
var/id = 0.0
|
||||
var/obj/master
|
||||
var/gun_click_time = -100 //I'm lazy.
|
||||
|
||||
/obj/screen/text
|
||||
icon = null
|
||||
@@ -72,6 +73,33 @@
|
||||
var/selecting = "chest"
|
||||
screen_loc = ui_zonesel
|
||||
|
||||
/obj/screen/gun
|
||||
name = "gun"
|
||||
icon = 'screen1.dmi'
|
||||
master = null
|
||||
dir = 2
|
||||
|
||||
move
|
||||
name = "Allow Walking"
|
||||
icon_state = "no_walk0"
|
||||
screen_loc = ui_gun2
|
||||
|
||||
run
|
||||
name = "Allow Running"
|
||||
icon_state = "no_run0"
|
||||
screen_loc = ui_gun3
|
||||
|
||||
item
|
||||
name = "Allow Item Use"
|
||||
icon_state = "no_item0"
|
||||
screen_loc = ui_gun1
|
||||
|
||||
mode
|
||||
name = "Toggle Gun Mode"
|
||||
icon_state = "gun0"
|
||||
screen_loc = ui_gun_select
|
||||
//dir = 1
|
||||
|
||||
|
||||
/obj/screen/zone_sel/MouseDown(location, control,params)
|
||||
// Changes because of 4.0
|
||||
@@ -460,6 +488,64 @@
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = null
|
||||
|
||||
if("Allow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
|
||||
if("Disallow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Toggle Gun Mode")
|
||||
usr.client.ToggleGunMode()
|
||||
|
||||
else
|
||||
DblClick()
|
||||
return
|
||||
|
||||
@@ -63,3 +63,6 @@
|
||||
|
||||
/mob/proc/update_inv_ears()
|
||||
return
|
||||
|
||||
/mob/proc/update_targeted()
|
||||
return
|
||||
|
||||
@@ -22,7 +22,14 @@
|
||||
var/recoil = 0
|
||||
var/ejectshell = 1
|
||||
var/clumsy_check = 1
|
||||
|
||||
var/tmp/list/mob/living/target //List of who yer targeting.
|
||||
var/tmp/lock_time = -100
|
||||
var/tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
|
||||
var/automatic = 0 //Used to determine if you can target multiple people.
|
||||
var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
|
||||
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
var/firerate = 1 // 0 for one bullet after tarrget moves and aim is lowered,
|
||||
//1 for keep shooting until aim is lowered
|
||||
|
||||
proc/load_into_chamber()
|
||||
return 0
|
||||
@@ -30,107 +37,157 @@
|
||||
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
|
||||
return 1
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
|
||||
|
||||
afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)//TODO: go over this
|
||||
if(flag) return //we're placing gun on a table or in backpack
|
||||
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
||||
|
||||
//Exclude lasertag guns from the CLUMSY check.
|
||||
if(clumsy_check)
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if ((CLUMSY in M.mutations) && prob(50))
|
||||
M << "<span class='danger'>[src] blows up in your face.</span>"
|
||||
M.take_organ_damage(0,20)
|
||||
M.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if (HULK in M.mutations)
|
||||
M << "\red Your meaty finger is much too large for the trigger guard!"
|
||||
return
|
||||
if(ishuman(user))
|
||||
if(user.dna && user.dna.mutantrace == "adamantine")
|
||||
user << "\red Your metal fingers don't fit in the trigger guard!"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = user.loc
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
|
||||
if(!special_check(user))
|
||||
return
|
||||
if(!load_into_chamber())
|
||||
user << "\red *click*";
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
return
|
||||
|
||||
if(!in_chamber)
|
||||
return
|
||||
|
||||
in_chamber.firer = user
|
||||
in_chamber.def_zone = user.zone_sel.selecting
|
||||
|
||||
|
||||
if(targloc == curloc)
|
||||
user.bullet_act(in_chamber)
|
||||
del(in_chamber)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(recoil)
|
||||
spawn()
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] fires [src]!</span>", "<span class='warning'>You fire [src]!</span>", "You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
|
||||
in_chamber.original = target
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.shot_from = src
|
||||
user.next_move = world.time + 4
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = curloc
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
|
||||
if(params)
|
||||
var/list/mouse_control = params2list(params)
|
||||
if(mouse_control["icon-x"])
|
||||
in_chamber.p_x = text2num(mouse_control["icon-x"])
|
||||
if(mouse_control["icon-y"])
|
||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
spawn()
|
||||
if(in_chamber)
|
||||
in_chamber.process()
|
||||
sleep(1)
|
||||
in_chamber = null
|
||||
|
||||
update_icon()
|
||||
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if(flag) return //we're placing gun on a table or in backpack
|
||||
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
||||
if(user && user.client && user.client.gun_mode && !(A in target))
|
||||
PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
|
||||
else
|
||||
Fire(A,user,params) //Otherwise, fire normally.
|
||||
|
||||
/obj/item/weapon/gun/proc/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)//TODO: go over this
|
||||
//Exclude lasertag guns from the CLUMSY check.
|
||||
if(clumsy_check)
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if ((CLUMSY in M.mutations) && prob(50))
|
||||
M << "<span class='danger'>[src] blows up in your face.</span>"
|
||||
M.take_organ_damage(0,20)
|
||||
M.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if (HULK in M.mutations)
|
||||
M << "\red Your meaty finger is much too large for the trigger guard!"
|
||||
return
|
||||
if(ishuman(user))
|
||||
if(user.dna && user.dna.mutantrace == "adamantine")
|
||||
user << "\red Your metal fingers don't fit in the trigger guard!"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
|
||||
if(!special_check(user))
|
||||
return
|
||||
|
||||
if(!load_into_chamber()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
if(!in_chamber)
|
||||
return
|
||||
|
||||
in_chamber.firer = user
|
||||
in_chamber.def_zone = user.zone_sel.selecting
|
||||
if(targloc == curloc)
|
||||
user.bullet_act(in_chamber)
|
||||
del(in_chamber)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(recoil)
|
||||
spawn()
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
|
||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
|
||||
in_chamber.original = target
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.shot_from = src
|
||||
user.next_move = world.time + 4
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = curloc
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
|
||||
if(params)
|
||||
var/list/mouse_control = params2list(params)
|
||||
if(mouse_control["icon-x"])
|
||||
in_chamber.p_x = text2num(mouse_control["icon-x"])
|
||||
if(mouse_control["icon-y"])
|
||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
spawn()
|
||||
if(in_chamber)
|
||||
in_chamber.process()
|
||||
sleep(1)
|
||||
in_chamber = null
|
||||
|
||||
update_icon()
|
||||
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/proc/click_empty(mob/user = null)
|
||||
if (user)
|
||||
user.visible_message("*click click*", "\red <b>*click*</b>")
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
else
|
||||
src.visible_message("*click click*")
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 100, 1)
|
||||
|
||||
/obj/item/weapon/gun/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
//Suicide handling.
|
||||
if (M == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
|
||||
mouthshoot = 1
|
||||
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
|
||||
if(!do_after(user, 40))
|
||||
M.visible_message("\blue [user] decided life was worth living")
|
||||
mouthshoot = 0
|
||||
return
|
||||
if (load_into_chamber())
|
||||
user.visible_message("<span class = 'warning'>[user] pulls the trigger. Ow.</span>")
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
in_chamber.on_hit(M)
|
||||
if (!in_chamber.nodamage)
|
||||
user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]")
|
||||
else
|
||||
user << "<span class = 'notice'>You feel dumb for trying this...</span>"
|
||||
del(in_chamber)
|
||||
mouthshoot = 0
|
||||
return
|
||||
else
|
||||
click_empty(user)
|
||||
mouthshoot = 0
|
||||
return
|
||||
|
||||
if (load_into_chamber())
|
||||
//Point blank shooting if on harm intent or target we were targeting.
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
in_chamber.damage *= 1.3
|
||||
Fire(M,user)
|
||||
return
|
||||
else if(target && M in target)
|
||||
Fire(M,user) ///Otherwise, shoot!
|
||||
return
|
||||
else
|
||||
return ..() //Pistolwhippin'
|
||||
@@ -10,7 +10,7 @@
|
||||
origin_tech = "combat=2;materials=2"
|
||||
w_class = 3.0
|
||||
m_amt = 1000
|
||||
|
||||
recoil = 1
|
||||
var/ammo_type = "/obj/item/ammo_casing/a357"
|
||||
var/list/loaded = list()
|
||||
var/max_shells = 7
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/load_into_chamber()
|
||||
// if(in_chamber)
|
||||
// return 1 {R}
|
||||
if(in_chamber)
|
||||
return 1 //{R}
|
||||
|
||||
if(!loaded.len)
|
||||
return 0
|
||||
@@ -77,6 +77,8 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/attack_self(mob/user as mob)
|
||||
if (target)
|
||||
return ..()
|
||||
if (loaded.len)
|
||||
if (load_method == SPEEDLOADER)
|
||||
var/obj/item/ammo_casing/AC = loaded[1]
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
caliber = "9mm"
|
||||
origin_tech = "combat=4;materials=2"
|
||||
ammo_type = "/obj/item/ammo_casing/c9mm"
|
||||
automatic = 1
|
||||
|
||||
isHandgun()
|
||||
return 0
|
||||
@@ -18,7 +19,7 @@
|
||||
icon_state = "mini-uzi"
|
||||
w_class = 3.0
|
||||
max_shells = 16
|
||||
caliber = ".45"
|
||||
caliber = " .45"
|
||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||
ammo_type = "/obj/item/ammo_casing/c45"
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
icon_state = "cshotgun"
|
||||
max_shells = 8
|
||||
origin_tech = "combat=5;materials=2"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
|
||||
//this is largely hacky and bad :( -Pete
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
|
||||
|
||||
@@ -58,6 +58,17 @@
|
||||
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, blocked)
|
||||
return 1
|
||||
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_step_to(user,target)) //Making the test....
|
||||
in_chamber.target = target
|
||||
in_chamber.flags = flags //Set the flags...
|
||||
in_chamber.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
in_chamber.firer = user
|
||||
var/output = in_chamber.process() //Test it!
|
||||
del(in_chamber) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
@@ -74,9 +85,14 @@
|
||||
loc = A.loc
|
||||
return 0// nope.avi
|
||||
|
||||
var/distance = get_dist(starting,loc)
|
||||
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
|
||||
// close distance, actually RAISE the chance to hit.
|
||||
var/distance = get_dist(starting,loc)
|
||||
var/miss_modifier = -30
|
||||
if (istype(shot_from,/obj/item/weapon/gun)) //If you aim at someone beforehead, it'll hit more often.
|
||||
var/obj/item/weapon/gun/daddy = shot_from //Kinda balanced by fact you need like 2 seconds to aim
|
||||
if (daddy.target && original in daddy.target) //As opposed to no-delay pew pew
|
||||
miss_modifier += -30
|
||||
def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance)
|
||||
|
||||
if(!def_zone)
|
||||
@@ -148,3 +164,44 @@
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
/obj/item/projectile/test //Used to see if you can hit them.
|
||||
invisibility = 101 //Nope! Can't see me!
|
||||
yo = null
|
||||
xo = null
|
||||
var/target = null
|
||||
var/result = 0 //To pass the message back to the gun.
|
||||
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
return //cannot shoot yourself
|
||||
if(istype(A, /obj/item/projectile))
|
||||
return
|
||||
if(istype(A, /mob/living))
|
||||
result = 2 //We hit someone, return 1!
|
||||
return
|
||||
result = 1
|
||||
return
|
||||
|
||||
process()
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if(!curloc || !targloc)
|
||||
return 0
|
||||
yo = targloc.y - curloc.y
|
||||
xo = targloc.x - curloc.x
|
||||
target = targloc
|
||||
while(src) //Loop on through!
|
||||
if(result)
|
||||
return (result - 1)
|
||||
if((!( target ) || loc == target))
|
||||
target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
|
||||
step_towards(src, target)
|
||||
var/mob/living/M = locate() in get_turf(src)
|
||||
if(istype(M)) //If there is someting living...
|
||||
return 1 //Return 1
|
||||
else
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
nodamage = 0
|
||||
flag = "bullet"
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)
|
||||
if (..(target, blocked))
|
||||
var/mob/living/L = target
|
||||
shake_camera(L, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet
|
||||
damage = 10
|
||||
|
||||
374
code/modules/projectiles/targeting.dm
Normal file
@@ -0,0 +1,374 @@
|
||||
/obj/item/weapon/gun/verb/toggle_firerate()
|
||||
set name = "Toggle Firerate"
|
||||
set category = "Object"
|
||||
firerate = !firerate
|
||||
if (firerate == 0)
|
||||
loc << "You will now continue firing when your target moves."
|
||||
else
|
||||
loc << "You will now only fire once, then lower your aim, when your target moves."
|
||||
|
||||
/obj/item/weapon/gun/verb/lower_aim()
|
||||
set name = "Lower Aim"
|
||||
set category = "Object"
|
||||
if(target)
|
||||
stop_aim()
|
||||
usr.visible_message("\blue \The [usr] lowers \the [src]...")
|
||||
|
||||
//Clicking gun will still lower aim for guns that don't overwrite this
|
||||
/obj/item/weapon/gun/attack_self()
|
||||
lower_aim()
|
||||
|
||||
//Removing the lock and the buttons.
|
||||
/obj/item/weapon/gun/dropped(mob/user as mob)
|
||||
stop_aim()
|
||||
if (user.client)
|
||||
user.client.remove_gun_icons()
|
||||
return ..()
|
||||
|
||||
//Removes lock fro mall targets
|
||||
/obj/item/weapon/gun/proc/stop_aim()
|
||||
if(target)
|
||||
for(var/mob/living/M in target)
|
||||
if(M)
|
||||
M.NotTargeted(src) //Untargeting people.
|
||||
del(target)
|
||||
|
||||
//Compute how to fire.....
|
||||
/obj/item/weapon/gun/proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params)
|
||||
//Lets not spam it.
|
||||
if(lock_time > world.time - 2) return
|
||||
.
|
||||
if(ismob(A) && isliving(A) && !(A in target))
|
||||
Aim(A) //Clicked a mob, aim at them
|
||||
else //Didn't click someone, check if there is anyone along that guntrace
|
||||
var/mob/living/M = GunTrace(usr.x,usr.y,A.x,A.y,usr.z,usr) //Find dat mob.
|
||||
if(M && isliving(M) && M in view(user) && !(M in target))
|
||||
Aim(M) //Aha! Aim at them!
|
||||
else if(!ismob(M) || (ismob(M) && !(M in view(user)))) //Nope! They weren't there!
|
||||
Fire(A,user,params) //Fire like normal, then.
|
||||
usr.dir = get_cardinal_dir(src, A)
|
||||
|
||||
//Aiming at the target mob.
|
||||
/obj/item/weapon/gun/proc/Aim(var/mob/living/M)
|
||||
if(!target || !(M in target))
|
||||
lock_time = world.time
|
||||
if(target && !automatic) //If they're targeting someone and they have a non automatic weapon.
|
||||
for(var/mob/living/L in target)
|
||||
if(L)
|
||||
L.NotTargeted(src)
|
||||
del(target)
|
||||
usr.visible_message("\red <b>[usr] turns \the [src] on [M]!</b>")
|
||||
else
|
||||
usr.visible_message("\red <b>[usr] aims \a [src] at [M]!</b>")
|
||||
M.Targeted(src)
|
||||
|
||||
//HE MOVED, SHOOT HIM!
|
||||
/obj/item/weapon/gun/proc/TargetActed(var/mob/living/T)
|
||||
var/mob/living/M = loc
|
||||
if(M == T) return
|
||||
if(!istype(M)) return
|
||||
if(src != M.equipped())
|
||||
stop_aim()
|
||||
M.last_move_intent = world.time
|
||||
if(load_into_chamber())
|
||||
var/firing_check = in_chamber.check_fire(T,usr) //0 if it cannot hit them, 1 if it is capable of hitting, and 2 if a special check is preventing it from firing.
|
||||
if(firing_check > 0)
|
||||
if(firing_check == 1)
|
||||
Fire(T,usr, reflex = 1)
|
||||
else if(!told_cant_shoot)
|
||||
M << "\red They can't be hit from here!"
|
||||
told_cant_shoot = 1
|
||||
spawn(30)
|
||||
told_cant_shoot = 0
|
||||
else
|
||||
click_empty(M)
|
||||
|
||||
usr.dir = get_cardinal_dir(src, T)
|
||||
|
||||
if (!firerate) // If firerate is set to lower aim after one shot, untarget the target
|
||||
T.NotTargeted(src)
|
||||
|
||||
//Yay, math!
|
||||
|
||||
#define SIGN(X) ((X<0)?-1:1)
|
||||
|
||||
proc/GunTrace(X1,Y1,X2,Y2,Z=1,exc_obj,PX1=16,PY1=16,PX2=16,PY2=16)
|
||||
//bluh << "Tracin' [X1],[Y1] to [X2],[Y2] on floor [Z]."
|
||||
var/turf/T
|
||||
var/mob/living/M
|
||||
if(X1==X2)
|
||||
if(Y1==Y2) return 0 //Light cannot be blocked on same tile
|
||||
else
|
||||
var/s = SIGN(Y2-Y1)
|
||||
Y1+=s
|
||||
while(1)
|
||||
T = locate(X1,Y1,Z)
|
||||
if(!T) return 0
|
||||
M = locate() in T
|
||||
if(M) return M
|
||||
M = locate() in orange(1,T)-exc_obj
|
||||
if(M) return M
|
||||
Y1+=s
|
||||
else
|
||||
var
|
||||
m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
|
||||
b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
|
||||
signX = SIGN(X2-X1)
|
||||
signY = SIGN(Y2-Y1)
|
||||
if(X1<X2) b+=m
|
||||
while(1)
|
||||
var/xvert = round(m*X1+b-Y1)
|
||||
if(xvert) Y1+=signY //Line exits tile vertically
|
||||
else X1+=signX //Line exits tile horizontally
|
||||
T = locate(X1,Y1,Z)
|
||||
if(!T) return 0
|
||||
M = locate() in T
|
||||
if(M) return M
|
||||
M = locate() in orange(1,T)-exc_obj
|
||||
if(M) return M
|
||||
return 0
|
||||
|
||||
|
||||
//Targeting management procs
|
||||
mob/var
|
||||
list/targeted_by
|
||||
target_time = -100
|
||||
last_move_intent = -100
|
||||
last_target_click = -5
|
||||
target_locked = null
|
||||
|
||||
mob/living/proc/Targeted(var/obj/item/weapon/gun/I) //Self explanitory.
|
||||
if(!I.target)
|
||||
I.target = list(src)
|
||||
else if(I.automatic && I.target.len < 5) //Automatic weapon, they can hold down a room.
|
||||
I.target += src
|
||||
else if(I.target.len >= 5)
|
||||
if(ismob(I.loc))
|
||||
I.loc << "You can only target 5 people at once!"
|
||||
return
|
||||
else
|
||||
return
|
||||
for(var/mob/living/K in viewers(usr))
|
||||
K << 'TargetOn.ogg'
|
||||
|
||||
if(!targeted_by) targeted_by = list()
|
||||
targeted_by += I
|
||||
I.lock_time = world.time + 20 //Target has 2 second to realize they're targeted and stop (or target the opponent).
|
||||
src << "((\red <b>Your character is being targeted. They have 2 seconds to stop any click or move actions.</b> \black While targeted, they may \
|
||||
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map, their items \
|
||||
(other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
|
||||
so try not to get on their bad side.\black ))"
|
||||
|
||||
if(targeted_by.len == 1)
|
||||
spawn(0)
|
||||
target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locking")
|
||||
overlays += target_locked
|
||||
spawn(0)
|
||||
sleep(20)
|
||||
if(target_locked)
|
||||
target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locked")
|
||||
update_targeted()
|
||||
|
||||
//Adding the buttons to the controler person
|
||||
var/mob/living/T = I.loc
|
||||
if(T)
|
||||
if(T.client)
|
||||
T.client.add_gun_icons()
|
||||
else
|
||||
I.lower_aim()
|
||||
return
|
||||
if(m_intent == "run" && T.client.target_can_move == 1 && T.client.target_can_run == 0)
|
||||
src << "\red Your move intent is now set to walk, as your targeter permits it." //Self explanitory.
|
||||
set_m_intent("walk")
|
||||
|
||||
//Processing the aiming. Should be probably in separate object with process() but lasy.
|
||||
while(targeted_by && T.client)
|
||||
if(last_move_intent > I.lock_time + 10 && !T.client.target_can_move) //If target moved when not allowed to
|
||||
I.TargetActed(src)
|
||||
if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
|
||||
I.lock_time = world.time + 5
|
||||
I.lock_time = world.time + 5
|
||||
I.last_moved_mob = src
|
||||
else if(last_move_intent > I.lock_time + 10 && !T.client.target_can_run && m_intent == "run") //If the target ran while targeted
|
||||
I.TargetActed(src)
|
||||
if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
|
||||
I.lock_time = world.time + 5
|
||||
I.lock_time = world.time + 5
|
||||
I.last_moved_mob = src
|
||||
if(last_target_click > I.lock_time + 10 && !T.client.target_can_click) //If the target clicked the map to pick something up/shoot/etc
|
||||
I.TargetActed(src)
|
||||
if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
|
||||
I.lock_time = world.time + 5
|
||||
I.lock_time = world.time + 5
|
||||
I.last_moved_mob = src
|
||||
sleep(1)
|
||||
|
||||
mob/living/proc/NotTargeted(var/obj/item/weapon/gun/I)
|
||||
if(!I.silenced)
|
||||
for(var/mob/living/M in viewers(src))
|
||||
M << 'TargetOff.ogg'
|
||||
targeted_by -= I
|
||||
I.target.Remove(src) //De-target them
|
||||
if(!I.target.len)
|
||||
del(I.target)
|
||||
var/mob/living/T = I.loc //Remove the targeting icons
|
||||
if(T && ismob(T) && !I.target)
|
||||
T.client.remove_gun_icons()
|
||||
if(!targeted_by.len)
|
||||
del target_locked //Remove the overlay
|
||||
del targeted_by
|
||||
spawn(1) update_targeted()
|
||||
|
||||
mob/living/Move()
|
||||
. = ..()
|
||||
for(var/obj/item/weapon/gun/G in targeted_by) //Handle moving out of the gunner's view.
|
||||
var/mob/living/M = G.loc
|
||||
if(!(M in view(src)))
|
||||
NotTargeted(G)
|
||||
for(var/obj/item/weapon/gun/G in src) //Handle the gunner loosing sight of their target/s
|
||||
if(G.target)
|
||||
for(var/mob/living/M in G.target)
|
||||
if(M && !(M in view(src)))
|
||||
M.NotTargeted(G)
|
||||
|
||||
//If you move out of range, it isn't going to still stay locked on you any more.
|
||||
client/var
|
||||
target_can_move = 0
|
||||
target_can_run = 0
|
||||
target_can_click = 0
|
||||
gun_mode = 0
|
||||
|
||||
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
|
||||
client/proc/add_gun_icons()
|
||||
if (!usr.item_use_icon)
|
||||
usr.item_use_icon = new /obj/screen/gun/item(null)
|
||||
usr.item_use_icon.icon_state = "no_item[target_can_click]"
|
||||
usr.item_use_icon.name = "[target_can_click ? "Disallow" : "Allow"] Item Use"
|
||||
|
||||
if (!usr.gun_move_icon)
|
||||
usr.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
usr.gun_move_icon.icon_state = "no_walk[target_can_move]"
|
||||
usr.gun_move_icon.name = "[target_can_move ? "Disallow" : "Allow"] Walking"
|
||||
|
||||
if (target_can_move && !usr.gun_run_icon)
|
||||
usr.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
usr.gun_run_icon.icon_state = "no_run[target_can_run]"
|
||||
usr.gun_run_icon.name = "[target_can_run ? "Disallow" : "Allow"] Running"
|
||||
|
||||
screen += usr.item_use_icon
|
||||
screen += usr.gun_move_icon
|
||||
if (target_can_move)
|
||||
screen += usr.gun_run_icon
|
||||
|
||||
client/proc/remove_gun_icons()
|
||||
screen -= usr.item_use_icon
|
||||
screen -= usr.gun_move_icon
|
||||
if (target_can_move)
|
||||
screen -= usr.gun_run_icon
|
||||
del usr.gun_move_icon
|
||||
del usr.item_use_icon
|
||||
del usr.gun_run_icon
|
||||
|
||||
client/verb/ToggleGunMode()
|
||||
set hidden = 1
|
||||
gun_mode = !gun_mode
|
||||
if(gun_mode)
|
||||
usr << "You will now take people captive."
|
||||
add_gun_icons()
|
||||
else
|
||||
usr << "You will now shoot where you target."
|
||||
for(var/obj/item/weapon/gun/G in usr)
|
||||
G.stop_aim()
|
||||
remove_gun_icons()
|
||||
if(usr.gun_setting_icon)
|
||||
usr.gun_setting_icon.icon_state = "gun[gun_mode]"
|
||||
|
||||
|
||||
client/verb/AllowTargetMove()
|
||||
set hidden=1
|
||||
|
||||
//Changing client's permissions
|
||||
target_can_move = !target_can_move
|
||||
if(target_can_move)
|
||||
usr << "Target may now walk."
|
||||
usr.gun_run_icon = new /obj/screen/gun/run(null) //adding icon for running permission
|
||||
screen += usr.gun_run_icon
|
||||
else
|
||||
usr << "Target may no longer move."
|
||||
target_can_run = 0
|
||||
del(usr.gun_run_icon) //no need for icon for running permission
|
||||
|
||||
//Updating walking permission button
|
||||
if(usr.gun_move_icon)
|
||||
usr.gun_move_icon.icon_state = "no_walk[target_can_move]"
|
||||
usr.gun_move_icon.name = "[target_can_move ? "Disallow" : "Allow"] Walking"
|
||||
|
||||
//Handling change for all the guns on client
|
||||
for(var/obj/item/weapon/gun/G in usr)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
for(var/mob/living/M in G.target)
|
||||
if(target_can_move)
|
||||
M << "Your character may now <b>walk</b> at the discretion of their targeter."
|
||||
if(!target_can_run)
|
||||
M << "\red Your move intent is now set to walk, as your targeter permits it."
|
||||
M.set_m_intent("walk")
|
||||
else
|
||||
M << "\red <b>Your character will now be shot if they move.</b>"
|
||||
|
||||
mob/living/proc/set_m_intent(var/intent)
|
||||
if (intent != "walk" && intent != "run")
|
||||
return 0
|
||||
m_intent = intent
|
||||
if(hud_used)
|
||||
if (hud_used.move_intent)
|
||||
hud_used.move_intent.icon_state = intent == "walk" ? "walking" : "running"
|
||||
|
||||
client/verb/AllowTargetRun()
|
||||
set hidden=1
|
||||
|
||||
//Changing client's permissions
|
||||
target_can_run = !target_can_run
|
||||
if(target_can_run)
|
||||
usr << "Target may now run."
|
||||
else
|
||||
usr << "Target may no longer run."
|
||||
|
||||
//Updating running permission button
|
||||
if(usr.gun_run_icon)
|
||||
usr.gun_run_icon.icon_state = "no_run[target_can_run]"
|
||||
usr.gun_run_icon.name = "[target_can_run ? "Disallow" : "Allow"] Running"
|
||||
|
||||
//Handling change for all the guns on client
|
||||
for(var/obj/item/weapon/gun/G in src)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
for(var/mob/living/M in G.target)
|
||||
if(target_can_run)
|
||||
M << "Your character may now <b>run</b> at the discretion of their targeter."
|
||||
else
|
||||
M << "\red <b>Your character will now be shot if they run.</b>"
|
||||
|
||||
client/verb/AllowTargetClick()
|
||||
set hidden=1
|
||||
|
||||
//Changing client's permissions
|
||||
target_can_click = !target_can_click
|
||||
if(target_can_click)
|
||||
usr << "Target may now use items."
|
||||
else
|
||||
usr << "Target may no longer use items."
|
||||
|
||||
if(usr.item_use_icon)
|
||||
usr.item_use_icon.icon_state = "no_item[target_can_click]"
|
||||
usr.item_use_icon.name = "[target_can_click ? "Disallow" : "Allow"] Item Use"
|
||||
|
||||
//Handling change for all the guns on client
|
||||
for(var/obj/item/weapon/gun/G in src)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
for(var/mob/living/M in G.target)
|
||||
if(target_can_click)
|
||||
M << "Your character may now <b>use items</b> at the discretion of their targeter."
|
||||
else
|
||||
M << "\red <b>Your character will now be shot if they use items.</b>"
|
||||
@@ -1815,6 +1815,7 @@ datum
|
||||
M.sleeping += 1
|
||||
if(51 to INFINITY)
|
||||
M.sleeping += 1
|
||||
M:toxloss += (data - 50)
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/machinery/disease2/incubator,
|
||||
/obj/machinery/disposal,
|
||||
/obj/machinery/apiary,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat )
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
#define SYRINGE_BROKEN 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe
|
||||
name = "Syringe"
|
||||
@@ -27,14 +28,14 @@
|
||||
update_icon()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
/*
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
mode = SYRINGE_INJECT
|
||||
if(SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
*/
|
||||
mode = !mode
|
||||
if(SYRINGE_BROKEN)
|
||||
return
|
||||
update_icon()
|
||||
|
||||
attack_hand()
|
||||
@@ -51,6 +52,10 @@
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!target.reagents) return
|
||||
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
user << "\red This syringe is broken!"
|
||||
return
|
||||
|
||||
if (user.a_intent == "hurt" && ismob(target))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
target = user
|
||||
@@ -190,6 +195,10 @@
|
||||
return
|
||||
|
||||
update_icon()
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
icon_state = "broken"
|
||||
overlays = null //dirty fix
|
||||
return
|
||||
var/rounded_vol = round(reagents.total_volume,5)
|
||||
overlays.Cut()
|
||||
if(ismob(loc))
|
||||
@@ -206,15 +215,63 @@
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "syringe10")
|
||||
|
||||
switch(rounded_vol)
|
||||
if(5) filling.icon_state = "syringe5"
|
||||
if(10) filling.icon_state = "syringe10"
|
||||
if(15) filling.icon_state = "syringe15"
|
||||
filling.icon_state = "syringe[rounded_vol]"
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
|
||||
var/target_zone = check_zone(user.zone_sel.selecting, target)
|
||||
var/datum/organ/external/affecting = target:get_organ(target_zone)
|
||||
|
||||
if (!affecting)
|
||||
return
|
||||
if(affecting.status & ORGAN_DESTROYED)
|
||||
user << "What [affecting.display_name]?"
|
||||
return
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if((user != target) && H.check_shields(7, "the [src.name]"))
|
||||
return
|
||||
|
||||
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] tries to stab [target] in the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] in the [hit_area] with [src.name]!</B>"), 1)
|
||||
|
||||
if(affecting.take_damage(7))
|
||||
target:UpdateDamageIcon()
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] with [src.name]!</B>"), 1)
|
||||
target.take_organ_damage(3)// 7 is the same as crowbar punch
|
||||
|
||||
src.reagents.reaction(target, INGEST)
|
||||
var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand
|
||||
src.reagents.trans_to(target, syringestab_amount_transferred)
|
||||
src.desc += " It is broken."
|
||||
src.mode = SYRINGE_BROKEN
|
||||
src.add_blood(target)
|
||||
src.add_fingerprint(usr)
|
||||
src.update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/ld50_syringe
|
||||
name = "Lethal Injection Syringe"
|
||||
desc = "A syringe used for lethal injections."
|
||||
@@ -310,56 +367,8 @@
|
||||
if (reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
|
||||
var/target_zone = check_zone(user.zone_sel.selecting, target)
|
||||
var/datum/organ/external/affecting = target:get_organ(target_zone)
|
||||
|
||||
if (!affecting)
|
||||
return
|
||||
if(affecting.status & ORGAN_DESTROYED)
|
||||
user << "What [affecting.display_name]?"
|
||||
return
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if((user != target) && H.check_shields(7, "the [src.name]"))
|
||||
return
|
||||
|
||||
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] tries to stab [target] in the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] in the [hit_area] with [src.name]!</B>"), 1)
|
||||
|
||||
if(affecting.take_damage(7))
|
||||
target:UpdateDamageIcon()
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] with [src.name]!</B>"), 1)
|
||||
target.take_organ_damage(7)
|
||||
|
||||
src.reagents.reaction(target, INGEST)
|
||||
var/syringestab_amount_transferred = rand(0, reagents.total_volume)
|
||||
src.reagents.trans_to(target, syringestab_amount_transferred)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
|
||||
|
||||
update_icon()
|
||||
var/rounded_vol = round(reagents.total_volume,50)
|
||||
@@ -375,6 +384,7 @@
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Syringes. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//Procedures in this file: Brain extraction. slime Core extraction.
|
||||
//Procedures in this file: Brain extraction. Brain fixing. Slime Core extraction.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -99,7 +99,39 @@
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// slime CORE EXTRACTION //
|
||||
// BRAIN DAMAGE FIXING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/cut_brain
|
||||
required_tool = /obj/item/weapon/hemostat
|
||||
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending ruptured vessels in [target]'s brain with \the [tool].", \
|
||||
"You start mending [target]'s brainwith \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends [target]'s brain hematoma with \the [tool].", \
|
||||
"\blue You mend ruptured vessels to [target]'s brain hematoma with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(50, BRUTE, "head", 1)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// SLIME CORE EXTRACTION //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/slime/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing ruptured lungs
|
||||
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing internal organs.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// GENERIC RIBCAGE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -58,6 +58,31 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit though. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">11/03/2013</h2>
|
||||
<h3 class="author">Chinsky updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Sec HUDs now can see short versions of sec records.on examine. Med HUDs do same for medical records, and can set medical status of patient.</li>
|
||||
<li class="rscadd">Damage to the head can now cause brain damage.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">March 11th 2013</h2>
|
||||
<h3 class="author">CIB updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Cloning now requires you to put slabs of meat into the cloning pod to replenish biomass.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">March 9th 2013</h2>
|
||||
<h3 class="author">Cael Aislinn updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Beekeeping is now possible. Construct an apiary of out wood and embed it into a hydroponics tray, then get a queen bee and bottle of BeezEez from cargo bay.
|
||||
Hives produce honey and honeycomb, but be wary if the bees start swarming.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">March 6th 2013</h2>
|
||||
@@ -67,6 +92,10 @@ should be listed in the changelog upon commit though. Thanks. -->
|
||||
<li class="wip">code/maps/rust_test.dmm contains an example setup for a functional RUST reactor. Maximum output is in the range of 12 to 20MW (12 to 20 million watts).</li>
|
||||
<li class="bugfix">Removed double announcement for gridchecks, reduced duration of gridchecks.</li>
|
||||
</ul>
|
||||
<h3 class="author">RavingManiac updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">You can now stab people with syringes using the "harm" intent. This destroys the syringe and transfers a random percentage of its contents into the target. Armor has a 50% chance of blocking the syringe.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
|
||||
|
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 112 KiB |
BIN
icons/obj/apiary_bees_etc.dmi
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.2 KiB |