mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Sanity for funtimes
This commit is contained in:
@@ -71,7 +71,8 @@ var/list/exclude = list("loc", "locs", "parent_type", "vars", "verbs", "type", "
|
|||||||
#ifdef DEBUG_OBJECT_POOL
|
#ifdef DEBUG_OBJECT_POOL
|
||||||
world << text("DEBUG_OBJECT_POOL: getFromPool([]) [] left.", A, length(masterPool[A]))
|
world << text("DEBUG_OBJECT_POOL: getFromPool([]) [] left.", A, length(masterPool[A]))
|
||||||
#endif
|
#endif
|
||||||
|
if(!O)
|
||||||
|
O = new A
|
||||||
O.loc = B
|
O.loc = B
|
||||||
return O
|
return O
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
animals lunging, etc.
|
animals lunging, etc.
|
||||||
*/
|
*/
|
||||||
/mob/proc/RangedAttack(var/atom/A, var/params)
|
/mob/proc/RangedAttack(var/atom/A, var/params)
|
||||||
if(!mutations.len) return
|
if(!mutations || !mutations.len) return
|
||||||
if((M_LASER in mutations) && a_intent == "hurt")
|
if((M_LASER in mutations) && a_intent == "hurt")
|
||||||
LaserEyes(A) // moved into a proc below
|
LaserEyes(A) // moved into a proc below
|
||||||
else if(M_TK in mutations)
|
else if(M_TK in mutations)
|
||||||
|
|||||||
@@ -55,6 +55,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
// For the typer, the input is enabled. Buffer the typed text
|
// For the typer, the input is enabled. Buffer the typed text
|
||||||
|
if(!istype(editingcode))
|
||||||
|
return
|
||||||
storedcode = "[winget(editingcode, "tcscode", "text")]"
|
storedcode = "[winget(editingcode, "tcscode", "text")]"
|
||||||
winset(editingcode, "tcscode", "is-disabled=false")
|
winset(editingcode, "tcscode", "is-disabled=false")
|
||||||
|
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ Alien plants should do something if theres a lot of poison
|
|||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
return
|
return
|
||||||
user.delayNextAttack(10)
|
user.delayNextAttack(10)
|
||||||
if(W.attack_verb.len)
|
if(W.attack_verb && W.attack_verb.len)
|
||||||
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||||
else
|
else
|
||||||
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||||
|
|||||||
@@ -71,5 +71,7 @@
|
|||||||
|
|
||||||
var/obj/structure/grille/Grille = getFromPool(/obj/structure/grille, user.loc)
|
var/obj/structure/grille/Grille = getFromPool(/obj/structure/grille, user.loc)
|
||||||
user << "<span class='notice'>You assembled a grille!</span>"
|
user << "<span class='notice'>You assembled a grille!</span>"
|
||||||
|
if(!Grille)
|
||||||
|
Grille = new(user.loc)
|
||||||
Grille.add_fingerprint(user)
|
Grille.add_fingerprint(user)
|
||||||
use(2)
|
use(2)
|
||||||
|
|||||||
@@ -407,7 +407,8 @@ var/const/POS_HEADER = {"<html>
|
|||||||
src.attack_hand(usr)
|
src.attack_hand(usr)
|
||||||
return
|
return
|
||||||
if(usr != logged_in)
|
if(usr != logged_in)
|
||||||
usr << "\red [logged_in.name] is already logged in. You cannot use this machine until they log out."
|
if(logged_in)
|
||||||
|
usr << "\red [logged_in.name] is already logged in. You cannot use this machine until they log out."
|
||||||
return
|
return
|
||||||
if("act" in href_list)
|
if("act" in href_list)
|
||||||
switch(href_list["act"])
|
switch(href_list["act"])
|
||||||
@@ -471,8 +472,9 @@ var/const/POS_HEADER = {"<html>
|
|||||||
if(!newtext) return
|
if(!newtext) return
|
||||||
var/pid = href_list["setpname"]
|
var/pid = href_list["setpname"]
|
||||||
var/line_item/LI = products[pid]
|
var/line_item/LI = products[pid]
|
||||||
LI.name = newtext
|
if(LI)
|
||||||
products[pid]=LI
|
LI.name = newtext
|
||||||
|
products[pid]=LI
|
||||||
else if("setprice" in href_list)
|
else if("setprice" in href_list)
|
||||||
var/newprice = input(usr,"Enter the product's price.") as num
|
var/newprice = input(usr,"Enter the product's price.") as num
|
||||||
if(!newprice) return
|
if(!newprice) return
|
||||||
|
|||||||
@@ -117,22 +117,26 @@
|
|||||||
set category = "Object"
|
set category = "Object"
|
||||||
set name = "Adjust welding goggles"
|
set name = "Adjust welding goggles"
|
||||||
set src in usr
|
set src in usr
|
||||||
|
var/mob/C = usr
|
||||||
if(usr.canmove && !usr.stat && !usr.restrained())
|
if(!usr)
|
||||||
|
if(!ismob(loc))
|
||||||
|
return
|
||||||
|
C = loc
|
||||||
|
if(C.canmove && !C.stat && !C.restrained())
|
||||||
if(src.up)
|
if(src.up)
|
||||||
src.up = !src.up
|
src.up = !src.up
|
||||||
src.flags |= GLASSESCOVERSEYES
|
src.flags |= GLASSESCOVERSEYES
|
||||||
flags_inv |= HIDEEYES
|
flags_inv |= HIDEEYES
|
||||||
icon_state = initial(icon_state)
|
icon_state = initial(icon_state)
|
||||||
usr << "You flip the [src] down to protect your eyes."
|
C << "You flip the [src] down to protect your eyes."
|
||||||
else
|
else
|
||||||
src.up = !src.up
|
src.up = !src.up
|
||||||
src.flags &= ~HEADCOVERSEYES
|
src.flags &= ~HEADCOVERSEYES
|
||||||
flags_inv &= ~HIDEEYES
|
flags_inv &= ~HIDEEYES
|
||||||
icon_state = "[initial(icon_state)]up"
|
icon_state = "[initial(icon_state)]up"
|
||||||
usr << "You push the [src] up out of your face."
|
C << "You push the [src] up out of your face."
|
||||||
|
|
||||||
usr.update_inv_glasses()
|
C.update_inv_glasses()
|
||||||
|
|
||||||
/obj/item/clothing/glasses/welding/superior
|
/obj/item/clothing/glasses/welding/superior
|
||||||
name = "superior welding goggles"
|
name = "superior welding goggles"
|
||||||
|
|||||||
@@ -373,7 +373,7 @@
|
|||||||
if(A && A.anti_ethereal)
|
if(A && A.anti_ethereal)
|
||||||
mob << "<span class='warning'>A strong force repels you from this area!</span>"
|
mob << "<span class='warning'>A strong force repels you from this area!</span>"
|
||||||
else
|
else
|
||||||
if(T.holy && isobserver(mob) && ((mob.invisibility == 0) || (ticker.mode && (mob.mind in ticker.mode.cult))))
|
if((T && T.holy) && isobserver(mob) && ((mob.invisibility == 0) || (ticker.mode && (mob.mind in ticker.mode.cult))))
|
||||||
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
|
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
|
||||||
else
|
else
|
||||||
mob.loc = get_step(mob, direct)
|
mob.loc = get_step(mob, direct)
|
||||||
|
|||||||
@@ -464,6 +464,8 @@ datum
|
|||||||
return
|
return
|
||||||
|
|
||||||
add_reagent(var/reagent, var/amount, var/list/data=null)
|
add_reagent(var/reagent, var/amount, var/list/data=null)
|
||||||
|
if(!my_atom)
|
||||||
|
return 0
|
||||||
if(!isnum(amount)) return 1
|
if(!isnum(amount)) return 1
|
||||||
update_total()
|
update_total()
|
||||||
if(total_volume + amount > maximum_volume)
|
if(total_volume + amount > maximum_volume)
|
||||||
|
|||||||
@@ -3621,7 +3621,8 @@ datum
|
|||||||
src.data++
|
src.data++
|
||||||
|
|
||||||
var/d = data
|
var/d = data
|
||||||
|
if(!holder)
|
||||||
|
del(src)
|
||||||
// make all the beverages work together
|
// make all the beverages work together
|
||||||
for(var/datum/reagent/ethanol/A in holder.reagent_list)
|
for(var/datum/reagent/ethanol/A in holder.reagent_list)
|
||||||
if(isnum(A.data)) d += A.data
|
if(isnum(A.data)) d += A.data
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
if(!istype(L, /list)) return
|
if(!istype(L, /list)) return
|
||||||
if(isnum(pos))
|
if(isnum(pos))
|
||||||
if(!value)
|
if(!value)
|
||||||
if(L.len >= pos)
|
if(L.len >= pos && !(pos > L.len))
|
||||||
return L[pos]
|
return L[pos]
|
||||||
else
|
else
|
||||||
if(L.len >= pos)
|
if(L.len >= pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user