mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Misc.
This commit is contained in:
@@ -14,8 +14,7 @@
|
||||
return -1
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/turf/simulated/New()
|
||||
@@ -26,19 +25,16 @@
|
||||
// STRUCTURES
|
||||
|
||||
/obj/structure/Destroy()
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
updateVisibility(src)
|
||||
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Destroy()
|
||||
if(ticker)
|
||||
updateVisibility(src)
|
||||
updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
|
||||
@@ -303,7 +303,6 @@
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
if(Bump(original))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(first_step)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
|
||||
/spell
|
||||
var/name = "Spell"
|
||||
var/desc = "A spell"
|
||||
parent_type = /datum
|
||||
var/name = "Spell"
|
||||
var/desc = "A spell"
|
||||
parent_type = /datum
|
||||
var/panel = "Spells"//What panel the proc holder needs to go on.
|
||||
|
||||
var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
|
||||
@@ -25,7 +25,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
var/range = 7 //the range of the spell; outer radius for aoe spells
|
||||
var/message = "" //whatever it says to the guy affected by it
|
||||
var/selection_type = "view" //can be "range" or "view"
|
||||
var/atom/movable/holder //where the spell is. Normally the user, can be an item
|
||||
var/atom/movable/holder //where the spell is. Normally the user, can be an item
|
||||
var/duration = 0 //how long the spell lasts
|
||||
|
||||
var/list/spell_levels = list(Sp_SPEED = 0, Sp_POWER = 0) //the current spell levels - total spell levels can be obtained by just adding the two values
|
||||
@@ -52,8 +52,8 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
var/hud_state = "" //name of the icon used in generating the spell hud object
|
||||
var/override_base = ""
|
||||
|
||||
var/obj/screen/connected_button
|
||||
|
||||
var/obj/screen/connected_button
|
||||
|
||||
///////////////////////
|
||||
///SETUP AND PROCESS///
|
||||
///////////////////////
|
||||
@@ -178,18 +178,19 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
|
||||
/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
|
||||
|
||||
if(!(src in user.spell_list) && holder == user)
|
||||
if(!(src in user.spell_list) && holder == user)
|
||||
error("[user] utilized the spell '[src]' without having it.")
|
||||
user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
|
||||
return 0
|
||||
|
||||
if(silenced > 0)
|
||||
return
|
||||
|
||||
var/turf/user_turf = get_turf(user)
|
||||
if(!user_turf)
|
||||
user << "<span class='warning'>You cannot cast spells in null space!</span>"
|
||||
|
||||
if(spell_flags & Z2NOCAST && (user_turf.z in config.admin_levels)) //Certain spells are not allowed on the centcomm zlevel
|
||||
var/turf/user_turf = get_turf(user)
|
||||
if(!user_turf)
|
||||
user << "<span class='warning'>You cannot cast spells in null space!</span>"
|
||||
|
||||
if(spell_flags & Z2NOCAST && (user_turf.z in config.admin_levels)) //Certain spells are not allowed on the centcomm zlevel
|
||||
return 0
|
||||
|
||||
if(spell_flags & CONSTRUCT_CHECK)
|
||||
@@ -197,7 +198,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(findNullRod(T))
|
||||
return 0
|
||||
|
||||
if(istype(user, /mob/living/simple_animal) && holder == user)
|
||||
if(istype(user, /mob/living/simple_animal) && holder == user)
|
||||
var/mob/living/simple_animal/SA = user
|
||||
if(SA.purge)
|
||||
SA << "<span class='warning'>The nullrod's power interferes with your own!</span>"
|
||||
@@ -206,7 +207,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone
|
||||
return 0
|
||||
|
||||
if(!(spell_flags & GHOSTCAST) && holder == user)
|
||||
if(!(spell_flags & GHOSTCAST) && holder == user)
|
||||
if(user.stat && !(spell_flags & STATALLOWED))
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
@@ -217,7 +218,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
return 0
|
||||
|
||||
var/spell/noclothes/spell = locate() in user.spell_list
|
||||
if((spell_flags & NEEDSCLOTHES) && !(spell && istype(spell)) && holder == user)//clothes check
|
||||
if((spell_flags & NEEDSCLOTHES) && !(spell && istype(spell)) && holder == user)//clothes check
|
||||
if(!user.wearing_wiz_garb())
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user