mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Cleaned up:
Flashlights Cigs/lighters Solars RCDs can no longer build airlocks on doors Airlocks now smash glass that is under them when they close AI sat firewall that is not really quite a firewall removed The solars will no longer update if they lack a controler Cut down on machines that don't actually do anything like fake sleepers and shuttle engines There is still a few shuttle engines around and I have no idea where, my map was already corrupted once by this so I am just leaving the define in for now. After a talk with some of the head coders Cyborgs can no longer be traitors at round start Some of the off Z1 areas cleaned up git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2028 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
307
code/WorkInProgress/minihivebottest.dm
Normal file
307
code/WorkInProgress/minihivebottest.dm
Normal file
@@ -0,0 +1,307 @@
|
||||
/obj/item/projectile/hivebotbullet
|
||||
damage = 5
|
||||
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
|
||||
|
||||
/obj/minihivebot/
|
||||
name = "Hivebot"
|
||||
desc = "A small robot"
|
||||
icon = 'Hivebot.dmi'
|
||||
icon_state = "basic"
|
||||
layer = 5.0
|
||||
density = 1
|
||||
anchored = 0
|
||||
var
|
||||
alive = 1
|
||||
health = 10
|
||||
task = "thinking"
|
||||
aggressive = 1
|
||||
wanderer = 1
|
||||
opensdoors = 1
|
||||
frustration = 0
|
||||
last_found = null
|
||||
target = null
|
||||
oldtarget_name = null
|
||||
target_lastloc = null
|
||||
atkcarbon = 1
|
||||
atksilicon = 0
|
||||
attack = 0
|
||||
attacking = 0
|
||||
steps = 0
|
||||
firevuln = 0.5
|
||||
brutevuln = 1
|
||||
seekrange = 7
|
||||
basic_damage = 2
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
..()
|
||||
if (!src.alive) return
|
||||
switch(W.damtype)
|
||||
if("fire") src.health -= W.force * src.firevuln
|
||||
if("brute") src.health -= W.force * src.brutevuln
|
||||
if (src.alive && src.health <= 0) src.Die()
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (!src.alive) return
|
||||
if (user.a_intent == "hurt")
|
||||
src.health -= 1 * src.brutevuln
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <b>[user]</b> punches [src]!", 1)
|
||||
playsound(src.loc, pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'), 100, 1)
|
||||
if (src.alive && src.health <= 0) src.Die()
|
||||
|
||||
|
||||
proc/patrol_step()
|
||||
var/moveto = locate(src.x + rand(-1,1),src.y + rand(-1, 1),src.z)
|
||||
if (istype(moveto, /turf/simulated/floor) || istype(moveto, /turf/simulated/shuttle/floor) || istype(moveto, /turf/unsimulated/floor)) step_towards(src, moveto)
|
||||
if(src.aggressive) seek_target()
|
||||
steps += 1
|
||||
if (steps == rand(5,20)) src.task = "thinking"
|
||||
|
||||
|
||||
Bump(M as mob|obj)
|
||||
spawn(0)
|
||||
if ((istype(M, /obj/machinery/door)))
|
||||
var/obj/machinery/door/D = M
|
||||
if (src.opensdoors)
|
||||
D.open()
|
||||
src.frustration = 0
|
||||
else src.frustration ++
|
||||
else if ((istype(M, /mob/living/)) && (!src.anchored))
|
||||
src.loc = M:loc
|
||||
src.frustration = 0
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
Bumped(M as mob|obj)
|
||||
spawn(0)
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
if(src.health <= 0)
|
||||
src.Die()
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.Die()
|
||||
return
|
||||
if(2.0)
|
||||
src.health -= 15
|
||||
if (src.health <= 0)
|
||||
src.Die()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
meteorhit()
|
||||
src.Die()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(25))
|
||||
src.Die()
|
||||
return
|
||||
|
||||
|
||||
proc/process()
|
||||
set background = 1
|
||||
if (!src.alive) return
|
||||
switch(task)
|
||||
if("thinking")
|
||||
src.attack = 0
|
||||
src.target = null
|
||||
sleep(15)
|
||||
walk_to(src,0)
|
||||
if (src.aggressive) seek_target()
|
||||
if (src.wanderer && !src.target) src.task = "wandering"
|
||||
if("chasing")
|
||||
if (src.frustration >= 8)
|
||||
src.target = null
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.task = "thinking"
|
||||
walk_to(src,0)
|
||||
if (target)
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
ChaseAttack(M)
|
||||
src.task = "attacking"
|
||||
src.anchored = 1
|
||||
src.target_lastloc = M.loc
|
||||
else
|
||||
var/turf/olddist = get_dist(src, src.target)
|
||||
walk_to(src, src.target,1,4)
|
||||
if ((get_dist(src, src.target)) >= (olddist))
|
||||
src.frustration++
|
||||
else
|
||||
src.frustration = 0
|
||||
sleep(5)
|
||||
else src.task = "thinking"
|
||||
if("attacking")
|
||||
// see if he got away
|
||||
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
|
||||
src.anchored = 0
|
||||
src.task = "chasing"
|
||||
else
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
if (!src.attacking) RunAttack(src.target)
|
||||
if (!src.aggressive)
|
||||
src.task = "thinking"
|
||||
src.target = null
|
||||
src.anchored = 0
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.attacking = 0
|
||||
else
|
||||
if(M!=null)
|
||||
if (M.health < 0)
|
||||
src.task = "thinking"
|
||||
src.target = null
|
||||
src.anchored = 0
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.attacking = 0
|
||||
else
|
||||
src.anchored = 0
|
||||
src.attacking = 0
|
||||
src.task = "chasing"
|
||||
if("wandering")
|
||||
patrol_step()
|
||||
sleep(10)
|
||||
spawn(8)
|
||||
process()
|
||||
return
|
||||
|
||||
|
||||
New()
|
||||
spawn(0) process()
|
||||
..()
|
||||
|
||||
|
||||
proc/seek_target()
|
||||
src.anchored = 0
|
||||
for (var/mob/living/C in view(src.seekrange,src))
|
||||
if (src.target)
|
||||
src.task = "chasing"
|
||||
break
|
||||
if ((C.name == src.oldtarget_name) && (world.time < src.last_found + 100)) continue
|
||||
if (istype(C, /mob/living/carbon/) && !src.atkcarbon) continue
|
||||
if (istype(C, /mob/living/silicon/) && !src.atksilicon) continue
|
||||
if (C.health < 0) continue
|
||||
if (istype(C, /mob/living/carbon/) && src.atkcarbon) src.attack = 1
|
||||
if (istype(C, /mob/living/silicon/) && src.atksilicon) src.attack = 1
|
||||
|
||||
if (src.attack)
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
src.task = "chasing"
|
||||
break
|
||||
else
|
||||
continue
|
||||
|
||||
|
||||
proc/Die()
|
||||
if (!src.alive) return
|
||||
src.alive = 0
|
||||
walk_to(src,0)
|
||||
src.visible_message("<b>[src]</b> blows apart!")
|
||||
var/turf/Ts = get_turf(src)
|
||||
new /obj/decal/cleanable/robot_debris(Ts)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
|
||||
|
||||
proc/ChaseAttack(mob/M)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> leaps at [src.target]!", 1)
|
||||
|
||||
|
||||
proc/RunAttack(mob/M)
|
||||
src.attacking = 1
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> claws at [src.target]!", 1)
|
||||
src.target:bruteloss += basic_damage
|
||||
spawn(25)
|
||||
src.attacking = 0
|
||||
|
||||
proc/Shoot(var/target, var/start, var/user, var/bullet = 0)
|
||||
if(target == start)
|
||||
return
|
||||
|
||||
var/obj/item/projectile/hivebotbullet/A = new /obj/item/projectile/hivebotbullet(user:loc)
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
|
||||
if(!A) return
|
||||
|
||||
if (!istype(target, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.current = target
|
||||
A.yo = target:y - start:y
|
||||
A.xo = target:x - start:x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
return
|
||||
|
||||
|
||||
/obj/minihivebot/range
|
||||
name = "Hivebot"
|
||||
desc = "A smallish robot, this one is armed!"
|
||||
var/rapid = 0
|
||||
|
||||
seek_target()
|
||||
src.anchored = 0
|
||||
for (var/mob/living/C in view(src.seekrange,src))
|
||||
if (!src.alive) break
|
||||
if (C.health < 0) continue
|
||||
if (istype(C, /mob/living/carbon/) && src.atkcarbon) src.attack = 1
|
||||
if (istype(C, /mob/living/silicon/) && src.atksilicon) src.attack = 1
|
||||
|
||||
if (src.attack)
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <b>[src]</b> fires at [src.target]!", 1)
|
||||
|
||||
var/tturf = get_turf(target)
|
||||
if(rapid)
|
||||
spawn(1)
|
||||
Shoot(tturf, src.loc, src)
|
||||
spawn(4)
|
||||
Shoot(tturf, src.loc, src)
|
||||
spawn(6)
|
||||
Shoot(tturf, src.loc, src)
|
||||
else
|
||||
Shoot(tturf, src.loc, src)
|
||||
|
||||
src.attack = 0
|
||||
sleep(12)
|
||||
seek_target()
|
||||
src.task = "thinking"
|
||||
break
|
||||
else continue
|
||||
|
||||
/obj/minihivebot/range/rapid
|
||||
rapid = 1
|
||||
|
||||
/obj/minihivebot/range/strong
|
||||
name = "Strong Hivebot"
|
||||
desc = "A robot, this one is armed and looks tough!"
|
||||
health = 50
|
||||
|
||||
/obj/minihivebot/range/borgkill
|
||||
name = "Strong Hivebot"
|
||||
desc = "A robot, this one is armed and looks tough!"
|
||||
health = 20
|
||||
atksilicon = 1
|
||||
@@ -45,7 +45,8 @@
|
||||
T.set_angle(angle)
|
||||
|
||||
for(var/obj/machinery/power/solar/S in machines)
|
||||
occlusion(S)
|
||||
if(S.control)
|
||||
occlusion(S)
|
||||
|
||||
|
||||
// for a solar panel, trace towards sun to see if we're in shadow
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
/client
|
||||
//START Admin Things
|
||||
//This should be changed to a datum
|
||||
var/obj/admins/holder = null
|
||||
var/buildmode = 0
|
||||
var/stealth = 0
|
||||
var/fakekey = null
|
||||
//Hosts can change their color
|
||||
var/ooccolor = "#b82e00"
|
||||
|
||||
//END Admin Things
|
||||
|
||||
//Key auth things
|
||||
authenticate = 0
|
||||
var/authenticated = 0
|
||||
var/goon = 0
|
||||
var/beta_tester = 0
|
||||
var/authenticating = 0
|
||||
|
||||
var/listen_ooc = 1
|
||||
var/move_delay = 1
|
||||
var/moving = null
|
||||
var/vote = null
|
||||
var/showvote = null
|
||||
var/adminobs = null
|
||||
var/deadchat = 0.0
|
||||
var/changes = 0
|
||||
@@ -18,17 +27,20 @@
|
||||
var/area = null
|
||||
var/played = 0
|
||||
var/team = null
|
||||
var/buildmode = 0
|
||||
var/stealth = 0
|
||||
var/fakekey = null
|
||||
var/warned = 0
|
||||
var/karma = 0
|
||||
var/karma_spent = 0
|
||||
var/ooccolor = "#b82e00" //only used for admins of host level, default is equal to admin default
|
||||
|
||||
|
||||
var/midis = 1 //Check if midis should be played for someone -- Urist
|
||||
var/bubbles = 1 //Check if bubbles should be displayed for someone -- Doohl
|
||||
var/be_alien = 0 //Check if that guy wants to be an alien -- Urist
|
||||
|
||||
authenticate = 0
|
||||
|
||||
var/vote = null
|
||||
var/showvote = null
|
||||
|
||||
|
||||
|
||||
// comment out the line below when debugging locally to enable the options & messages menu
|
||||
control_freak = 1
|
||||
@@ -304,30 +304,6 @@
|
||||
/obj/item/device
|
||||
icon = 'device.dmi'
|
||||
|
||||
/obj/item/device/flashlight
|
||||
name = "flashlight"
|
||||
desc = "A hand-held emergency light."
|
||||
icon_state = "flight0"
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/icon_on = "flight1"
|
||||
var/icon_off = "flight0"
|
||||
w_class = 2
|
||||
item_state = "flight"
|
||||
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light. It shines as well as a flashlight."
|
||||
icon_state = "plight0"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
item_state = ""
|
||||
icon_on = "plight1"
|
||||
icon_off = "plight0"
|
||||
brightness_on = 3
|
||||
|
||||
/obj/item/device/infra_sensor
|
||||
name = "Infrared Sensor"
|
||||
desc = "Scans for infrared beams in the vicinity."
|
||||
|
||||
@@ -149,47 +149,5 @@
|
||||
desc = "For ages 0 and under."
|
||||
icon_state = "fake-moustache"
|
||||
|
||||
/obj/item/clothing/mask/cigarette
|
||||
name = "Cigarette"
|
||||
desc = "A roll of tobacco and nicotine."
|
||||
icon_state = "cigoff"
|
||||
var/lit = 0
|
||||
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
var/icon_off = "cigoff"
|
||||
var/icon_butt = "cigbutt"
|
||||
throw_speed = 0.5
|
||||
item_state = "cigoff"
|
||||
var/lastHolder = null
|
||||
var/smoketime = 300
|
||||
w_class = 1
|
||||
body_parts_covered = null
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar
|
||||
name = "Premium Cigar"
|
||||
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
|
||||
icon_state = "cigaroff"
|
||||
icon_on = "cigaron"
|
||||
icon_off = "cigaroff"
|
||||
icon_butt = "cigarbutt"
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 1500
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
name = "Cohiba Cigar"
|
||||
desc = "There's little more you could want from a cigar."
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
icon_butt = "cigarbutt"
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havanian
|
||||
name = "Premium Havanian Cigar"
|
||||
desc = "A cigar fit for only the best for the best."
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
icon_butt = "cigarbutt"
|
||||
smoketime = 7200
|
||||
|
||||
|
||||
|
||||
@@ -217,38 +217,6 @@
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
var/id = 0.0
|
||||
|
||||
/obj/machinery/vehicle
|
||||
name = "Vehicle Pod"
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "podfire"
|
||||
density = 1
|
||||
flags = FPRINT
|
||||
anchored = 1.0
|
||||
var/speed = 10.0
|
||||
var/maximum_speed = 10.0
|
||||
var/can_rotate = 1
|
||||
var/can_maximize_speed = 0
|
||||
var/one_person_only = 0
|
||||
use_power = 0
|
||||
|
||||
/obj/machinery/vehicle/pod
|
||||
name = "Escape Pod"
|
||||
desc = "A pod, for, moving in space"
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "pod"
|
||||
can_rotate = 0
|
||||
var/id = 1.0
|
||||
|
||||
/obj/machinery/vehicle/recon
|
||||
name = "Reconaissance Pod"
|
||||
desc = "A fast moving pod."
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "recon"
|
||||
speed = 1.0
|
||||
maximum_speed = 30.0
|
||||
can_maximize_speed = 1
|
||||
one_person_only = 1
|
||||
|
||||
/obj/machinery/restruct
|
||||
name = "DNA Physical Restructurization Accelerator"
|
||||
desc = "This looks complex."
|
||||
@@ -322,21 +290,6 @@
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 400
|
||||
|
||||
/obj/machinery/sec_lock
|
||||
name = "Security Pad"
|
||||
desc = "A lock, for doors. Used by security."
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "sec_lock"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/a_type = 0.0
|
||||
var/obj/machinery/door/d1 = null
|
||||
var/obj/machinery/door/d2 = null
|
||||
anchored = 1.0
|
||||
req_access = list(access_brig)
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/machinery/door_control
|
||||
name = "Remote Door Control"
|
||||
desc = "This controls doors."
|
||||
@@ -375,44 +328,6 @@
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/machinery/shuttle
|
||||
name = "shuttle"
|
||||
icon = 'shuttle.dmi'
|
||||
use_power = 0
|
||||
|
||||
/obj/machinery/shuttle/engine
|
||||
name = "engine"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
/obj/machinery/shuttle/engine/heater
|
||||
name = "heater"
|
||||
icon_state = "heater"
|
||||
|
||||
/obj/machinery/shuttle/engine/platform
|
||||
name = "platform"
|
||||
icon_state = "platform"
|
||||
|
||||
/obj/machinery/shuttle/engine/propulsion
|
||||
name = "propulsion"
|
||||
icon_state = "propulsion"
|
||||
opacity = 1
|
||||
|
||||
/obj/machinery/shuttle/engine/propulsion/burst
|
||||
name = "burst"
|
||||
|
||||
/obj/machinery/shuttle/engine/propulsion/burst/left
|
||||
name = "left"
|
||||
icon_state = "burst_l"
|
||||
|
||||
/obj/machinery/shuttle/engine/propulsion/burst/right
|
||||
name = "right"
|
||||
icon_state = "burst_r"
|
||||
|
||||
/obj/machinery/shuttle/engine/router
|
||||
name = "router"
|
||||
icon_state = "router"
|
||||
|
||||
/obj/machinery/teleport
|
||||
name = "teleport"
|
||||
icon = 'stationobjs.dmi'
|
||||
@@ -506,47 +421,6 @@
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 80
|
||||
|
||||
/obj/machinery/power/solar
|
||||
name = "solar panel"
|
||||
desc = "A solar electrical generator."
|
||||
icon = 'power.dmi'
|
||||
icon_state = "sp_base"
|
||||
anchored = 1
|
||||
density = 1
|
||||
directwired = 1
|
||||
var/health = 10.0
|
||||
var/id = 1
|
||||
var/obscured = 0
|
||||
var/sunfrac = 0
|
||||
var/adir = SOUTH
|
||||
var/ndir = SOUTH
|
||||
var/turn_angle = 0
|
||||
var/obj/machinery/power/solar_control/control
|
||||
use_power = 0
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
|
||||
/obj/machinery/power/solar_control
|
||||
name = "solar panel control"
|
||||
desc = "A controller for solar panel arrays."
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "solar"
|
||||
anchored = 1
|
||||
density = 1
|
||||
directwired = 1
|
||||
var/id = 1
|
||||
var/cdir = 0
|
||||
var/gen = 0
|
||||
var/lastgen = 0
|
||||
var/track = 2 // 0= off 1=timed 2=auto (tracker)
|
||||
var/trackrate = 600 // 300-900 seconds
|
||||
var/trackdir = 1 // 0 =CCW, 1=CW
|
||||
var/nexttime = 0
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 20
|
||||
|
||||
|
||||
/obj/machinery/cell_charger
|
||||
name = "cell charger"
|
||||
desc = "A charging unit for power cells."
|
||||
|
||||
@@ -41,49 +41,6 @@
|
||||
m_amt = 1000
|
||||
origin_tech = "materials=2"
|
||||
|
||||
/obj/item/weapon/match
|
||||
name = "Match"
|
||||
desc = "A simple match stick, used for lighting tobacco"
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "match_unlit"
|
||||
var/lit = 0
|
||||
var/smoketime = 5
|
||||
w_class = 1.0
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/matchbox
|
||||
name = "Matchbox"
|
||||
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "matchbox"
|
||||
item_state = "zippo"
|
||||
w_class = 1
|
||||
flags = ONBELT | TABLEPASS
|
||||
var/matchcount = 10
|
||||
w_class = 1.0
|
||||
|
||||
/obj/item/weapon/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "rcd"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
var/matter = 0
|
||||
var/working = 0
|
||||
var/mode = 1
|
||||
var/disabled = 0
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
m_amt = 50000
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
var/datum/effects/system/spark_spread/spark_system
|
||||
|
||||
/obj/item/weapon/rsf
|
||||
name = "Rapid-Service-Fabricator (RSF)"
|
||||
desc = "A device used to rapidly deploy service items."
|
||||
@@ -1838,17 +1795,6 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
name = "clown's rubber stamp"
|
||||
icon_state = "stamp-clown"
|
||||
|
||||
/obj/item/weapon/cigpacket
|
||||
name = "Cigarette packet"
|
||||
desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigpacket"
|
||||
item_state = "cigpacket"
|
||||
w_class = 1
|
||||
throwforce = 2
|
||||
var/cigcount = 6
|
||||
flags = ONBELT | TABLEPASS
|
||||
|
||||
/*
|
||||
/obj/item/weapon/cigarpacket
|
||||
name = "Pete's Cuban Cigars"
|
||||
@@ -1861,57 +1807,6 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
var/cigarcount = 6
|
||||
flags = ONBELT | TABLEPASS */
|
||||
|
||||
/obj/item/weapon/cigbutt
|
||||
name = "Cigarette butt"
|
||||
desc = "A manky old cigarette butt."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigbutt"
|
||||
w_class = 1
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/cigarbutt
|
||||
name = "Cigar butt"
|
||||
desc = "A manky old cigar butt."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigarbutt"
|
||||
w_class = 1
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/zippo
|
||||
name = "Zippo lighter"
|
||||
desc = "The detective's zippo."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
w_class = 1
|
||||
throwforce = 4
|
||||
var/lit = 0
|
||||
flags = ONBELT | TABLEPASS | CONDUCT
|
||||
|
||||
/obj/item/weapon/knifezippo
|
||||
name = "Zippo lighter"
|
||||
desc = "The zippo."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "knifezippo"
|
||||
item_state = "knifezippo"
|
||||
force = 15
|
||||
w_class = 1
|
||||
throwforce = 4
|
||||
var/lit = 0
|
||||
flags = ONBELT | TABLEPASS | CONDUCT
|
||||
|
||||
/obj/item/weapon/knifezippo/attack(mob/M as mob, mob/user as mob)
|
||||
if (!( istype(M, /mob) ))
|
||||
return
|
||||
//for(var/mob/O in viewers(M, null))
|
||||
// O.show_message(text("\red [] has been stabbed with [] by [].", M, src, user), 1)
|
||||
user << "\red You stab [M] with the zippo knife."
|
||||
M << "\red You feel a tiny prick!"
|
||||
M.attack_log += text("<font color='orange'>[world.time] - has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to stab [M.name] ([M.ckey])</font>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/mousetrap
|
||||
name = "mousetrap"
|
||||
|
||||
@@ -145,14 +145,9 @@
|
||||
var/T = M.loc
|
||||
if (istype(T, /turf/space))
|
||||
numSpace += 1
|
||||
else
|
||||
if (istype(T, /obj/machinery/vehicle/pod))
|
||||
numPod += 1
|
||||
else if (istype(T, /turf))
|
||||
if (M.z!=1)
|
||||
numOffStation += 1
|
||||
else
|
||||
numAlive += 1
|
||||
else if(istype(T, /turf))
|
||||
if (M.z!=1)
|
||||
numOffStation += 1
|
||||
else
|
||||
numAlive += 1
|
||||
if (numSpace==0 && numPod==0 && numOffStation==0)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
config_tag = "changeling"
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
required_players = 15
|
||||
required_enemies = 1
|
||||
|
||||
var
|
||||
const
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
traitors_possible = 3 //hard limit on traitors if scaling is turned off
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
required_players = 20
|
||||
required_enemies = 2
|
||||
|
||||
/datum/game_mode/traitor/changeling/announce()
|
||||
world << "<B>The current game mode is - Traitor+Changeling!</B>"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
config_tag = "cult"
|
||||
restricted_jobs = list("Chaplain", "Security Officer", "Warden", "Detective", "AI", "Cyborg", "Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
required_players = 15
|
||||
required_enemies = 3
|
||||
|
||||
var/datum/mind/sacrifice_target = null
|
||||
var/finished = 0
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
list/datum/mind/modePlayer = new
|
||||
list/restricted_jobs = list()
|
||||
required_players = 0
|
||||
required_enemies = 0
|
||||
|
||||
/datum/game_mode/proc/announce() //to be calles when round starts
|
||||
world << "<B>Notice</B>: [src] did not define announce()"
|
||||
@@ -111,18 +112,18 @@
|
||||
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/new_player/player in world)
|
||||
if (player.client && player.ready)
|
||||
if(player.client && player.ready)
|
||||
if(player.preferences.be_special & role)
|
||||
if(!jobban_isbanned(player, "Syndicate"))
|
||||
candidates += player.mind
|
||||
|
||||
if(candidates.len == 0)
|
||||
if(candidates.len < required_enemies)
|
||||
for(var/mob/new_player/player in world)
|
||||
if (player.client && player.ready)
|
||||
if(!jobban_isbanned(player, "Syndicate"))
|
||||
candidates += player.mind
|
||||
|
||||
if(candidates.len == 0 && override_jobbans) //just to be safe. Ignored jobbans are better than broken round. Shouldn't happen usually. --rastaf0
|
||||
if(candidates.len < required_enemies && override_jobbans) //just to be safe. Ignored jobbans are better than broken round. Shouldn't happen usually. --rastaf0
|
||||
for(var/mob/new_player/player in world)
|
||||
if (player.client && player.ready)
|
||||
candidates += player.mind
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "AI malfunction"
|
||||
config_tag = "malfunction"
|
||||
required_players = 20
|
||||
required_enemies = 1
|
||||
var/const/waittime_l = 600
|
||||
var/const/waittime_h = 1800 // started at 1800
|
||||
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
if (location in escape_zone)
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else
|
||||
if (istype(player.loc, /obj/machinery/vehicle/pod))
|
||||
survivors[player.real_name] = "pod"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
survivors[player.real_name] = "alive"
|
||||
// if (istype(player.loc, /obj/machinery/vehicle/pod))
|
||||
// survivors[player.real_name] = "pod"
|
||||
|
||||
if (survivors.len)
|
||||
world << "\blue <B>The following survived the meteor attack!</B>"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name = "nuclear emergency"
|
||||
config_tag = "nuclear"
|
||||
required_players = 15
|
||||
required_enemies = 5
|
||||
|
||||
var/const/agents_possible = 5 //If we ever need more syndicate agents.
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
config_tag = "revolution"
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
required_players = 20
|
||||
required_enemies = 3
|
||||
|
||||
var/finished = 0
|
||||
var/const/max_headrevs = 3
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
/datum/game_mode/traitor
|
||||
name = "traitor"
|
||||
config_tag = "traitor"
|
||||
restricted_jobs = list("Cyborg")
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
@@ -70,8 +73,10 @@
|
||||
else
|
||||
num_traitors = max(1, min(num_players(), traitors_possible))
|
||||
|
||||
// log_game("Number of traitors: [num_traitors]")
|
||||
// message_admins("Players counted: [num_players] Number of traitors chosen: [num_traitors]")
|
||||
for(var/datum/mind/player in possible_traitors)
|
||||
for(var/job in restricted_jobs)
|
||||
if(player.assigned_role == job)
|
||||
possible_traitors -= player
|
||||
|
||||
for(var/j = 0, j < num_traitors, j++)
|
||||
if (!possible_traitors.len)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name = "wizard"
|
||||
config_tag = "wizard"
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
|
||||
var/finished = 0
|
||||
|
||||
|
||||
@@ -114,6 +114,10 @@
|
||||
if(P:brainmob.stat == 2)
|
||||
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
|
||||
return
|
||||
if(jobban_isbanned(P:brainmob, "AI"))
|
||||
user << "\red This MMI does not seem to fit."
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
brain = P
|
||||
|
||||
@@ -28,8 +28,12 @@
|
||||
src.authorized -= W:registered
|
||||
src.authorized += W:registered
|
||||
if (src.auth_need - src.authorized.len > 0)
|
||||
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
|
||||
log_game("[user.ckey] has authorized early shuttle launch")
|
||||
world << text("\blue <B>Alert: [] authorizations needed until shuttle is launched early</B>", src.auth_need - src.authorized.len)
|
||||
else
|
||||
message_admins("[key_name_admin(user)] has launched the shuttle")
|
||||
log_game("[user.ckey] has launched the shuttle early")
|
||||
world << "\blue <B>Alert: Shuttle launch time shortened to 10 seconds!</B>"
|
||||
emergency_shuttle.settimeleft(10)
|
||||
//src.authorized = null
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
sleep(20)
|
||||
|
||||
for(var/obj/machinery/mass_driver/M in machines)
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if(M.id == src.id)
|
||||
M.drive()
|
||||
|
||||
|
||||
@@ -993,6 +993,9 @@ About the new airlock wires panel:
|
||||
return
|
||||
use_power(50)
|
||||
playsound(src.loc, 'airlock.ogg', 30, 1)
|
||||
var/obj/window/killthis = (locate(/obj/window) in get_turf(src))
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ Class Procs:
|
||||
machines.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/proc/process()
|
||||
/obj/machinery/proc/process()//If you dont use process or power why are you here
|
||||
// machines.Remove(src)Not going to do this till I test it a bit more
|
||||
return
|
||||
|
||||
/obj/machinery/emp_act(severity)
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
|
||||
process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
|
||||
if(port && mecha && mecha in port.recharge_floor)
|
||||
if(!mecha.cell) return
|
||||
var/delta = min(max_charge, mecha.cell.maxcharge - mecha.cell.charge)
|
||||
if(delta>0)
|
||||
mecha.give_power(delta)
|
||||
|
||||
@@ -1,67 +1,89 @@
|
||||
//#define FLASHLIGHT_LUM 4
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
else
|
||||
icon_state = icon_off
|
||||
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
/obj/item/device/flashlight
|
||||
name = "flashlight"
|
||||
desc = "A hand-held emergency light."
|
||||
icon_state = "flight0"
|
||||
w_class = 2
|
||||
item_state = "flight"
|
||||
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
var
|
||||
on = 0
|
||||
brightness_on = 4 //luminosity when on
|
||||
icon_on = "flight1"
|
||||
icon_off = "flight0"
|
||||
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.on && user.zone_sel.selecting == "eyes")
|
||||
if ((user.mutations & CLOWN || user.brainloss >= 60) && prob(50))//too dumb to use flashlight properly
|
||||
return ..()//just hit them in the head
|
||||
/*user << "\blue You bounce the light spot up and down and drool."
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] bounces the light spot up and down and drools", user), 1)
|
||||
src.add_fingerprint(user)
|
||||
return*/
|
||||
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity
|
||||
usr.show_message("\red You don't have the dexterity to do this!",1)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M//mob has protective eyewear
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
user << text("\blue You're going to need to remove that [] first.", ((H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : ((H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses")))
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(M, null))//echo message
|
||||
if ((O.client && !(O.blinded )))
|
||||
O.show_message("\blue [(O==user?"You direct":"[user] directs")] [src] to [(M==user? "your":"[M]")] eyes", 1)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))//robots and aliens are unaffected
|
||||
if(M.stat > 1 || M.sdisabilities & 1)//mob is dead or fully blind
|
||||
if(M!=user)
|
||||
user.show_message(text("\red [] pupils does not react to the light!", M),1)
|
||||
else if(M.mutations & XRAY)//mob has X-RAY vision
|
||||
if(M!=user)
|
||||
user.show_message(text("\red [] pupils give an eerie glow!", M),1)
|
||||
else //nothing wrong
|
||||
flick("flash", M.flash)//flash the affected mob
|
||||
if(M!=user)
|
||||
user.show_message(text("\blue [] pupils narrow", M),1)
|
||||
else
|
||||
return ..()
|
||||
attack_self(mob/user)
|
||||
on = !on
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
icon_state = icon_off
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
if(on)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.on && user.zone_sel.selecting == "eyes")
|
||||
if ((user.mutations & CLOWN || user.brainloss >= 60) && prob(50))//too dumb to use flashlight properly
|
||||
return ..()//just hit them in the head
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity
|
||||
usr.show_message("\red You don't have the dexterity to do this!",1)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M//mob has protective eyewear
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
user << text("\blue You're going to need to remove that [] first.", ((H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : ((H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses")))
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(M, null))//echo message
|
||||
if ((O.client && !(O.blinded )))
|
||||
O.show_message("\blue [(O==user?"You direct":"[user] directs")] [src] to [(M==user? "your":"[M]")] eyes", 1)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))//robots and aliens are unaffected
|
||||
if(M.stat > 1 || M.sdisabilities & 1)//mob is dead or fully blind
|
||||
if(M!=user)
|
||||
user.show_message(text("\red [] pupils does not react to the light!", M),1)
|
||||
else if(M.mutations & XRAY)//mob has X-RAY vision
|
||||
if(M!=user)
|
||||
user.show_message(text("\red [] pupils give an eerie glow!", M),1)
|
||||
else //nothing wrong
|
||||
flick("flash", M.flash)//flash the affected mob
|
||||
if(M!=user)
|
||||
user.show_message(text("\blue [] pupils narrow", M),1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light. It shines as well as a flashlight."
|
||||
icon_state = "plight0"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
item_state = ""
|
||||
icon_on = "plight1"
|
||||
icon_off = "plight0"
|
||||
brightness_on = 3
|
||||
|
||||
|
||||
|
||||
//Looks like most of the clothing lights are here
|
||||
/obj/item/clothing/head/helmet/hardhat/attack_self(mob/user)
|
||||
on = !on
|
||||
icon_state = "hardhat[on]_[color]"
|
||||
@@ -77,8 +99,6 @@
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/dropped(mob/user)
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
@@ -109,8 +129,6 @@
|
||||
src.sd_SetLuminosity(0)
|
||||
usr.sd_SetLuminosity(usr.luminosity + brightness_on)
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/space/engineering/dropped(mob/user)
|
||||
if(on)
|
||||
usr.sd_SetLuminosity(usr.luminosity - brightness_on)
|
||||
@@ -141,9 +159,8 @@
|
||||
src.sd_SetLuminosity(0)
|
||||
usr.sd_SetLuminosity(usr.luminosity + brightness_on)
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/space/command/chief_engineer/dropped(mob/user)
|
||||
if(on)
|
||||
usr.sd_SetLuminosity(usr.luminosity - brightness_on)
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
@@ -450,7 +450,6 @@
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
istype(W, /obj/item/weapon/weldingtool) && W:welding || \
|
||||
istype(W, /obj/item/weapon/zippo) && W:lit || \
|
||||
istype(W, /obj/item/weapon/knifezippo) || \
|
||||
istype(W, /obj/item/weapon/match) && W:lit || \
|
||||
istype(W, /obj/item/clothing/mask/cigarette) && W:lit || \
|
||||
istype(W, /obj/item/weapon/wirecutters) || \
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/obj/item/clothing/suit/armor/powered
|
||||
/obj/item/clothing/head/helmet/powered
|
||||
|
||||
/obj/item/clothing/suit/powered
|
||||
name = "Powered armor"
|
||||
desc = "Not for rookies."
|
||||
|
||||
@@ -1,170 +1,207 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
RCD
|
||||
|
||||
*/
|
||||
/obj/item/weapon/rcd/New()
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
src.spark_system = new /datum/effects/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if ((matter + 10) > 30)
|
||||
user << "The RCD cant hold any more matter."
|
||||
return
|
||||
del(W)
|
||||
matter += 10
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/user as mob)
|
||||
playsound(src.loc, 'pop.ogg', 50, 0)
|
||||
if (mode == 1)
|
||||
mode = 2
|
||||
user << "Changed mode to 'Airlock'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if (mode == 2)
|
||||
mode = 3
|
||||
user << "Changed mode to 'Deconstruct'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if (mode == 3)
|
||||
/obj/item/weapon/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "rcd"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
m_amt = 50000
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
var
|
||||
datum/effects/system/spark_spread/spark_system
|
||||
matter = 0
|
||||
working = 0
|
||||
mode = 1
|
||||
user << "Changed mode to 'Floor & Walls'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
// Change mode
|
||||
disabled = 0
|
||||
|
||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user as mob)
|
||||
if (!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
|
||||
|
||||
New()
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
src.spark_system = new /datum/effects/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
return
|
||||
|
||||
if (istype(A, /turf) && mode == 1)
|
||||
if (istype(A, /turf/space) && matter >= 1)
|
||||
user << "Building Floor (1)..."
|
||||
if (!disabled)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithFloor()
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 30
|
||||
else
|
||||
matter--
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 3)
|
||||
user << "Building Wall (3)..."
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if ((matter + 10) > 30)
|
||||
user << "The RCD cant hold any more matter."
|
||||
return
|
||||
del(W)
|
||||
matter += 10
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'pop.ogg', 50, 0)
|
||||
if (mode == 1)
|
||||
mode = 2
|
||||
user << "Changed mode to 'Airlock'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if (mode == 2)
|
||||
mode = 3
|
||||
user << "Changed mode to 'Deconstruct'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
if (mode == 3)
|
||||
mode = 1
|
||||
user << "Changed mode to 'Floor & Walls'"
|
||||
src.spark_system.start()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user as mob)
|
||||
if (!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
|
||||
return
|
||||
|
||||
if (istype(A, /turf) && mode == 1)
|
||||
if (istype(A, /turf/space) && matter >= 1)
|
||||
user << "Building Floor (1)..."
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 90
|
||||
else
|
||||
matter -= 3
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
|
||||
user << "Building Airlock (10)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
|
||||
T.autoclose = 1
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sparks2.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 300
|
||||
else
|
||||
matter -= 10
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
|
||||
return
|
||||
else if (mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
|
||||
if (istype(A, /turf/simulated/wall) && matter >= 5)
|
||||
user << "Deconstructing Wall (5)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithFloor()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
engy.cell.charge -= 30
|
||||
else
|
||||
matter -= 5
|
||||
if(!matter >= 1) return
|
||||
matter--
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /turf/simulated/wall/r_wall) && matter >= 5)
|
||||
user << "Deconstructing RWall (5)..."
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 3)
|
||||
user << "Building Wall (3)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 90
|
||||
else
|
||||
if(!matter >= 3) return
|
||||
matter -= 3
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
|
||||
user << "Building Airlock (10)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
else
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 5)
|
||||
user << "Deconstructing Floor (5)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithSpace()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
else
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /obj/machinery/door/airlock) && matter >= 10)
|
||||
user << "Deconstructing Airlock (10)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
del(A)
|
||||
if(locate(/obj/machinery/door) in get_turf(src)) return
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
|
||||
var/obj/window/killthis = (locate(/obj/window) in get_turf(src))
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
T.autoclose = 1
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sparks2.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 300
|
||||
else
|
||||
if(!matter >= 10) return
|
||||
matter -= 10
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
|
||||
return
|
||||
else if (mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
|
||||
if (istype(A, /turf/simulated/wall) && matter >= 5)
|
||||
user << "Deconstructing Wall (5)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithFloor()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
else
|
||||
if(!matter >= 5) return
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /turf/simulated/wall/r_wall) && matter >= 5)
|
||||
user << "Deconstructing RWall (5)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
else
|
||||
if(!matter >= 5) return
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 5)
|
||||
user << "Deconstructing Floor (5)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
A:ReplaceWithSpace()
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 150
|
||||
else
|
||||
if(!matter >= 5) return
|
||||
matter -= 5
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if (istype(A, /obj/machinery/door/airlock) && matter >= 10)
|
||||
user << "Deconstructing Airlock (10)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (!disabled)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
del(A)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 300
|
||||
else
|
||||
if(!matter >= 10) return
|
||||
matter -= 10
|
||||
user << "The RCD now holds [matter]/30 matter-units."
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
|
||||
@@ -10,144 +10,159 @@ ZIPPO
|
||||
///////////
|
||||
//MATCHES//
|
||||
///////////
|
||||
/obj/item/weapon/match
|
||||
name = "Match"
|
||||
desc = "A simple match stick, used for lighting tobacco"
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "match_unlit"
|
||||
var/lit = 0
|
||||
var/smoketime = 5
|
||||
w_class = 1.0
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/match/process()
|
||||
while(src.lit == 1)
|
||||
src.smoketime--
|
||||
sleep(10)
|
||||
if(src.smoketime < 1)
|
||||
src.icon_state = "match_burnt"
|
||||
|
||||
process()
|
||||
while(src.lit == 1)
|
||||
src.smoketime--
|
||||
sleep(10)
|
||||
if(src.smoketime < 1)
|
||||
src.icon_state = "match_burnt"
|
||||
src.lit = -1
|
||||
processing_items.Remove(src)
|
||||
return
|
||||
|
||||
|
||||
dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
src.lit = -1
|
||||
return
|
||||
|
||||
/obj/item/weapon/match/dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
src.lit = -1
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "match_burnt"
|
||||
src.item_state = "cigoff"
|
||||
src.name = "Burnt match"
|
||||
src.desc = "A match that has been burnt"
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "match_burnt"
|
||||
src.item_state = "cigoff"
|
||||
src.name = "Burnt match"
|
||||
src.desc = "A match that has been burnt"
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
//////////////
|
||||
//MATCHBOXES//
|
||||
//////////////
|
||||
/obj/item/weapon/matchbox/attack_hand(mob/user as mob)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(src.matchcount <= 0)
|
||||
user << "\red You're out of matches. Shouldn't have wasted so many..."
|
||||
return
|
||||
else
|
||||
src.matchcount--
|
||||
var/obj/item/weapon/match/W = new /obj/item/weapon/match(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
if(src.matchcount <= 0)
|
||||
src.icon_state = "matchbox_empty"
|
||||
else if(src.matchcount <= 3)
|
||||
src.icon_state = "matchbox_almostempty"
|
||||
else if(src.matchcount <= 6)
|
||||
src.icon_state = "matchbox_almostfull"
|
||||
else
|
||||
src.icon_state = "matchbox"
|
||||
src.update_icon()
|
||||
return
|
||||
/obj/item/weapon/matchbox
|
||||
name = "Matchbox"
|
||||
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "matchbox"
|
||||
item_state = "zippo"
|
||||
w_class = 1
|
||||
flags = ONBELT | TABLEPASS
|
||||
var/matchcount = 10
|
||||
w_class = 1.0
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(src.matchcount <= 0)
|
||||
user << "\red You're out of matches. Shouldn't have wasted so many..."
|
||||
return
|
||||
else
|
||||
src.matchcount--
|
||||
var/obj/item/weapon/match/W = new /obj/item/weapon/match(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
if(src.matchcount <= 0)
|
||||
src.icon_state = "matchbox_empty"
|
||||
else if(src.matchcount <= 3)
|
||||
src.icon_state = "matchbox_almostempty"
|
||||
else if(src.matchcount <= 6)
|
||||
src.icon_state = "matchbox_almostfull"
|
||||
else
|
||||
src.icon_state = "matchbox"
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/weapon/match/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
|
||||
W.lit = 1
|
||||
W.icon_state = "match_lit"
|
||||
processing_items.Add(W)
|
||||
W.update_icon()
|
||||
return
|
||||
|
||||
obj/item/weapon/matchbox.attackby(obj/item/weapon/match/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
|
||||
W.lit = 1
|
||||
W.icon_state = "match_lit"
|
||||
W.process()
|
||||
W.update_icon()
|
||||
return
|
||||
|
||||
|
||||
///////////////////////
|
||||
//CIGARETTES + CIGARS//
|
||||
///////////////////////
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
light("\red [user] casually lights the [name] with [W], what a badass.")
|
||||
/* if(src.lit == 0)
|
||||
|
||||
/obj/item/clothing/mask/cigarette
|
||||
name = "Cigarette"
|
||||
desc = "A roll of tobacco and nicotine."
|
||||
icon_state = "cigoff"
|
||||
throw_speed = 0.5
|
||||
item_state = "cigoff"
|
||||
w_class = 1
|
||||
body_parts_covered = null
|
||||
var
|
||||
lit = 0
|
||||
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
icon_off = "cigoff"
|
||||
icon_butt = "cigbutt"
|
||||
lastHolder = null
|
||||
smoketime = 300
|
||||
proc
|
||||
light(var/flavor_text = "[usr] lights the [name].")
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
light("\red [user] casually lights the [name] with [W], what a badass.")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/zippo) && (W:lit > 0))
|
||||
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
|
||||
light("\red [user] lights their [name] with their [W]. How poor can you get?")
|
||||
|
||||
else if (istype(W, /obj/item/weapon/trashbag))
|
||||
var/obj/item/weapon/trashbag/S = W
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/clothing/mask/cigarette/C in locate(src.x,src.y,src.z))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += C;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
break
|
||||
user << "\blue You pick up all trash."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
S.update_icon()
|
||||
return
|
||||
|
||||
|
||||
light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.damtype = "fire"
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] casually lights the [] with [], what a badass.", user, src.name, W), 1)
|
||||
spawn() //start fires while it's lit
|
||||
src.process()*/
|
||||
else if(istype(W, /obj/item/weapon/zippo) && W:lit)
|
||||
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
||||
/* if(src.lit == 0)
|
||||
src.lit = 1
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red With a single flick of their wrist, [] smoothly lights their [] with their []. Damn they're cool.", user, src.name, W), 1)
|
||||
spawn() //start fires while it's lit
|
||||
src.process()*/
|
||||
else if(istype(W, /obj/item/weapon/match) && W:lit)
|
||||
light("\red [user] lights their [name] with their [W]. How poor can you get?")
|
||||
/* if(src.lit == 0)
|
||||
src.lit = 1
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] lights their [] with their []. How poor can you get?", user, src.name, W), 1)
|
||||
spawn() //start fires while it's lit
|
||||
src.process()*/
|
||||
else if (istype(W, /obj/item/weapon/trashbag))
|
||||
var/obj/item/weapon/trashbag/S = W
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/clothing/mask/cigarette/C in locate(src.x,src.y,src.z))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += C;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
break
|
||||
user << "\blue You pick up all trash."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
S.update_icon()
|
||||
return
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(flavor_text, 1)
|
||||
processing_items.Add(src)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.damtype = "fire"
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(flavor_text, 1)
|
||||
spawn()
|
||||
src.process()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/process()
|
||||
|
||||
var/atom/lastHolder = null
|
||||
|
||||
while(src.lit == 1)
|
||||
var/turf/location = src.loc
|
||||
var/atom/holder = loc
|
||||
var/isHeld = 0
|
||||
var/mob/M = null
|
||||
process()
|
||||
var/turf/location = get_turf(src)
|
||||
src.smoketime--
|
||||
|
||||
if(istype(location, /mob/))
|
||||
M = location
|
||||
if(M.l_hand == src || M.r_hand == src || M.wear_mask == src)
|
||||
location = M.loc
|
||||
if(src.smoketime < 1)
|
||||
if (istype(src,/obj/item/clothing/mask/cigarette/cigar))
|
||||
var/obj/item/weapon/cigbutt/C = new /obj/item/weapon/cigarbutt
|
||||
@@ -155,209 +170,213 @@ obj/item/weapon/matchbox.attackby(obj/item/weapon/match/W as obj, mob/user as mo
|
||||
else
|
||||
var/obj/item/weapon/cigbutt/C = new /obj/item/weapon/cigbutt
|
||||
C.loc = location
|
||||
if(M != null)
|
||||
if(ismob(src.loc))
|
||||
var/mob/living/M = src.loc
|
||||
M << "\red Your [src.name] goes out."
|
||||
processing_items.Remove(src)
|
||||
del(src)
|
||||
return
|
||||
if (istype(location, /turf)) //start a fire if possible
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
if (ismob(holder))
|
||||
isHeld = 1
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
// note remove luminosity processing until can understand how to make this compatible
|
||||
// with the fire checks, etc.
|
||||
|
||||
isHeld = 0
|
||||
if (lastHolder != null)
|
||||
//lastHolder.sd_SetLuminosity(0)
|
||||
lastHolder = null
|
||||
|
||||
if (isHeld == 1)
|
||||
//if (holder != lastHolder && lastHolder != null)
|
||||
//lastHolder.sd_SetLuminosity(0)
|
||||
//holder.sd_SetLuminosity(1)
|
||||
lastHolder = holder
|
||||
|
||||
//sd_SetLuminosity(1)
|
||||
sleep(10)
|
||||
|
||||
if (lastHolder != null)
|
||||
//lastHolder.sd_SetLuminosity(0)
|
||||
lastHolder = null
|
||||
|
||||
//sd_SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] calmly drops and treads on the lit [], putting it out instantly.", user,src.name), 1)
|
||||
src.lit = -1
|
||||
src.damtype = "brute"
|
||||
src.icon_state = icon_butt
|
||||
src.item_state = icon_off
|
||||
src.desc = "A [src.name] butt."
|
||||
src.name = "[src.name] butt"
|
||||
return ..()
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] drops the []. Guess they've had enough for the day.", user, src), 1)
|
||||
dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] calmly drops and treads on the lit [], putting it out instantly.", user,src.name), 1)
|
||||
src.lit = -1
|
||||
src.damtype = "brute"
|
||||
src.icon_state = icon_butt
|
||||
src.item_state = icon_off
|
||||
src.desc = "A [src.name] butt."
|
||||
src.name = "[src.name] butt"
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
////////////
|
||||
// CIGARS //
|
||||
////////////
|
||||
/obj/item/clothing/mask/cigarette/cigar
|
||||
name = "Premium Cigar"
|
||||
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
|
||||
icon_state = "cigaroff"
|
||||
icon_on = "cigaron"
|
||||
icon_off = "cigaroff"
|
||||
icon_butt = "cigarbutt"
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 1500
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
name = "Cohiba Cigar"
|
||||
desc = "There's little more you could want from a cigar."
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
icon_butt = "cigarbutt"
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/havanian
|
||||
name = "Premium Havanian Cigar"
|
||||
desc = "A cigar fit for only the best for the best."
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
icon_butt = "cigarbutt"
|
||||
smoketime = 7200
|
||||
|
||||
/obj/item/weapon/cigbutt
|
||||
name = "Cigarette butt"
|
||||
desc = "A manky old cigarette butt."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigbutt"
|
||||
w_class = 1
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/cigarbutt
|
||||
name = "Cigar butt"
|
||||
desc = "A manky old cigar butt."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigarbutt"
|
||||
w_class = 1
|
||||
throwforce = 1
|
||||
|
||||
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/cigpacket
|
||||
name = "Cigarette packet"
|
||||
desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'cigarettes.dmi'
|
||||
icon_state = "cigpacket"
|
||||
item_state = "cigpacket"
|
||||
w_class = 1
|
||||
throwforce = 2
|
||||
flags = ONBELT | TABLEPASS
|
||||
var
|
||||
cigcount = 6
|
||||
|
||||
/obj/item/weapon/cigpacket/update_icon()
|
||||
src.icon_state = text("cigpacket[]", src.cigcount)
|
||||
src.desc = text("There are [] cigs\s left!", src.cigcount)
|
||||
return
|
||||
|
||||
/obj/item/weapon/cigpacket/attack_hand(mob/user as mob)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(src.cigcount == 0)
|
||||
user << "\red You're out of cigs, shit! How you gonna get through the rest of the day..."
|
||||
return
|
||||
else
|
||||
src.cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
update_icon()
|
||||
src.icon_state = text("cigpacket[]", src.cigcount)
|
||||
src.desc = text("There are [] cigs\s left!", src.cigcount)
|
||||
return
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(src.cigcount == 0)
|
||||
user << "\red You're out of cigs, shit! How you gonna get through the rest of the day..."
|
||||
return
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
src.update_icon()
|
||||
return
|
||||
src.cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/cigpacket/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/trashbag))
|
||||
var/obj/item/weapon/trashbag/S = W
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/weapon/cigpacket/CP in locate(src.x,src.y,src.z))
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/trashbag))
|
||||
var/obj/item/weapon/trashbag/S = W
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/weapon/cigpacket/CP in locate(src.x,src.y,src.z))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += CP;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
break
|
||||
user << "\blue You pick up all trash."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += CP;
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
break
|
||||
user << "\blue You pick up all trash."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The bag is full."
|
||||
S.update_icon()
|
||||
return
|
||||
S.update_icon()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/////////
|
||||
//ZIPPO//
|
||||
/////////
|
||||
#define ZIPPO_LUM 2
|
||||
/obj/item/weapon/zippo
|
||||
name = "Zippo lighter"
|
||||
desc = "The detective's zippo."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
w_class = 1
|
||||
throwforce = 4
|
||||
flags = ONBELT | TABLEPASS | CONDUCT
|
||||
var
|
||||
lit = 0
|
||||
|
||||
/obj/item/weapon/zippo/attack_self(mob/user)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.icon_state = "zippoon"
|
||||
src.item_state = "zippoon"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red Without even breaking stride, [] flips open and lights the [] in one smooth movement.", user, src), 1)
|
||||
|
||||
user.sd_SetLuminosity(user.luminosity + ZIPPO_LUM)
|
||||
spawn(0)
|
||||
process()
|
||||
attack_self(mob/user)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.icon_state = "zippoon"
|
||||
src.item_state = "zippoon"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red Without even breaking stride, [] flips open and lights the [] in one smooth movement.", user, src), 1)
|
||||
|
||||
user.sd_SetLuminosity(user.luminosity + 2)
|
||||
processing_items.Add(src)
|
||||
else
|
||||
src.lit = 0
|
||||
src.icon_state = "zippo"
|
||||
src.item_state = "zippo"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red You hear a quiet click, as [] shuts off the [] without even looking what they're doing. Wow.", user, src), 1)
|
||||
|
||||
user.sd_SetLuminosity(user.luminosity - 2)
|
||||
processing_items.Remove(src)
|
||||
else
|
||||
src.lit = 0
|
||||
src.icon_state = "zippo"
|
||||
src.item_state = "zippo"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red You hear a quiet click, as [] shuts off the [] without even looking what they're doing. Wow.", user, src), 1)
|
||||
|
||||
user.sd_SetLuminosity(user.luminosity - ZIPPO_LUM)
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/zippo/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return ..()
|
||||
return
|
||||
|
||||
if(istype(M.wear_mask,/obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && src.lit)
|
||||
if(M == user)
|
||||
M.wear_mask:light("\red With a single flick of their wrist, [user] smoothly lights their [M.wear_mask.name] with their [src.name]. Damn they're cool.")
|
||||
|
||||
attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
if(istype(M.wear_mask,/obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && src.lit)
|
||||
if(M == user)
|
||||
M.wear_mask:light("\red With a single flick of their wrist, [user] smoothly lights their [M.wear_mask.name] with their [src.name]. Damn they're cool.")
|
||||
else
|
||||
M.wear_mask:light("\red [user] whips the [src.name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light the [M.wear_mask.name] with.")
|
||||
else
|
||||
M.wear_mask:light("\red [user] whips the [src.name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light the [M.wear_mask.name] with.")
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/zippo/process()
|
||||
|
||||
while(src.lit)
|
||||
var/turf/location = src.loc
|
||||
|
||||
if(istype(location, /mob/))
|
||||
var/mob/M = location
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = M.loc
|
||||
if (istype(location, /turf))
|
||||
process()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
sleep(10)
|
||||
|
||||
|
||||
/obj/item/weapon/zippo/pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + ZIPPO_LUM)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/zippo/dropped(mob/user)
|
||||
if(lit)
|
||||
user.sd_SetLuminosity(user.luminosity - ZIPPO_LUM)
|
||||
src.sd_SetLuminosity(ZIPPO_LUM)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/knifezippo/attack_self(mob/user)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.icon_state = "knifezippoon"
|
||||
src.item_state = "knifezippoon"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red Without even breaking stride, [] flips open and lights the [] in one smooth movement.", user, src), 1)
|
||||
|
||||
else
|
||||
src.lit = 0
|
||||
src.icon_state = "knifezippo"
|
||||
src.item_state = "knifezippo"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red You hear a quiet click, as [] shuts off the [] without even looking what they're doing. Wow.", user, src), 1)
|
||||
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/knifezippo/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
/obj/item/weapon/knifezippo/process()
|
||||
|
||||
while(src.lit)
|
||||
var/turf/location = src.loc
|
||||
pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + 2)
|
||||
return
|
||||
|
||||
if(istype(location, /mob/))
|
||||
var/mob/M = location
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = M.loc
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 5)
|
||||
sleep(10)
|
||||
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.sd_SetLuminosity(user.luminosity - 2)
|
||||
src.sd_SetLuminosity(2)
|
||||
return
|
||||
@@ -7,8 +7,6 @@
|
||||
#define ADD "add"
|
||||
#define SET "set"
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
////////////////AMMO SECTION///////////////////
|
||||
///////////////////////////////////////////////
|
||||
@@ -1528,7 +1526,7 @@
|
||||
S.pump()
|
||||
return
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
if(silenced)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
@@ -1566,3 +1564,4 @@
|
||||
if(istype(src, /obj/item/weapon/gun/projectile/shotgun))
|
||||
var/obj/item/weapon/gun/projectile/shotgun/S = src
|
||||
S.pumped++
|
||||
update_icon()
|
||||
|
||||
42
code/game/shuttle_engines.dm
Normal file
42
code/game/shuttle_engines.dm
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
/obj/structure/shuttle
|
||||
name = "shuttle"
|
||||
icon = 'shuttle.dmi'
|
||||
|
||||
/obj/structure/shuttle/engine
|
||||
name = "engine"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/shuttle/engine/heater
|
||||
name = "heater"
|
||||
icon_state = "heater"
|
||||
|
||||
/obj/structure/shuttle/engine/platform
|
||||
name = "platform"
|
||||
icon_state = "platform"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion
|
||||
name = "propulsion"
|
||||
icon_state = "propulsion"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst
|
||||
name = "burst"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst/left
|
||||
name = "left"
|
||||
icon_state = "burst_l"
|
||||
|
||||
/obj/structure/shuttle/engine/propulsion/burst/right
|
||||
name = "right"
|
||||
icon_state = "burst_r"
|
||||
|
||||
/obj/structure/shuttle/engine/router
|
||||
name = "router"
|
||||
icon_state = "router"
|
||||
/obj/machinery/shuttle/engine/heater
|
||||
/obj/machinery/shuttle/engine/propulsion
|
||||
/obj/item/clothing/suit/armor/powered
|
||||
/obj/item/clothing/head/helmet/powered
|
||||
/obj/machinery/shuttle/engine/propulsion/burst
|
||||
@@ -745,11 +745,11 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
|
||||
else
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
/turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
if (!( locate(/obj/machinery/mass_driver, src) ))
|
||||
return 0
|
||||
return ..()
|
||||
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
// if (!( locate(/obj/machinery/mass_driver, src) ))
|
||||
// return 0
|
||||
// return ..()
|
||||
|
||||
/turf/simulated/floor/ex_act(severity)
|
||||
//set src in oview(1)
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
if (M.client.stealth && !usr.client.holder)
|
||||
peeps += "\t[M.client.fakekey]"
|
||||
else if (M.client.goon) //everyone is authed
|
||||
peeps += "\t\red[M.client] [M.client.stealth ? "<i>(as [M.client.fakekey])</i>" : "([html_encode(M.client.goon)])"]"
|
||||
else
|
||||
peeps += "\t[M.client][M.client.stealth ? " <i>(as [M.client.fakekey])</i>" : ""]"
|
||||
|
||||
|
||||
@@ -955,14 +955,14 @@
|
||||
del(O)
|
||||
for(var/obj/grille/O in world)
|
||||
del(O)
|
||||
for(var/obj/machinery/vehicle/pod/O in world)
|
||||
/* for(var/obj/machinery/vehicle/pod/O in world)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
del(O)
|
||||
ok = 1
|
||||
ok = 1*/
|
||||
if("toxic")
|
||||
/* for(var/obj/machinery/atmoalter/siphs/fullairsiphon/O in world)
|
||||
O.t_status = 3
|
||||
@@ -1613,7 +1613,7 @@
|
||||
dat += "<td>Monkey</td>"
|
||||
if(istype(M, /mob/living/carbon/alien))
|
||||
dat += "<td>Alien</td>"
|
||||
dat += {"<td>[(M.client ? "[(M.client.goon ? "<font color=red>" : "<font>")][M.client]</font>" : "No client")]</td>
|
||||
dat += {"<td>[M.client]</font>" : "No client")]</td>
|
||||
<td align=center><A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>X</A></td>
|
||||
<td align=center><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>
|
||||
"}
|
||||
@@ -1658,7 +1658,7 @@
|
||||
dat += "<td>Monkey</td>"
|
||||
if(isalien(M))
|
||||
dat += "<td>Alien</td>"
|
||||
dat += {"<td>[(M.client ? "[(M.client.goon ? "<font color=red>" : "<font>")][M.client]</font>" : "No client")]</td>
|
||||
dat += {"<td>[(M.client ? "[M.client]</font>" : "No client")]</td>
|
||||
<td align=center><A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>X</A></td>
|
||||
<td align=center><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>
|
||||
"}
|
||||
|
||||
@@ -1,333 +1,396 @@
|
||||
/obj/machinery/power/solar/New()
|
||||
..()
|
||||
spawn(10)
|
||||
#define SOLARGENRATE 1500
|
||||
/obj/machinery/power/solar
|
||||
name = "solar panel"
|
||||
desc = "A solar electrical generator."
|
||||
icon = 'power.dmi'
|
||||
icon_state = "sp_base"
|
||||
anchored = 1
|
||||
density = 1
|
||||
directwired = 1
|
||||
use_power = 0
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
var
|
||||
health = 10.0
|
||||
id = 1
|
||||
obscured = 0
|
||||
sunfrac = 0
|
||||
adir = SOUTH
|
||||
ndir = SOUTH
|
||||
turn_angle = 0
|
||||
obj/machinery/power/solar_control/control
|
||||
proc
|
||||
healthcheck()
|
||||
updateicon()
|
||||
update_solar_exposure()
|
||||
broken()
|
||||
|
||||
if(powernet)
|
||||
for(var/obj/machinery/power/solar_control/SC in powernet.nodes)
|
||||
if(SC.id == id)
|
||||
control = SC
|
||||
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if (W)
|
||||
src.add_fingerprint(user)
|
||||
src.health -= W.force
|
||||
New()
|
||||
..()
|
||||
spawn(10)
|
||||
updateicon()
|
||||
update_solar_exposure()
|
||||
if(powernet)
|
||||
for(var/obj/machinery/power/solar_control/SC in powernet.nodes)
|
||||
if(SC.id == id)
|
||||
control = SC
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if (W)
|
||||
src.add_fingerprint(user)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
src.health--
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar/blob_act()
|
||||
src.health--
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if(!(stat & BROKEN))
|
||||
broken()
|
||||
healthcheck()
|
||||
if (src.health <= 0)
|
||||
if(!(stat & BROKEN))
|
||||
broken()
|
||||
else
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
updateicon()
|
||||
overlays = null
|
||||
if(stat & BROKEN)
|
||||
overlays += image('power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
|
||||
else
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
del(src)
|
||||
overlays += image('power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)
|
||||
src.dir = angle2dir(adir)
|
||||
return
|
||||
|
||||
|
||||
update_solar_exposure()
|
||||
if(!sun)
|
||||
return
|
||||
return
|
||||
if(obscured)
|
||||
sunfrac = 0
|
||||
return
|
||||
var/p_angle = abs((360+adir)%360 - (360+sun.angle)%360)
|
||||
if(p_angle > 90) // if facing more than 90deg from sun, zero output
|
||||
sunfrac = 0
|
||||
return
|
||||
sunfrac = cos(p_angle) ** 2
|
||||
|
||||
/obj/machinery/power/solar/proc/updateicon()
|
||||
overlays = null
|
||||
if(stat & BROKEN)
|
||||
overlays += image('power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
|
||||
else
|
||||
overlays += image('power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)
|
||||
src.dir = angle2dir(adir)
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar/proc/update_solar_exposure()
|
||||
if(!sun)
|
||||
return
|
||||
if(obscured)
|
||||
sunfrac = 0
|
||||
return
|
||||
process()
|
||||
if(stat & BROKEN) return
|
||||
if(!control) return
|
||||
if(obscured) return
|
||||
|
||||
var/p_angle = abs((360+adir)%360 - (360+sun.angle)%360)
|
||||
if(p_angle > 90) // if facing more than 90deg from sun, zero output
|
||||
sunfrac = 0
|
||||
return
|
||||
|
||||
sunfrac = cos(p_angle) ** 2
|
||||
|
||||
#define SOLARGENRATE 1500
|
||||
|
||||
/obj/machinery/power/solar/process()
|
||||
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
//return //TODO: FIX
|
||||
|
||||
if(!obscured)
|
||||
var/sgen = SOLARGENRATE * sunfrac
|
||||
add_avail(sgen)
|
||||
if(powernet && control)
|
||||
if(control in powernet.nodes) //this line right here...
|
||||
control.gen += sgen
|
||||
|
||||
if(adir != ndir)
|
||||
spawn(10+rand(0,15))
|
||||
adir = (360+adir+dd_range(-10,10,ndir-adir))%360
|
||||
updateicon()
|
||||
update_solar_exposure()
|
||||
|
||||
/obj/machinery/power/solar/proc/broken()
|
||||
stat |= BROKEN
|
||||
updateicon()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar/meteorhit()
|
||||
if(stat & !BROKEN)
|
||||
broken()
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/machinery/power/solar/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(prob(15))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(25))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
del(src)
|
||||
return
|
||||
if (prob(50))
|
||||
broken()
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
broken()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar/blob_act()
|
||||
if(prob(75))
|
||||
broken()
|
||||
src.density = 0
|
||||
if(adir != ndir)
|
||||
spawn(10+rand(0,15))
|
||||
adir = (360+adir+dd_range(-10,10,ndir-adir))%360
|
||||
updateicon()
|
||||
update_solar_exposure()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/solar_control/New()
|
||||
..()
|
||||
spawn(15)
|
||||
if(!powernet) return
|
||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||
if(S.id != id) continue
|
||||
cdir = S.adir
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/power/solar_control/proc/updateicon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
overlays = null
|
||||
return
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "c_unpowered"
|
||||
overlays = null
|
||||
return
|
||||
|
||||
icon_state = "solar"
|
||||
overlays = null
|
||||
if(cdir > 0)
|
||||
overlays += image('computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir))
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/solar_control/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/solar_control/attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/process()
|
||||
lastgen = gen
|
||||
gen = 0
|
||||
|
||||
if(stat & (NOPOWER | BROKEN))
|
||||
return
|
||||
|
||||
use_power(250)
|
||||
if(track==1 && nexttime < world.timeofday && trackrate)
|
||||
nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
cdir = (cdir+trackrate/abs(trackrate)+360)%360
|
||||
|
||||
set_panels(cdir)
|
||||
broken()
|
||||
stat |= BROKEN
|
||||
updateicon()
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// called by solar tracker when sun position changes
|
||||
/obj/machinery/power/solar_control/proc/tracker_update(var/angle)
|
||||
if(track != 2 || stat & (NOPOWER | BROKEN))
|
||||
return
|
||||
cdir = angle
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/power/solar_control/proc/interact(mob/user)
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
user.machine = src
|
||||
|
||||
var/t = "<TT><B>Solar Generator Control</B><HR><PRE>"
|
||||
t += "Generated power : [round(lastgen)] W<BR><BR>"
|
||||
t += "<B>Orientation</B>: [rate_control(src,"cdir","[cdir]°",1,15)] ([angle2text(cdir)])<BR><BR><BR>"
|
||||
|
||||
t += "<BR><HR><BR><BR>"
|
||||
|
||||
t += "Tracking: "
|
||||
switch(track)
|
||||
if(0)
|
||||
t += "<B>Off</B> <A href='?src=\ref[src];track=1'>Timed</A> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(1)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <B>Timed</B> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(2)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <A href='?src=\ref[src];track=1'>Timed</A> <B>Auto</B><BR>"
|
||||
|
||||
|
||||
t += "Tracking Rate: [rate_control(src,"tdir","[trackrate] deg/h ([trackrate<0 ? "CCW" : "CW"])",5,30,180)]<BR><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A></TT>"
|
||||
user << browse(t, "window=solcon")
|
||||
onclose(user, "solcon")
|
||||
meteorhit()
|
||||
if(stat & !BROKEN)
|
||||
broken()
|
||||
else
|
||||
del(src)
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(prob(15))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(25))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
del(src)
|
||||
return
|
||||
if (prob(50))
|
||||
broken()
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
broken()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(75))
|
||||
broken()
|
||||
src.density = 0
|
||||
|
||||
|
||||
/obj/machinery/power/solar/fake/process()
|
||||
machines.Remove(src)
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/Topic(href, href_list)
|
||||
if(..())
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
return
|
||||
if(href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/solar_control
|
||||
name = "solar panel control"
|
||||
desc = "A controller for solar panel arrays."
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "solar"
|
||||
anchored = 1
|
||||
density = 1
|
||||
directwired = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 20
|
||||
var
|
||||
id = 1
|
||||
cdir = 0
|
||||
gen = 0
|
||||
lastgen = 0
|
||||
track = 2 // 0= off 1=timed 2=auto (tracker)
|
||||
trackrate = 600 // 300-900 seconds
|
||||
trackdir = 1 // 0 =CCW, 1=CW
|
||||
nexttime = 0
|
||||
proc
|
||||
updateicon()
|
||||
tracker_update(var/angle)
|
||||
set_panels(var/cdir)
|
||||
broken()
|
||||
interact(mob/user)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(15)
|
||||
if(!powernet) return
|
||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||
if(S.id != id) continue
|
||||
cdir = S.adir
|
||||
updateicon()
|
||||
|
||||
|
||||
updateicon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
overlays = null
|
||||
return
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "c_unpowered"
|
||||
overlays = null
|
||||
return
|
||||
icon_state = "solar"
|
||||
overlays = null
|
||||
if(cdir > 0)
|
||||
overlays += image('computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir))
|
||||
return
|
||||
|
||||
if(href_list["dir"])
|
||||
cdir = text2num(href_list["dir"])
|
||||
spawn(1)
|
||||
|
||||
attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
interact(user)
|
||||
|
||||
|
||||
attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
interact(user)
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/computerframe/A = new /obj/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
process()
|
||||
lastgen = gen
|
||||
gen = 0
|
||||
|
||||
if(stat & (NOPOWER | BROKEN))
|
||||
return
|
||||
|
||||
use_power(250)
|
||||
if(track==1 && nexttime < world.timeofday && trackrate)
|
||||
nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
cdir = (cdir+trackrate/abs(trackrate)+360)%360
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
|
||||
if(href_list["rate control"])
|
||||
if(href_list["cdir"])
|
||||
src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// called by solar tracker when sun position changes
|
||||
tracker_update(var/angle)
|
||||
if(track != 2 || stat & (NOPOWER | BROKEN))
|
||||
return
|
||||
cdir = angle
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
interact(mob/user)
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
user.machine = src
|
||||
|
||||
var/t = "<TT><B>Solar Generator Control</B><HR><PRE>"
|
||||
t += "Generated power : [round(lastgen)] W<BR><BR>"
|
||||
t += "<B>Orientation</B>: [rate_control(src,"cdir","[cdir]°",1,15)] ([angle2text(cdir)])<BR><BR><BR>"
|
||||
t += "<BR><HR><BR><BR>"
|
||||
t += "Tracking: "
|
||||
switch(track)
|
||||
if(0)
|
||||
t += "<B>Off</B> <A href='?src=\ref[src];track=1'>Timed</A> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(1)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <B>Timed</B> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(2)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <A href='?src=\ref[src];track=1'>Timed</A> <B>Auto</B><BR>"
|
||||
|
||||
t += "Tracking Rate: [rate_control(src,"tdir","[trackrate] deg/h ([trackrate<0 ? "CCW" : "CW"])",5,30,180)]<BR><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A></TT>"
|
||||
user << browse(t, "window=solcon")
|
||||
onclose(user, "solcon")
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
return
|
||||
if(href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
if(href_list["dir"])
|
||||
cdir = text2num(href_list["dir"])
|
||||
spawn(1)
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
if(href_list["tdir"])
|
||||
src.trackrate = dd_range(-7200,7200,src.trackrate+text2num(href_list["tdir"]))
|
||||
|
||||
if(href_list["rate control"])
|
||||
if(href_list["cdir"])
|
||||
src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360)
|
||||
spawn(1)
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
if(href_list["tdir"])
|
||||
src.trackrate = dd_range(-7200,7200,src.trackrate+text2num(href_list["tdir"]))
|
||||
if(src.trackrate) nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
|
||||
if(href_list["track"])
|
||||
if(src.trackrate) nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
track = text2num(href_list["track"])
|
||||
if(track == 2)
|
||||
var/obj/machinery/power/tracker/T = locate() in world
|
||||
if(T)
|
||||
cdir = T.sun_angle
|
||||
|
||||
if(href_list["track"])
|
||||
if(src.trackrate) nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
track = text2num(href_list["track"])
|
||||
if(track == 2)
|
||||
var/obj/machinery/power/tracker/T = locate() in world
|
||||
if(T)
|
||||
cdir = T.sun_angle
|
||||
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/proc/set_panels(var/cdir)
|
||||
if(!powernet) return
|
||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||
if(S.id != id) continue
|
||||
S.control = src
|
||||
S.ndir = cdir
|
||||
|
||||
/obj/machinery/power/solar_control/power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
set_panels(cdir)
|
||||
updateicon()
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
stat |= NOPOWER
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
set_panels(var/cdir)
|
||||
if(!powernet) return
|
||||
for(var/obj/machinery/power/solar/S in powernet.nodes)
|
||||
if(S.id != id) continue
|
||||
S.control = src
|
||||
S.ndir = cdir
|
||||
|
||||
|
||||
power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
updateicon()
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
stat |= NOPOWER
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/power/solar_control/proc/broken()
|
||||
stat |= BROKEN
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/power/solar_control/meteorhit()
|
||||
broken()
|
||||
return
|
||||
stat |= BROKEN
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/power/solar_control/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
broken()
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
broken()
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/blob_act()
|
||||
if (prob(75))
|
||||
meteorhit()
|
||||
broken()
|
||||
src.density = 0
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
broken()
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
broken()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if (prob(75))
|
||||
broken()
|
||||
src.density = 0
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/obj/machinery/sec_lock//P'sure this was part of the tunnel
|
||||
name = "Security Pad"
|
||||
desc = "A lock, for doors. Used by security."
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "sec_lock"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/a_type = 0.0
|
||||
var/obj/machinery/door/d1 = null
|
||||
var/obj/machinery/door/d2 = null
|
||||
anchored = 1.0
|
||||
req_access = list(access_brig)
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/move/airtunnel/process()
|
||||
if (!( src.deployed ))
|
||||
return null
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
/obj/machinery/vehicle
|
||||
name = "Vehicle Pod"
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "podfire"
|
||||
density = 1
|
||||
flags = FPRINT
|
||||
anchored = 1.0
|
||||
var/speed = 10.0
|
||||
var/maximum_speed = 10.0
|
||||
var/can_rotate = 1
|
||||
var/can_maximize_speed = 0
|
||||
var/one_person_only = 0
|
||||
use_power = 0
|
||||
|
||||
/obj/machinery/vehicle/pod
|
||||
name = "Escape Pod"
|
||||
desc = "A pod, for, moving in space"
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "pod"
|
||||
can_rotate = 0
|
||||
var/id = 1.0
|
||||
|
||||
/obj/machinery/vehicle/recon
|
||||
name = "Reconaissance Pod"
|
||||
desc = "A fast moving pod."
|
||||
icon = 'escapepod.dmi'
|
||||
icon_state = "recon"
|
||||
speed = 1.0
|
||||
maximum_speed = 30.0
|
||||
can_maximize_speed = 1
|
||||
one_person_only = 1
|
||||
|
||||
|
||||
/obj/machinery/vehicle/process()
|
||||
if (src.speed)
|
||||
if (src.speed <= 10)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
17091
maps/tgstation.2.0.8.dmm
17091
maps/tgstation.2.0.8.dmm
File diff suppressed because it is too large
Load Diff
@@ -310,6 +310,7 @@
|
||||
#include "code\game\landmarks.dm"
|
||||
#include "code\game\master_controller.dm"
|
||||
#include "code\game\prisonshuttle.dm"
|
||||
#include "code\game\shuttle_engines.dm"
|
||||
#include "code\game\smoothwall.dm"
|
||||
#include "code\game\sound.dm"
|
||||
#include "code\game\specops_shuttle.dm"
|
||||
@@ -824,6 +825,7 @@
|
||||
#include "code\modules\research\server.dm"
|
||||
#include "code\WorkInProgress\buildmode.dm"
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\minihivebottest.dm"
|
||||
#include "code\WorkInProgress\organs\organs.dm"
|
||||
#include "code\WorkInProgress\recycling\conveyor.dm"
|
||||
#include "code\WorkInProgress\recycling\disposal-construction.dm"
|
||||
|
||||
Reference in New Issue
Block a user