mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Stun batons will no longer randomly stun people when they bump/are bumped by a guy holding one.
Bit of blob mode work. Added a Blob Core sprite by Scottzar git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2247 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -449,7 +449,7 @@ obj/indicator
|
|||||||
var/measure = "temperature"
|
var/measure = "temperature"
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
|
||||||
proc/process()
|
process()
|
||||||
icon_state = measurement()
|
icon_state = measurement()
|
||||||
|
|
||||||
proc/measurement()
|
proc/measurement()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
|
dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
|
||||||
if(!z_offset)
|
if(!z_offset)
|
||||||
z_offset = world.maxz+1
|
z_offset = world.maxz+1
|
||||||
@@ -45,6 +44,7 @@ dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
|
|||||||
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len) break
|
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len) break
|
||||||
sleep(-1)
|
sleep(-1)
|
||||||
|
|
||||||
|
|
||||||
dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num)
|
dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num)
|
||||||
set background = 1
|
set background = 1
|
||||||
|
|
||||||
@@ -104,13 +104,14 @@ dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/
|
|||||||
var/atom/instance
|
var/atom/instance
|
||||||
var/dmm_suite/preloader/_preloader = new(fields)
|
var/dmm_suite/preloader/_preloader = new(fields)
|
||||||
if(ispath(atom_def,/area))
|
if(ispath(atom_def,/area))
|
||||||
|
|
||||||
var/turf/A = locate(xcrd,ycrd,zcrd)
|
var/turf/A = locate(xcrd,ycrd,zcrd)
|
||||||
if(A.loc.name == "space")
|
if(A.loc.name == "Space")
|
||||||
instance = locate(atom_def)
|
instance = locate(atom_def)
|
||||||
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
if(instance)
|
||||||
|
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
//global.current_preloader = _preloader
|
||||||
instance = new atom_def(locate(xcrd,ycrd,zcrd))
|
instance = new atom_def(locate(xcrd,ycrd,zcrd))
|
||||||
if(_preloader)
|
if(_preloader)
|
||||||
_preloader.load(instance)
|
_preloader.load(instance)
|
||||||
@@ -118,7 +119,6 @@ dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/
|
|||||||
if(!findtext(copytext(model,dpos,0),",")) break
|
if(!findtext(copytext(model,dpos,0),",")) break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dmm_suite/proc/trim_text(var/what as text)
|
dmm_suite/proc/trim_text(var/what as text)
|
||||||
while(length(what) && findtext(what," ",1,2))
|
while(length(what) && findtext(what," ",1,2))
|
||||||
what=copytext(what,2,0)
|
what=copytext(what,2,0)
|
||||||
@@ -126,6 +126,13 @@ dmm_suite/proc/trim_text(var/what as text)
|
|||||||
what=copytext(what,1,length(what))
|
what=copytext(what,1,length(what))
|
||||||
return what
|
return what
|
||||||
|
|
||||||
|
/*
|
||||||
|
var/global/dmm_suite/preloader/current_preloader = null
|
||||||
|
atom/New()
|
||||||
|
if(global.current_preloader)
|
||||||
|
global.current_preloader.load(src)
|
||||||
|
..()
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
dmm_suite/preloader
|
dmm_suite/preloader
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
B.Life()
|
B.Life()
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode/blob/proc/stage()//Still needs worrrrrk
|
/datum/game_mode/blob/proc/stage()
|
||||||
if (world.timeofday < next_stage)
|
if (world.timeofday < next_stage)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -75,7 +75,8 @@
|
|||||||
send_intercept(1)
|
send_intercept(1)
|
||||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||||
if (aiPlayer.client)
|
if (aiPlayer.client)
|
||||||
var/law = "The station is under a quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving."
|
// var/law = "The station is under a quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving."
|
||||||
|
var/law = "The station is under quarantine. The biohazard must be destroyed at all costs and must not be allowed to spread. Anyone using a space suit for any reason other than to destroy the biohazard is to be terminated."
|
||||||
aiPlayer.set_zeroth_law(law)
|
aiPlayer.set_zeroth_law(law)
|
||||||
aiPlayer << "Laws Updated: [law]"
|
aiPlayer << "Laws Updated: [law]"
|
||||||
stage = 1
|
stage = 1
|
||||||
@@ -85,7 +86,7 @@
|
|||||||
if (1)
|
if (1)
|
||||||
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||||
world << sound('outbreak5.ogg')
|
world << sound('outbreak5.ogg')
|
||||||
// autoexpand = 0//The blob now has to live on its own
|
autoexpand = 0//The blob now has to live on its own
|
||||||
stage = 2
|
stage = 2
|
||||||
// now check every minute
|
// now check every minute
|
||||||
next_stage = world.timeofday + 600
|
next_stage = world.timeofday + 600
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
command_alert("Uncontrolled spread of the biohazard onboard the station. We have issued directive 7-12 for [station_name()]. Any living Heads of Staff are ordered to enact directive 7-12 at any cost, a print out with detailed instructions has been sent to your communications computers.", "Biohazard Alert")
|
command_alert("Uncontrolled spread of the biohazard onboard the station. We have issued directive 7-12 for [station_name()]. Any living Heads of Staff are ordered to enact directive 7-12 at any cost, a print out with detailed instructions has been sent to your communications computers.", "Biohazard Alert")
|
||||||
send_intercept(2)
|
send_intercept(2)
|
||||||
declared = 2
|
declared = 2
|
||||||
if(blobs.len > 700)
|
if(blobs.len > 700)//This might need work
|
||||||
stage = 3
|
stage = 3
|
||||||
next_stage = world.timeofday + 600
|
next_stage = world.timeofday + 600
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
|
|
||||||
proc/check_mutations()//These could be their own objects I guess
|
proc/check_mutations()//These could be their own objects I guess
|
||||||
if(blobtype != "Blob") return
|
if(blobtype != "Blob") return
|
||||||
desc = "This really needs a better sprite."
|
|
||||||
//Spaceeeeeeblobbb
|
//Spaceeeeeeblobbb
|
||||||
if((istype(src.loc, /turf/space)) || (blobdebug == 4))
|
if((istype(src.loc, /turf/space)) || (blobdebug == 4))
|
||||||
active = 0
|
active = 0
|
||||||
@@ -68,7 +67,7 @@
|
|||||||
brute_resist = 2
|
brute_resist = 2
|
||||||
fire_resist = 2
|
fire_resist = 2
|
||||||
name = "blob core"
|
name = "blob core"
|
||||||
icon_state = "blob_node"//needs a new sprite
|
icon_state = "blob_core"
|
||||||
blobtype = "Core"
|
blobtype = "Core"
|
||||||
active_blobs -= src
|
active_blobs -= src
|
||||||
processing_objects.Add(src)
|
processing_objects.Add(src)
|
||||||
@@ -108,7 +107,7 @@
|
|||||||
if(check_mutations())
|
if(check_mutations())
|
||||||
return
|
return
|
||||||
|
|
||||||
if((blobtype == "Blob") && (pulse <= 2))
|
if((blobtype == "Blob") && (pulse <= 2) && (prob(30)))
|
||||||
blobdebug = 4
|
blobdebug = 4
|
||||||
check_mutations()
|
check_mutations()
|
||||||
return
|
return
|
||||||
@@ -181,7 +180,7 @@
|
|||||||
else
|
else
|
||||||
T.blob_act()
|
T.blob_act()
|
||||||
del(B)
|
del(B)
|
||||||
for(var/atom/A in T)//This might be killing the spores, it IS killing the spores and come to think of it I am ok with this
|
for(var/atom/A in T)
|
||||||
A.blob_act()
|
A.blob_act()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -241,6 +240,18 @@
|
|||||||
src.update()
|
src.update()
|
||||||
|
|
||||||
|
|
||||||
|
proc/revert()
|
||||||
|
name = "blob"
|
||||||
|
icon_state = "blob"
|
||||||
|
brute_resist = 4
|
||||||
|
fire_resist = 1
|
||||||
|
blobtype = "Blob"
|
||||||
|
blobdebug = 0
|
||||||
|
health = (health/2)
|
||||||
|
active_blobs += src
|
||||||
|
src.update()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
/datum/station_state/proc/count()
|
/datum/station_state/proc/count()
|
||||||
for(var/turf/T in world)
|
for(var/turf/T in world)
|
||||||
|
|||||||
@@ -68,19 +68,19 @@
|
|||||||
return ..(gibbed)
|
return ..(gibbed)
|
||||||
|
|
||||||
|
|
||||||
/mob/living/blob/bullet_act(var/obj/item/projectile/Proj)
|
/mob/living/blob/bullet_act(var/obj/item/projectile/Proj, var/datum/organ/external/def_zone)
|
||||||
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
for(var/i = 1, i<= Proj.mobdamage.len, i++)
|
||||||
switch(i)
|
switch(i)
|
||||||
if(1)
|
if(1)
|
||||||
bruteloss = Proj.mobdamage[BRUTE]
|
bruteloss += Proj.mobdamage[BRUTE]
|
||||||
if(2)
|
if(2)
|
||||||
fireloss = Proj.mobdamage[BURN]
|
fireloss += Proj.mobdamage[BURN]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/mob/living/blob/blob_act()
|
/mob/living/blob/blob_act()
|
||||||
src << "The blob attempts to reabsorb you."
|
src << "The blob attempts to reabsorb you."
|
||||||
toxloss += 10
|
toxloss += 20
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -108,6 +108,10 @@
|
|||||||
usr << "There is another node nearby, move away from it!"
|
usr << "There is another node nearby, move away from it!"
|
||||||
creating_blob = 0
|
creating_blob = 0
|
||||||
return
|
return
|
||||||
|
for(var/obj/blob/blob in orange(2))
|
||||||
|
if(blob.blobtype == "Factory")
|
||||||
|
usr << "There is a porus blob nearby, move away from it!"
|
||||||
|
creating_blob = 0
|
||||||
B.blobdebug = 2
|
B.blobdebug = 2
|
||||||
spawn(0)
|
spawn(0)
|
||||||
B.Life()
|
B.Life()
|
||||||
@@ -134,7 +138,7 @@
|
|||||||
usr << "Unable to use this blob, find another one."
|
usr << "Unable to use this blob, find another one."
|
||||||
creating_blob = 0
|
creating_blob = 0
|
||||||
return
|
return
|
||||||
for(var/obj/blob/blob in orange(1))//Not right next to nodes/cores
|
for(var/obj/blob/blob in orange(2))//Not right next to nodes/cores
|
||||||
if(blob.blobtype == "Node")
|
if(blob.blobtype == "Node")
|
||||||
usr << "There is a node nearby, move away from it!"
|
usr << "There is a node nearby, move away from it!"
|
||||||
creating_blob = 0
|
creating_blob = 0
|
||||||
@@ -143,6 +147,10 @@
|
|||||||
usr << "There is a core nearby, move away from it!"
|
usr << "There is a core nearby, move away from it!"
|
||||||
creating_blob = 0
|
creating_blob = 0
|
||||||
return
|
return
|
||||||
|
if(blob.blobtype == "Factory")
|
||||||
|
usr << "There is another porous blob nearby, move away from it!"
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
B.blobdebug = 3
|
B.blobdebug = 3
|
||||||
spawn(0)
|
spawn(0)
|
||||||
B.Life()
|
B.Life()
|
||||||
@@ -150,6 +158,54 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/blob/verb/revert()
|
||||||
|
set category = "Blob"
|
||||||
|
set name = "Purge Defense"
|
||||||
|
set desc = "Removes a porous blob."
|
||||||
|
if(creating_blob) return
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
creating_blob = 1
|
||||||
|
if(!T)
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
|
var/obj/blob/B = (locate(/obj/blob) in T)
|
||||||
|
if(!B)
|
||||||
|
usr << "There is no blob here!"
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
|
if(B.blobtype != "Factory")
|
||||||
|
usr << "Unable to use this blob, find another one."
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
|
B.revert()
|
||||||
|
src.gib()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/blob/verb/spawn_blob()
|
||||||
|
set category = "Blob"
|
||||||
|
set name = "Create new blob"
|
||||||
|
set desc = "Attempts to create a new blob in this tile, note might not work."
|
||||||
|
if(creating_blob) return
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
creating_blob = 1
|
||||||
|
if(!T)
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
|
var/obj/blob/B = (locate(/obj/blob) in T)
|
||||||
|
if(B)
|
||||||
|
usr << "There is a blob here!"
|
||||||
|
creating_blob = 0
|
||||||
|
return
|
||||||
|
if(prob(50))
|
||||||
|
new/obj/blob(src.loc)
|
||||||
|
src << "\blue Success."
|
||||||
|
else
|
||||||
|
src << "\red Creation failed."
|
||||||
|
src.gib()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
///mob/proc/Blobize()
|
///mob/proc/Blobize()
|
||||||
/client/proc/Blobize()//Mostly stolen from the respawn command
|
/client/proc/Blobize()//Mostly stolen from the respawn command
|
||||||
set category = "Debug"
|
set category = "Debug"
|
||||||
@@ -161,11 +217,9 @@
|
|||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
var/input = input(src, "Please specify which key will be turned into a bloby.", "Key", "")
|
var/input = input(src, "Please specify which key will be turned into a bloby.", "Key", "")
|
||||||
if(!input)
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/dead/observer/G_found
|
var/mob/dead/observer/G_found
|
||||||
if(input == "Random")
|
if(!input)
|
||||||
var/list/ghosts = list()
|
var/list/ghosts = list()
|
||||||
for(var/mob/dead/observer/G in world)
|
for(var/mob/dead/observer/G in world)
|
||||||
if(G.client)
|
if(G.client)
|
||||||
|
|||||||
@@ -85,27 +85,8 @@
|
|||||||
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
|
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
|
||||||
if(Metroid.Victim == tmob)
|
if(Metroid.Victim == tmob)
|
||||||
Metroid.UpdateFeed()
|
Metroid.UpdateFeed()
|
||||||
|
|
||||||
return
|
return
|
||||||
if(istype(equipped(), /obj/item/weapon/melee/baton)) // add any other item paths you think are necessary
|
|
||||||
if(loc:sd_lumcount < 3 || blinded)
|
|
||||||
var/obj/item/weapon/W = equipped()
|
|
||||||
if (world.time > lastDblClick+2)
|
|
||||||
lastDblClick = world.time
|
|
||||||
if((prob(40)) || (prob(95) && mutations & CLOWN))
|
|
||||||
//src << "\red You accidentally stun yourself with the [W.name]."
|
|
||||||
visible_message("\red [src] accidentally stun \himself with the [W.name].", \
|
|
||||||
"\red You accidentally stun yourself with the [W.name].")
|
|
||||||
weakened = max(12, weakened)
|
|
||||||
else
|
|
||||||
visible_message("\red[src] accidentally bumps into [tmob] with the [W.name].", \
|
|
||||||
"\red You accidentally bumps into [tmob] with the [W.name].")
|
|
||||||
tmob.weakened = max(4, tmob.weakened)
|
|
||||||
tmob.stunned = max(4, tmob.stunned)
|
|
||||||
playsound(loc, 'Egloves.ogg', 50, 1, -1)
|
|
||||||
W:charges--
|
|
||||||
now_pushing = 0
|
|
||||||
return
|
|
||||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||||
if(prob(40) && !(mutations & FAT))
|
if(prob(40) && !(mutations & FAT))
|
||||||
visible_message("\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>", \
|
visible_message("\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>", \
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user